It's probably the quotes that is messing it up. Try it with " quotes.
|
I have tried all the following possibilities and still it does not work and the image location is always wrong
Quote:
Quote:
Quote:
I have even tried all 3 of the above with single quotes instead but it still does not work. The image source just keeps coming out wrong with that added home/tahir786/public_html/urbanretro-co-uk/ in the middle that is not needed. Is there any other way apart from the above to say where the img src is in the code. Thanks. Tahir |
Replace "server path to remove" with the part you want to cut out. The second set of quotes after the : should be empty.
|
Re: Easy dynamic thumbnail generation
Quote:
Where would I edit the code? I presently have my images in the "files" directory and there is already a "cache" directory inside it. The first image is the default (no image available). Whenever I click on the thumbnail on the product page, I now get a 404 error in the popup window. I used the first example of your product_images.tpl in xcart version 4.1.2. Also, how would I get just a "stack" of the detail image thumbnails with the main product thumbnail at the top of the stack... like this; Product Thumbnail Detail Thumbnail Detail Thumbnail ... and have the popup window open on the detail photo of which ever is clicked. |
Re: Easy dynamic thumbnail generation
Quote:
The cache directory is defined here: Code:
### ц°bergebene Parameter auswerten und verifizieren Below this you can aslo set certain paramaters to default to the settings you want, so you don't have to set them in the templates themselves. Quote:
In my first product_images.tpl, the first image is not a detailed product image, it's the product's main image, you probably don't have that set if it's not loading. Getting a stack of thumbs like you want is possible, but you'd need to rewrite the product_images.tpl. It would be easiest to remove the link the the main image entirely and just use the default product_images.tpl. Just replace the image links with the {thumb} function.[/code] |
Hey Alltribes. Thanks so much I got it all working now. My first mod and its a beauty.
Sorry for being a pain but I need to know 1 last thing, something simple. How do you set the border to 0. I have put border="0" in the product_images.tpl in every place possible but the border does not go. Where exactly do I put border="0" to get rid of the border? Thanks a million Tahir |
To get rid of the border put the border="0" in the html parameter. Here's an example:
Code:
{thumb file="images/visuals/rallyewm02/Rallye142.jpg" width="150" link="false" html='border="0"'} |
great thanks
|
I have got this all working now. Thanks for all the help alltribes. When my site is launched I will place a link so people can see it in action
|
that's COOL
thanks Alltribes. I'm in debt.
To others, here's a live site showing the effect, using exactly the technology as explained by Alltribes. I made some cosmetic modifications though. Still under development, only 2 dummy products. Hopefully it helps. |
forgot to cite the site
|
That's a very nice idear, no product image, just the detailed images.
i think i'll do the same if you don't mind. Cheers Eddie |
Quote:
That's why I posted it. Enjoy. |
For a Windows server, I had to nake the following change in product_images.tpl:
Find: Code:
Image{$images[image].imageid}.src = "{$images[image].image_path}"; Code:
Image{$images[image].imageid}.src = "{$images[image].image_path|replace:"\\":"/"}"; There may be an easier or better way, but that was the only way I knew how to do it. |
Re: Easy dynamic thumbnail generation
Is it me or has some of the code in the examples on page 1 missing? Perhaps due to the forum upgrade... I can't seem to get the image swapping method working. Can anyone post their working code?
I notice that the plugin has just been updated with frame and overlay support :) |
Re: Easy dynamic thumbnail generation
The new forum messed up the image tags in the code.
where you see [img] blah blah blah [img] you need to make a valid tag (i.e. <img src="" /> |
Re: Easy dynamic thumbnail generation
Ahh ok, many thanks.
|
Re: Easy dynamic thumbnail generation
Hello this is a great mod and I have been looking for it for a long time...
I am not sure what I am doing wrong.... I installed the plugin I copied the file.... I have installed the store here... http://www.purebaby.net.au/mitash/ Code:
{if $images ne ""} I want to be able to achieve something like this... http://www.ebonist.nl/samenstellen/product.php?productid=16138&cat=248&page=1 I have added multiple images here... However it is not working... http://www.purebaby.net.au/mitash/product.php?productid=16219&cat=262&page=2 Please help! Thanks in advance Ash |
Re: Easy dynamic thumbnail generation
Code:
|replace:"server path to remove":"home/pur6105/public_html/mitash/" Your problem is right there. It should look like this: Code:
|replace:"home/pur6105/public_html/mitash/":"" Just fix all the places that appears and it should work. |
Re: Easy dynamic thumbnail generation
Thanks heaps for your reply...
I have modifed it to.... Code:
|replace:"home/pur6105/public_html/mitash/":"" However it still looks the same.... Here is my file.... Code:
{if $images ne ""} http://www.purebaby.net.au/mitash/pr...cat=262&page=2 Am not sure if I missed any step... Thanks for helping with this... |
Re: Easy dynamic thumbnail generation
Hmm, the link doesn't work.
In any case, from looking at the site I think perhaps the mitash/ doesn't need removed. Try this: Code:
|replace:"home/pur6105/public_html/":"" |
Re: Easy dynamic thumbnail generation
Hi Thanks for your reply...
Here's the link... http://www.purebaby.net.au/mitash/product.php?productid=16219&cat=262&page=2 Everything is installed under purebaby.net.au/mitash/ so i think we might need mitash there... What do you think..? I can give u my username and password if you can have a quick look for me pls... |
Re: Easy dynamic thumbnail generation
Hmm, I think I know the problem. You're using the code for 4.0 on a 4.1 store.
The image urls are different between the two versions. The |replace sections are for the 4.0 version only. Remove them and it should work. |
Re: Easy dynamic thumbnail generation
Hi I am using 4.1.3 version
I tried what you suggested however still not working...? Thanks Ash |
Re: Easy dynamic thumbnail generation
Maybe the forum move messed up more than the <img> tags. Here's my current code for product_images.tpl on my 4.1.3 store:
*fixed Code:
{if $images ne ""} This uses image preloading unlike the template you're trying to use. Make sure you disable the detailed product images popup. I'll try and find the time to sort out the code on the first page and make sure it all works still. I've got some other goodies to add to this mod as well (first detailed image as the thumbnail!). I've already updated the 4.1x preloading code with the above code. |
Re: Easy dynamic thumbnail generation
Thanks heaps for your help and for your patience with this mod....
I have implemented your code... It is working however, it shows very big thumbnails..... http://www.purebaby.net.au/mitash/product.php?productid=16219&cat=262&page=2 Not sure what's going on there.... Also, instead of displaying the imgaes and thumb nails in the detailed images section I am hoping to have the positioning of the imgages and thumbnails like this... http://www.ebonist.nl/samenstellen/product.php?productid=16138&cat=248&page=1 Thank you muchly! Ash |
Re: Easy dynamic thumbnail generation
Oops, my bad. I moved the thumbnailing code to my product_thumbnail.tpl since I'm using the first detailed image for all my thumbnails. The good news is it IS getting the correct image paths, hehe.
I've edited my previous code (and the 4.1x preloading script on page 1) so the thumbnail code is in the product_images.tpl again. |
Re: Easy dynamic thumbnail generation
wow...
Thats fantastic... It's working now... thatnks you so much for your help! =) Only one thing I would like to display images like this... at the moment they are coming up in detailed images section/position...... I want to do the swap thing where the first image is.... like this page.... http://www.ebonist.nl/samenstellen/product.php?productid=16138&cat=248&page=1 |
Re: Easy dynamic thumbnail generation
Here's the working URL
http://www.purebaby.net.au/mitash/product.php?productid=16219&cat=253&page=1 Just want to fix the positioning now.... Thanks Ash |
Re: Easy dynamic thumbnail generation
Quote:
That should be easy enough to do. Simply replace this (in product.tpl): Code:
{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail" type="P"} With this: Code:
{if $active_modules.Detailed_Product_Images ne "" && ($config.Detailed_Product_Images.det_image_popup ne 'Y' || $js_enabled ne 'Y')} Also remove Code:
{capture name=dialog} Code:
{/capture} |
Re: Easy dynamic thumbnail generation
Hi, got a question about this mod. Do the product exports show the path to the original image i.e. the non cached image path? If so, how would you go about getting a list of cached image paths for various exports?
I'm guessing that whatever code is responsible for displaying the image on the product page can be reproduced to do this. Thanks Dan |
Re: Easy dynamic thumbnail generation
This mod doesn't make any changes to the exports. The paths of the created thumbnails are not stored in the database, so will not show up in exports. The file name for the thumbs is a md5 hash of the file name and the various parameters you set.
Theoreticaly you could use the code from the plugin that generates the md5 and modify it to store the thumbnail path in the database so it can be exported. Personaly I'm working on loading the path of the first detailed image into the thubmnail table. Though loading the actual path to the generated thumbnail into that table would be a better solution, it's beyond my current abilities. |
Re: Easy dynamic thumbnail generation
Hey Alltribes.... i was wondering if i could get your help on this one. i am still struggling to get it to work on 4.X
You can see what i have here: [url] http://www.motonekoparts.com/product.php?productid=16165&cat=67&page=1 the images show up... but no swapping happens I have modified the pluggin it in a couple places so the image would load instead of [img] ...was this neccessary? i didn't read any other posts about modifying the plugin, but i couldn't any images to load otherwise. here is my product_images.tpl Code:
{* $Id: product_images.tpl,v 1.12 2004/05/28 12:21:05 max Exp $ *} -michelle |
Re: Easy dynamic thumbnail generation
You've got a couple errors.
You have an extra { on line 18: Code:
{if {$images[image].image_path} You may also want to change that to Code:
{if $images[image].image_path neq ""} After line 20 you removed Code:
<a href="#" onmouseover="document.main_image.src=Image{$images[image].imageid}.src;"> That's your problem, right there. Also on line 21 you;re not using the |replace function, yet your thumbs do seem to be loading. Not sure what's up with that. Code:
{thumb file=`$images[image].image_path` longside="100" link="false" html="alt='`$product.product` '"} |
Re: Easy dynamic thumbnail generation
yeah, i can see how it wouldn't be working now! i used the final edit from post #7 ....
"Here is the preloading script for 4.0x, now using imageid instead of orderby" anyways... here is my revised product_images.tpl Code:
{if $images ne ""} i think the problem is here: Code:
<img src="{$images[0].image_path|replace:"home/content/m/o/t/motonekoparts/html/":""}"> when i try and name it as name="main_image" it won't show up thanks for your help! -michelle my version of X-Cart is 4.0.18 |
Re: Easy dynamic thumbnail generation
Hmm, I'm not sure what to tell you. You definately need the name="main_image" as that's the "hook" the java uses to swap out the main image.
Try removing the quotes around {$images[0].....}. |
Re: Easy dynamic thumbnail generation
well... after some more trial and error i finally get her working!! yay! thanks again for sharing this with everyone! here is my product_images.tpl for 4.0.18 if it can help anyone else....
Code:
{if $images ne ""} |
Re: Easy dynamic thumbnail generation
i just have one last question for you....
i am using transparent gifs for my thumbs... anyway to preserve that transparency? right now the cached thumbs all have a black background. i tried adding background="transparent" in the HTML, but that didn't work for me. any thoughts? thanks again, michelle |
Re: Easy dynamic thumbnail generation
Sorry, I can't help you there. I have no experience at all with image manipulation via PHP. You'll have to hire someone to look at the plugin, or contact Christoph Erdmann.
|
Re: Easy dynamic thumbnail generation
ok, i'll try him. many thanks for your help
|
All times are GMT -8. The time now is 11:32 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.