Any way to embed G2 pictures in other places?
bodypainter
Joined: 2003-02-27
Posts: 21 |
Posted: Mon, 2005-02-28 14:00 |
With the previous alpha of G2 (and with G1) I am able to copy the URL of a picture, including intermediate sizes, and then embed them in message board threads elsewhere. With the more recent G2 the URLs to the picture don't refer to a jpg file. Instead I get a URL that looks like this. http://techquarium.com/gallery2/main.php?g2_view=core:DownloadItem&g2_itemId=4307&g2_serialNumber=2 That URL opens a window with just the picture but I can't embed it as a picture on a forum. I'm not sure I explained that well enough but does anyone know what I mean or have a solution? Thanks. |
|
Posts: 32509
1. there's noting wrong with the url you posted. it's not a html site or something strange, it's actually an ordinary image file. the only unusual thing is the url. the url points to g2 and g2 returns an image.
2. the problem you experience is a weakness of the forum software. the forum software thinks that only urls that end in known image extensions (.jpg, .jpeg, .gif, .bmp, ...) are urls that point to images. but actually, a url doesn't have to end on such an extension, to return a standard image file.
you can test this claim by creating a html page with an ordinary image tag with the above url.
<img src="http://techquarium.com/gallery2/main.php?g2_view=core:DownloadItem&g2_itemId=4307&g2_serialNumber=2" /img>
what can we do about it?
not sure if it is already solved with the short urls (mod_rewrite). but you could check by activating the url rewrite module in G2 and turning short urls on in site admin -> general.
if it's not solved by that, perhaps there's already a feature request on sf.net/projects/gallery/ to make urls look like ordinary image urls. if not, you may add this feature request on sf.net.
Posts: 32509
ps: you may also want to take a look at the imageblock module in G2.
site admin -> random/popular imageblock
there's you'll find the php to paste in another web page to display images from G2 on other web pages than G2 itself.
Posts: 21
Short URL's did the trick. I'd apparently enabled them in my first G2 install but not in the more recent.
Thanks everyone! G2 is looking great.