CPG 1.4.8 - CATMGR.PHP "Hack": Beta CPG 1.4.8 - CATMGR.PHP "Hack": Beta
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

CPG 1.4.8 - CATMGR.PHP "Hack": Beta

Started by Prisoner_24601, July 22, 2006, 12:39:23 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Prisoner_24601

As per the comments on the Mods/Hacks area, I'm posting here if you want to test this.

================

This isn't exactly a hack nor a Mod because I didn't change any code anyplace in CPG 1.4.8.  It's essentially an add-on.

NOTE: the following hack can delete stuff.  It's supposed to.  Backup, backup, backup before testing.

SUMMARY: because I have way too many categories (2500+), I rarely use catmgr.php (i.e., the Category Manager) built into CPG.  It's too slow and I've killed it off too many times.  I therefore use DIRECT URLs to do stuff.  In other words, if I wanted to delete category #2, I'd type the following into my browser: http://www.foobar.com/cpg148/catmgr.php?op=deletecat&cid=2

With some assistance from my friends, I created an HTML page to do things like that, essentially so I don't have to look at my notes to remember the proper URL syntax to get the task done.

This isn't as elegant as doing direct SQL queries, but I'm a lot better with HTML than SQL, so this is what you get.

--------------------------

INSTALLATION INSTRUCTIONS:
* Get and install Nibbler's catmgr.php from http://forum.coppermine-gallery.net/index.php?action=dlattach;topic=33724.0;attach=4356 (this isn't exactly necessary, but makes things a lot quicker.  You also don't have to change the settings from default, unless you want to).
* Download my attached Zip and expand it.  It's just an HTML file.
* EDIT the HTML file in your favorite text editor.
* CHANGE the following code in the HTML:

http://www.foobar.com/cpg148/catmgr.php

to YOUR URL where you have catmgr.php on your server.

You don't need to even install my HTML file on your server.  You can launch it from your hard drive.  However, remember to only use whichever web browser you've set as default.

==============

FUNCTIONING:

* NOTE that this HTML form won't work if you aren't logged into Coppermine as an Admin!
* Functions are self explanatory when you open the HTML file: category deleting, category editing and category moving (setting child and/or parent).  In each case, you enter the number of the category you want to play with and then you hit SUBMIT.  The actual catmgr.php opens, briefly, in a new window.  You can just leave that window alone or minimize it or close it.

The RESET THE FORM button just deletes stuff from the HTML form.

==============

COMMENTS: This works for me, as is, but I'd like it to automagically close the catmgr.php after that window opens.  I haven't played with it enough to do that.  I also am thinking about how to make one of these forms do an SQL query to delete an entire swath of categories, albums and pictures.

That's that.  Enjoy.  Don't count on me being back until Monday (US time).