PDA

View Full Version : vB 3.7x - Where is "Forum Active" Data Saved in Database?


evenmonkeys
07-03-2012, 02:12 AM
<i>I'm trying to figure out how the database saves this boolean. It's not in the table labeled "forum" so I have no idea where to look. I'm starting to think it's in a datastore styled field.. but yeah.

Anyone know where I can look?</i>

Edit: Actually, I'm going to rephrase a bit. I think I know where it's being stored, but I still don't get it. Here's what I want to do..

I'm making a modification that will randomly run a php script that will set forum X to active or not active and open or not open. I just want to know the code required to make that happen. Unfortunately, it's not its own field. It's stored in the datastore table and I don't understand how that stuff works.

Thanks!

evenmonkeys
07-05-2012, 03:16 AM
Still trying to figure out how to do this.

kh99
07-05-2012, 01:06 PM
You can do something like this:


$forumid = X; // set to forumid
$active = 0; // set to 0 or 1
$open = 0; // set to 0 or 1

$forumdata =& datamanager_init('Forum', $vbulletin, ERRTYPE_CP);
$forumdata->set_existing($vbulletin->forumcache[$forumid]);
$forumdata->set_bitfield('options', 'active', $active);
$forumdata->set_bitfield('options', 'open', $open);
$forumdata->save();