Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-20-2005, 02:12 AM
kkiely kkiely is offline
 
Join Date: Feb 2004
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Custom redirect from non-VB quick reply

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]&amp;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]&amp;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 />
Reply With Quote
  #2  
Old 08-20-2005, 06:16 PM
Paprika Paprika is offline
 
Join Date: Jul 2003
Location: Ohio
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For request one, the first thing I'd try would be to remove ' $newpost['visible'] && '

See if that does what you need. Not totally sure here but I'm a bit tired too and don't really know.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:05 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03372 seconds
  • Memory Usage 2,175KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (2)postbit
  • (2)postbit_onlinestatus
  • (2)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete