Also - can I get image attributes like height and width?
If need be, I am willing to pay someone to do this if there isn't a fix like this around.
floridave
Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2007-11-09 04:31
Enable buffered debug: FAQ: How to set/use Gallery in debug mode?
in the popup window you will see all the smarty variable available.
Example: {$theme.item.width} will give you the width {$theme.item.height} will give you the height {$theme.item.pathComponent} will give you the name of the item as saved in the g2data directory.
What is it you are after? do you want to paste a image on a external site? Then use the geturls module.
I can hotlink images ie http://mydomain.com/gallerys/d/26164-2/image.jpg
However I can't seem to work out how to extract that url and use it on the photo.tpl page. I always end up with <img src= or <a href tags around it.
Is there a way to go about doing this?
cheers,
AJ
aj510
Joined: 2006-10-10
Posts: 24
Posted: Sat, 2007-11-10 00:19
bump - finding it quite strange to think that obtaining the url of an image on the page it is displayed could be this difficult?
floridave
Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2007-11-10 05:25
Full URL:{g->url arg1="view=core.DownloadItem" arg2="itemId=`$theme.item.id`" forceFullUrl=true}<br/>
resized URL:{g->url arg1="view=core.DownloadItem" arg2="itemId=`$image.id`" forceFullUrl=true}
Posts: 24
Also - can I get image attributes like height and width?
If need be, I am willing to pay someone to do this if there isn't a fix like this around.
Posts: 27300
Enable buffered debug:
FAQ: How to set/use Gallery in debug mode?
in the popup window you will see all the smarty variable available.
Example:
{$theme.item.width}
will give you the width{$theme.item.height}
will give you the height{$theme.item.pathComponent}
will give you the name of the item as saved in the g2data directory.What is it you are after? do you want to paste a image on a external site? Then use the geturls module.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 24
Thanks Dave, i'll give that a go.
I want to add an mms for each image and need to get the path and width/height to do so.
Posts: 24
The width and height work perfectly, however the full url of the image doesn't seem work (only the image name itself).
Any idea how I can get the full path of the image?
mod_rewrite is enabled and working...
Posts: 27300
If you followed directions your G2data directory will be outside the web viewable location.
you want the image url on photo.tpl?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 24
Yes I would like the full image url on photo.tpl
I can hotlink images ie
http://mydomain.com/gallerys/d/26164-2/image.jpg
However I can't seem to work out how to extract that url and use it on the photo.tpl page. I always end up with <img src= or <a href tags around it.
Is there a way to go about doing this?
cheers,
AJ
Posts: 24
bump - finding it quite strange to think that obtaining the url of an image on the page it is displayed could be this difficult?
Posts: 27300
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 24
Dave - that does exactly what I was wanting.
Thank you so much - tell your wife to be extra friendly tonight
Posts: 1
hey i neeed help,i want to get the url for a picture i need to opload on myspace? some good pages where they do that?
Posts: 27300
http://codex.gallery2.org/Gallery2:Modules:geturls
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team