PDA

View Full Version : how do I detect a forum id via plugin?


amnesia623
10-15-2007, 12:55 AM
I am writing a plugin script that would output different content based on the form ID and script?

I am having a heck of a time remembering how to detect the forum id from php tho

(i did search...I'm sure it's somewhere, but I am not able to find it)

Something like


if ((vbulletin->script == 'index') || (vbulletin->script == 'forumdisplay') ){
if (vbulletin->forum['id]==1) { do this;};
}


or, better would be a switch/case because there will be a lot of forums.

Thanks for the help

Adrian Schneider
10-15-2007, 01:02 AM
THIS_SCRIPT is the first one you're looking for.

The other is usually $foruminfo['forumid'], but it really depends where the plugin is executed.