Advertisement:

Author Topic: CSS Notification messages instead of Flash  (Read 2291 times)

webbuster

  • Newbie
  • *
  • Posts: 32
CSS Notification messages instead of Flash
« on: June 29, 2011, 01:45:15 am »
Hi I was wondering what is the best way to use CSS Notification messages instead of flash that is used in OSClass I have attached a picture so you know what I mean.



Thanks, Cam

Juan Ramón

  • Osclass Developer
  • Hero Member
  • *****
  • Posts: 2382
Re: CSS Notification messages instead of Flash
« Reply #1 on: June 29, 2011, 02:04:07 pm »
When you use flash messages (it's how we call it in OSClass core), it prints this html code:
Code: [Select]
<div id="FlashMessage" class="FlashMessage error">
    message
</div>

There are three types of message:
    - Error messages:
Code: [Select]
        <div id="FlashMessage" class="FlashMessage error">
            message
        </div>
    - Info messages:
Code: [Select]
        <div id="FlashMessage" class="FlashMessage info">
            message
        </div>
    - Success messages:
Code: [Select]
        <div id="FlashMessage" class="FlashMessage ok">
            message
        </div>

The reason why in the modern theme appear at the top and it has this effect it's because the design and javascript. So, the html code will appear where you put the next php code:
Code: [Select]
    <?php osc_show_flash_message() ; ?>
We'll add warning messages in the future (I'm going add in 2.2 version). The html code will be something like this:
Code: [Select]
        <div id="FlashMessage" class="FlashMessage warning">
            message
        </div>