badmeetsevil-
Thu 11th Oct '01, 6:05pm
New Threads Today
Summary of Hack
A simple little hack that is very interesting to have on your forums. If installed correctly, it will show how many threads were started that present day, and reset at midnight. If a thread is deleted, it will be taken off the thread count.
Demo
http://www.soaped-up.com/bbs
Installation
Very simple installation. Download, and open index.php from your forums directory. Find a nice spot anywhere in the file, (maybe under // get total posts) and copy + paste the following:
// number of threads today
$datecut = mktime(0,0,0,date("m"), date("d"), date("y"));
$getthreadstoday=$DB_site->query_first("SELECT count(*) AS count FROM thread WHERE dateline>='$datecut'");
$threadstoday=$getthreadstoday[count];
Close the file, and re-upload it to your server.
Go into your Admin Control Panel, open the template "Forum Home" and find the following:
Total Posts: <b>$totalposts</b>
Immediately following that, paste the following..
| New Threads Today: <b>$threadstoday</b>
Go to your forum main, and you'll see it in action! If it's not working, please reply to this stating what's wrong.
Enjoy.
Summary of Hack
A simple little hack that is very interesting to have on your forums. If installed correctly, it will show how many threads were started that present day, and reset at midnight. If a thread is deleted, it will be taken off the thread count.
Demo
http://www.soaped-up.com/bbs
Installation
Very simple installation. Download, and open index.php from your forums directory. Find a nice spot anywhere in the file, (maybe under // get total posts) and copy + paste the following:
// number of threads today
$datecut = mktime(0,0,0,date("m"), date("d"), date("y"));
$getthreadstoday=$DB_site->query_first("SELECT count(*) AS count FROM thread WHERE dateline>='$datecut'");
$threadstoday=$getthreadstoday[count];
Close the file, and re-upload it to your server.
Go into your Admin Control Panel, open the template "Forum Home" and find the following:
Total Posts: <b>$totalposts</b>
Immediately following that, paste the following..
| New Threads Today: <b>$threadstoday</b>
Go to your forum main, and you'll see it in action! If it's not working, please reply to this stating what's wrong.
Enjoy.