UBB.Dev
Posted By: JoshPet Beta-[6.3-6.4] Mass Threads Move for 6.3 - 06/15/2003 8:57 AM
Mod Name / Version: Mass Threads Move for 6.3 & 6.4

Description: This modification and enclosed scripts will allow admins/moderators to move multiple threads from one forum to another . This includes unapproved posts.

Working Under: UBB.Threads 6.3 & 6.4

Mod Status: Beta

Any pre-requisites: none

Author(s): JustDave

Date: 06/14/03

Credits: JoshPet minor update to instructions for 6.3

Files Altered: /admin/menu.php, /admin/chooseforum.php

New Files: viewmovethreads.php, doviewmovethreads.php

Database Altered: none

Info/Instructions: This is really JustDave's work - just minor tweak to the instructions for 6.3. <img src="/forum/images/graemlins/smile.gif" alt="" />

Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.




Attached File
84984-massthreadsmove.6.3.zip  (132 downloads)
Posted By: Turbosport Re: Beta-[6.3] Mass Threads Move for 6.3 - 06/17/2003 11:18 AM
I have an issue that if you move a thread to a forum you cant then use this mod to move it back, anyone else got this ?
Posted By: Turbosport Re: Beta-[6.3] Mass Threads Move for 6.3 - 06/17/2003 11:23 AM
Ah another thing I have just noticed is that if I select more than one file only one moves and the other disapears !
so this could move all old threads to an archive board??
Posted By: JoshPet Re: Beta-[6.3] Mass Threads Move for 6.3 - 06/18/2003 1:32 AM
Haven't noticed any problems. We used it here to combine the archived finished mods forum and the archived beta mods forum.
Instead of the number 30, I used a variable $massmovenumber= 30; and carefully increased it up to 3000

This way I archived 20 000 threads with no maior difficulty. Works great!!

Now I put it back to $massmovenumber= 300; as 3000 should be used with great care only!!
i cant get this to work, it says its moved the thread but when i check its not moved...

Any suggestions??

thanks again
Hmmmm..... I'd double check your instructions. I know this works because I isntalled it here when we had some reorganization to do.
omg sorry it is working! told you its one of those weeks!

Thanks its great!!
LOL

I know sometimes we're not much help..... but I guess at least if others say they know it works under 6.3 then you know to double check instructions. I've installed things and stared at them until I was blue.... only to finally find what I did wrong.
Hi,

Did anybody try this for 6.4?
I'm about to create an archive and this mod would make my live quite a bit easier

Sanuk!
It works fine on my 6.4b1.
Hi,

Cool. Thanks.

Sanuk!
I'm having some problems running this one too. If I select two posts, I'm only seeing the first one get moved. I haven't finished looking at it, but the update seems to do the correct "OR". One thing I did find was that $oldboard was not getting set in doviewmovethreads, and only the updating for the new boards was getting run.

Lee
Okay, I found why the last thread isn't moved, here is an example:

UPDATE w3t_Posts
SET B_Board = 'website'
WHERE B_Main = '1569' OR B_Main = '35731'
AND B_Board = ''
;

The precedence of AND and OR makes it: B_Main = '1569 OR (B_Main = '35731' AND B_Board = '') which is all except the last one. I fixed it by adding parens around the WHERE $Formatted_q in the UPDATE. Of course it doen't move posts now becasue of $oldbard not being set, so on to that...

Lee
That was easy enough. After adding
Code
$oldboard = get_input("oldboard","post");
to the top where it was seting newboard it seems to be running correctly now.

Lee
Posted By: Sheall Re: Beta-[6.3-6.4] Mass Threads Move for 6.3 - 05/11/2004 1:52 PM
This modification has one small problem, it allows moderators to move threads to forums they do not have moderator access to. The fix is below.

IN VIEWMOVETHREADS.PHP

FIND THIS:

Code
 <br />   $initialcat = ""; <br />   $boardSelect = "<select name=\"newboard\" class=\"formboxes\">"; <br />   while (  list($Title,$Board,$Catnum,$Sorter,$Name) = $dbh -> fetch_array($sth)) { <br />


AND CHANGE IT TO THIS:

Code
 <br />   $initialcat = ""; <br />   $boardSelect = "<select name=\"newboard\" class=\"formboxes\">"; <br />   while (  list($Title,$Board,$Catnum,$Sorter,$Name) = $dbh -> fetch_array($sth)) { <br /> <br /> <br />       $Board_q    = addslashes($Board); <br />       $query = " <br />           SELECT Mod_Board <br />           FROM   {$config['tbprefix']}Moderators <br />           WHERE  Mod_Uid = '{$user['U_Number']}' <br />           AND    Mod_Board    = '$Board_q' <br />      "; <br />       $sti = $dbh -> do_query($query); <br />      list($check) = $dbh -> fetch_array($sti); <br />      if ( ($user['U_Status'] != 'Administrator') && (!$check) ) { <br />         continue; <br />      } <br />
Posted By: JoshPet Re: Beta-[6.3-6.4] Mass Threads Move for 6.3 - 05/12/2004 4:48 AM
Normal functionality in Threads is that a moderator can move posts to any forum that they can WRITE to. They don't have to be moderators in the forum they are moving TO. The move function in threads works the same way. Thus the moderator of a forum can move posts OUT of their forum to the correct forum.
© UBB.Developers