JoshPet
The artist formerly known as Mr. Bug
  
Reged: 11/29/01
Posts: 11414
Loc: Charlotte, NC
|
|
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.
--------------------
Josh - Joshua PettitWebsite - For Hire Coding work and Modifications
Feel Better, Look younger - www.BuyTransD.com
Use Coupon Code 1004 to Save $20 Off Your Initial Order of Trans-D Tropin
Edited by JoshPet (01/02/04 07:01 PM)
|
Turbosport
Member
Reged: 09/08/01
Posts: 157
Loc: Kent, UK.
|
|
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!
|
Turbosport
Member
Reged: 09/08/01
Posts: 157
Loc: Kent, UK.
|
|
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!
|
mario2
Enthusiast

Reged: 07/08/99
Posts: 470
Loc: Los Angeles, Rio de Janeiro, M...
|
|
so this could move all old threads to an archive board??
|
JoshPet
The artist formerly known as Mr. Bug
  
Reged: 11/29/01
Posts: 11414
Loc: Charlotte, NC
|
|
Haven't noticed any problems. We used it here to combine the archived finished mods forum and the archived beta mods forum.
--------------------
Josh - Joshua PettitWebsite - For Hire Coding work and Modifications
Feel Better, Look younger - www.BuyTransD.com
Use Coupon Code 1004 to Save $20 Off Your Initial Order of Trans-D Tropin
|
mario2
Enthusiast

Reged: 07/08/99
Posts: 470
Loc: Los Angeles, Rio de Janeiro, M...
|
|
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!!
|
tenshu
Journeyman
Reged: 05/12/03
Posts: 118
|
|
i cant get this to work, it says its moved the thread but when i check its not moved...
Any suggestions??
thanks again
|
JoshPet
The artist formerly known as Mr. Bug
  
Reged: 11/29/01
Posts: 11414
Loc: Charlotte, NC
|
|
Hmmmm..... I'd double check your instructions. I know this works because I isntalled it here when we had some reorganization to do.
--------------------
Josh - Joshua PettitWebsite - For Hire Coding work and Modifications
Feel Better, Look younger - www.BuyTransD.com
Use Coupon Code 1004 to Save $20 Off Your Initial Order of Trans-D Tropin
|
tenshu
Journeyman
Reged: 05/12/03
Posts: 118
|
|
omg sorry it is working! told you its one of those weeks!
Thanks its great!!
|
JoshPet
The artist formerly known as Mr. Bug
  
Reged: 11/29/01
Posts: 11414
Loc: Charlotte, NC
|
|
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.
--------------------
Josh - Joshua PettitWebsite - For Hire Coding work and Modifications
Feel Better, Look younger - www.BuyTransD.com
Use Coupon Code 1004 to Save $20 Off Your Initial Order of Trans-D Tropin
|
ksanuk
Member
Reged: 02/06/02
Posts: 290
Loc: Bangkok, Thailand
|
|
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!
|
dman
Journeyman
 
Reged: 01/14/03
Posts: 145
|
|
It works fine on my 6.4b1.
|
ksanuk
Member
Reged: 02/06/02
Posts: 290
Loc: Bangkok, Thailand
|
|
Hi,
Cool. Thanks.
Sanuk!
|
lcantey
Member
Reged: 05/20/99
Posts: 166
Loc: CA
|
|
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
|
lcantey
Member
Reged: 05/20/99
Posts: 166
Loc: CA
|
|
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
|
lcantey
Member
Reged: 05/20/99
Posts: 166
Loc: CA
|
|
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
|
Sheall
User
Reged: 05/25/02
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:
$initialcat = "";
$boardSelect = "<select name=\"newboard\" class=\"formboxes\">";
while ( list($Title,$Board,$Catnum,$Sorter,$Name) = $dbh -> fetch_array($sth)) {
AND CHANGE IT TO THIS:
Code:
$initialcat = "";
$boardSelect = "<select name=\"newboard\" class=\"formboxes\">";
while ( list($Title,$Board,$Catnum,$Sorter,$Name) = $dbh -> fetch_array($sth)) {
$Board_q = addslashes($Board);
$query = "
SELECT Mod_Board
FROM {$config['tbprefix']}Moderators
WHERE Mod_Uid = '{$user['U_Number']}'
AND Mod_Board = '$Board_q'
";
$sti = $dbh -> do_query($query);
list($check) = $dbh -> fetch_array($sti);
if ( ($user['U_Status'] != 'Administrator') && (!$check) ) {
continue;
}
|
JoshPet
The artist formerly known as Mr. Bug
  
Reged: 11/29/01
Posts: 11414
Loc: Charlotte, NC
|
|
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.
--------------------
Josh - Joshua PettitWebsite - For Hire Coding work and Modifications
Feel Better, Look younger - www.BuyTransD.com
Use Coupon Code 1004 to Save $20 Off Your Initial Order of Trans-D Tropin
|
fofas
Lurker
Reged: 09/30/05
Posts: 3
|
|
Sehr hilfreich / very useful
THX
-------------------- Schnäppchenshop (EDV, Büro und Schule)
|