We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

New Plugin/Extension: Flash Messenger

Development and Programming

Avi Block's avatar
Avi Block
27 posts
16 years ago
Avi Block's avatar Avi Block

Have you ever wanted to have a form submit to back to its own page, and have a success message in place, as opposed to having generic thank you page (useful for edit forms especially, when the user might want to do successive edits lets say)?

Now you can do it like this:

{exp:comment:comment_form}
{exp:flash_msg msg='<span class="success">Comment submitted succesfully!</span>'}
......
{/exp:comment:comment_form}

and then anywhere on that template you can put the variable {flash_msg} which will output this message only if the form was submitted succesfully (meaning that you weren’t taken to an EE error page).

This plugin is also accompanied by an extension which does some dirty work in the background…

If you want to read about the technical details of the implementations, you can read here:

http://www.aviblock.com/blog/2009/05/07/flash-messenger-for-expression-engine/

Hope you find this useful!

       
leadsuccess's avatar
leadsuccess
408 posts
16 years ago
leadsuccess's avatar leadsuccess

This looks really good and just in time for my site launch, so is it me or is the link for download missing:)

       
Avi Block's avatar
Avi Block
27 posts
16 years ago
Avi Block's avatar Avi Block

My apologies! I was so sure that it was attached, but I guess it wasn’t!

       
leadsuccess's avatar
leadsuccess
408 posts
16 years ago
leadsuccess's avatar leadsuccess

Thanks blocka! I am going to go check it out and come back to comment.

       
Avi Block's avatar
Avi Block
27 posts
16 years ago
Avi Block's avatar Avi Block

Before you try it out, I realized the version I uploaded has a syntax error in it…I’m reuploading it now and it should work.

       
leadsuccess's avatar
leadsuccess
408 posts
16 years ago
leadsuccess's avatar leadsuccess

When I upload the plugin & extension and go to activate the ext I get this error.

Fatal error: Cannot redeclare Flash_messenger::activate_extension() in /var/www/vhosts/discovervancouver.org/httpdocs/admin_cp/extensions/ext.flash_messenger.php on line 87
       
Avi Block's avatar
Avi Block
27 posts
16 years ago
Avi Block's avatar Avi Block

Was this before or after my update?

       
leadsuccess's avatar
leadsuccess
408 posts
16 years ago
leadsuccess's avatar leadsuccess

All good now, will take a look.

       
leadsuccess's avatar
leadsuccess
408 posts
16 years ago
leadsuccess's avatar leadsuccess

After submit I am being sent to my default page and not back to the form. I am using this with the {exp:weblog:entry_form} not sure if it works with that tag. Here is the example of how I am using it.

{flash_msg}
{exp:weblog:entry_form weblog="blog" name="Blog"}
{exp:flash_msg msg="Form Submitted Succesfully!"} ...
       
Sean C. Smith's avatar
Sean C. Smith
3,818 posts
16 years ago
Sean C. Smith's avatar Sean C. Smith

This looks great.

       
Avi Block's avatar
Avi Block
27 posts
16 years ago
Avi Block's avatar Avi Block
After submit I am being sent to my default page and not back to the form. I am using this with the {exp:weblog:entry_form} not sure if it works with that tag. Here is the example of how I am using it.
{flash_msg}
{exp:weblog:entry_form weblog="blog" name="Blog"}
{exp:flash_msg msg="Form Submitted Succesfully!"} ...

I think you’re missing the “return” parameter…

       
leadsuccess's avatar
leadsuccess
408 posts
16 years ago
leadsuccess's avatar leadsuccess

@Avi Oh I thought it automatically grabbed the URI, I get it now:)

       
wecreateyou's avatar
wecreateyou
86 posts
15 years ago
wecreateyou's avatar wecreateyou

Sounds great, is this achieved with php or javascript?

       
Avi Block's avatar
Avi Block
27 posts
15 years ago
Avi Block's avatar Avi Block

php

       
wecreateyou's avatar
wecreateyou
86 posts
15 years ago
wecreateyou's avatar wecreateyou

And the winner is flash messenger! Performs nicely in the test I did so far. I like this thing!

again, thanks for sharing.

       
1 2

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.