vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   External PHP, creates endless redirect of threads. (https://vborg.vbsupport.ru/showthread.php?t=285175)

RivaCom 07-03-2012 06:25 PM

External PHP, creates endless redirect of threads.
 
I am trying to pull in a widget I had used for vbadvanced, but instead just pull it into vbulletin itself by creating a plugin. However , whenever it's enabled. No matter what thread you click, it always leads to the same thread. Below is my plugin code. If need be I can post the php code as well. Any ideas?

Code:

ob_start();
  require_once('/home/rivacom/revenantgaming.com/forum/modules/slidermodule.php');
$php_include = ob_get_clean();

ob_end_clean();
vB_Template::preRegister('adv_portal',array('php_include' => $php_include));


RivaCom 07-05-2012 09:13 PM

anyone?

kh99 07-06-2012 10:44 AM

When you say "no matter what thread you click", are you talking about clicking a thread in your slider widget? I'm not sure how we could answer your question without seeing the code, unless someone happens to be familiar with that module. (Also, unfortunately, unless it's your own code you can't post it here).

RivaCom 07-06-2012 12:16 PM

Any thread, outside of the actually widget. So if I browse my forums, click a thread, it takes me to the same thread no matter what I click. The widget is this one.

https://vborg.vbsupport.ru/showthread.php?t=233909

Works fine as a widget for vbadvanced but once I try to use it with vbulletin using it as a plugin, I get this loop.

Lynne 07-06-2012 04:32 PM

Can we get an actual link to be able to see the problem (see the page source).

RivaCom 07-06-2012 06:53 PM

<a href="http://revenantgaming.com/forum/forum.php" target="_blank">http://revenantgaming.com/forum/forum.php</a>

kh99 07-06-2012 07:11 PM

Which hook is your plugin using?

RivaCom 07-06-2012 07:41 PM

global_start

kh99 07-06-2012 08:03 PM

I think your problem is that the mod code uses the variable $threadid, which is supposed to get set to the thread you're trying to view (so my guess is the one thread you're always seeing is the last news thread listed). If you edit the mod code and change $threadid to something else everywhere it appears, you should fix the problem (and while you're at it you might as well change $forumid too - I'm not sure that will actually cause a problem but it's probably easier to change it than to figure out some weird problem later).

Edit: I thought of something that's easier - change your plugin code to save the values of $threadid and $forumid at the beginning and restore them when you're done. (Sorry if you already did the editing).


All times are GMT. The time now is 03:09 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.00984 seconds
  • Memory Usage 1,724KB
  • 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
  • (9)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