Sharing images with addThis

frankroa

Joined: 2010-05-20
Posts: 4
Posted: Mon, 2010-06-07 23:45

Hi everyone,
I know that for g2 there isn't an addThis module, but I needed to use addThis for what I'm trying to do. This way I can track stats for what's been shared and all. Also, for Facebook you need to use meta tags to share images and info because it scrapes anything sent to the site this way. For images you have to use <link rel="image_src" href="(url to image)" /> I used this to get the first image from a selected album:

<link rel="image_src" href="{g->url arg1="view=core.DownloadItem" arg2="itemId=`$theme.children[0].image.id`" arg3="serialNumber=`$theme.children[0].image.serialNumber`" htmlEntities=false}" />

Although it won't pull the currently selected image to send over (I know the reason being the children[0]). My question was does anyone have any ideas for how I could change it so it'd find the value like children[x] and could use the x variable to change as needed? My knowledge of js isn't as advanced as the js files I found, but maybe it's easier than I think?

Thanks in advance for any help!

-Frank

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2010-06-08 00:09
 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2010-06-08 04:40

http://gallery.menalto.com/node/91931

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team