The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Redirect user back to the homepage after submitting post?
Hi there...
I'm trying to make it so that when a user hits the 'post reply'or 'submit new thread' buttons, they wil automatically be redirected back the the forum index. I hope that makes sense...can anyone help me? Thanks |
#2
|
|||
|
|||
If it is a form you're using, you can use
PHP Code:
|
#3
|
|||
|
|||
Thanks for the advice!
I need it to submit the users post (just like when I hit 'submit reply' to post this reply) and then send the user back to the index page... Will that work? |
#4
|
|||
|
|||
Should do, not sure which template you'll have to edit tho' , so perhaps one of the more advanced coders could shed some light on this.
Could end up being a useful hack |
#5
|
|||
|
|||
Thanks UK
Here is the button I am working with in the newreply template: <input type="submit" class="button" name="sbutton" id="{$editorid}_save" value="$vbphrase[submit_reply]" accesskey="s" tabindex="1" /> Right now when a user hits it to post a reply, they get the $vbphrase"postthanks_moderate" in a splash screen and then the user is automatically redirected back to the thread. I need them redirected back to the index instead of the thread after they submit thier post, and I can't seem to figure this out |
#6
|
|||
|
|||
Let's talk newreply, you figure out newpost.
on hook newreply_post_complete set $vbulletin->url to the url of the index. execute... eval(print_standard_redirect('redirect_postthanks' , true, true)); |
#7
|
|||
|
|||
This looks awesome, noppid, but I can't get it to work- probably because I'm not typing in the right place. Sorry.
Where exactly do I put all that in? thanks for the help. |
#8
|
|||
|
|||
I didn't test it, but that is where I would start...
Hook: PHP Code:
|
#9
|
|||
|
|||
I'm in the newreply template- is that where I should be typing or do I need to be elsewhere? I added that code after the submit button code, like this:
<input type="submit" class="button" name="sbutton" id="{$editorid}_save" value="$vbphrase[submit_reply]" accesskey="s" tabindex="1" /> $vbulletin->url = 'index.php?' . $vbulletin->session->vars['sessionurl']; eval(print_standard_redirect('redirect_postthanks' , true, true)); and it didn't do anything differently... Thanks for your patience with my inexperience! |
#10
|
|||
|
|||
You need to add it to a new plug in on hook newreply_post_complete, not into a template.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|