WordPress.org

Ready to get started?Download WordPress

Forums

Can we fix batch-categories? (53 posts)

  1. Lorelle
    Member
    Posted 9 years ago #

    I just got this from Batch-Categories page:

    # Steph Says:
    February 21st, 2005 at 8:24 am
    I’m really sorry to hear the plugin doesn’t work with 1.5. As I might have mentioned, I’m swamped right now. If nobody does it before me, I’ll adapt it to 1.5 at some point. If anybody feels like doing it, just go ahead! I really don’t care if it’s me or somebody else who writes the 1.5 version of Batch Categories.

    This is such an incredibly valuable tool. Anyone been able to figure out how to get it to work with the new version of WordPress 1.5? I had it working with an earlier beta version, but with the new release, it's toast and I don't know what changed to kill it.

    Let's save batch-categories! Please.

  2. Kafkaesqui

    Posted 9 years ago #

    Try adding this just above the admin-header.php require:

    require_once('admin.php');

  3. Ryan Boren
    WordPress Dev
    Posted 9 years ago #

    http://boren.nu/downloads/batch-categories.phps

    Some warnings still need to be cleaned up, but it works for me. Put it in your plugin directory and activate. 1.5 only.

  4. Lorelle
    Member
    Posted 9 years ago #

    I got a mess of warnings when I activated it, but it says "plugin activated". And the Batch Categories tab shows up, but the warnings stay. Any way of making them go away? Use the "require_once" mentioned above?

    I'm so thrilled to have this. I'll see how it is working.

  5. Lorelle
    Member
    Posted 9 years ago #

    Here is the error I'm getting and it's the abbreviated error report and involves the same error for admin.php lines 6, 7, 8, 9. I just don't know enough about php to nail this and fix it.

    Warning: Cannot modify header information - headers already sent by (output started at /home/cameraon/public_html/test/wordpress/wp-content/plugins/batch-categories.php:402) in /home/cameraon/public_html/test/wordpress/wp-admin/admin.php on line 6

  6. Kafkaesqui

    Posted 9 years ago #

    I'd add the line I specified above to the pre-existing version of batch-categories.php.

    Ryan's work definitely brings it into the 1.5 era, but I'm playing with the old edition with no errors in Strayhorn on a couple of different setups.

  7. Lorelle
    Member
    Posted 9 years ago #

    I did add the:

    above the admin-header.php require add:
    require_once('admin.php');

    But I can't find the admin-header.php reference in the batch-categories I grabbed from the above link. I did find:

    global $posts, $post, $wp_query, $id;
    include(ABSPATH.'wp-blog-header.php');
    extract($wp_query->query_vars);

    And I put the require above that include, but it didn't change anything at all. Didn't hurt or help. Still got the errors.

    It's annoying but batch-categories is working and I'm plowing through hundreds of screwed up categories. I should have never done a search and replace in the database to change my categories....dumb, but I got what I wanted and now I have to fix the rest.

  8. Lorelle
    Member
    Posted 9 years ago #

    Add to this, when I make a change in the Categories Panel (Under Manage), it makes the change but totally chokes. I get an error ridden screen. I had to come back in on a different page and then back to Categories to see that the change had taken place even though it choked. The errors all echo the words "batch-categories"...

  9. Ryan Boren
    WordPress Dev
    Posted 9 years ago #

    If you direct your warning message to the server logs (a good practice), they won't interfere with operation. They need to be fixed, but I haven't the time at the moment. Consider it groundwork.

  10. Lorelle
    Member
    Posted 9 years ago #

    Ah, and how would one do this amazing feat?

    Ah, shoot, do I have to look it up myself again....? ;-)

  11. piginzen
    Member
    Posted 9 years ago #

    I'd also love for this to be updated for 1.5

    thanks!

  12. Lorelle
    Member
    Posted 9 years ago #

    I'm still waiting to find out how to redirect these warnings to the server logs. HOW?

  13. Jinsan
    Member
    Posted 9 years ago #

    Is this an admin plugin in essence? Just helps organise your posts better within the backend?

  14. Kafkaesqui

    Posted 9 years ago #

    "Once more unto the breach?"

    Lorelle: I'm playing with the old edition with no errors in Strayhorn on a couple of different setups. By 'old edition' I mean the one from Stephanie's site. I haven't put the script through it's paces as I've not much use for it, but the little I've played with it caused no problems for me.

    So, I downloaded this:
    http://climbtothestars.org/code/batch-categories.phps

    Then near the top of the script, changed this:

    $title = __('Batch Categories');
    $parent_file = 'edit.php';
    require_once('admin-header.php');

    to:

    $title = __('Batch Categories');
    $parent_file = 'edit.php';
    require_once('admin.php');
    require_once('admin-header.php');

    "I know not if the day be ours or no."

  15. Jinsan
    Member
    Posted 9 years ago #

    Hmm Kaf I just tried this - copied and pasted to a new php file, uploaded and had to add the bits to show the plugin within the panel (author name plugin name etc).

    Now I get this error:

    Fatal error: Call to undefined function: get_admin_page_title() in /***/****/public_html/wp/wp-admin/admin-header.php on line 4

    Can I just del the plugin so tht I can get back in the plguins area? I don't think it's activated, or has it? Ah bugger.

  16. Kafkaesqui

    Posted 9 years ago #

    Can't say why that error pops up, since get_admin_page_title() is a WP function, and it's called to assign $title to the page.

    Don't activate the plugin from Climb to the Stars, since it's only meant to provide a link within the admin pages to batch-categories.php.

  17. Jinsan
    Member
    Posted 9 years ago #

    Not sure what you mean by the last comment, but I deleted the thing anyway and I've got my plugins screen back. Will wait for others to test it before I give it another go :)

    Thanks

  18. Kafkaesqui

    Posted 9 years ago #

    See Update II from Stephanie here for the purpose of the plugin:
    http://climbtothestars.org/archives/2004/06/24/batch-category-editing-for-wordpress/

  19. Ryan Boren
    WordPress Dev
    Posted 9 years ago #

    I uploaded a new version that fixes all warnings, at least for me. Of course, my testing was cursory since I have no need for a batch category editor.

  20. Lorelle
    Member
    Posted 9 years ago #

    Kaf, you are the miracle worker!!! Sorry for the delay in attempting this, but I've been ~~a little preoccupied~~ with a major leak in our home and had to rip off one wall to find and repair it....Yuk. It's now almost done and I can get back to REAL work.

    This is brilliant. I've hard coded a link in my admin MANAGE screen to the file but it works like a charm. Too bad the plugin version didn't work that puts a link in automatically, but this is brilliant.

    THANK YOUOUOUO!!!!

  21. crackdown
    Member
    Posted 9 years ago #

    Ryan, your plugin adds a space in the XML feeds! Can you solve it? It worked just fine for me...apart that HUGE issue!

  22. gpaulson
    Member
    Posted 9 years ago #

    This is a hard thread to follow since there appears to be about 3 different versions of the plugin/hack being discussed.

    I finally got it working by following only Kaf's advice. Then I typed
    http://my-site/wp-admin/batch-categories.php
    and it worked! (of course change my-site to the name of your site).

    Now to hack a menu call to it as mentioned by Lorell on 3/3 and I will be set!

  23. gpaulson
    Member
    Posted 9 years ago #

    Now I just wish I could figure out how to call this routine from within a post - so I could easily change it's categories without modifying the post_modified date.

  24. Lorelle
    Member
    Posted 9 years ago #

    You don't. This isn't something you want in a post. Batch Categories is a utility that runs on it's own page within your Admin - not your blog or site.

    And when you change categories, the date of the posts should not change. This is strictly a utility not something to display to the world.

    Or are you talking about a little link that only appears when you are logged in? Like EDIT? Still does the same thing. I click EDIT then BATCH CATEGORIES link in the ADMIN and do what I want and then VIEW SITE. This is for changing a BUNCH of posts within categories. For one post, click EDIT, change the category, SAVE and go on.

  25. gpaulson
    Member
    Posted 9 years ago #

    Yes, I meant like EDIT - and yes, I can jump from edit to Batch-Categories.

    My posts show the Date they were created and then the "Last Modified" date and also on my sidebar it shows all the 'Latest' posts which includes any posts that have been modified recently. If all I do is correct a category I don't want the 'last modified' date changed - so batch-categories does the job whereas the regular edit changes this date.

    What I really would like to find is a hack that allows you to keep the 'last modified' date from changing, just like is already built into Edit for the Post Date.

    BTW - I tried to document all I did in installing batch-categories to my blog at:
    http://www.garypaulson.net/2005/05/07/batch-categories-hack/

    Hopefully will be of help to others like you guys have been for me :)

  26. Lorelle
    Member
    Posted 9 years ago #

    Thanks for spreading the good works and words.

    By changing categories you are technically "modifying" things. That's hard to get around.

    Once you have everything in the right category, then you don't need batch categories so much. If you screw up and put one post in the wrong category, that's not something batch categories is good for. Remember, it consumes a lot of resources, including bandwidth and database. This is a utility for SERIOUS category switching, not the occassional muck up.

    And glad to help. When I did my huge import into WordPress from static HTML pages, Batch Categories saved me as the primary category took but the secondary category didn't. That took ages by hand, but batch categories made it a breeze to clean all those up quickly. And then when I decided to be stupid and change my category ID numbers without thinking the entire process through, I had over 500 posts to change categories on. UGH! Batch categories again saved me. It's been weeks since I've used it, but I'm sure glad I have it, just in case. Brilliant thing.

    Now, if you liked that....check out this:

    Enhanced Post View from http://www.coldforged.org/ (search the site for those words). It is abso-fabul-ohshus-lee wonderful. And may help you even more than batch categories.

  27. thebloke
    Member
    Posted 9 years ago #

    I have tried to follow all the different posts and advice in this thread but I have not been able to bring up the admin screen. I have put in batch-categories.php in the wp-admin folder and I have the batch-access.php in my plugins folder. I have activated batch categories plugin, but when I browse to /wp-admin/batch-categories.php I get a blank screen. I have tried to hack the menu.php, but to no avail. I suspect I need to be able to bring in the admin screen by browsing to it first. Can someone help???

  28. Kafkaesqui

    Posted 9 years ago #

    @thebloke

    What happens when you access it directly. That is, can you open it by going to wp-admin/batch-categories.php (assuming you didn't rename it)?

  29. thebloke
    Member
    Posted 9 years ago #

    Hi Kafkaesqui. I get a blank screen.

  30. Kafkaesqui

    Posted 9 years ago #

    Sounds like the original problems with what admin scripts are required for inclusion (and in what order). I hit your contact page with a possible solution.

Topic Closed

This topic has been closed to new replies.

About this Topic