You are not logged in.

#1 2008-10-08 22:24:17

escondida
Package Maintainer (PM)
Registered: 2008-04-03
Posts: 157

Forums: Adding a "Previous Page" and a "Next Page" button

Hello,

I've been checking the forums a little more regularly lately, and one thing that I've noticed is that there is no button for forward or back when browsing search results, subforums, etc.

I know this is a trivial issue, but I believe it would make things just that slight bit more convenient to add this feature.

Therefore, I'm going to suggest that one be added as part of the pages-to-choose-from array at the top/bottom of pages.

Questions? Further thoughts? Comments?

Offline

#2 2008-10-08 22:48:07

koch
Member
From: Germany
Registered: 2008-01-26
Posts: 369

Re: Forums: Adding a "Previous Page" and a "Next Page" button

most browsers can do this, the side-buttons of my mouse can do this and my keyboard can control my firefox to do this.
IMHO there is no need for bloating the forum with stuff like that.

also there is this line at the top of the forum displaying where you are and at both, top and bottom, the pages of the thread you are in are displayed.
so at least i have 5 possibilities to go back or forward in history.

do you really need 6 ways to do this.  wink

Offline

#3 2008-10-08 22:55:55

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: Forums: Adding a "Previous Page" and a "Next Page" button

koch wrote:

most browsers can do this, the side-buttons of my mouse can do this and my keyboard can control my firefox to do this.
IMHO there is no need for bloating the forum with stuff like that.

also there is this line at the top of the forum displaying where you are and at both, top and bottom, the pages of the thread you are in are displayed.
so at least i have 5 possibilities to go back or forward in history.

do you really need 6 ways to do this.  wink

I agree, plus, I never understood what was the purpose of a "Back" and "Forward" link on webpages, where web browsers are all capable of doing that, at least all those I have used, and I'm not sure what kind of exhotic web browser would omit a back button. In text browsers, controls are keyboard oriented, so it is actually quicker to press the right button for that function than to navigate to the actual link.


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#4 2008-10-08 23:57:09

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: Forums: Adding a "Previous Page" and a "Next Page" button

I think the OP means "next page of search results" and "previous page of search results" - not actual back/forward buttons that navigate your browser's cache.

Offline

#5 2008-10-09 00:04:10

escondida
Package Maintainer (PM)
Registered: 2008-04-03
Posts: 157

Re: Forums: Adding a "Previous Page" and a "Next Page" button

Cerebral, that's exactly what I meant. Sorry I didn't make that clearer. Thanks.

Offline

#6 2008-10-09 00:12:46

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: Forums: Adding a "Previous Page" and a "Next Page" button

This is useful for vimperator's "]]" and "[[" too.

Note that you can reduce the problem by setting how many topics/posts you see per page to max (75) in your profile / display.

Offline

#7 2008-10-14 03:06:08

zenos
Member
Registered: 2008-09-23
Posts: 23

Re: Forums: Adding a "Previous Page" and a "Next Page" button

+1

I was thinking about this today. I was also going to recomend subsections in the Desktop Environments forum. Give kde, gnome, xfce, *box, X11 their own space that way everything is not grouped together.  It would make specific topics and questions easier to answer and respond to. For example if someone has a question about openbox they can post it in Desktop Environments/Openbox where it would be easier to find and get answered by openbox users.

Offline

#8 2008-11-10 16:26:47

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Forums: Adding a "Previous Page" and a "Next Page" button

finferflu wrote:
koch wrote:

bhla bhla bhla

bhla bhla bhla

I think this is what she ment:
Pages: 1 2 3 4  => Pages: < 1 2 3 4 >

Personally, I think it's a good idea.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#9 2008-11-10 16:50:09

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: Forums: Adding a "Previous Page" and a "Next Page" button

My bad, I misunderstood, sorry.

OT: What do [[ and ]] do in Vimperator? I tried them, but I can't understand what they do...


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#10 2008-11-10 17:51:29

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Forums: Adding a "Previous Page" and a "Next Page" button

I was always thinking that it's strange these buttons are missing.


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#11 2008-11-10 17:55:34

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: Forums: Adding a "Previous Page" and a "Next Page" button

finferflu: they automatically follow the link that matches a pattern (by default something like "next" or ">>" I'm not sure)

Last edited by Procyon (2008-11-10 18:00:56)

Offline

#12 2008-11-11 03:25:46

ssjlegendx
Member
Registered: 2008-01-01
Posts: 94
Website

Re: Forums: Adding a "Previous Page" and a "Next Page" button

joyfulgirl wrote:

I'm going to suggest that one be added as part of the pages-to-choose-from array at the top/bottom of pages.

I agree: this is a feature I've wanted for a while (though -- at this point -- I can do without it). If it is not implemented forum-wide, it could be "added" on an individual basis via a Greasemonkey script of one's own device.


#!/vim/rocks

Offline

#13 2008-11-11 04:29:23

TjPhysicist
Member
From: Waterloo, Canada
Registered: 2008-04-12
Posts: 126
Website

Re: Forums: Adding a "Previous Page" and a "Next Page" button

ssjlegendx wrote:
joyfulgirl wrote:

I'm going to suggest that one be added as part of the pages-to-choose-from array at the top/bottom of pages.

I agree: this is a feature I've wanted for a while (though -- at this point -- I can do without it). If it is not implemented forum-wide, it could be "added" on an individual basis via a Greasemonkey script of one's own device.

can u point me 2 the exact script thtat works for you....thx.


-Tj
Now reborn as Tjh_ (to keep it similar to my username in other places)

Offline

#14 2008-11-11 05:36:36

toofishes
Developer
From: Chicago, IL
Registered: 2006-06-06
Posts: 602
Website

Re: Forums: Adding a "Previous Page" and a "Next Page" button

We don't customize our forum all that much. If punbb supports it, let us know what we have to configure and we might be able to turn it on.

Offline

#15 2008-11-12 03:18:20

ssjlegendx
Member
Registered: 2008-01-01
Posts: 94
Website

Re: Forums: Adding a "Previous Page" and a "Next Page" button

TjPhysicist wrote:

can u point me 2 the exact script thtat works for you....thx.

I don't actually use or have such a script; I've contemplated writing one, but I'm not sure if I ever will.


Edit:

After making my original (now slightly-modified) post, I worked on some JavaScript to accomplish this task. I wrote code that can extract the thread ID and current page number from the URL (window.location.href), and I began working on part of the DOM modification needed to add a link for the next page. (Even the code I have needs some work and foolproofing.) I'm not certain if I will ever completely finish what I have and convert it into a Greasemonkey script, but I might.

Also, one should note that the PunBB Forums themselves have "Previous" and "Next" buttons. Based on their current list of plugins used (pun_bbcode, pun_e_mail_auth), I suppose this is a feature that is built into (at least the newer versions of) PunBB. Then again, the PunBB folks might have added this as a custom feature.

I've become accustomed to the lack of these buttons, and so using the individual page numbers for navigation does not especially faze me any longer.

Last edited by ssjlegendx (2008-11-12 13:46:39)


#!/vim/rocks

Offline

#16 2008-11-18 03:42:41

moose jaw
Member
From: Milwaukee
Registered: 2007-08-20
Posts: 104

Re: Forums: Adding a "Previous Page" and a "Next Page" button

Heartily endore OP's suggestion, and note along with Procyon that this would make a real difference for browsing the forums with Vimperator, using "]]" and "[[" (especially on netbooks where small screen and trackpad can make it hard to land on those tiny little numbers).

Offline

#17 2008-11-18 07:57:57

u_no_hu
Member
Registered: 2008-06-15
Posts: 453

Re: Forums: Adding a "Previous Page" and a "Next Page" button

In vimperator C-a and C-x will do this from second page onwards.... it increments the last number of the url....

And punbb 1.3 supports this by default.


Don't be a HELP VAMPIRE. Please search before you ask.

Subscribe to The Arch Daily News.

Offline

#18 2008-11-18 14:03:30

moose jaw
Member
From: Milwaukee
Registered: 2007-08-20
Posts: 104

Re: Forums: Adding a "Previous Page" and a "Next Page" button

u_no_hu wrote:

In vimperator C-a and C-x will do this from second page onwards.... it increments the last number of the url....

Whoa, thanks!  That is great to know.

Offline

#19 2008-11-18 14:34:20

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: Forums: Adding a "Previous Page" and a "Next Page" button

Here's a javascript that I've used successfully with lots of other sites. Not in a position atm to test it out here, but even if it doesn't work as-is, it'd be a useful starting point. This script evolved out of ones included with a FF2.* extension, I think it was "Next, Please!"

Apologies if the formatting is off. It was all compressed together in an old bookmarks file.

javascript:(function(){

    function image(re){
        for(var i=0;i<document.images.length;i++){
            if(re.test(document.images[i].src.split("/").pop())){
                j=document.images[i].parentNode;
                if(j.href){return Array.indexOf(document.links,j);}
            }
        }
    }

    function link(re){
        var h;
        for(var i=0;i<document.links.length;i++){
            h=document.links[i].toString();
            if(/https?|file/.test(h.split(":")[0])&&re.test(h)){
                return i;
            }
        }
    }

    function linktext(re){
        var l;
        for(var i=0;i<document.links.length;i++){
            l=document.links[i];
            if(/https?|file/.test(l.toString().split(":")[0])&&re.test(l.textContent)){
                return i;
            }
        }
    }

    function linkclass(re){
        var l,c;
        for(var i=0;i<document.links.length;i++){
            l=document.links[i];
            if(/https?|file/.test(l.toString().split(":")[0])){
                c=l.attributes.getNamedItem("class");
                if(c&&re.test(c.value)){
                    return i;
                }
            }
        }
    }

    function increment(){
        var i=location.href.split("/").pop().split("?")[0].match(/(?:(index|page|)(\\d*)\\.)?/)[2];
        if(!i){
            i="(1|2)";
        }else{
            i=(i-0+1).toString();
        }
        return link(new RegExp("/(index|page|)"+i+"\\\\.(html?|asp|php)(\\\\?.*)?$","i"));
    }

    function incrementp(){
        var i=location.href.split("?")[1];
        if(i){
            i=i.match(/&p=(\\d*)/);
            if(!i){
                i="(1|2)"
            }else{
                i=(i[1]-0+1).toString();
            }
            return link(new RegExp("&p="+i));
        }
    }

    var i,j,links=document.getElementsByTagName("link");
    if(links){
        for(i=links.length-1; i>=0; i--){
            if(links[i].getAttribute("rel")=="next"){
                j=links[i].getAttribute("href");
                if(j){location.href=j;return;}
            }
        }
    }
    i=undefined;
    if(/^(www\\.)?salon\\.com$/.test(document.domain)){
        i=increment();
    }else{
        if(/^bbs\\.archlinux\\.org$/.test(document.domain)){
            i=incrementp();
        }else{
            if(/^del\\.icio\\.us$/.test(document.domain)){
                i=linktext(/%C2%AB earlier/i);
            }
        }
    }
    if(!i){i=linkclass(/^next$/i);}
    if(!i){
        i=linktext(/^\\s*(\\[?\\s*next( \\d+( \\w+s)?| \\w+)?\\s*\\]?|\\[?\\s*next page\\s*\\]?|\\[?\\s*more( \\w+s)?\\s*\\]?|older( \\w+s)?|continued)(\\s*(>>?|%C2%BB))?\\s*$/i);
    }
    if(!i){
        i=image(/next\\.(jpg|jpeg|gif|png)/);
    }
    if(!i){
        i=linktext(/^\\s*(>>?|%C2%BB)\\s*$/i);
    }
    if(!i){i=increment();}
    if(!i){
        alert("Sorry, I could not find the next page of results for this page.");
    }else{
        document.links[i].focus();
        location.href=document.links[i];
    }

})()

Offline

Board footer

Powered by FluxBB