View Full Version : php calls more then one forumid
Michael.A
07-25-2010, 10:52 PM
how can i have this code to function around more then one forum ids?
if ($foruminfo['forumid'] == $vbulletin->options['mad_run'])
Lynne
07-26-2010, 06:36 PM
So $vbulletin->options['mad_run'] datatype 'free'. If so, you first need to explode it and then you can use it as an array.
$madrun = explode(",", $vbulletin->options[mad_run]));
if (in_array($foruminfo['forumid'], $madrun))
Something like that should work.
Guest190829
07-26-2010, 07:07 PM
It depends on how that specific option is constructed, if a select options of forums, it will be more difficult to alter to support multiple forums; if it's a simple text input you can make a comma delimited list and use Lynne's code.
Michael.A
07-26-2010, 07:35 PM
ok here is what i got
if ($forumid = explode(",", $vbulletin->options['fa_stats_dump_in_forum']))
{
$forum['threadcount'] = $forum['threadcount'] + $vbulletin->options['fa_stats_threads'];
$forum['replycount'] = $forum['replycount'] + $vbulletin->options['fa_stats_posts'];
$forum['threadcount'] = vb_number_format($forum['threadcount']);
$forum['replycount'] = vb_number_format($forum['replycount']);
}
it works in a way
how ever it shows on all the forums
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.