View Full Version : "share photo" in photo tools
rainforest1155
Mar-14-2005, 03:34 AM
Hi there,
it has always bugged me that I have to view my pictures in single-picture-view in order to get the "share photo"-button.
How about integrating this link in photo-tools?
Thanks for listening,
Sebastian
devbobo
Mar-14-2005, 05:00 PM
Hi there,
it has always bugged me that I have to view my pictures in single-picture-view in order to get the "share photo"-button.
How about integrating this link in photo-tools?
Thanks for listening,
Sebastian Sebastian,
Here's a piece of code for the co-branding footer html section, that will add 'share' button to each photo and it only works properly for 'Traditional' or 'All Thumbs' styles...
<script for="window" event="onload" defer>
try
{
var re1 = new RegExp("\/gallery\/([0-9]+)","ig");
var re2 = new RegExp("\/photos\/([0-9]+)-","ig");
re1.exec(document.location);
var sAlbumID = RegExp.$1;
if (sAlbumID != "")
{
var objCol = document.getElementsByTagName('img');
for (i = 0; i < objCol.length; i++)
{
if (objCol[i].className == "smborderoff")
{
re2.exec(objCol[i].getAttribute('src'));
var sImageID = RegExp.$1;
objParent = objCol[i].parentNode;
while (objParent.nodeName != "TBODY")
objParent = objParent.parentNode;
objTR = document.createElement('tr');
objParent.appendChild(objTR);
objTD = document.createElement('td');
objTR.appendChild(objTD);
objForm = document.createElement('form');
objForm.setAttribute('action', '/gallery/share.mg');
objForm.setAttribute('method', 'post');
objTD.appendChild(objForm);
objAlbum = document.createElement('input');
objAlbum.setAttribute('type', 'hidden');
objAlbum.setAttribute('name', 'AlbumID');
objAlbum.setAttribute('value', sAlbumID);
objForm.appendChild(objAlbum);
objImage = document.createElement('input');
objImage.setAttribute('type', 'hidden');
objImage.setAttribute('name', 'ImageID');
objImage.setAttribute('value', sImageID);
objForm.appendChild(objImage);
objPage = document.createElement('input');
objPage.setAttribute('type', 'hidden');
objPage.setAttribute('name', 'Page');
objPage.setAttribute('value', '1');
objForm.appendChild(objPage);
objSubmit = document.createElement('input');
objSubmit.setAttribute('type', 'submit');
objSubmit.setAttribute('value', 'share');
objSubmit.className= 'buttons';
objForm.appendChild(objSubmit);
}
}
}
} catch(e) {}
</script>
Cheers,
David
rainforest1155
Mar-15-2005, 02:49 AM
David,
many thanks for the effort!:clap
Too bad I'm stuck with a basic account at the moment and therefore can't use it for now.
I'm sure somebody else can use it.
Sebastian
rainforest1155
Mar-21-2005, 01:44 PM
Is there something in the long feature-queue for basic-accounts or is it not going to happen? :wxwax
I can life with anything except silence. :D
Thanks,
Sebastian
{JT}
Mar-21-2005, 07:50 PM
We have not discussed moving the share photo button, but will keep it mind for the list ;)
Is there something in the long feature-queue for basic-accounts or is it not going to happen? :wxwax
I can life with anything except silence. :D
Thanks,
Sebastian
rainforest1155
Mar-22-2005, 12:19 AM
We have not discussed moving the share photo button, but will keep it mind for the list ;)Thanks for the answear. Actually I wasn't talking about moving, that would make no sense especially for the users who don't have an admin account to my pictures. :D
I was thinking about an additional share photo button for easy access in photo tools.
Sebastian
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.