This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Edit post comment redirect location
#1

I've done a substantial amount of perusing but can't figure this out. How can I edit the redirect that occurs after an individual posts a comment? Currently it routes to:
http://www.mysite.com/tabs.php?id=2&_=12...6#process/

Ultimately I would really just like it to redirect to the comments page itself.... At the very minimum I'd like to remove the ability to post another comment that occurs at the bottom of the page...

Anyway, any help you can provide would be greatly appreciated...


Attached Files Thumbnail(s)
   
Reply
#2

Hi, I'm not entirely sure what you are trying to achieve but you probably want to be looking at this part of the script:

comments/includes/template/form.php (line 331)

Have you completed the interview?
Reply
#3

That doesn't seem to be it. Basically I'm trying to alter the onclick function of the submit button on the form.

"<input type="submit" name="submit_button" title="Add Comment" onclick="return processSubmit()" value="<?php echo SUBMIT_BUTTON ?>"/>"

Instead of onclick invoking the "thank you" page (the thumbnail from the original post), I simply want that function to "post" the comment and return the user to the "comments" page which should now include his/her comments.

Does that make more sense?
Reply
#4

The script is designed to post the comment to the same page - it doesn't redirect to another page. The comments and the 'thank you' message and the form are all parts (or sections) of the page. There is no comments 'page' but there is a comments 'section' which is a part of the page. So I don't quite understand why you want to edit the redirect part.

Unless you're talking about the anchor. If you want the page scroll bar to be positioned where the comments are after a user submits a comment then in the line I referred to earlier replace $anchor_text with $anchor_text_pagination.

It sounds like you also don't want the 'thank you' message to be displayed at all and you don't want the form to be displayed after a comment is submitted. In that case it would be fairly easy to make this change. You would need to wrap an 'if statement' around the 'thank you' message and another 'if statement' around the form and both statements would check to see whether a comment has just been added. Let me know if that's what you want and I can then give you some help to implement it.

Have you completed the interview?
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Steven
29-Sep-2021, 11:41 AM
Last Post by afoster
02-Aug-2020, 10:40 PM
Last Post by Steven
10-Jan-2018, 09:58 PM
Last Post by noblues
08-Mar-2015, 05:08 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)