Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Adding page navigation to the top of each thread

ZhaanZhaan Professional fool ✭✭

Good evening, VF!

I've got a quick question for you guys regarding page navigation (as in 'Go to page 1, 2, 4, 5' etc.) inside discussions. Basically, my problem is that these links are only displayed on the bottom of each page, and I'd like to add them to the top as well. What would be the easiest way to do this?

PS: I'm using the BitterSweet theme in 2.1.

Any input will be appreciated!

Comments

  • ZhaanZhaan Professional fool ✭✭

    Bump! Isn't there a template or something I can edit?

  • businessdadbusinessdad Stealth contributor MVP

    @Zhaan said:
    Bump! Isn't there a template or something I can edit?

    I would not recommend editing the core files, but you can create a new theme and add the required view(s) to it. The one you might be interested into is /views/discussion/index.php, which is the one that displays the pager at the bottom of a thread.

  • ZhaanZhaan Professional fool ✭✭

    Cheers, I'll try that. :)

  • 422422 Developer MVP

    Would like to know where this is created too.

    I want to change the < to Prev and the > to Next

    There was an error rendering this rich post.

  • businessdadbusinessdad Stealth contributor MVP

    @422 said:
    Would like to know where this is created too.

    In Vanilla 2.0 it's in /views/discussion/index.php, line 16: PagerModule::Write($PagerOptions);

  • 422422 Developer MVP
    edited February 2013

    Yeah I see that, but buggered if I can see what fires the < and the > for previous and next. ps. I am on 2.0.18.4

    No such line in that file

    There was an error rendering this rich post.

  • businessdadbusinessdad Stealth contributor MVP
    edited February 2013

    @422 said:
    Yeah I see that, but buggered if I can see what fires the < and the > for previous and next

    class.pagermodule.php

    line 117:

      $this->MoreCode = '›';
      $this->LessCode = '‹';
    

    line 244:

      $PreviousText = T($this->LessCode);
      $NextText = T($this->MoreCode);
    

    Is that what you were looking for?

  • 422422 Developer MVP

    Yes. But that code is not in the file you indicate

    There was an error rendering this rich post.

  • 422422 Developer MVP
    edited February 2013

    I ses it in applications > dashboard > modules > class.pagermodule.php

    Ok that did it, but WTF is it in dashboard for ?

    There was an error rendering this rich post.

  • businessdadbusinessdad Stealth contributor MVP
    edited February 2013

    @422 said:
    Yes. But that code is not in the file you indicate

    It is, I have it in front of me, in class.pagermodule.php. Of course, you don't have to modify that file to make it work, you should be able change the text as follows:

    // $PagerOptions initialised before this line
    $PagerOptions['MoreCode'] = 'Next';
    $PagerOptions['LessCode'] = 'Prev';
    PagerModule::Write($PagerOptions);      
    
  • 422422 Developer MVP

    Yer all done now, fixed, just changing the crappy span tags they use. And adding no hover. Cheers mate

    There was an error rendering this rich post.

Sign In or Register to comment.