HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


strange gallery behavior

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#78396 (In Topic #16050)
Avatar

Community saint

I have a user with his gallery viewing set to regular, he sent me this message:

if you go to my Gallery I have 13 images. it pages at 12. Go to the second/last page with 1 image. Now click on "13 images per page". The next/previous goes away but the screen doesn't refresh to show all of them because the URL says start=12 but this means there is no way to go back to the first page. So whatever code you have that updates to "view all" should clear the start value or reset it to 1

I went to view it in that mode, he is right, when you go to his gallery you see 12 images, if you click to the next page, it uses

Code

index.php?page=galleries&type=misc&id=member_27_root&start=12&root=root

If you then use the pulldown to select 13 images per page it gives you:

Code

http://www.air-rc.com/mgalleries/index.php?type=misc&id=member_27_root&start=12&root=root&page=galleries&max=13

The start=12 should change, it is probably left there because it was passed from being currently on the 'second'  page.   I would think if you change max, it should recalculate which image to 'start' on for whatever page you are currently on, or send you to page one I guess.

But I guess it doesn't know how many 'max' was last time.   Interesting situation.

Paul
Back to the top
 
Posted
Rating:
#78397
Avatar

Community saint

Of interest as well, I manually changed the sart=12 in the url

Code

/index.php?type=misc&id=member_27_root&start=1&root=root&page=galleries&max=13

So you would think it would go back to the start and show all 13 images.   Nope.  It shows 12 images, just no way to go to the next page.   Tried 14,15,16, same thing, only shows 12 images.

Paul
Back to the top
 
Posted
Rating:
#78408
Avatar

Think I have a fix. In sources/templates_results_browser.php change:

Code

$hidden=build_keep_form_fields('_SELF',true,array($max_name,'wide_high'));
to

Code

$hidden=build_keep_form_fields('_SELF',true,array($max_name,'wide_high',$start_name));

Regarding your second point, start starts at zero because it's actually an offset not a position.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#78412
Avatar

Community saint

Absolutely fixed it.   Thanks.  You made that a heck of a lot simpler than I thought it woud be.

Is that file part of the tempcode processing stuff?

Paul
Back to the top
 
Posted
Rating:
#78414
Avatar

Not really, just a frontend to the pagination templates.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: