View Full Version : Is this possible...
iBrian
Aug-15-2006, 09:53 AM
Is this possible….
If I'm using an all thumbnails view, can I somehow modify the image navigation control to include a link that will return my users back to the thumbnails for that gallery?
For example instead of this, "<Prev 23 of 94 Next>" can I replace the "23 of 94" with a link that returns to the thumbnails for that gallery.
Maybe it would look something like this, "<Prev | INDEX | Next>".
Thanks,
Andy
Aug-15-2006, 10:00 AM
Is this possible….
If I'm using an all thumbnails view, can I somehow modify the image navigation control to include a link that will return my users back to the thumbnails for that gallery?
For example instead of this, "<Prev 23 of 94 Next>" can I replace the "23 of 94" with a link that returns to the thumbnails for that gallery.
Maybe it would look something like this, "<Prev | INDEX | Next>".
Thanks,
Probably - it would need a Javascript hack, and that would require bigwebguy or devbobo. So, stay tuned, and bump this in a day if you get no traction :)
iBrian
Aug-15-2006, 11:49 AM
Thanks Andy! I love how customizable Smugmug is!
Probably - it would need a Javascript hack, and that would require bigwebguy or devbobo. So, stay tuned, and bump this in a day if you get no traction :)
iBrian
Aug-17-2006, 02:53 AM
Anybody?
devbobo
Aug-17-2006, 04:32 AM
Anybody?
hi Brian,
Sorry I missed this one, try this..
javascript code...
function fixPhotoNav()
{
oPhotoNav = YD.getElementsByClassName("photoNav", "div");
for (i=0; i < oPhotoNav.length; i++)
{
re = /gallery\/([\d]+)\//;
oTitle = YD.getElementsByClassName("title", "span", oPhotoNav[i]);
if (re.test(window.location))
{
re.exec(window.location);
oTitle[0].innerHTML = "| <a href=\"/gallery/" + RegExp.$1 + "\">index</a> |";
}
}
}
footer code...
<*script*>
if (YD.hasClass(document.body, "singleImage"))
fixPhotoNav();
</*script*>
Note remove the *'s.
Cheers,
David
brandofamily
Aug-17-2006, 05:02 AM
the code is FANFRICKIN' TASTIC:clap:clap:clap
But I have one small prob.... I have had customers e-mail me orders and use the image number as the reference.... as in "I wish to by # 28 of 128."
Any thoughts on how to achieve the "index" link and still have the number of the pic?
devbobo
Aug-17-2006, 05:13 AM
the code is FANFRICKIN' TASTIC:clap:clap:clap
But I have one small prob.... I have had customers e-mail me orders and use the image number as the reference.... as in "I wish to by # 28 of 128."
Any thoughts on how to achieve the "index" link and still have the number of the pic?
Thanks Anthony.
Tell me how u want it done and I will mod the code :D
brandofamily
Aug-17-2006, 05:23 AM
Thanks Anthony.
Tell me how u want it done and I will mod the code :D
could it be
<prev| 1 of 128 | next> ..................................Return to Index
(This part left Justified) ................................(this part centered)
Or set it up so a user could adjust that text to their taste?
Edit: i see that i CAN adjust the text... so I guess that's not an issue..... using my limited ability, It seems that the code replaces the "1 of 128" element.... So I guess I'm asking to not replace the element, but to add a "new" piece. I gues it could be centered in the gap between the "next" and the buy options...
iBrian
Aug-17-2006, 08:18 AM
This is exactly what I was hoping could be done!!!
Anthony does make a good point. Is it possible to display the "1 of 128" somewhere else on the screen?
Thanks again!
Brian
brandofamily
Aug-17-2006, 08:28 AM
could it be
<prev| 1 of 128 | next> ..................................Return to Index
(This part left Justified) ................................(this part centered)
Or set it up so a user could adjust that text to their taste?
Edit: i see that i CAN adjust the text... so I guess that's not an issue..... using my limited ability, It seems that the code replaces the "1 of 128" element.... So I guess I'm asking to not replace the element, but to add a "new" piece.
After looking at a page that allows for sales... centering the "return to index" does not look like it would work. Not enough space. But I would like the "1 of 128" and the "index" both there in some fahion, if possible...
brandofamily
Aug-19-2006, 07:56 PM
Thanks Anthony.
Tell me how u want it done and I will mod the code :D
just bumping so this does not get lost... the board is moving quickly these days...
Ryan Armbrust
Aug-20-2006, 06:19 AM
Very interested in this code, sounds great.
brandofamily
Aug-23-2006, 07:11 PM
Thanks Anthony.
Tell me how u want it done and I will mod the code :D
waiting patiently... bump to keep it alive...
ExposeTheMoment
Aug-23-2006, 08:10 PM
yea this code looks cool, I'd like to add it too
devbobo
Aug-25-2006, 05:06 AM
could it be
<prev| 1 of 128 | next> ..................................Return to Index
(This part left Justified) ................................(this part centered)
Anthony,
here's the modified function, i will let you sort out centering the return to index...
function fixPhotoNav()
{
oPhotoNav = YD.getElementsByClassName("photoNav", "div");
for (i=0; i < oPhotoNav.length; i++)
{
re = /gallery\/([\d]+)\//;
oTitle = YD.getElementsByClassName("title", "span", oPhotoNav[i]);
if (re.test(window.location))
oTitle[0].innerHTML = "| " + oTitle[0].innerHTML + " |";
re.exec(window.location);
oPhotoNav[i].innerHTML = oPhotoNav[i].innerHTML + "<span ><a href=\"/gallery/" + RegExp.$1 + "\">return to index</a></span>";
}
}
brandofamily
Aug-25-2006, 07:57 PM
Thanks you sir.... you are truely the best.... We here at the SM group are blessed to have people like you around to help...
ExposeTheMoment
Aug-31-2006, 01:24 AM
Thanks you sir.... you are truely the best.... We here at the SM group are blessed to have people like you around to help...
Hey I added the code,it works but I also looked at your site, mouse to the next in a gallery and move it slowly to the right, it wants to use the link for return to index, but the mouse won't be on the text.
I hope that made sence.
Gary
brandofamily
Aug-31-2006, 03:23 AM
Anthony,
here's the modified function, i will let you sort out centering the return to index...
function fixPhotoNav()
{
oPhotoNav = YD.getElementsByClassName("photoNav", "div");
for (i=0; i < oPhotoNav.length; i++)
{
re = /gallery\/([\d]+)\//;
oTitle = YD.getElementsByClassName("title", "span", oPhotoNav[i]);
if (re.test(window.location))
oTitle[0].innerHTML = "| " + oTitle[0].innerHTML + " |";
re.exec(window.location);
oPhotoNav[i].innerHTML = oPhotoNav[i].innerHTML + "<span ><a href=\"/gallery/" + RegExp.$1 + "\">return to index</a></span>";
}
}
Dev can you check out my site in IE and see if there is anything you can figure out to fix this... You'll see what the issue is when you hover "around" the "next" and "return to index" text/ button...
devbobo
Aug-31-2006, 03:58 AM
Dev can you check out my site in IE and see if there is anything you can figure out to fix this... You'll see what the issue is when you hover "around" the "next" and "return to index" text/ button...
Brando,
I had a look into the problem, seems most of the time on the hover you get this error message.
document.getElementById("floatingPreview") has no properties
This problem is to do with a small issue with one of JT's functions. He is going to fix it, but until then perhaps you can turn off if u are concerned about it, using...
showImagePreview = false;
Cheers,
David
brandofamily
Aug-31-2006, 10:30 AM
Brando,
I had a look into the problem, seems most of the time on the hover you get this error message.
document.getElementById("floatingPreview") has no properties
This problem is to do with a small issue with one of JT's functions. He is going to fix it, but until then perhaps you can turn off if u are concerned about it, using...
showImagePreview = false;
Cheers,
David
being a bit slow... where does that code go... must be JS, but where should I add it in?
devbobo
Aug-31-2006, 01:19 PM
being a bit slow... where does that code go... must be JS, but where should I add it in?
in your js block :thumb
brandofamily
Aug-31-2006, 07:30 PM
I put it in at the end of the JS block. And it did stop the dropdown preview image. But did not fix the problem. I think the problem is that the span you created for the "return" button gets wider when I set a margin-left to move it over... The span width does not matter in FF seemingly. But does in IE. When you hover the span at ANY portion you are hovering the whole thing... I hope that makes sense...
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.