Ok, Please test this good first:
1. Create a new Forum on the place you want to featured forum to show up.
2. Enter a Title and if wanted a description
3. Set a display order
4. LEAVE THE REST EMPTY!!!! (or put a link to a forum in "Forum Link")
now save the following into a new file in your includes/cron directory:
PHP Code:
<?php
// Sample featured forum cron script by MarcoH64
error_reporting(E_ALL & ~E_NOTICE);
if (!is_object($DB_site))
{
exit;
}
// Define the featured forum link, insert forumid
$featuredforumlink = 6;
// Fill array with forumids to choose from
$chooseforums = array(2,4,5);
// No more changes needed under this
// Select random forum
$selected = $DB_site->query_first("SELECT forumid from " . TABLE_PREFIX . "forum
WHERE forumid IN (" . implode(",",$chooseforums) . ")
ORDER BY RAND()
LIMIT 1
");
// Update forum info
$DB_site->query("UPDATE " . TABLE_PREFIX . "forum
SET link = '$vboptions[bburl]/forumdisplay.php?f=$selected[forumid]'
WHERE forumid = $featuredforumlink
");
require_once('./global.php');
build_forum_permissions();
log_cron_action("Featured Forum Updated. New featured forum: $selected[forumid]", $nextitem);
?>
Edit the $featuredforumlink and the $chooseforums var's.
Setup the new cronjob with a schedule you want. All should go auto now.
PS This is an example on how you could do it, change for your needs.