1

Topic: Page Navigation suggestion

There are regular requests for next page/previous page links which is a perfeclty sensible idea. The only reason it is not been implemented is difficulty finding room for them largely because of the space occupied by the breadcrumbs.

In version 1.2 the viewforum page has the name of the forum in the header as well as the breadcrumbs. In version 1.3 viewtopic has a header row which has the name of the topic. It would also be easy enough to change post.php so the header says "Reply to: name of topic" or "Post new topic in: name of forum". The final item of the breadcrumbs is thus rendered redundant because the information is contained in the header of the main section of the board. The breadcrumbs could then be changed to
"Back to: Index >> PunBB discussions" or "Back to: Index" depending which page you are on and positioned centrally. End result is sufficient space for "<< Prev 1, 2, 3, 4 ... 5  Next >>". Potential problems of having long topic names in headers would be solved with overflow hidden so they are truncated thus avoiding ugly wrapping in narrow layouts.

Re: Page Navigation suggestion

sounds like a plan smile any chance of a mock up version for us to have a look at? since it sounds good but sometimes things just don't work out as well in practise wink

3 (edited by Sander D. 2005-07-01 14:31)

Re: Page Navigation suggestion

You could at least use HTML links, for the browsers that support it (or have extensions for it):

<link rel="next" href="…" />
<link rel="previous" href="…" />
<link rel="first" href="…" />
<link rel="last" href="…" />

Re: Page Navigation suggestion

do any browsers support them?

Re: Page Navigation suggestion

Opera and Mozilla (and some other browsers like Lynx) support them. For Firefox, there is the Link Toolbar extension, and there's one for Internet Explorer too.

Re: Page Navigation suggestion

ooo that link toolbar seems nice smile

7

Re: Page Navigation suggestion

Its an excellent idea. Implementing it is something else. The page number links are generated by a call to the paginate function from the main content files e.g. viewtopic.php. To get the links into the header it would need an extra variable in the template and an additonal ob_thingy in any file that used page numbering.

How about doing the same for the breadcrumbs?
<link rel="start" href="index.php" />
<link rel="parent" href="viewforum blah" />

BTW: I have a look at my original thought for page navigation, it sounds tidier that it looked. Back to the thinking board.

Re: Page Navigation suggestion

what about making it so the paginate function put the <link> stuff in a variable and footer.php checked to see if it existed? then if it exists just have <pun_link> replaced with them or if not <pun_link> removed?

9

Re: Page Navigation suggestion

See what the boss says if/when he reads this thread.

Wouldn't paginate have to return an array for any kind of next/previous funcionality to work anyway? If it did then you could do things like display "Page 7 of 12".

Re: Page Navigation suggestion

ok well forgetting the implementation for now...

what about
http://mypunbb.com/files/page.png
i'm not sure it looks as neat as the current system but i can see it is easier to click the links (and the 4 links could correspond to <link> relationships)

11

Re: Page Navigation suggestion

Meh, I don't like changing the breadcrumbs. What you describe is actually how phpBB treated topic breadcrumbs, but before switching, I changed it to behave like punBB.

But now that you mention it, next/previous links might be nice since the text is a slightly easier target than those tiny numbers. You could just create two rows of stuff, and even throw in some next/previous topic links to fill in the empty space. I always liked those. Or something like that..

Hard work may not kill you, but why take chances?

12

Re: Page Navigation suggestion

There is actually a logical way to do it.

1. Leave the top of the page alone
2. Add a footer to viewforum table using tfoot and stick next and previous links in there on the left with a back to top link on the right.
3. Add a footer immediatelly following the the last post in viewforum, put the next and previous links on the left and the subscription link on the right.

That works without disrupting anything and with with addition of no additional vertical space in viewtopic and only one extra row in viewforum. It even solves a problem, the subscribe link is awkward where it is because of the way breadcrumbs wrap.

Re: Page Navigation suggestion

I'm too tired to think about this right now, but I love screenshots big_smile

"Programming is like sex: one mistake and you have to support it for the rest of your life."

14

Re: Page Navigation suggestion

http://www.post21.co.uk/files/viewforum.png

http://www.post21.co.uk/files/viewtopic.png

Re: Page Navigation suggestion

"I'm lovin' it!" big_smile

I'm not sure about "Back to top" though. It will be rather confusing if that link is replaced with the subscribe link.

Are the "Go top" links an accessibility requirement or did you just put them in for fun? smile

"Programming is like sex: one mistake and you have to support it for the rest of your life."

16

Re: Page Navigation suggestion

As regards the "Go top" links. I need a tag at the bottom of viewtopic regardless of whether the post actions are there. I just figured since there has to be tag we might as well put something useful in it as have a div with a non-breaking space. I have seen it requested on more than one occassion as well.  An alternative worth considering is a "Print" action which could be always on, if guests can view posts there is no reason to stop them printing them. Clicking it would open a new window using the same javascipt as the help links which would present a version of the post formatted for printing. On reflection, a print action would be much more useful particularly on support boards.

The only thing to consider is what to do when there is no next/previous page. I would favour deactiving the links rather than hiding them.

As regards the "Back to top" link. What about changing it go "Go top" which is shorter then in viewtopic doing this

Subscribe Go top

That keeps things consistant as the subscribe link is an addition rather than a substitution. In which case the "Go top" links in individual posts would certianly need replacing.

It just occurred to me if the Next|Previous links were on the right then they could be mirrored in the headers so you have the same navigation top and bottom though maybe that begins to look a little cluttered.

17

Re: Page Navigation suggestion

I don't like it ... too confusing smile but a little display:none will be perfect to not have this navigation smile

18

Re: Page Navigation suggestion

There is a variation which is even more logical and provides first page and last page links

http://www.post21.co.uk/files/viewforum2.png

In viewtopic the subscirbe link would be in the centre.

Re: Page Navigation suggestion

looks cool, would First page and Last page be better than << and >> ? just << and >> to me could as easily mean next and prev as first and last hmm

20

Re: Page Navigation suggestion

Not if you have a narrow layout and the subscribe link in the middle. Space is at a premium. Mind you, changing the unsubscribe text and link to just Cancel Subscription would help.

21

Re: Page Navigation suggestion

Paul, try your last suggestion with the pages in the middle between "Prev page" and "next page" ...

22

Re: Page Navigation suggestion

Then it wouldn't match the top page numbers. Consistency matters. Plus I want to get the subscribe link out of its current position.

23

Re: Page Navigation suggestion

And a form option ??? if number of the page > 20 (for example), url are replaced by a form with the number of the pages ?

Re: Page Navigation suggestion

I like it Paul. I like it a lot!

"Programming is like sex: one mistake and you have to support it for the rest of your life."

25

Re: Page Navigation suggestion

OK. Now all I have to do is make it work. I am about to finish 1.3 for the fifth time. The markup keeps shrinking and becoming more source ordered and semantic, the css keeps growing and becoming more complicated. There is it seems an inverse relationship between markup and css, less of one means more of the other.