Member
Member
ksvendsboe   2009-04-28, 22:57
#1

Hi there,

I have created a custom theme based on the zenpage default theme and have combined album.php and image.php to have the images load in the same page as the thumbnails (album.php file). I am now trying to get next and previous buttons so that viewers can click through the images easily but am having trouble getting it to work. I pulled this code from image.php:

        " title="">« 

        " title=""> »

and plugged it to the album.php page, but it is bringing up nothing. Here is a link to one of the albums on the site in question:

http://heatherwb.com/portfolios/commercial-campaign-editorial/

if anyone could offer advice, I would greatly appreciate it! Thanks.

Administrator
Administrator
acrylian   2009-04-29, 08:16
#2

So you added the sized image to album.php? That will not work this way. Adding the thumbnails (next_image loop) to image.php is far more easier. But of course you will have to change the link to skip the normal thumbnail view. Please try a forum search, we had that several times.

Member
Member
ksvendsboe   2009-04-29, 17:42
#3

thanks for your advice, acrylian. I actually added the unsized image to album.php this way:

" title="">

and that part works just fine, as can be seen here:

http://heatherwb.com/portfolios/commercial-campaign-editorial/

I just can't get the next and previous php to work correctly. The if/then in the next and previous php isn't bringing anything up. I have seen the forum posts about adding thumbs to image.php, but since I already did the whole site this way, I guess I was hoping that there were other options that didn't involve redoing what I have already done. If not, I'll just have to go that route, but I'll still keep my fingers crossed for a couple of days. So if anyone out there has a suggestion...

Thanks!

Administrator
Administrator
acrylian   2009-04-30, 08:10
#4

Well, it is not a big change I think. All you need to do is to change the link that normal goes to the thumbnail view. Use this within the next_album loop on album.php (or index.php depending if you have subalbums or not):

`

.]">...
`
That's all. This links to image.php and shows the first image.

Member
Member
ksvendsboe   2009-04-30, 18:16
#5

please pardon me - I am a complete php novice. I know just enough to be a danger to myself. Thinking that I knew what you meant, I tried this:

">

which did not seem to help. I am using this javascript to bring up the large images:

function showPic (whichpic) {
if (document.getElementById) {
document.getElementById('placeholder').src = whichpic.href;
if (whichpic.title) {
document.getElementById('desc').childNodes[0].nodeValue = whichpic.title;
} else {
document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
}
return false;
} else {
return true;
}
}

and this is the relevant code within the page:

    " title=" ">



    " title=" ">










        " title="">









        " title="">« 

        " title=""> »




Choose an image to begin

I hate to be a pest, but the person I made the site for has suddenly decided that having this functionality is the most important thing on the site. Things I wish I had known to start with... Thanks so much for your help!

Administrator
Administrator
acrylian   2009-04-30, 18:25
#6

Your site uses javascript to load the image within the page. This is of course not the standard way Zenphoto works which loads actually a new page. If you can live with that you have to do it my way (using image.php and skipping album.php).

It is possible to do that your way but you will have to write your own php/js function stuff to get the next/prev buttons working.

Member
Member
ksvendsboe   2009-04-30, 19:29
#7

good enough - thanks so much for your help and time.

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