If you're like any other webmaster, you hate spammers. Here's a simple hack I recently implemented on my board to limit my users to 1 new topic per every 48 hours in each forum in a certain category. For example, if you apply this hack to forums "A" and "B," posting in forum A will not affect your ability to post in forum B, but you will not be able to post a new topic in forum A until 2 days (adjustable) pass. Replies are unaffected, this only applies to new threads. Anyway, here's the hack:
In the DoPostTheTopic subroutine of
postings.cgi find (around line 1340):
Right under that insert the following:
Replace
YourCategoryNumber with the number of the category you want this to affect. (Open your
forums.cgi file in the UBB CGI directory on your web server and look at the very first number of one of the lines that contains one of the forum names in that category. DON'T EDIT THE FILE!) Alternatively, you can change
$thisforum[0] == YourCategoryNumberto
$number == YourForumNumberand replace
YourForumNumber with the number of the forum you want this to affect (look at the links to messages on your board if you don't know the numbers). To have it affect multiple forums, change
if ($number == YourForumNumber) {to
if (($number == YourForumNumber1) | | ($number == YourForumNumber2)) {Be sure to remove the spaces between the pipes "| |".
Finally, to change the time a user has to wait to post another new topic, change the value of
$numDaysToWait to some other number of days.
That's it. May your fight against spam be a winning one.
![[Linked Image]](http://ubbcodehacking.com/ubb/biggrin.gif)
------------------
Leshrac leshrac@magictraders.com Founder, Owner -
Magic Online Trading League (MOTL)
http://www.magictraders.com MOTL Bulletin Board