![]() |
Auto Delete/Move Thread After X days
What does this hack do ?
This is second version of Auto Delete/Move Hacks, this hack can delete the zero post threads that was created before X days in your specific forums or it can move the zero post threads to specific(Archive) through scheduled task, by defualt delete the zero post every ten days, sure you can change the period as you want, this is where the Auto Delete After X Days comes in handy! Features:
Install instructions: 1- Upload the file to forum/includes/cron. 2- Import the Product XML file through your Admincp. 3- Enjoy. NOTE: Do not forget to review the hacks options in vBulletin options under "Auto Delete/Move After X Days " to set it as you want, the defualt setting are:- - Soft delete for the threads that have zero replay and created before 30 days ago. - protected user that have id 1 & 2. - it will running every ten days. - check the attachments. that's all Any questions, comments, suggestions, pleaes let me know Enjoy! |
Awesome! I think I might just have a use for this... ;)
[high]* projectego clicks install[/high] |
Is there a way so I can set the time I want for specific threads?
|
Can you set this up without any delete options? i just want to have threads moved to a new section after however many days.
|
Can u make it also for move closed thread after X days... ?
|
Quote:
Quote:
Quote:
sure you can User the delete thread or move the read or the both |
suggestions... ;)
ok, so delete type will only correspond w/ Auto Delete Thread After X days; could you move the Delete Type menu selection to within the Auto Delete Thread After X days fieldset. could you set this up for multiple forums/archives; ie: Effected Forums A = Archive Forum A & Effected Forums B = Archive Forum B and so forth? |
could you make it with inactive threads, because its kinda useless moving a thread that is still active. It should be handy that when a thread is inactive and X days old is moved to an archive forum...
Grtz |
Quote:
I mean to say I want Its Move all closed threads to Archive not Unreplied :( |
Quote:
now you all (effected forums) >>> (archive) Quote:
find: Code:
AND `replycount` = '0' Quote:
to do that you should change the /cron/cronautodelete.php file in line 31 : find: Code:
AND `replycount` = '0' Code:
AND `open` = '0' |
This can be very handy. I was looking for something that will move all threads that have been replied to in one forum to another... :up:
EDIT: I can't tell you how much this hack (with 2 changes to the cron query) solved a big headache I had for very long time... Thanks |
Great add-on, could you add the option to and have it configurable on a per-forum basis?
Ignore Stickies [yes no] Ignore Closed Threads [yes no] Move threads where the last reply is atleast X days ago Configurable on a Per-forum Basis ( so each forum can be configured different) Smiliar to the options in the Prune and Threads section of Admincp. |
can you add a feture to delete all the posts that has been Soft' deleted by the moderators???
Many thanks in advance (very nice mod anyway i clicked install) |
I cant get it to work..
It dont create any on "Scheduled Tasks"... And it dont move any Thread.... Can you help me? And plz post the Scheduled Task info... So i can add it manuel. Thx |
Quote:
Code:
INSERT INTO " . TABLE_PREFIX . "cron (weekday,day,hour,minute,filename,loglevel,active,varname, volatile,product)) VALUES (-1, 10, 0, 'a:1:{i:0;i:0;}', './includes/cron/cronautodelete.php', 1, 'Auto Delete/Move Thread After X days') and It should be working now... thanks all for your suggestions,and It will be done soon |
Dear HaMaDa4eVeR,
Thank a bunch for this beautiful mod i was always looking for. I will be lot greatful if you can help me on how to make this mod delete threads "after x days of inactivity". ie; the thread will be deleted after x days of no reply. To be specific, our forum moderators send "junk" or "spam" to a forum named "thrash" and we need to make the "thrash bin forum" work with your script so as it will delete the threads in that "thrash forum" after X days a thread stays in thrash. is it possible with a mod in this mod?? hopefully waiting for your reply regards Matthew |
Quote:
I'm ready to help you.. but the support for installed members only :) |
Quote:
I will be only happy to install the mod if it can be made compatible with the thread deletion rule mentioned.. only very happy to.. Pls do reply if you are keeping track mate.. I will be prompt for now on.. Thank you once agn and sorry for incon caused regards Matts |
I can?t seem to get the SQL Query to work...
This is the dump of the "cron" table: Code:
CREATE TABLE `cron` ( I just get the following error: Quote:
Code:
INSERT INTO cron VALUES (-1, 10, 0, 'a:1:{i:0;i:0;}', './includes/cron/cronautodelete.php', 1, 'Auto Delete/Move Thread After X days') Quote:
|
CREATE TABLE `cron` (
table prefix? The table prefix I use is "vb_" thus I use CREATE TABLE `vb_cron` ( *shrug* INSERT INTO cron (field1,field2,field3,...) VALUES (-1, 10, 0, 'a:1:{i:0;i:0;}', './includes/cron/cronautodelete.php', 1, 'Auto Delete/Move Thread After X days') see http://dev.mysql.com/doc/refman/5.0/en/insert.html for the proper syntax for the INSERT statement. |
Very cool!
Any chance it will be supported (I ask because of the new vb-versions)? 1. Does it only work with 0 posts? 2. Do I have to make the cron myself? |
Quote:
as you wish, just edit the attached file forum/includes/cron |
INSERT INTO " . TABLE_PREFIX . "cron (weekday,day,hour,minute,filename,loglevel,active, varname, volatile,product)) VALUES (-1, 10, 0, 'a:1:{i:0;i:0;}', './includes/cron/cronautodelete.php', 1, 'Auto Delete/Move Thread After X days')
Give me #1064 - Erreur de syntaxe pr賠de '" . TABLE_PREFIX . "cron (weekday,day,hour,minute,filename,logle' ࠬa ligne 1 |
very nice, will it work with 3.6.7?
does the timer start when the thread was created or when the last post was made? |
thx alot ^^ but i don'est add any cron job in v 3.6.7 pl1 >.>
how can i add it manually without running sql Query |
Quote:
Quote:
The number of quoted columns (Ten) does not mach the number of values (Seven). To me it looks like there are missing values for column active, varname and volatile. I have no scheduled task in either 3.6.4 (mine) or on a 3.6.7PL1 (which I am co-admin). Sorry if I'm being thick, but the SQL on the install code just doesn't look correct. :confused: |
Quick questions...I'm just about to install this...I will have it up in a few minutes.
But....what I want to know is once it's installed...and I have applied it to my specific forum that I want to apply it to. WILL it then do the action to everything that is CURRENTLY in that FORUM??? or will it only do it to NEW THREADS/POST that come in AFTER the Hack is installed??? JUST WONDERING??? Kirk |
Quote:
PHP Code:
Quote:
PHP Code:
Quote:
Quote:
old/new topics |
Tnx Good PlugIn:cool:
|
Quote:
I did what you said here...and this is the message I got after running it: Quote:
Kirk |
I got the SCHEDULED TASK situation fixed.....I read in post number: 10 the following:
Quote:
find: Code:
AND `replycount` = '0' ========== I did this and it only deleted threads that had ZERO posts in them. What I want this to do is this..... I have a forum where my members SELL stuff....and usually after 30 days...the stuff they are selling is OLD, SOLD, or they are not going to sell it. So...I want all threads...and all posts....that are more than 30 days old to just be deleted...every night.....is that want this will do for me? I have done what you suggested above...but it again....only deleted threads that had ZERO posts. HELP!!! Kirk |
How did you get the cron to work? I'm still having problems with it.
|
All I did was make a NEW SCHEDULED TASK and had it point to .php file that I uploaded into the "CRON" folder.
Just like that...it works. But....I seriously, seriously, SERIOUSLY need to get this working so that it DELETES ALL threads....older than 35 days....even the ones that have posts to them....JUST like you do in the "PRUNE" section manually. Kirk |
I think you put back what you deleted.
Code:
AND `replycount` = '0' |
Quote:
I did not TEST to see if it work on MOVING THEM??? HUM??? That could be the answer??? All I did was test to see if it would work on me DELETING them... I'm off to test that. Kirk |
Quote:
Thank you, THANK YOU!!!! That did it...I had the "AUTO MOVE" feature OFF....and when I removed the "AND 'replycount' = '0' command....it did not apply to "DELETING"...only MOVING. Which I can make work. I just set up a dummy forum....made it so nobody can see in it...and I'll just DELETE from it every now and then....EASY!!!! Thank you, thank you thank you!!!!! I vote that this be the best HaCK ever! Kirk |
Your welcome! :)
That's what I've done...I've set up a "recycle bin" that I'll manually prune. I just got done pruning over 10k THREADS! It's almost like giving lipo to someone who weighed 300 lbs and now weighs 100 lol j/p But the site is loading much quicker now :) |
After install I ran the Task manager and get this error message...
Invalid SQL: SELECT * FROM `vbthread` Where forumid IN(11,40,25,29,12,17,27,15,22,18,30,26,19,44,24,23 ,28,20,) AND `replycount` = '0' AND `postuserid` NOT IN (1,2) AND `dateline` <= '1190175911'; MySQL Error : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND `replycount` = '0' AND `postuserid` NOT IN (1,2) AND `da Error Number : 1064 I have no idea what this means, please help |
Anyone home??
|
I removed te trailing comma, 20,), that was the problem, seems to work now.
|
All times are GMT. The time now is 07:14 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:
|