![]() |
Automatic Zero-Reply Pruning
This hack was requested by T3MEDIA here.
What this hack does:
Well thats about it :) |
Odd... your php file seems to be a ph p file.
:) |
I'd look to thread table, and check for dateline = lastpost date. If they'r the same, then prune the thread (excepts for ones of admins). ;)
edit: nvm me. lol |
Quote:
|
Looks like a ph p file here also. But saving as php, strange.
|
Question does it have usergroup permision? Thank you btw.
edit just looked it over. It does. |
has anyone installed this ?
what will happen if I install it with 137,000 posts on my forumjust now... will it delete the current 0 reply's ??? or will it only be from when I install it :nervous: |
It says I have an error
Fatal error: Call to undefined function: delete_thread() in /var/www/html/forum/includes/cron/deletezerothreads.php on line 49 line 49 is:- "delete_thread($threads['threadid'], 1, $deletetype, $delinfo);" I uploaded to /var/www/html/forum/includes/cron/ ???? :ermm: Is this right?? |
How are you running it? By directly going to the URL?
|
Quote:
scheduled tasks "RUN NOW" then the error comes up :rolleyes: Edit:-I've took a screenie of it..am thinking its a typo in the file..I uploaded in ANSI |
try adding this right above the $prunedthreads query start:
PHP Code:
|
Quote:
as per "Rebuilds forum counters after thread deletion. Clean!" Ideally I would want the users to have the same postcount,there an awful moany bunch lol |
Worked a treat https://vborg.vbsupport.ru/external/2005/04/3.gif
thank you for a great hack, just a little Question If I change the WHERE `replycount` = '0' to "1" will it work in the same way ? |
1. Im not sure if it changes the USERs postcounts, but it changes the FORUMs.
2. If you do that change, it will prune all threads where replies is EXACTLY 1. IE not 0 or 2, but 1. If you want it to prune threads where reply count is 1 or less, then do WHERE `replycount`<= '1' |
Quote:
Brilliant stuff Revan,well done,works great,changes post count and forum stats, Not to worry thou i'm happy with it... Thanks again :up: |
Minor snag...
Some fourms have news areas and articles. where no one posts. Could this have a tiny mod to ignore these forum id's? |
Add a variable like so:
PHP Code:
Code:
WHERE `replycount` = '0' AND `forumid` NOT IN($ignoreids) You might want to try running the script right after applying the changes to test it, instead of not seeing the errors and thinking it runs OK ;) |
Quote:
|
great hack
|
I must be pretty stupid, but I made a modification of this cron job to prune closed threads (not sticky) and I just can't get them to delete :'(
Any help would be appreciated! PHP Code:
|
All times are GMT. The time now is 02:58 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|