Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: live627 on October 24, 2006, 05:28:02 PM

Title: Move Old Topics
Post by: live627 on October 24, 2006, 05:28:02 PM
Link to Mod (http://mods.simplemachines.org/index.php?mod=503)

This mod Adds the Ability to Move all posts in board(s) to another board based on How old it is and with special options like only moved topics, locked topics, and/or ignoring stickied topics. This is great for use with Archive boards and mass moving topics of old age at once.
Title: Re: Move Old Topics
Post by: danskmacabre on October 25, 2006, 04:26:55 AM
Installed and tested this mod, which works fine.

one small thing though.
When you press the move button, it still sends the old "warning, these posts will be deleted etc etc".

This concerned me a bit, as I DO use an archive forum and didn't want to lose posts, so I did it on a test forum and it didn't delete the posts but moved them as expected.
However, if you could change or remove that message, it might be less alarming for people.
Title: Re: Move Old Topics
Post by: denislici on October 25, 2006, 08:26:46 AM

i cant download it !!!!
Title: Re: Move Old Topics
Post by: danskmacabre on October 25, 2006, 08:48:39 AM
Just tried again to download it and it worked fine for me.
Title: Re: Move Old Topics
Post by: L.G.S on October 25, 2006, 11:19:10 AM
Sweet !! Waiting for this for ages.

As the dan said also, I do not like how it says the posts will be deleted.
Title: Re: Move Old Topics
Post by: SleePy on October 25, 2006, 06:25:17 PM
Quote from: danskmacabre on October 25, 2006, 04:26:55 AM
Installed and tested this mod, which works fine.

one small thing though.
When you press the move button, it still sends the old "warning, these posts will be deleted etc etc".

This concerned me a bit, as I DO use an archive forum and didn't want to lose posts, so I did it on a test forum and it didn't delete the posts but moved them as expected.
However, if you could change or remove that message, it might be less alarming for people.
Quote from: danskmacabre on October 25, 2006, 08:48:39 AM
Just tried again to download it and it worked fine for me.

Oops.. Thanks for noticing that.. I have fixed it and uploaded it as V1.1 that also fixed a spacing error just before the day input box..
btw.. To upgrade. Remove old version first...
Or You just have to add 1 language string and edit the admin.template.php to use that new language string.. Which I can help if you dont want to do the upgrade..

Quote from: denislici on October 25, 2006, 08:26:46 AMi cant download it !!!!

Please try to download again or try a different browser... The download should work fine.. If not get ahold of a member of the SMF team to have them sort the issue. The download issue would be their issue not mine as the mod is hosted on their site.
Title: Re: Move Old Topics
Post by: danskmacabre on October 26, 2006, 02:00:34 AM
yes, just tested that, and the text has been changed.
Thanks for that  :) , I know it's only a cosmetic change, but an important one. 
Title: Re: Move Old Topics
Post by: littleone on October 27, 2006, 06:48:27 PM
It wont let me "apply" the mod.  Here is what i get in my error log:

512: parseModification(): The filename 'index.php' is not a full path!
File: /home/xxxxxxxxxxx/public_html/forum/Sources/Subs-Package.php
Line: 1330
Title: Re: Move Old Topics
Post by: PrizeLive.com on October 30, 2006, 01:05:49 PM
can this be made for 1.2 rc2?
Title: Re: Move Old Topics
Post by: littleone on November 07, 2006, 12:17:31 PM
Still getting....

512: parseModification(): The filename 'index.php' is not a full path!
File: /home/xxxxxxxx/public_html/forum/Sources/Subs-Package.php
Line: 1330



Starting to feel like there is bad support on this mod when my issue isnt even acknowledged.
Title: Re: Move Old Topics
Post by: Greengoat on November 12, 2006, 12:48:54 PM
Works fine.  I was wondering if it is possible to send it to a child board?  I wanted to create an archive board off of a board.

Thanks
Title: Re: Move Old Topics
Post by: SleePy on November 12, 2006, 02:13:08 PM
Quote from: Greengoat on November 12, 2006, 12:48:54 PM
Works fine.  I was wondering if it is possible to send it to a child board?  I wanted to create an archive board off of a board.

Thanks

You should be able to send it to any board..

@littleone..

Sorry for making you wait.. Some reason I didn't get notified of the topic reply...

But the error you getting is due to a little code I missed..
You can download 1.2 and it will install..

Though I don't guarantee my mods work for 1.1 RC2 as they were developed on 1.1 RC3..
But it should as only minor changes were made between the two..
Title: Re: Move Old Topics
Post by: Greengoat on November 12, 2006, 04:08:19 PM
Okay it's been along two days of forum maintenance so I should stop asking questions without first taking a nap or drinking more coffee.

It works, even on the child boards.  I was using my test board and because after the fresh install I didn't bother setting it up exactly the same as the real board I didn't....have any child boards.  Once I created a child board it of course showed up on the drop down menu.

Peace and thanks again,
Michael
Title: Re: Move Old Topics
Post by: fiver on December 06, 2006, 03:27:08 AM
Hi SleePy,

Is there a way to make it automatically move topics from Main board to Its child board? For example setting [7] days since last post, will move those topics which are inactive for 7 days.

:)
Title: Re: Move Old Topics
Post by: SleePy on December 06, 2006, 05:53:30 PM
No its not a feature in this mod..
You could make a script to use this mods function to do that though.. Then run it with cron jobs every 7 days..

But that sounds like another mod as it is.. This mods moves massive topics at once to a single board. It does not watch for inactive topics to move them..
Title: Re: Move Old Topics
Post by: Fiery on January 04, 2007, 04:45:14 AM
Hello,

First of all great mod, it worked really well.

But I have one suggestion.  It would be nice if by default all of the "Specific Boards" were not checked (as is the case for "remove old posts")  I think people may forget they are all checked and accidentally move all topics/posts to a new board... I would know, I did; and it was a lot of fun fixing it  ;)
Additionally if for some reason they wanted to move them all they could just hit the select all button or something.

This is just a thought I had that would make it "safer."
Title: Re: Move Old Topics
Post by: El Reclutador 2003 on February 22, 2007, 10:19:05 AM
Where is in the admin panel settings to configure the boards and anymore?
Title: Re: Move Old Topics
Post by: CyberOto on February 22, 2007, 12:35:29 PM
Hi,

Go to Maintenance -> Forum Maintenance and you will see the new option - Forum Maintenance - Remove Old Posts


Cheers
Title: Re: Move Old Topics
Post by: SleePy on February 22, 2007, 05:23:11 PM
Quote from: pmp6nl on January 04, 2007, 04:45:14 AM
Hello,

First of all great mod, it worked really well.

But I have one suggestion.  It would be nice if by default all of the "Specific Boards" were not checked (as is the case for "remove old posts")  I think people may forget they are all checked and accidentally move all topics/posts to a new board... I would know, I did; and it was a lot of fun fixing it  ;)
Additionally if for some reason they wanted to move them all they could just hit the select all button or something.

This is just a thought I had that would make it "safer."

Hey pmp6nl,
I know its a bit late but that is why there is a javascript notice that you can't undo the action. You should always double check when doing this or the delete maintenance

Quote from: El Reclutador 2003 on February 22, 2007, 10:19:05 AM
Where is in the admin panel settings to configure the boards and anymore?

This is in your Admin -> Forum Maintenance area.
Title: Re: Move Old Topics
Post by: Con on May 06, 2007, 10:33:50 AM
I just installed this, but it's not showing up in the Forum Maintenance, could it be because of custom themes?
Title: Re: Move Old Topics
Post by: TrueSatan on May 06, 2007, 10:43:58 AM
Quote from: Con on May 06, 2007, 10:33:50 AM
I just installed this, but it's not showing up in the Forum Maintenance, could it be because of custom themes?
Try it in the default theme and if it works there you'll have to investigate installation into a custom theme. This mod should be able to work in any theme judging from a cursory look at the code but you should always test in the default theme to see if a new mod works them move on to trying to get it to work in custom themes.
Title: Re: Move Old Topics
Post by: Con on May 06, 2007, 01:23:34 PM
Quote from: TrueSatan on May 06, 2007, 10:43:58 AM
Try it in the default theme and if it works there you'll have to investigate installation into a custom theme. This mod should be able to work in any theme judging from a cursory look at the code but you should always test in the default theme to see if a new mod works them move on to trying to get it to work in custom themes.
Tried in the default one too, still isn't shown, but it is displayed as installed in the package menu...
Title: Re: Move Old Topics
Post by: SleePy on May 07, 2007, 04:49:03 PM
Are you sure it installed?
Do you see the MoveTopic.php in Sources has been modified? has the Admin.template.php in your custom theme (or default theme if none) has been modified when you installed the mod?
Title: Re: Move Old Topics
Post by: Con on May 07, 2007, 04:57:42 PM
Movetopic.php has not been modified, but admin template has, strange as it does say the mod has been installed.
Title: Re: Move Old Topics
Post by: SleePy on May 07, 2007, 05:15:33 PM
uninstall the mod. If it says it will uninstall unsuccessfully (with errors). Then that means it didn't fully install for some reason. Proceed with it anyways and try to install again.
Title: Re: Move Old Topics
Post by: Con on May 07, 2007, 07:10:50 PM
It suddently worked after I uninstalled some other mods.
ones about display things like group badges and location/age, nothing that seemed to be bugging this one.. ohwell.
Title: Re: Move Old Topics
Post by: NGame.nl on August 16, 2007, 03:09:03 PM
I can see the MOD, but if I would like to move the topics, it says complete but they aren't moved.
Title: Re: Move Old Topics
Post by: SleePy on August 16, 2007, 07:19:26 PM
Any errors occurred in the SMF error log?
Are you moving topics to the same board you are moving from?
Title: Re: Move Old Topics
Post by: NGame.nl on August 17, 2007, 10:06:25 AM
if(is_array($_POST['tobard']))
fatal_error($txt[106].' ERROR ID: MoveOldPosts-2');


Undefined index: tobard
Title: Re: Move Old Topics
Post by: SleePy on August 17, 2007, 04:53:13 PM
That line is incorrect, The post variable is slightly wrong.

Uninstall the mod. Download a new one and install it again and see if this helps.

That line should of been like this:
if(is_array($_POST['toboard']))
fatal_error($txt[106].' ERROR ID: MoveOldPosts-2');
Title: Re: Move Old Topics
Post by: Jye on October 10, 2007, 03:58:37 PM
I have SMF 1.1.4.  This Mod is meant to be compatible with it right?  After I installed it on the default theme, I get the following text show at the very top of each page.  How can this be fixed?

//Move Old Posts $txt['move_maintain_old'] = 'Move Old Posts'; $txt['move_maintain_old_since_days1'] = 'Move all topics not posted in for'; $txt['move_maintain_old_since_days2'] = 'days, which are:'; $txt['move_maintain_old_remove'] = 'Move Old'; $txt['move_Destboard'] = 'Destination Board:'; $txt['move_maintain_old_confirm'] = 'Are you really sure you want to MOVE old posts now?';
Title: Re: Move Old Topics
Post by: SleePy on October 10, 2007, 04:46:38 PM
Open Modifcations.english.php in Themes/default/languages.
Find ?>

And move this to the very bottom leaving no spaces or returns after it.
Title: Re: Move Old Topics
Post by: Jye on October 10, 2007, 05:00:57 PM
Quote from: SleePy on October 10, 2007, 04:46:38 PM
Open Modifcations.english.php in Themes/default/languages.
Find ?>

And move this to the very bottom leaving no spaces or returns after it.
Ah yes, makes sense.  Thank you SleePy it worked!
Title: Re: Move Old Topics
Post by: SleePy on October 10, 2007, 05:39:25 PM
No thank you, I thought this would be a good idea for a doc in the docs site so I kicked the idea to the doc team :)
Title: Re: Move Old Topics
Post by: cor met snor on October 11, 2007, 04:05:37 AM
This mod works fine, but how can I make it work in Dutch (Dilber Theme - English oké but not in Dutch)

for example

English                           Dutch

Move Old Post -              Verplaats oude berichten
Destination Board -         Bestemmings Board
Move Old -                       Verplaats Oud

New Category -               Nieuwe Categorie
General Category -          Algemene Categorie

It generaly works in Dutch but without the mentioned Messages

I hope You can help me or give me a hint how to fix this



Title: Re: Move Old Topics
Post by: SleePy on October 11, 2007, 03:17:45 PM
If you look at Modifications.english.php
There should be the text strings related to the mod.
Just copy those to Modifications.dutch.php (or Modifications.dutch-utf8.php if you are using utf8) and then change them to the dutch version.
Title: Re: Move Old Topics
Post by: cor met snor on October 11, 2007, 05:15:40 PM
Okay thanks, it was easy that way, even a dummy as me could fix it.

Maybe it should be even a greater admin tool, if we could move selected posts from boards to an new to create destination board.


Title: Re: Move Old Topics
Post by: Hoochie Coochie Man on January 13, 2008, 07:12:49 PM
Great mod, thank you SleePy

But I think there is a bug.
You must change here (admin.template.php)
$txt['maintain_old_since_days2']
to
$txt['move_maintain_old_since_days2']
;)

and here is modification.turkish.php
//Move Old Posts by Hoochie Coochie Man
$txt['move_maintain_old'] = 'Eski Konuları Taşı';
$txt['move_maintain_old_since_days1'] = 'Mesaj gönderilmemiş';
$txt['move_maintain_old_since_days2'] = ' günü geçen konuları taşı, bunlar:';
$txt['move_maintain_old_remove'] = 'Taşı';
$txt['move_Destboard'] = 'Taşınacağı Bölüm:';
$txt['move_maintain_old_confirm'] = 'Eski Konuları Taşımak İstediğinizden Emin misin?';

Title: Re: Move Old Topics
Post by: SleePy on January 13, 2008, 07:32:07 PM
Thanks for the report. I fixed it in my sources. I won't update the main file at the moment though.

Is that turkish-utf8 or just turkish?
Title: Re: Move Old Topics
Post by: Hoochie Coochie Man on January 13, 2008, 07:41:21 PM
Quote from: SleePy on January 13, 2008, 07:32:07 PM
Is that turkish-utf8 or just turkish?
just turkish
Title: Re: Move Old Topics
Post by: cellax on April 28, 2008, 08:02:00 PM
the help box speaks about REMOVE topics, I fixed.


On your language folder, look for "Help.english.php" (english means your language too)
Code (search for) Select
$helptxt['maintenance_rot']

Code (add before) Select
//Move Old Posts BEGIN
$helptxt['maintenance_mot'] = 'This allows you to <b>irrevocably</b> move old topics, if something goes wrong, you have to move topics one by one.  You should try to make a backup first, just in case you remove something you didn\'t mean to.<br /><br />Use this option with care.';
//Move Old Posts END

   
   
on your Theme folder, look for "Admin.template.php"
   
Code (search for) Select
// Moving any older posts.
echo '
<tr class="titlebg">
<td><a href="', $scripturl, '?action=helpadmin;help=maintenance_rot" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.gif" alt="', $txt[119], '" align="top" /></a> ', $txt['maintain_title'], ' - ', $txt['move_maintain_old'], '</td>
</tr>
<tr>
<td class="windowbg2">
<a name="rotLink"></a>';

               
Code (replace) Select
// Moving any older posts.
echo '
<tr class="titlebg">
<td><a href="', $scripturl, '?action=helpadmin;help=maintenance_mot" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.gif" alt="', $txt[119], '" align="top" /></a> ', $txt['maintain_title'], ' - ', $txt['move_maintain_old'], '</td>
</tr>
<tr>
<td class="windowbg2">
<a name="rotLink"></a>';


thx for this mod
Title: Re: Move Old Topics
Post by: Soti-Dragon on May 30, 2008, 12:45:09 AM
Hi Sleepy ...

I like the look of this mod, but I was wondering if there was a cheap and easy way to change if from Old Posts to Inactive Posts ... basing it off the last post in the thread, rather than the first.

I read somewhere in this thread that you thought that might be a seperate mod, or maybe you were referring to making it automatic.

I don't care if it is automatic, if it only happens when I am not to lazy to click the button, that is fine, but I would rather move inactive threads than active threads that are old.

Any idea's ? or shall I wait and hope someone makes that mod (mainly because my own coding ability is rather limited).
Title: Re: Move Old Topics
Post by: SleePy on May 30, 2008, 10:14:05 PM
I did take a peak at things, but to to be able to do this I would have to join another table (I think) in the query and get the last poster time. I haven't had the time at the moment to look into doing this though :)
Title: Re: Move Old Topics
Post by: Soti-Dragon on June 02, 2008, 02:15:25 AM
No problems ... I can wait ... and if you do manage to find the time to be able to do it ... I will shower you in monopoly money stolen from someone elses monopoly game ...  Thanks for looking though :)
Title: Re: Move Old Topics
Post by: SleePy on June 02, 2008, 11:58:08 PM
Soti-Dragon,

I just looked at this and the mod does do this by the last poster time.

    // Now that we made the checks lets get going with this function
    $request = db_query("
        SELECT t.ID_TOPIC
        FROM ({$db_prefix}topics AS t, {$db_prefix}messages AS m)
        WHERE m.ID_MSG = t.ID_LAST_MSG
            AND m.posterTime < " . (time() - 3600 * 24 * $_POST['maxdays']) . "
            AND t.ID_BOARD != ".$_POST['toboard']."
            $additional
            AND t.ID_BOARD IN (" . implode(', ', array_keys($_POST['boards'])) . ")", __FILE__, __LINE__);


That will check for where the id_msg is equal ot the id of the last message made and where the the poster time is below a certain limit. As well as a few other checks.

Title: Re: Move Old Topics
Post by: Soti-Dragon on June 03, 2008, 12:49:49 PM
Sleepy,

Thanks man ... total bonus, and you didn't even have to do any coding, just reading ... I'll shower you in monopoly money later ...

I'll chuck this into my forums and have a play ... thanks for your time man ... no doubt I will be posting in here if I fubar the intall ... (using custom skin) ... but I am pretty good at making mods work even with my customer skin ...

Thanks again for your time ...
Title: Re: Move Old Topics
Post by: SleePy on June 03, 2008, 04:29:53 PM
Well if your unsure about it, I always suggest a test forum. So if you screw things over, your live site isn't affected ;)
Title: Re: Move Old Topics
Post by: Soti-Dragon on June 30, 2008, 09:50:31 PM
Well, I am a lazy bugger, so put all mods into the Live forum, cross my fingers and pray ...

But this Mod works as I was hoping it would ...

Thank you man ... you are a legend ...

*bows down in worship to SleePy*

If you need any testing done for other mods, feel free to let me know, I am silly enough to break my forums :)
Title: Re: Move Old Topics
Post by: shacon on September 14, 2008, 02:47:17 PM
Will this work with ver. 2.0,  3 Beta Public?  I noticed that an error occurred for the manual install when submitted on modification link.

Thanks.

-shacon :)
Title: Re: Move Old Topics
Post by: SleePy on September 14, 2008, 03:00:09 PM
It should, but I would recommend you upgrade to 2.0 beta 4 Public :)
Title: Re: Move Old Topics
Post by: shacon on September 14, 2008, 03:06:24 PM
Quote from: SleePy on September 14, 2008, 03:00:09 PM
It should, but I would recommend you upgrade to 2.0 beta 4 Public :)

I would in a heartbeat, however the other admins want to wait until SMF is final.

-s
Title: Re: Move Old Topics
Post by: SleePy on September 14, 2008, 04:00:22 PM
I hope your admins realize that 2.0 Beta 4 Public had a security issue patched in it. May be something to consider.

I don't officially support old versions of 2.0, but if they install and work for you then it does  ;D

I do keep all releases I have ever done on my own site. So one of those versions most likely will work for 2.0 beta 3.
http://sleepycode.com/index.php/action,hacks/hack,2.html
Title: Re: Move Old Topics
Post by: wowyahoo on September 14, 2008, 05:42:07 PM
thanks for the mod link! I like it.
Title: Re: Move Old Topics
Post by: PetrusCorporated on September 20, 2008, 08:34:09 AM
HI! I've found a problem using this mod. I was moving some topics from a subforum to another, a lot of topics [it was over 300], and some of the moved topics become blank topics, like this one:

http://www.gtacrew.net/index.php?topic=3661.0

This Topic is in this subforum:

http://www.gtacrew.net/index.php?board=18.0

It's named 'Tupac esta vivo?', at the bottom of the page.

Do you have any idea about what happened, or how can I fix this? There are not too much blank topics, but it's a problem :S
Title: Re: Move Old Topics
Post by: SleePy on September 20, 2008, 10:24:02 PM
Do you get any errors in the error log?

This topic makes use of the built in SMF function for moving topics, so the only thing I can think of is there was to many to do at once and then a server time out happened resulting in not all the queries able to be executed.
Title: Re: Move Old Topics
Post by: DirtRider on May 11, 2009, 03:16:30 PM
Well I gave this mod a bash with the remove option and I got the following error

An Error Has Occurred!
Unable to verify referring url. Please go back and try again.
Title: Re: Move Old Topics
Post by: SleePy on May 11, 2009, 07:21:59 PM
What version of SMF?
Title: Re: Move Old Topics
Post by: DirtRider on May 11, 2009, 10:54:37 PM
Ooops sorry I am running RC1 but the funny thing another member here has had the same error when trying to do file maintenance http://www.simplemachines.org/community/index.php?topic=309729.0;topicseen (http://www.simplemachines.org/community/index.php?topic=309729.0;topicseen) so I am not sure now if this could be a RC1 bug or not
Title: Re: Move Old Topics
Post by: SleePy on May 12, 2009, 05:44:52 PM
Where you using multiple tabs in your browser.
This can happen sometimes when browsing around or if you clicked something, then went back and clicked on the submission button.

Basically what is going on is the SMF session check is saying our previous url doesn't match up to the site you are on. So its throwing the security error out.
Title: Re: Move Old Topics
Post by: defcrash on July 14, 2009, 11:11:44 AM
Hi there SleePy, this mod is exactly what i was looking for, thanks a lot! ;D

I've only have 2 questions, is the "igonre sticky" topics only avaiable at the version 1.3.5? Because i instaled the 1.3.4 version (cause i'm on the 2.0 beta 4) and i can't see that option! :-\

Another thing that i wanted to ask its if theres any way of adding this to the moderation center?

Thanks for your time,

Best Regards,
defcrash
Title: Re: Move Old Topics
Post by: SleePy on August 22, 2009, 12:19:37 PM
You can add it to the moderation center, but it would require modifying the templates and changing security checks to allow non-admins to do this.

The ignore sticky option should of been there long ago.  It is in the move old topic options to ignore stickies when moving topics.
Title: Re: Move Old Topics
Post by: wildmck8 on September 20, 2009, 09:19:29 AM
Hi all,
when trying to install this mod via package manager on my 1.1.9 site, I get the following error prior to install:

Execute Modification     ./Themes/default/languages/Modifications.english-utf8.php     File not found

Any clues or suggestions. I really want to use this mod.  It looks fantastic.

Thanks,
Luap
Title: Re: Move Old Topics
Post by: SleePy on September 21, 2009, 10:30:54 PM
You should be able to install cleanly.  That action just adds the text strings to the UTF-8 language english file if it exists.
Title: Re: Move Old Topics
Post by: PalmBeachPreps on December 09, 2009, 01:54:28 AM
I'm using 2.0 RC2 and would love to have this mod, however I'm getting this: 2.     Add Before     ./Themes/default/ManageMaintenance.template.php     Test failed.

I went to manually change the code and found that the problem is that it's looking for a table tag, which is nowhere to be found in the file.

It tells me to look fore this:</table>';
}

// Simple template for showing results of our optimization...
function template_optimize()
BUT, that section actually has this:</div>
</div>
<br class="clear" />';
}

// Simple template for showing results of our optimization...
function template_optimize()
.
Title: Re: Move Old Topics
Post by: SleePy on December 09, 2009, 07:08:11 PM
Woops, some of my changes didn't make my packaging.  I repackaged as 1.3.5.1 and it includes the fixed package :)
Title: Re: Move Old Topics
Post by: Tanks on December 11, 2009, 03:14:38 AM
Hi Sleepy

Thanks for a great mod, but i don't get to choose a destination board.

The mod installed with no errors on SMF 2.0 RC2

See attached image
Title: Re: Move Old Topics
Post by: Tanks on December 13, 2009, 01:01:31 AM
Wake up Sleepy :D
Title: Re: Move Old Topics
Post by: SleePy on December 13, 2009, 01:01:56 AM
You are right.  Somehow in my conversion to curve code I lost it.  I won't have time until late monday/early Tuesday to work on this :(
Title: Re: Move Old Topics
Post by: Tanks on December 13, 2009, 01:09:22 AM
That's cool - looking forward to use your mod ;)
Title: Re: Move Old Topics
Post by: SleePy on December 15, 2009, 04:44:53 PM
The mod has been fixed :)
Title: Re: Move Old Topics
Post by: PalmBeachPreps on December 15, 2009, 05:21:44 PM
Works great now, thanks Sleepy!
Title: Re: Move Old Topics
Post by: Tanks on December 16, 2009, 12:01:52 AM
Thanks :)
Title: Re: Move Old Topics
Post by: Sharkillero on March 26, 2010, 12:12:25 PM
I'm using SMF 1.1.11 and got this message:

An Error Has Occurred!
The package you tried to upload either is not a valid package or has become corrupted.

Any ideas?
Title: Re: Move Old Topics
Post by: SleePy on March 28, 2010, 06:47:21 PM
Are you using the 1.3.6 package?
Title: Re: Move Old Topics
Post by: - WoW - on May 04, 2010, 06:38:22 AM
Where can I use this mod?
Where can I option it?
Title: Re: Move Old Topics
Post by: tvirusxx1 on June 17, 2010, 12:38:37 PM
Hi all,

So far the Mod itself is perfect. I have set it up Properly but the problem is that now I can not move Topics manually!

I hope you can help me.

Regards tvirusxx1
Title: Re: Move Old Topics
Post by: SleePy on June 20, 2010, 11:20:50 AM
This mod doesn't interfere with SMFs default ability to move topics.  You can uninstall the mod to see if it fixes it, but I highly doubt it will.
Title: Re: Move Old Topics
Post by: Agkel0s on July 14, 2010, 04:56:44 PM
Hello everybody...

I'm having a problem in installing this mod. When I try to install the package, after uploading it to the server, a message appears saying something like this:

"There are no install or uninstall actions defined for this package" (I use a different language, but this is the translation to the message I see)

Did this happened to anyone else? How do I fix this?

Thanks in advance!
Title: Re: Move Old Topics
Post by: SleePy on July 18, 2010, 01:46:11 PM
What version of SMF are you using?
Have you tried downloading/uploading it with another browser?
Title: Re: Move Old Topics
Post by: Soti-Dragon on December 31, 2010, 08:35:45 AM
Quote from: Soti-Dragon on June 30, 2008, 09:50:31 PM

The quote was just to show you how long ago it was that I last thought to ask you anything.  *grin*

I was just wondering if it would be difficult to port this so that I can automate it.

Having it as a php file that is called from a cron is easier enough ... or ported to perl so that I can add parameters works ... whichever way ...

You once said to me:

Quote from: SleePy on June 02, 2008, 11:58:08 PM
    // Now that we made the checks lets get going with this function
    $request = db_query("
        SELECT t.ID_TOPIC
        FROM ({$db_prefix}topics AS t, {$db_prefix}messages AS m)
        WHERE m.ID_MSG = t.ID_LAST_MSG
            AND m.posterTime < " . (time() - 3600 * 24 * $_POST['maxdays']) . "
            AND t.ID_BOARD != ".$_POST['toboard']."
            $additional
            AND t.ID_BOARD IN (" . implode(', ', array_keys($_POST['boards'])) . ")", __FILE__, __LINE__);


The maxdays is wasy enough to figure out, and so is the toboard ...

But how would I change the query to basically say that I want to move files that are older that blah from board blerg to board blarg.

I understand that you may not want to look at that, and that is cool, but I figured it wouldn't hurt to ask.
Title: Re: Move Old Topics
Post by: SleePy on January 04, 2011, 02:29:18 AM
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.
Title: Re: Move Old Topics
Post by: Soti-Dragon on January 04, 2011, 07:31:55 AM
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 ...
Title: Re: Move Old Topics
Post by: SleePy on January 05, 2011, 03:08:27 PM
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 :(
Title: Re: Move Old Topics
Post by: impreza on January 05, 2011, 04:16:00 PM
A fun, thank you
Title: Re: Move Old Topics
Post by: AutoPuzzles on August 29, 2011, 10:39:21 PM
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?mod=503):

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

WTF?
Title: Re: Move Old Topics
Post by: SleePy on August 30, 2011, 06:00:42 PM
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.
Title: Re: Move Old Topics
Post by: 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.
Title: Re: Move Old Topics
Post by: GhostHunter on August 30, 2011, 11:14:00 PM
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.

Title: Re: Move Old Topics
Post by: 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. 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.

Title: Re: Move Old Topics
Post by: GhostHunter on September 27, 2011, 11:31:23 PM
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