- Posts: 1421
- Thank you received: 234
For reference only. Please use a different board for new questions
Using 404 caching for images
11 years 7 months ago #1229
by redactie
Replied by redactie on topic Re: Using 404 caching for images
The width is hard code in the index.php of the 404 scripts.
the component does not support multiple images so if you want to have a thumb and a large image you will need to edit the layouts and compile your own image link.
the component does not support multiple images so if you want to have a thumb and a large image you will need to edit the layouts and compile your own image link.
Please Log in to join the conversation.
11 years 7 months ago #1237
by mackelito
Replied by mackelito on topic Re: Using 404 caching for images
Found the width/height just after posting hehe..
Can change the script so that it creates 2 versions of the images?
imgname and imgname-thumb
And then I´ll just change in the layouts
Can change the script so that it creates 2 versions of the images?
imgname and imgname-thumb
And then I´ll just change in the layouts
Please Log in to join the conversation.
11 years 7 months ago #1238
by redactie
Replied by redactie on topic Re: Using 404 caching for images
quick and dirty is to have two instances of the scripts.
ROOT/img/large/index.php
ROOT/img/thumb/index.php
ROOT/img/large/index.php
ROOT/img/thumb/index.php
Please Log in to join the conversation.
11 years 7 months ago #1239
by mackelito
Replied by mackelito on topic Re: Using 404 caching for images
Well.. what can I say... I like your dirty idea!
thx!
thx!
Please Log in to join the conversation.
11 years 7 months ago - 11 years 7 months ago #1240
by mackelito
Replied by mackelito on topic Re: Using 404 caching for images
What about the xhelper file?
Do I need to add something?
I wanted to have my structure like:
/product-images/large
/product-images/thumbs
Will that be a problem? Because I can´t get it to work
Do I need to add something?
I wanted to have my structure like:
/product-images/large
/product-images/thumbs
Will that be a problem? Because I can´t get it to work
Last edit: 11 years 7 months ago by mackelito.
Please Log in to join the conversation.
11 years 7 months ago #1245
by redactie
what did you do/change?
first in the index.php of the 404 caching script ( you have two of them) the $basedir should reflect the path to the image location. so they should be 'product-images/large' and 'product-images/thumb'
From the components database you can only get one image url formated (in the xhelpers.php)
If you want to use the other one you will need to create it using php
so where the template says
$item (or $row )
it becomes
' img.example.com/product-images/thumbs/'.$item .'/'.$item.'.jpg'
Replied by redactie on topic Re: Using 404 caching for images
mackelito wrote:
I wanted to have my structure like:
/product-images/large
/product-images/thumbs
what did you do/change?
first in the index.php of the 404 caching script ( you have two of them) the $basedir should reflect the path to the image location. so they should be 'product-images/large' and 'product-images/thumb'
From the components database you can only get one image url formated (in the xhelpers.php)
Code:
define ('DF_IMAGE','concat("https://img.example.com/product-images/large/",`feed_id`,"/",`items_id`,".jpg")');
If you want to use the other one you will need to create it using php
so where the template says
$item (or $row )
it becomes
' img.example.com/product-images/thumbs/'.$item .'/'.$item.'.jpg'
Please Log in to join the conversation.
Time to create page: 0.948 seconds