I spent about 30 minutes cracking this up:
PHP Code:
<?php
require_once('global.php');
require_once(DIR . '/includes/adminfunctions.php');
$vbulletin->input->clean_gpc('g', 'enable', TYPE_BOOL);
$enable = $vbulletin->GPC['enable'];
$sql = "SELECT `forumid`, `options` FROM `".TABLE_PREFIX."forum` WHERE `forumid` = '57'";
$res = $vbulletin->db->query_read_slave($sql);
while ($row = $vbulletin->db->fetch_array($res))
{
$forumid = $row['forumid'];
$optionbits = $row['options'];
$newoptionbits = ($enable? $optionbits | 3 : $optionbits - ($optionbits & 3));
$vbulletin->db->query_write("UPDATE `".TABLE_PREFIX."forum` SET `options` = '$newoptionbits' WHERE `forumid` = '$forumid'");
}
build_forum_permissions();
?>
Modify the SQL query $sql to put the forumids you are interested in. Then save as
forumswitch.php in your vbulletin directory.
Set two Scheduled Tasks in AdminCP that call
forumswitch.php?enable=0 and
forumswitch.php?enable=1 respectively.