Datafeedr Support Forums  

Go Back   Datafeedr Support Forums > Current Version (V3) Forum > Tips, Tricks & Tutorials
Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Important - The support forums are now in "read-only" mode as we transition to an alternative help desk solution. Feel free to contact us here with any of your questions or search the forums for an existing solution.
Thread Tools Search this Thread Display Modes
Old May 1st, 2012, 02:46 AM
madsem madsem is offline
Join Date: Apr 2012
Posts: 10
Default [GET] Free plugin that delivers all datafeedr images through TimThumb and masks urls

I had an issue yesterday that my store didn't display any images, after I couldn't figure out what was wrong, involved my host, checked my curl install a dozen times and then heard back from Eric that Datafeedr does not show masked images when the merchant has some access limitation, i.e htaccess protection aginst hotlinking or so...

I just made a plugin for wordpress that uses the timthumb script to display all images from datafeedr.

I don't want to change the img tags every time there is a merchant in one of my stores that limits access to their images, so my plugin simply displays all datafeedr images in a php script and adds rewrite rules to wordpress so that the img urls have all nice permalinks too.

The usage is pretty simple, you upload the plugin to your wordpress plugin directory, go in your wp-admin and activate it.

Then you have to go in your Datafeedr views and change ALL tags that display product images OR thumbnails

HTML Code:
<img src="[server.url type='domain']store/img/[]-120-120/">
The part with -120-120/ is the image size, if you want images to have a different size you can change it to whatever you like, the first -120 is the height, the last one the width.

Please note that images are not cropped to the exact size, it is the maximum size... The script keeps the aspect ratio of the images intact so that they always look perfect.

If you use this plugin you can completely disregard the url settings for images and thumbnails in datafeedr, those are not used anymore, the script queries your local database for the correct image and it should result in much faster loading times across the board!

Timthumb also caches all your images locally for 24 hours, so that will also help to reduce page load times a lot...

If there are any issues, make a post here and I'll try my best to fix it, but it should just work out of the box. But no guarantees, I coded it very fast and made it work for my set up


P.S: Maybe Eric or Stefan can verify the plugin contains no harmful code I just wanted to share it here because I thought some of you might have use for it.
Attached Files
File Type: zip (24.5 KB, 112 views)

Last edited by madsem : May 1st, 2012 at 02:55 AM.
Old May 1st, 2012, 03:09 AM
madsem madsem is offline
Join Date: Apr 2012
Posts: 10

Totally forgot: If you use this plugin... Delete the entries in your Datafeedr plugin for the thumbnail and product image directories, so that the Datafeedr plugin doesn't download the images onto your server anymore.

The plugin has cached versions of all images that were loaded once available, so the loading times of your shop will be the same as if you host the images locally...
Old May 1st, 2012, 05:44 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
Join Date: Feb 2008
Posts: 16,902


Thanks for posting! Does it also get around the issue of images being blocked by the merchant from being downloaded?

Old May 1st, 2012, 05:52 AM
madsem madsem is offline
Join Date: Apr 2012
Posts: 10

Well, kind of yes

TimThumb makes a cached version of all the images in all the different sizes you have on your site, cache is deleted after 24 hours.

So it works basically the same way as datafeedr works, only that it makes a copy of the image in the cache directory and serves from there until cache is deleted and a new copy is created.

Installed that on my store, changed the views and my images are all loaded instantly now, after of course they were loaded the first time.
Old May 1st, 2012, 05:56 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
Join Date: Feb 2008
Posts: 16,902

Very cool! Thanks for sharing. We'll take a look at the TimThumb code and see if it's something that would be worthwhile integrating into Datafeedr.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Excerpt displayed incorrectly on wordpress query posts when on Datafeedr urls fsuggest Problems 1 April 29th, 2012 03:38 PM
Datafeedr Plugin Update: 3.6 is Available Eric News & Announcements 6 April 19th, 2012 12:37 PM
Datafeedr Plugin 0.9.95 Released Eric News & Announcements 0 April 18th, 2008 09:07 PM

All times are GMT -5. The time now is 09:51 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.