Member
Member
Rain   2008-12-17, 22:04
#1

What's the way to pull the URL to the album the visitor is currently viewing? I've tried it several ways and I can get it through printing the breadcrumb navigation, but I need to have a custom named link, not the gallery name. All the others ways I've tried just direct to the image page the visitor is already on..

Thanks.

Member
Member
sbillard   2008-12-17, 22:14
#2

getAlbumLinkURL()

Member
Member
Rain   2008-12-17, 22:22
#3

That's one of the ones I tried and it links to the page the visitor is currently on?
For example, if the visitor is on "http://example.com/zenphoto/album-name/image.jpg.html" then getAlbumLinkURL() links to the same url..

Member
Member
sbillard   2008-12-17, 22:42
#4

Maybe you better describe more thoroughly what you are trying to do. That link will point you to the current album, which is what I thought you asked for.

Member
Member
Rain   2008-12-17, 22:49
#5

Sure. Please go here for example: http://www.thatvideogameblog.com/galleries/prince-of-persia/Prince_of_Persia-960.jpg.html

What I need is for that "view thumbnails" link to link to "http://www.thatvideogameblog.com/galleries/prince-of-persia/"
not "http://www.thatvideogameblog.com/galleries/prince-of-persia/Prince_of_Persia-960.jpg.html"

In other words, the album thumbnail index link is what I'm after.

Member
Member
sbillard   2008-12-17, 23:31
#6

Well, getAlbumLinkURL) will get you the link to the album as you wish. This is the same function call that is used when you print the breadcrumbs.

Member
Member
Rain   2008-12-17, 23:38
#7

But since it is not, what could be the problem?

Member
Member
sbillard   2008-12-17, 23:50
#8

But it is working, since the breadcrumb is correct. So maybe you have not used it correctly. What is your code.

Member
Member
Rain   2008-12-18, 00:22
#9

view thumbnails

EDIT // Duh, I left out "print," should be view thumbnails

Problem solved, thanks for the help.

Member
Member
sbillard   2008-12-18, 01:12
#10

One more thing. The 'get' versions of the template functions all return 'raw' data. So you might want to htmlspecialchars() the result before placing it in a HREF. Otherwise special characters in your album names may cause difficulties.

Member
Member
Rain   2008-12-18, 10:46
#11

Is this the correct way of doing that?
``

EDIT: Nope, that didn't work properly, gotta lose the "print" in this case, correct?
``

Administrator
Administrator
acrylian   2008-12-18, 11:44
#12

Right

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.