vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   I want to redirect to current thread after posting quickreply (https://vborg.vbsupport.ru/showthread.php?t=262738)

Lestat_ 04-27-2011 02:38 PM

I want to redirect to current thread after posting quickreply
 
So what needs to be done, is when a user posts a reply with quickreply a redirect to the current thread should execute, so the user sees the first post of the thread after replying with quickreply

Could someone please tell me which file I need to alter to get this done and provide me with the correct code to do this ?

many thanks in advance

Lynne 04-27-2011 04:15 PM

When you reply via quick reply, you are returned to the thread. It's ajax, so the thread remains and only the quick reply is modified to show the new post. If you don't want it to do that, then turn off ajax, but that will affect several places on the site.

Lestat_ 04-27-2011 04:28 PM

turning off ajax is not what I want to do, ajax is jscript so I'm guessing it should be possible to solve this with a window.location redirect in the ajax script vbulletin_quick_reply ?

--------------- Added [DATE]1303927114[/DATE] at [TIME]1303927114[/TIME] ---------------

i think i have a way do do this, but just don't know where to put it :

if i add this code to the vbulletin_quick_reply.js :
Code:

var v = $('.threadtitle a').attr('href');
window.location=v;

it should trigger the thread title link so the page should reload.
If only I knew where to put this extra code, should be when quick_reply_posting is complete


All times are GMT. The time now is 07:12 PM.

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.01032 seconds
  • Memory Usage 1,709KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete