News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Move Old Topics

Started by live627, October 24, 2006, 05:28:02 PM

Previous topic - Next topic

SleePy

The from boards are: (" . implode(', ', array_keys($_POST['boards'])) . ")

This needs to be a comma separated array in mysql.  So for example:  (1,5,6,13,642)

To apply this to multiple destination boards you would have to run the query multiple times.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Soti-Dragon

So if I was just going to automate it from a cron ...

I would just use the function  MoveTopic3() ... (which would call MoveTopics($topics, $toBoard) as part of its function) ... and rip out some of the checks, like checksession, if their allowed and such ... and replace the $_POST['toboard'] with the board I wish to move them to, and change either $_POST['boards'] to an array I make eg $array - array(1,2,3,4); or change (" . implode(', ', array_keys($_POST['boards'])) . ") to be a from board ... eg 5

Or should I just ignore it and forget automation ...

SleePy

Yes you can do that. :)
I did have plans to someday make this function use Scheduled tasks in 2.0 and make a nice way to auto move old topics from certain boards to other boards.  I just haven't had the time to do such work though :(
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

impreza

Portal ToTemat.pl - treści w postaci artykułów i filmów tematycznych.

AutoPuzzles

#84
When trying to upload the package the Package Manager says the following:


QuoteThe package you tried to upload either is not a valid package or has become corrupted.

I am using current edition SMF 1.1.14.  I downloaded the mod from the following link on this  Mods page:

http://custom.simplemachines.org/mods/index.php?action=download;mod=503;id=178707

WTF?

SleePy

As the error messages suggests, I think the package is corrupted.  This sometimes happens between some browsers when downloading and how the package is uploaded.  Giving it a try using another browser and/or a different upload method may resolve the issue.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

GhostHunter

I am getting the same error as AutoPuzzles, also in 1.1.14. Tried download/upload with both Firefox and Seamonkey, WinRAR says the archive has no errors.

GhostHunter

Quote from: GhostHunter on August 30, 2011, 11:06:47 PM
I am getting the same error as AutoPuzzles, also in 1.1.14. Tried download/upload with both Firefox and Seamonkey, WinRAR says the archive has no errors.

Same behavior on my test forum, which is still at 1.1.13.


GhostHunter

I installed the mod manually in 1.1.14, and it does not seem to work. I select to move all posts over X number of days old in a single board to another board, and (after asking if I really want to do it) I am returned immediately to the top level index page with no action taken, no posts moved, and no errors in the error log.


GhostHunter

Quote from: GhostHunter on September 17, 2011, 02:20:59 PM
I installed the mod manually in 1.1.14, and it does not seem to work.

Never mind. I missed an edit. Works now.

NGH

Advertisement: