Previous Thread
Next Thread
Print Thread
Rating: 5
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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.


Attachments
84984-massthreadsmove.6.3.zip (0 Bytes, 132 downloads)

Last edited by JoshPet; 01/02/2004 8:01 PM.
Sponsored Links
Joined: Sep 2001
Posts: 129
Member
Member
Offline
Joined: Sep 2001
Posts: 129
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 ?


Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!
Joined: Sep 2001
Posts: 129
Member
Member
Offline
Joined: Sep 2001
Posts: 129
Ah another thing I have just noticed is that if I select more than one file only one moves and the other disapears !


Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!
Joined: Jul 1999
Posts: 118
Enthusiast
Enthusiast
Offline
Joined: Jul 1999
Posts: 118
so this could move all old threads to an archive board??

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Haven't noticed any problems. We used it here to combine the archived finished mods forum and the archived beta mods forum.

Sponsored Links
Joined: Jul 1999
Posts: 118
Enthusiast
Enthusiast
Offline
Joined: Jul 1999
Posts: 118
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!!

Joined: May 2003
Posts: 115
Journeyman
Journeyman
Offline
Joined: May 2003
Posts: 115
i cant get this to work, it says its moved the thread but when i check its not moved...

Any suggestions??

thanks again

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Hmmmm..... I'd double check your instructions. I know this works because I isntalled it here when we had some reorganization to do.

Joined: May 2003
Posts: 115
Journeyman
Journeyman
Offline
Joined: May 2003
Posts: 115
omg sorry it is working! told you its one of those weeks!

Thanks its great!!

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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.

Sponsored Links
Joined: Feb 2002
Posts: 295
Member
Member
Offline
Joined: Feb 2002
Posts: 295
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!

Joined: Jan 2003
Posts: 141
Journeyman
Journeyman
Offline
Joined: Jan 2003
Posts: 141
It works fine on my 6.4b1.

Joined: Feb 2002
Posts: 295
Member
Member
Offline
Joined: Feb 2002
Posts: 295
Hi,

Cool. Thanks.

Sanuk!

Joined: May 1999
Posts: 78
Member
Member
Offline
Joined: May 1999
Posts: 78
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

Joined: May 1999
Posts: 78
Member
Member
Offline
Joined: May 1999
Posts: 78
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

Joined: May 1999
Posts: 78
Member
Member
Offline
Joined: May 1999
Posts: 78
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

Joined: May 2002
Posts: 41
User
User
Offline
Joined: May 2002
Posts: 41
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 />

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
JAISP
JAISP
PA
Posts: 449
Joined: February 2008
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)