PDA

View Full Version : Pulling current forumid from forumdisplay.php?


RetroDreams
11-15-2005, 01:01 AM
I'm trying to write a mini-mod for vBAdvanced so I can have a custom column per forum. I was able to successfully do this in vBulletin 3.x but the code no longer works for vBulletin 3.5.

Does anyone have any ideas how I can pull the current forumid from forumdisplay? Below is the code I used in vBulletin 3.0.

if (isset($f))
{
$forumid = intval($f);
}
switch($forumid)
{
case 1:
blah blah;
break;
default:
blah blah blah;
break;
}

cinq
11-15-2005, 01:13 AM
Try this?


$vbulletin->input->clean_array_gpc('r', array('f' => TYPE_INT));
if (!$vbulletin->GPC['f'])
eval(standard_error(fetch_error('requiredfields')) );

$forumid = $vbulletin->GPC['f'];
switch($forumid)
{
case 1:
blah blah;
break;
default:
blah blah blah;
break;
}

RetroDreams
11-15-2005, 01:25 AM
No go... I get:

Fatal error: Call to a member function on a non-object

cinq
11-15-2005, 01:40 AM
How's the code for the rest of the file?

RetroDreams
11-15-2005, 02:05 AM
How's the code for the rest of the file?

It's just the rest of the forumdisplay.php file. The only thing that differs is that the blah blah contains some vBAdvanced code. However, if I pull it out, I still get the error.