sfFlashMessagePlugin - 1.0.1
This helper plugin displays user flash messages using very nice looking jQueryNotifyBar
You are currently browsing
the website for symfony 1
This helper plugin displays very nice looking notify bar with user flash message text. Bar pops from the top and disappear after defined amount of time. Customization is possible.
This helper plugin displays user flash messages using jQueryNotifyBar or jquery-notice plugin (your choice). First method displays very nice looking notify bar which pops from the top and disappear after defined amount of time. Second method displays growl-like messages at the right side of the browser window. Customization is possible.
This plugin uses awesome jQuery library, jqueryNotifyBar plugin by Dmitri Smirnov and jquery-notice plugin by Tim Benniks
|Artur Rozek||lead||lp.ten.traofni <<ta>> rutra|
Copyright (c) 2009 Artur Rozek - artur(at)infoart.net.pl
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
Pear package and docs bugs fixed
Pear package and docs bugs fixed
This helper plugin displays user flash messages using jQueryNotifyBar plugin. Its displays very nice looking notify bar which pops from the top and disappear after defined amount of time. Customization is possible.
This plugin uses awesome jQuery library and jqueryNotifyBar plugin by Dmitri Smirnov.
$ symfony plugin:install sfFlashMessagePlugin $ symfony cache:clear
Place use_helper in your main layout template:
and then place helper itself (anywhere inside the body tag):
<?php echo flash_message() ?>
Define flash message in your ations.class.php
$this->getUser()->setFlash('notice', 'This is notice');
Above will display green popup (pops from the top) with 'This is notice' text. It will disappear after 2.5 seconds.
$this->getUser()->setFlash('error', 'Error !');
Above will display red popup with 'Error !' text. It will disappear after 5 seconds.
If there is no flash message for the user, nothing will be displayed.
You can customize delay time after which popup disappear (in miliseconds).
<?php echo flash_message(5000) ?>
Which means 5 seconds. Error messages displays twice as long as notice messages (10 seconds for this example).
You can also customize look and feel of notify bars by defining your own css. (See css plugin dir).
Plugin works best with sfJQueryReloadedPlugin.
Plugin uses jQuery so its not compatible with sfProtoculousPlugin (which has to be disabled).