vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   vB 3.7x - Where is "Forum Active" Data Saved in Database? (https://vborg.vbsupport.ru/showthread.php?t=285145)

evenmonkeys 07-03-2012 02:12 AM

vB 3.7x - Where is "Forum Active" Data Saved in Database?
 
<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:

Code:

$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();



All times are GMT. The time now is 03:48 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00958 seconds
  • Memory Usage 1,709KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete