OK, this is what I have. I have a particular thread which shows up on a non-BV page. I also have a quick reply box set up on the same non-VB page which is set to reply to that particular thread. When I reply to the thread it redirects me to the last post in the thread (which it is supposed to do). But I want it to redirect back to the non-VB page I was on. I tried to code it like this:
On the quick reply form on the non-VB page I created this bold line:
Code:
<input type=hidden name=fromquickreply value=1 />
<input type=hidden name=s value=$session[sessionhash] />
<input type=hidden name=do value=postreply />
<input type=hidden name=nonvb value=1>
<input type=hidden name=t value=36896 id=qr_threadid />
<input type=hidden name=p value=$qrpostid id=qr_postid />
<input type=hidden name=parseurl value=1 />
<input type=hidden name=clickedelm value= />
<input type=submit class=button value=Submit Comment accesskey=s title=(Alt + S) name=sbutton tabindex=2 onclick=this.form.clickedelm.value=this.value />
<input type=submit class=button value=Preview accesskey=x title=(Alt + X) name=preview tabindex=3 id=qr_preview onclick=this.form.clickedelm.value = this.value />
then made the newreply.php changed to this:
Code:
if ($newpost['visible'] && $nonvb=1)
{
$url = "http://www.mysite.com/nonvbpage.php";
}
else
{
$url = "showthread.php?$session[sessionurl]p=$newpost[postid]&goto=postid";
// what was the line above supposed to do? I have changed it to the line below instead. - KD
$url = "showthread.php?$session[sessionurl]p=$newpost[postid]#post$newpost[postid]";
}
eval(print_standard_redirect('redirect_postthanks'));
When I test it by posting from my non-VB page it redirects me back to the non-VB page like it should. But when I try reply to a post from the forum - ANY post - it also redirects me back to the non-VB page. I don't know much about coding so I'm sure I must be doing something wrong.
=========================================
REQUEST #2: How do I set the redirect page to a variable? Something like this:
[CODE]
Code:
if ($newpost['visible'] && $nonvb=1)
{
$url = "http://www.mysite.com/$nonvbpage.php";
}
else
{
$url = "showthread.php?$session[sessionurl]p=$newpost[postid]&goto=postid";
// what was the line above supposed to do? I have changed it to the line below instead. - KD
$url = "showthread.php?$session[sessionurl]p=$newpost[postid]#post$newpost[postid]";
}
and then putting a line like this:
Code:
<input type=hidden name=fromquickreply value=1 />
<input type=hidden name=s value=$session[sessionhash] />
<input type=hidden name=do value=postreply />
<input type=hidden name=nonvb value=1>
<input type=hidden name=$nonvpage value=http://www.mysite.com/pageichoose.php>
<input type=hidden name=t value=36896 id=qr_threadid />
<input type=hidden name=p value=$qrpostid id=qr_postid />
<input type=hidden name=parseurl value=1 />
<input type=hidden name=clickedelm value= />
<input type=submit class=button value=Submit Comment accesskey=s title=(Alt + S) name=sbutton tabindex=2 onclick=this.form.clickedelm.value=this.value />
<input type=submit class=button value=Preview accesskey=x title=(Alt + X) name=preview tabindex=3 id=qr_preview onclick=this.form.clickedelm.value = this.value />