The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Auto move threads to archive forum after x days Details »» | |||||||||||||||||||||||||||
Auto move threads to archive forum after x days
Developer Last Online: Jul 2008
Requested by Floris
This is another simple script based on the Close thread after 30 days .... BUT ... This one will auto move all threads to an archive forum where the last post is 365 days or older There is 2 variables for you to edit 1) Defult is set to "1" $newforum = the forum number that these threads are to be moved to 2) Defult is set to 365 this means that threads that havnt been replied to in the last 365 days will be moved to the nominated archive forum you can change 365 to whatever days you like Trafix Please click Install Update Found an error in the code please download new zip and replace the file on your forum Added file ... This file will move threads from a specific forum to another spacific forum, edit as instructed Show Your Support
|
Comments |
#42
|
||||
|
||||
nice work
|
#43
|
|||
|
|||
Quote:
It seems when I search, or goto 'new posts' it shows on all the threads. |
#44
|
||||
|
||||
With this cron, it runs without error but nothing get moved. I do have it set for 2 different forums to move into one. Here's a peek:
Code:
error_reporting(E_ALL & ~E_NOTICE); if ($DB_site == NULL) { exit; } global $DB_site; // you only need to edit the number of days only $movedate = strtotime("now -365 days"); //############################################## // edit the forum id number where the threads have to be moved FROM $fromforuma="10"; // edit the forum id number where the threads have to be moved TO $toforuma="60"; // do not edit below $DB_site->query(" UPDATE " . TABLE_PREFIX . "thread SET forumid = $toforuma Where lastpost <= $movedate AND forumid = $fromforuma "); // do not edit above //############################################## // edit the forum id number where the threads have to be moved FROM $fromforumb="17"; // edit the forum id number where the threads have to be moved TO $toforumb="60"; $DB_site->query(" UPDATE " . TABLE_PREFIX . "thread SET forumid = $fromforumb Where lastpost <= $movedate AND forumid = $toforumb "); // do not edit above |
#45
|
|||
|
|||
I get this error when I try to run it:
Database error in vBulletin 3.0.6: Invalid SQL: UPDATE thread SET forumid = Where lastpost <= 1110979914 AND forumid = 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 'Where lastpost <= 1110979914 AND forumid =' at line 3 mysql error number: 1064 Any ideas? Here's a sample of the php file I've edited: // edit the forum id number where the threads have to be moved FROM $fromforuma="153"; // edit the forum id number where the threads have to be moved TO $toforuma="63"; $DB_site->query(" UPDATE " . TABLE_PREFIX . "thread SET forumid = $toforuma Where lastpost <= $movedate AND forumid = $fromforuma "); // edit the forum id number where the threads have to be moved FROM $fromforumb="4"; // edit the forum id number where the threads have to be moved TO $toforumb="63"; $DB_site->query(" UPDATE " . TABLE_PREFIX . "thread SET forumid = $toforumb Where lastpost <= $movedate AND forumid = $fromforumb "); . . . . . . |
#46
|
|||
|
|||
Nobody?
|
#47
|
|||
|
|||
This is almost what I have looking for!
Is it possible for this to move a thread once some one posts in it? Like..a thread is started in one forum (news forum) and once someone replies it then moves to a discussion forum so others can reply? |
#48
|
|||
|
|||
Quote:
|
#49
|
|||
|
|||
Quote:
|
#50
|
|||
|
|||
Quote:
|
#51
|
|||
|
|||
PHP Code:
PS: OMG This is the worst script i have ever seen. Do you realize you could also have done this in a 6-line loop? No offence ment, not trying to put you down, but this really brought a smile on my face. (and a headache looking for the wrong spelled var) |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|