Member
Member
sabistar   2009-12-29, 22:12
#1

Hi guys,

I'm a newbie with Php so I'm sorry if I'm not descriptive enough or sound a little dumb! hehe.

I'm trying to remove the Previous/Next that appear at the bottom of my albums when I have one page only. I found the getTotalPages function but I am unsure how to use it. From another thread of this forum, I figured this syntaxe (at one point it was working.. I don't know what I changed, but it's not working anymore!).

In order to try to debug this, I have tried to remove the printPageListWithNav function and replace with a simple Echo. The echo returns data only when gettotalpages < 1! How can I have less than one page? Or is my syntaxe erroneous? This is what I have now:

I hope you can help

Thanks,
Sabrina

(if it can help, this is the website.. keep in mind it's not finished and I did use some pictures from Windows to get more than one page..)

http://www.sabrinaphoto.ca/zenphoto/

The gallery called "spectacle, the first one, has more than one page)

Member
Member
sbillard   2009-12-30, 00:09
#2

Most people do that via CSS changes that make those elements the same as the background color. (The links are class disabled or something like that.)

But if you do wish to do it with code, you need to realize that it is not the code that is causing you your problem. It is instead your math. If you are actually looking at a page, the there must be at least one page.

Member
Member
sabistar   2009-12-30, 00:22
#3

Yeah I realize that the math is the problem as it's impossible that I have less than one page. I just don't understand how that works I guess.. I thought it was a simple less than/greater than.

I'll try with the CSS, it's probably easier. I didn't realize I could do it that way. Thanks.

Member
Member
sabistar   2009-12-30, 00:33
#4

Oh my god the CSS thing worked like a charm even for me!!!!!

Thank you so much you made my day.. just 30 seconds of work after your post and I got it working..

Really, thanks!

Administrator
Administrator
acrylian   2009-12-30, 11:42
#5

You of course could also hide these elements via the visibilityor display elements with CSS.

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