SMFHacks.com

SMF Gallery Pro => Support => Bugs => Topic started by: Scy on September 06, 2007, 03:29:54 am

Title: Correct behaviour for Previous- and Next -links
Post by: Scy on September 06, 2007, 03:29:54 am
I guess this could be as well on the Feature Requests, but I consider this more like bug that should be fixed, so I'll posted it here.

When user is browsing images in certain categories and he/she reaches the last picture in this category, there will be still "Next" -link available, allthough there isn't any next picture.

By clickin this link user gets back to same last picture. I've noticed this causes some confusion and some user's even seem to think that there's some kind of error in the gallery.

So do you have any fix for this that if the picture is the last one in it's category there would be no Next-link (and vice versa no Previous -link in the very first picture)?
Title: Re: Correct behaviour for Previous- and Next -links
Post by: SMFHacks on September 06, 2007, 07:14:16 am
Could be done just would require more sql queries.
Title: Re: Correct behaviour for Previous- and Next -links
Post by: Scy on September 07, 2007, 12:26:37 am
Quote
Could be done just would require more sql queries.

Would you be so kind to give an example what kind of queries or modification this would require?

The thing is annoying because it also manipulates the view statistis to be incorrect: When user reaches the last picture in the folder and happens to click next several times, every page load is counted as a new view.

I think this also should be prevented by setting a cookie per picture - so that statistics wouldn't be manipulated so easily. Is it possible to use similar cookie with this just like when user gives a star rating to pic - and how?
Title: Re: Correct behaviour for Previous- and Next -links
Post by: SMFHacks on September 07, 2007, 07:14:40 am
It would probably add two queires one to check if the picture is the very first in the category and another to check if the picture is the very last. If it meets either case then it would the previous/next link.
Title: Re: Correct behaviour for Previous- and Next -links
Post by: Scy on September 24, 2007, 01:31:08 am
Would you please consider sharing an living example of what lines to add and where to achieve this kind of feature?  ::)

To be honest, this is very defunctional clich and should be corrected also in the future versions.

Considering this, it also seems that picture views count doesn't use cookies like star rating, and user can manipulate the views by reloading page. This also causes that pictures in gallery section that are the last will get always double or even triple view amounts because of incorrect behaviour of next-link. Could this also be implemented, so that user would be able to add only a one view to picture (like setting cookie that would last, to say, 15 minutes..)