Hey all,
We are coming from UBB to VB. In UBB we had a hacked the code so that when ever someone posted a topic in our website reviews forum it would automatically be locked untill a moderator or admin unlocked it.
Does anyone know the code to do this in VB?
you can see what we mean at http://www.sitepoint.com/forums/
when you post a topic in the website reviews forum your topic will automatically be locked.
Thanks in advance!
In newthread.php, look for:
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,p ostusername,lastposter,dateline,iconid,visible) VALUES (NULL,'".addslashes($subject)."',".time().",$forumid,1,0,'".addslashes($username)."','".addslashes($username)."',".time().",$iconid,$visible)");
Replace that with:
if ($forumid == 2) {
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,p ostusername,lastposter,dateline,iconid,visible) VALUES (NULL,'".addslashes($subject)."',".time().",$forumid,0,0,'".addslashes($username)."','".addslashes($username)."',".time().",$iconid,$visible)");
} else {
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,p ostusername,lastposter,dateline,iconid,visible) VALUES (NULL,'".addslashes($subject)."',".time().",$forumid,1,0,'".addslashes($username)."','".addslashes($username)."',".time().",$iconid,$visible)");
}
You'll need to change the 2 contained in the if() statement to whatever the forum ID is of your reviews forum.
hi ya jonese, remember me akka 'prequel' at sitepoint forum thedesktopthemes.com guy and those rounded corners for your web site ? :D
isn't it easier if you just went into the admin control panel, modify forum (site reviews) and set moderation queue to 'yes' ? or is it you don't want the emails coming in ?
well welcome :D
Thanks to both of you.
eva2000 AKA prequel
We decided to go with your idea since it will mean we won't have to edit in the future if we upgrade etc.!!!
Yea i remember you, love the corners :)
your welcome :D ... you could add your suggestion for this to be added in future versions of vb... it wouldn't be a bad thing if you get alot of posts for such a forum... especially if you don't want that much email
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.