Yii 1.1: pnotify

Widget for using JQuery plugin "Pines Notify - Notifications for Bootstrap or jQuery UI"

I just quickly wrote a widget for the JQuery plugin Pines Notify - Notifications for Bootstrap or jQuery UI.

Check the Pines Notify Website for examples and documentation.

Have a look at the Github Repo.

Also have a look at this extension: Pines Tags

Special thanks to Chillance who implemented the flash support!


Yii 1.1 or above


Just extract the files in your extensions directory.

There are three ways to use this widget: the very simple way, the normal way, and the flash messages way.

The very simple way

This will create a very simple notification without a title and any options. Just submit a "message". Any given options will be ignored.

    'message'=>'I am really a very simple notification')


$.pnotify("I am really a very simple notification");

The normal way

Here we go: DONT use the key "message", fill the notification with options.

        'title'=>'You did it!',
        'text'=>'This notification is awesome! Awesome like you!',


$.pnotify({'title':'You did it!','text':'This notification is awesome! Awesome like you!','type':'success','closer':false,'hide':false});

Using with Flash messages

              'flash_messages_only' => true,

And then when you do:

Yii::app()->user->setFlash('success', array('title' => 'Login Successful!', 'text' => 'You successfully logged in. Enjoy!'));

You get the nice message because of:

$.pnotify({'type':'success','title':'Login Successful!','text':'You successfully logged in. Enjoy!'});


You can use ALL the options Pines Notify offers.



Total 4 comments

#19467 report it
gifrancohe at 2015/07/16 12:37pm
Question ?

I can make a notifications for one user specific from my session.(Assuming that the other user has his session initiated). it is Possible?

#15111 report it
adreno at 2013/10/08 10:00am
Works great

Good work thanks. Up and running in 5 mins!

Just one question: can I set the notifications to close automatically after X many seconds?

#11278 report it
Yerlt at 2013/01/03 04:32am
Re: Flash messages

Hey Chillance,

no, i dont have any plans to extend this by myself. But setFlash()-support would be nice! So i created a git-repo. Feel free to add flash support and submit it via git. I will merge it and update the extension.

#11266 report it
Chillance at 2013/01/02 12:02pm
Flash messages

Hey, this is great! Any plans on adding Yii::app()->user->setFlash() support? Maybe I even add it myself. :)

Leave a comment

Please to leave your comment.

Create extension