Hey, i'm in the middle of finishing a hack of mine. In the hack it uses the /admincp/forums.php file. To turn this hack on/off of a per forum baisis. Look here so you get a better understanding.
PHP Code:
print_yes_no_row($vbphrase['turn_marlboro_on_off'], 'forum[marlboro]', $forum['marlboro']);
Now in some files im using this:
PHP Code:
if ($foruminfo['marlboro']=='1')
{
Code here
}
else
{
Code Here
}
Basicly If custom hack is turned on for that forum show this, if not show this instead.
Now my problem is, i have to call the forum IDs that the custom hack is turned on. Heres the query im using now.
PHP Code:
$mar = $DB_site->query("
SELECT
thread.threadid as threadid,thread.title as title,thread.forumid as forumid,thread.postusername as postusername,thread.dateline as dateline
FROM thread AS thread
WHERE postuserid= $userinfo[userid] AND forumid IN(X,Y,Z)
ORDER BY dateline DESC
");
Notice the X,Y,Z. I would have to put the forum IDs there, i know i could make this a vbulletin setting and use $vboptions['forum_ids'] in place of the forumid IN(X,Y,Z), but i would rather not have the user turn it on in the forum, and then add the forumid in a box in the vbulletin options area.
Does anyone know what i could use for that query to grab the turned on forums id?
Something like this?
PHP Code:
$mar = $DB_site->query("
SELECT
thread.threadid as threadid,thread.title as title,thread.forumid as forumid,thread.postusername as postusername,thread.dateline as dateline
FROM thread AS thread
WHERE postuserid= $userinfo[userid] AND forumid IN(($foruminfo['marlboro'])
ORDER BY dateline DESC
");
Doubt i'm even close. Thanks in advance!