Create a "anynameyouwant.php" file in your forum directory and put this code inside that file:
PHP Code:
<?php
set_time_limit(900);
require('./global.php');
$userArray=$DB_site->query("SELECT * FROM user WHERE (usergroupid=9 OR usergroupid=11) AND posts>0");
while ($user=$DB_site->fetch_array($userArray))
{
$days = mktime (date("H"), date("i"), date("s"), date("m"), date("d")-30, date("Y"));
$lastpost=$DB_site->query_first("SELECT dateline FROM post WHERE visible=1 AND userid='$user[userid]' ORDER BY dateline DESC LIMIT 1");
if ($lastpost[dateline]>0 AND $lastpost[dateline]>$days)
{
$DB_site->query("UPDATE user SET usergroupid=2 WHERE userid='$user[userid]'");
}
}
?>
Now configure your CRON job to run this file once everyday at any time you like.
Please test this script in a test board first! I dont expect a problem but I don't like giving away scripts like this as they make changes in DB so a bug can create serious problems. I didnt test the script myself.