Forums

[Plugin: Hot Linked Image Cacher] HOWTO: change cache folder (2 posts)

  1. smoothmoniker
    Member
    Posted 1 year ago #

    I love the "Hot Linked Image Cacher" plugin, but I wanted some control over where the images were stored. I don't like having them in a folder under the plugin, I wanted them in my standard wp-content/uploads folder, along with all the other images.

    So, here's how to modify the plugin to make it do that:

    Open up hotlinked-image-cacher.php

    On line 58 & line 63, modify the URL between the quotes so that it matches your preferred location. On mine, it reads:

    Line 58:
    $httppath = get_option('siteurl') . "/wp-content/uploads/2008/hotlink";

    Line 63:
    $absoupload = ABSPATH . "/wp-content/uploads/2008/hotlink";

    The URL shows up once more, on line 173, but it's only in a warning message and not part of the function. Change it if you like.

    After making the above changes, I had to go create the new folder, and chmod it to 777, but it worked perfectly after that.

    I'd love to see this rolled into the plugin as a setting, instead of having to modify the code, but until then, enjoy the hack!

  2. harrishcl
    Member
    Posted 1 year ago #

    if i want to remove the website address from where it fetches . how can i do that.

    suppose the image from amazon.com/sadasd.jpg

    after

    it save that images with this link : www.mywebsite.com/images/amazon.com/sadasd.jpg

Topic Closed

This topic has been closed to new replies.

About this Topic