Support » Plugin: Media File Renamer (Auto Rename) » File Rename log Information

  • Resolved john53

    (@john53)


    Hi
    Is there any way to clear the file name information log that can be imported into redirection? I have quite a lot of images to rename and I do a batch when I have time and then create the redirects.

    I have to try to figure out which records in the file are the new ones. It’s not that easy because new records don’t seem to automatically go to the bottom of the list. Sometimes they are at the bottom, sometimes the top and sometimes they seem to go in between.

    If I could clear all the records I could rename some images and happily export all of them to the redirection plugin without having to try to figure out which ones are the new ones.

    If you cant add a facility is there anything in my cpanel that I could use to clear this information, like phpMyAdmin etc?

    Thanks for your help
    Best regards
    John

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    Hi John,

    Is there any way to clear the file name information log that can be imported into redirection? I have quite a lot of images to rename and I do a batch when I have time and then create the redirects.

    Actually no, as it is not a log, it is a SQL query, and there is no date associated with the filename updates. That’s why they don’t go in the bottom of the list or anything. I don’t see an easy way to do this, but if you reimport into Redirection I don’t think it would do it “twice”… is it?

    Hi Jordy

    Thank you for the information. I think I am safer creating the redirects individually immediately after renaming an image.

    I don’t want to risk importing all the redirects into redirections, in the hope that it knows which ones are already present because if it goes wrong it could be an awful lot of work and worry to put right!

    It’s a pity there is no way for the plugin to create a log because it would be very pain-free and absolutely brilliant.

    Thanks for your help.

    Best regards
    John

    Plugin Author Jordy Meow

    (@tigroumeow)

    Hi John,

    If there was such a log, it would have to go into the database, and I don’t want to add more things into WordPress, I prefer to keep things clean and neat as much as possible. I would prefer people to do it by hooking into an action of my plugin. I made something for this kind of post-operation.

    In your functions.php (or your own plugin), you can do this:

    add_action( 'mfrh_media_renamed', 'filepath_of_media_was_modified', 10, 3 );
    
    function filepath_of_media_was_modified( $post, $orig_image_url, $new_image_url )
    {
      // To get the original filename:
      // $original_filename = get_post_meta( $id, '_original_filename', true );
      // Call the Redirection plugin API to add the new redirection
      // $post['ID'] is the ID of the media
    }

    You can work something out with this, maybe by asking also a developer to spend some time for you on it (2-3 hours of work).

    I keep a simple mfrh_custom.php file in the plugin for now, with examples. If you get the code for this, I could add it to it πŸ™‚

    By the way, if you want to give me a little push, don’t hesitate to write a little review for the plugin πŸ™‚

    • This reply was modified 1 year, 7 months ago by  Jordy Meow.

    OK! Thank you

    Best regards
    John

    Hi Jordy
    I’ve left you a review. I don’t need you to create the log option for me because I don’t have too many more images to rename now. I still think it would be a good feature to have for your plugin for others to use though.

    Thanks for the plugin and for all your help.

    Best regards
    John

    Plugin Author Jordy Meow

    (@tigroumeow)

    Thank you John, I really appreciate it πŸ™‚ Well, the best would be to actually create the redirection automatically in the Redirection plugin, right? It could be better than a log πŸ™‚ What do you think?

    Hi Jordy
    Wow, that would be superb!

    I know from personal experience how much time effort and aggro is involved in figuring out, applying then sometimes troubleshooting redirects.

    Keep up the good work.

    Best regards
    John

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘File Rename log Information’ is closed to new replies.