UBB.Dev
Posted By: AllenAyres Carnell's Mass Move/ Delete Utilities - 10/14/2000 7:31 AM
A new (old) mod has been added to the database, Ron Carnell's Mass Move/ Delete Utilities:

https://www.ubbdev.com/db/cgi/ultimatebb.cgi?ubb=get_topic&f=8&t=000020

Here is a description in Ron's words:
"Testing the new Mass Move hack was a real pain. Every single test changed the configuration of my test board and meant I had to go to the Unix prompt to move things back again for the next test. Almost immediately, I began wishing I had a Mass Unlock routine. It eventually dawned on me that many of the routines I was creating could easily be crafted to do exactly the kinds of things I needed. I was essentially writing routines to sweep through a forum and perform a number of operations on it. Once the code was written to sweep through a forum, it wasn't difficult to add new functionality.

Mass Move

The only thing this program has in common with my original Mass Move hack is the name. The code is entirely new and optimized for just one thing - SPEED. It's also a little less likely to bring your server to its knees. Using settings that duplicate the functionality of my original Mass Move hack, which effectively rebuilt all files on-the-fly, it is roughly twice as fast as the old code. Using optimum settings, which delays rebuilding until all topics are moved, it is at least a hundred times faster. Using the highest possible settings (which I don't recommend on anything but a dedicated server), my best times were 24 seconds for the move operation, 8 seconds to rebuild threads, and an additional 126 seconds to Update all HTML pages. That's less than three minutes to move 4,000 topics composed of 23,932 posts. Your mileage will certainly vary.

This program is a stand-alone utility and requires no changes to the UBB scripts. Installation instructions are at the top of the code. While I feel I've tested it pretty thoroughly, there are so many combinations of possible options that it's impossible to test them all. As always, please backup your forums before using! Let me know if you find an option set that doesn't work together. I'd also be very interested in hearing some reports on speed.

I will be adding the other options on the menu as time permits, probably in the order listed. "
Posted By: Logix Re: Carnell's Mass Move/ Delete Utilities - 10/14/2000 2:37 PM
Allen, I love this hack but do you know if anyone is planning on updating it for Renaming forum, Manage members, etc? I think this is a really good hack but I'd love to have those added to it too.
Posted By: TwiZteR Re: Carnell's Mass Move/ Delete Utilities - 10/25/2000 1:55 PM
MAN i really love this Mod, but yeah I would love it even more if he could update the rest of it [Linked Image]

------------------
Posted By: AllenAyres Re: Carnell's Mass Move/ Delete Utilities - 01/06/2001 10:58 PM
NEWSFLASH!! Carnell Utilities have been updated to work with recent versions!

Here is the update in Ron Carnell's own words:

This is an update to my original Mass Move utility , released back in April, 2000. Okay, it's a rather extensive update and the "Plus" in the subject above should maybe be a little bigger. For some (like me), I suspect the Archive module won't necessarily be the most useful of the new functionalities.

For those who don't know, the original Mass Move utility provided the ability to move threads in bulk, to either another Forum or into an Archive. It was built for speed, at least as much as Perl and file structure allowed, and seemed to be pretty stable. In fact, there have been exactly three reported bugs in nearly a year. The first was a big one (noted in the thread above) and fixed immediately. The second was minor (the Rebuild Threads dialog ignored a "no" answer) and only recently fixed. The third reported bug, detailed here , here , and here , was the motivation for this update. The original utility mangled Archive HTML pages because it exactly duplicated a bug in the standard UBB code (recently fixed). Once mangled, they were not easily repaired. Until now.

Mass Move Module There have been a few changes to the original utility, first to make it easier to select threads and, second, to provide additional functionality once the threads are selected. In the first vein, there is now a Sort By dropdown allowing the returned threads to be sorted by Date, Reverse Date, Author or Subject. You can also search for specific threads, either by Author or Subject, in addition to the Age of Thread prompt. As in the past, I've tried to make each prompt self-documenting, with a short explanation of how it works.

Added functionality to this module comes from the "Operation" dropdown. The first, default Operation is Mass Move and, as before, allows the returned threads to be moved to another Forum or Archive. The second Operation is Delete and allows the returned threads to be, uh, deleted (duplicating to some extent, the Mass Lock module). The third possible Operation is Edit Threads and, since it's also part of the Archive Manager module, is worth a little explanation.

The Edit icon that is a part of each UBB thread page is a wonderful tool, but only if you can get to it. If the HTML page is trashed, however, it's pretty much useless. The Edit/Prune ability in the Control Panel is equally wonderful, but again has limitations. And, of course, neither of these are available for Archived threads. The Edit Threads operation, in both Mass Move and the Archive Manager, removes ALL limitations. You are literally editing the raw text of the threads, just as if you were at the Unix prompt (but easier), and can change any field you wish. Of course, you can also destroy any field you wish, making this a bit dangerous for the uninitiated. (Side note: Create a directory called BAK in your non-CGI dir and chmod it to 777, and Edit Threads will backup a copy of the original thread before writing your changes to disk. Or use CU Setup to create the directory for you.) At its conclusion, Edit Threads will of course update the forum index and recreate the HTML page. (Hint: I have used this to change the date on a thread to 2010 and then locked the thread, forcing the system to keep it at the top of a forum for a LONG time.)

Finally, the Mass Move module (and Archive Manager) now has support for the "Last Reply By" hack, adding the appropriate field to the forums thread file if you request it. Please note, however, that this is completely untested. Even though I kind of helped write portions of the Last Reply hack, I don't use it at my own forums, so it was impossible to test.

Mass Lock/Unlock Module I have added the "Sort By" prompt to this screen, but it is otherwise unchanged from the original utility. Part of its functionality, the ability to mass Delete threads, has already been incorporated into the Mass Move module and I suspect this part of the utility will eventually go bye-bye.

Rebuild Forum Details The module now offers partial support for Archives as well as Forums, but essentially remains unchanged. As before, it will rebuild your threads index for forums (and now Archives), just as you can do from General Settings - but much, much faster since it makes one sweep instead of two.

Archive Manager This includes all of the functionality of the Mass Move module, but for Archives instead of Forums. You can Move, Delete, or Edit bulk threads in your Archives, as well as Rebuild HTML pages and Update (threads file) and Summarize (since the UBB Archive forumdisplay gives very little information about how many threads are in an Archive). As with the Mass Move module, a move operation can be directed into either another Archive or back into a live Forum. Archiving a thread should no longer mean you lose control of it.

Sweep & Swap Module This is essentially a massive Search & Replace utility (or Search & Destroy, if misused), that - strangely enough - arose from my tests with the Archive Manager. As some of you know, I've never used Archives at my forums before and one of the first things I noticed when I started moving threads into an Archive was that the "sort by subject" display was skewed. Why were there "W's" sitting at the top of the display? Turns out that some of my users padded their subjects with leading (and trailing) spaces - which would automatically sort in front of alpha characters. Others used quotation marks, again messing up the sort order. The Archives are far less useful, I thought, when it's so difficult to find a thread.

Sweep & Swap was born, then, to fix some of these problems, and you'll find several options for "cleaning up" the Subject line. But once that code was written, a little light bulb went off and a few new options were quickly added.

Ever moved your UBB from one domain to another? If so, you've discovered that all your smilies were broken and still pointing back at the old domain. Worse, every single board I've ever seen includes posts that point to other threads (just as I did at the beginning of this post), and those are just as broken as the smilies when moving to a new domain. Sweep & Swap can fix those kinds of problems, quickly changing every reference to an old domain into a reference to the new one.

It gets better. One of the problems with changing Usernames is that the old Username suddenly becomes unregistered in all of the user's old posts, the result of a less than optimum data structure (the Profile number, not the Username, should be the foreign key in the thread - but that's another story and another utility). Enter Sweep & Swap. Input an existing Username and a new Username, select "All" for the forums to sweep, and all of those old posts will be changed. The utility changes both the author name in a thread and (if email view is enabled in the profile) the email address. At the end of the sweep, the Profile and the memberslist.cgi file will also be updated. The one file not changed (maybe next version) is the mods.file if the User happens to be a Moderator (you'll have to do that one, manually, through the CP). The only thing left is to notify the User his cookies are no longer any good.

Because the important files are not changed until the completion of the sweep, this process is almost 100 percent reliable. If the Sweep is interrupted for any reason, you need only start it again. Threads already changed will be ignored, those not previously changed will be changed, and the main files will only be rewritten at completion. The only way to hose yourself is to run it on a single forum instead of "All," but even that can be easily fixed - just by running it again (which is precisely why the program allows it to be run on a single forum).

There are three possible scenarios when changing a Username. First, if the Original Username you enter does not exist, you're going to waste a few CPU cycles and nothing will be changed. Second, if the Original Username exists but the New Username does not, all of the threads will be swapped and then the profile and memberslist.cgi will be changed to reflect the new name. The Original Username will cease to exist.

Third, and this is the complicated (and potentially dangerous) one, if both the Original Username and New Username exist, the two profiles will essentially be merged. All threads in the system will be altered to point to the New Username, just as expected. At the end of the process, the post count in the Original Username profile will be set to zero and the post count in the New Username will be updated to include both the Original and the New. Additionally, the oldest Registration date of the two will be moved to the New Username (giving him back his seniority). Passwords remain the same and the Original Username is NOT disabled, so it's up to you to decide whether you want to allow it to continue being used.

Why is this third possible scenario potentially dangerous? Because if you're not careful, you're going to enter what you "think" is a New Username, only to later discover someone else had registered under that name. Do NOT assume a New Username is new and unused until you check. The system, rather than change the Original Username as you expected, will merge the two Profiles and you're going to be up a creek trying to separate them again. (Note: The profiles will be backed up if you have a BAK directory, but there is no provision for restoring them except by hand.)

ALL of the possible Sweep & Swap operations are purposely on one screen. That screen defaults to six lines for changing six Usernames, but there's a prompt where you can add more (as with most of my stuff, there are no arbitrary limitations and I trust you to use common sense - keep it under a thousand) before activating the swap. The idea is to make as many Swaps as possible on each Sweep, since most of the time spent will be on disk reads and writes rather than on string manipulation. It makes sense to plan ahead and run Sweep & Swap on, shall we say, less than a daily basis.

I have assumed (right or wrong) that you guys know what you're doing and have placed very few limitations on Sweep & Swap. There is even a prompt called "Global Adjustments" that will swap any string in ANY thread field and is guaranteed to destroy your boards if misused. Frankly, if I need to tell you to back up your forums before using Sweep & Swap, you probably shouldn't be using it at all. Please be careful.

CU Setup The final module, another new one, really only has two items that are strictly "setup" options. The first allows you to determine whether the Utilities can be used by Moderators or should be restricted to Admins. The second gives you the option to either Create or Clear your BAK directory, whichever is appropriate. All of the rest of this fairly long screen is for setting the Default values that will be used throughout the program. If you typically use the same Source Forum, for example, you can set it as the default. There's not a default setting for every prompt in every screen, but there's a few. Using them can make the program a little more convenient.

That's it, guys, except for the usual caveats. If you discover a hidden feature (there are no bugs) or have any questions, please post them here and I'll address them as quickly as possible. If you want to email me, fine, but I'll only respond to posts in this thread - if you have a question you can bet someone else does too, and I prefer to answer just once. This software has been run through the mill and I'm pretty comfortable with it - but there ain't no guarantees. If you trash your boards, either through an inadvertent bug (which I think is unlikely) or through misuse (which I think is darn likely), the onus is entirely on you. If you are a veteran UBB admin, please use the Utilities with caution. If you are a neophyte, please run. Fast.

Zip File (Installation instructions included)



------------------
Allen

- http://www.stand318.com
Posted By: indoe Re: Carnell's Mass Move/ Delete Utilities - 01/07/2001 6:56 AM
Thx

------------------
Posted By: DavidW Re: Carnell's Mass Move/ Delete Utilities - 01/09/2001 3:59 AM
When I edit a message icon (or edit any part of the thread) in v5.44 and v5.46 through the Mass Move Operation:Edit Threads routine, all the message icons revert to

------------------
"A knifeless man is a lifeless man"
-Nordic proverb
Posted By: qasic Re: Carnell's Mass Move/ Delete Utilities - 01/09/2001 6:53 AM
I was also wondering if this version fixes the bug which prevented Forum Mods from using this script.

Never mind, it allows moderators but not to the control extent as I desire.

This message has been edited by qasic on January 08, 2001 at 11:21 PM
Posted By: AllenAyres Re: Carnell's Mass Move/ Delete Utilities - 01/09/2001 10:37 PM
Ron has updated the file to fix a bug or 2 if'n you wanna download it again...

------------------
Allen

- http://www.stand318.com
Posted By: Vipermad Re: Carnell's Mass Move/ Delete Utilities - 01/10/2001 12:19 AM
Would love to but the link is a no-go...I mean the link to the zip file outside UBBDev.

------------------
Tony (Vipermad) Rickard
Viper Club UBB Admin
Posted By: freak.scene Re: Carnell's Mass Move/ Delete Utilities - 01/10/2001 3:45 PM
The link has worked fine for me at work and home. Try again. [Linked Image]

------------------
Jeremiah
FreakScene - The Dinosaur Jr Audio/Visual Archive
My UBB
In
( ((((((((((((((STEREO))))))))))))) ) )
Where Available
Posted By: Vipermad Re: Carnell's Mass Move/ Delete Utilities - 01/10/2001 11:35 PM
Got it...must have been a glitch! I just wanted to make sure that if there was a big problem someone knew about it. [Linked Image]

------------------
Tony (Vipermad) Rickard
Viper Club UBB Admin
Posted By: Zedd Re: Carnell's Mass Move/ Delete Utilities - 07/13/2001 7:46 PM
The link here does not work. Any chance someone still ahs this?
Posted By: Vipermad Re: Carnell's Mass Move/ Delete Utilities - 07/13/2001 10:39 PM
Here you go! Carnell
Posted By: AllenAyres Re: Carnell's Mass Move/ Delete Utilities - 07/13/2001 10:49 PM
It's in the databse still.. link up top updated...
© UBB.Developers