Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jan 2000
Posts: 114
Member
Member
Offline
Joined: Jan 2000
Posts: 114
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):
Code
code:
Right under that insert the following:
Code
code:
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] == YourCategoryNumber
to
$number == YourForumNumber

and 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]

------------------
Leshrac
leshrac@magictraders.com
Founder, Owner - Magic Online Trading League (MOTL)
http://www.magictraders.com
MOTL Bulletin Board

Sponsored Links
Entire Thread
Subject Posted By Posted
Simple Hack to Limit # of New Threads Users Can Create per Day(s) Leshrac 04/24/2000 10:02 AM
Re: Simple Hack to Limit # of New Threads Users Can Create per Day(s) cal 04/24/2000 12:36 PM
Re: Simple Hack to Limit # of New Threads Users Can Create per Day(s) Leshrac 04/25/2000 12:15 AM
Re: Simple Hack to Limit # of New Threads Users Can Create per Day(s) Justice 04/29/2000 4:53 AM
Re: Simple Hack to Limit # of New Threads Users Can Create per Day(s) Leshrac 04/29/2000 6:57 AM
Re: Simple Hack to Limit # of New Threads Users Can Create per Day(s) Leshrac 05/15/2000 3:52 AM
Re: Simple Hack to Limit # of New Threads Users Can Create per Day(s) CARTOON 04/23/2001 7:51 PM
Re: Simple Hack to Limit # of New Threads Users Can Create per Day(s) CARTOON 04/25/2001 2:10 AM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Nettomo
Nettomo
Germany, Bremen
Posts: 417
Joined: November 2001
Forum Statistics
Forums63
Topics37,575
Posts293,930
Members13,823
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)