PDA

View Full Version : Force ForumID?


Ian Cunningham
01-17-2011, 07:51 PM
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:

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 1295302241 at 1295302241 ---------------

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 1295355405 at 1295355405 ---------------

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! :)