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 Extension - Comment Redirect…

Development and Programming

Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen

Another very quick one here for anyone who would like to re-direct to a different template upon a successful comment submission.

Usage :

{exp:comment:form preview="{my_template_group}/comment_preview" return_url="template_group/template_name"}

{!-- Comment form goes here --}

{/exp:comment:form}

That’s it for now! Would love to hear from anyone if I’ve done anything silly on this one.

Best wishes,

Mark

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

I am using solspace’s rating module but the more good stuff I see like this then more I think hmmmm but hey I can use it for my other sites:) Mark this looks really useful thanks!

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen
I am using solspace’s rating module but the more good stuff I see like this then more I think hmmmm but hey I can use it for my other sites:) Mark this looks really useful thanks!

Thanks for the kind words, much appreciated. Hope it is of use to people and I just hope I haven’t done anything silly by using this method. The extension itself is exceptionally simple and I was hoping to find a way to add in a new parameter to the comment form tag without having to hack any core files although I’m not sure if that’s going to be possible or not.

Anyway hope it’s of some use.

N.B. Just updated the usage above as I had accidentally left the return_url=”” form field as a text type instead of a hidden field

Best wishes,

Mark

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen

A very quick update on this. Thanks to Silenz I have now updated the extension so you now have a return_url=”template_group/template_name” parameter in the comment form tag instead of having to use a hidden field.

New version and instructions are in the first post in this thread.

Best wishes,

Mark

       
silenz's avatar
silenz
1,648 posts
16 years ago
silenz's avatar silenz

I was just thinking about whether I actually have a use for this extension myself.

During evaluation I realized that you should probably return the unaltered hidden fields in case no return_url parameter exists.

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen
I was just thinking about whether I actually have a use for this extension myself.

In that case I think I will have to charge you for it 😉

Just kidding as I couldn’t have possibly made this without your help.

During evaluation I realized that you should probably return the unaltered hidden fields in case no return_url parameter exists.

New version now attached to top post. Hopefully should work correctly now and return the standard fields if no return_url=”“ parameter value is set or the parameter isn’t present in the tag.

Thanks again for your help on this one.

Best wishes,

Mark

       
basvanbokhorst's avatar
basvanbokhorst
1 posts
15 years ago
basvanbokhorst's avatar basvanbokhorst

Hi Mark,

I was wondering if you are planning on updating this nice little extension for the brand new 2.0 version of EE. Apparantly the redirect function is not part of the new version, so your extension would be more than welcome for users of the new EE 2.0.

Cheers,

Bas

       

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.