Feature Request [# 426] Can't add relative URL to Image Thumbs URL inputbox.
Tags:   No tags associated yet.

  Go back
 Target:  --  Category:  Product/Category Management
Description:
URL input box for Image Thumbs only allows absolute URLs.

Could we at least add option of having a mosConfig_live_site added to the beginning instead of requiring "http" only??

This is important because I am linking to images with a url, but I am developing locally with a "localhost" url. This would break all my image thumb links once uploaded to live server.

ultimately the best solution would be simply to allow both absolute and relative urls to images.

Details:
Submitted Comment
soeren_nb
Jan 06 2006
Yes, and to avoid having to run the above commands, from a User's (Author's) perspective, it would help a great deal to be based off the mosConfig_live_site method that Joomla uses. This way it makes it incredibly easy to move the site from local staging, to on-line, without knowing specific MySQL commands, keeps it consisent with Joomla, and ultimately is using the absolute method of URL's (the base url is converted with mosConfig_live_site just like the rest of the Joomla site).

This isn't a forum so I won't go on and on. I'm just pointing out inconsistencies so this can be a better product. When I have to search around for the reason why something is different than the norm, then it wastes time. Just like the difference between "Add To Cart" buttons in product category browse (handled by Joomla) vs. flypage "Add To Cart" buttons (handled by VM).

Again, from a User's perspective, I don't see why they are different, and it adds to the confusion of the site both visually, and logically.
soeren_nb
Jan 06 2006
It would be useful to have relative urls (have to agree there) - I hadn't realised that this was due to the setup of the database. I guess one would like relative urls in case folders move/change etc. - however the above code provided by Soeren is really useful, and it would be great if it were publicised more.:)
soeren_nb
Jan 05 2006
I would want to because it is much easier if one does not know how to modify a database. That's why. Why would I only want absolute?

My work-around was to do a text replace on the database itelf, which worked. Of course, if you are a PHP developer (like yourself), not a user (like myself), the above command would be "easy" as you say.
soeren_nb
Jan 05 2006
But why in the world do you fill in a relative URL?
The database must have a full URL beginning with __http://__ because of the product image display function.
When you put the site online you can simply replace all occurences of __http://localhost__ with another URL by using this SQL command:

UPDATE jos_vm_product SET product_full_image = REPLACE( product_full_image, 'http://localhost', 'http://www.newurl.com' );
UPDATE jos_vm_product SET product_thumb_image = REPLACE( product_thumb_image, 'http://localhost', 'http://www.newurl.com' );

That's easy.
soeren_nb
Jan 04 2006
Entering the relative url in the browse input box above give a successful message, but does not show image (does not work).

images/stories/product_thumbs/T014_thumb.gif
or
/images/stories/product_thumbs/T014_thumb.gif
does not work.