vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Force ForumID? (https://vborg.vbsupport.ru/showthread.php?t=257301)

Ian Cunningham 01-17-2011 07:51 PM

Force ForumID?
 
I'm working on a custom script, but I'm stuck at the final hurdle when trying to force a forumid for forumdisplay.php.

I have made a plugin in forumdisplay_start where all of the following fails:

PHP Code:

if ($_REQUEST[test]){ 
$forumid 6;
$forum[forumid]=6;
$vbulletin->GPC['forumid'] = 6;


Does anyone know how I can force a forumid for forumdisplay.php using plugins?

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

Got it! :D

$foruminfo = fetch_foruminfo($newforumid);

kh99 01-17-2011 08:12 PM

nvm - posted at same time as your second post (and I think mine was wrong anyway).

Lynne 01-17-2011 08:15 PM

Did you try looking in the code where the hook location is? The variable is not called $forum, it's called $foruminfo.

Ian Cunningham 01-17-2011 08:26 PM

Thanks to you both for the reply :). I found this out just after I posted and edited my OP with the fix.

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

Now that I've set the $foruminfo varible in forumdisplay_start, I can't get the meta tags in "headinclude" to work?

For example, the variable "$foruminfo[title_clean]" in headinclude doesn't return anything - even though I set $foruminfo in forumdisplay_start.

I'm a real novice at programming, so any help would be most welcome! :)


All times are GMT. The time now is 07:20 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.00994 seconds
  • Memory Usage 1,716KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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