PDA

View Full Version : Maximum Threads in Particular Forum


fotografik
05-03-2007, 12:39 AM
I found this code in vb.org and would like to know if it can be implemented in VB3.6 (the previous code was for VB3.0).


if ($bbuserinfo[usergroupid]==X AND $foruminfo[forumid]==Z) {
$checkpostfromthread=$DB_site->query_first("SELECT count(*) as count FROM thread WHERE postuserid=$bbuserinfo[userid] AND forumid=$foruminfo[forumid]");
if ($checkpostfromthread['count']>Y) {eval(print_standard_error('canpostx'));exit;}
}Note : X = usergroup; Z = forum; Y = # of threads max

I want to be able to check the number of threads that a user has in that particular forum before allowing the user to create a new thread.

fotografik
05-17-2007, 01:46 PM
Would appreciate if an expert coder could advise - if it can or cannot be done. Thanks.