Version: 1.00, by trafix
Developer Last Online: Jul 2008
Version: 3.0.5
Rating:
Released: 01-20-2005
Last Update: 01-20-2005
Installs: 15
No support by the author.
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
This modification may not be copied, reproduced or published elsewhere without author's permission.
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
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
");
.
.
.
.
.
.
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
");
.
.
.
.
.
.
Imagine a world where my mods would get off my back to make this hack work....please help if you can. I only install hacks that are supposed to be supported, as this one is advertised.
Imagine a world where my mods would get off my back to make this hack work....please help if you can. I only install hacks that are supposed to be supported, as this one is advertised.