Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: Move the paginator?  (Read 2222 times)

cpmv2

  • Newbie
  • *
  • Karma: 0
  • Posts: 25
Move the paginator?
« on: December 13, 2006, 12:05:08 am »

Does anyone know how to move the paginator ( First Previous 1 2 Next Last ) to the top of an article?
Logged

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
Move the paginator?
« Reply #1 on: December 13, 2006, 06:15:47 am »

moved from sNews 1.5 Webdesign

Look for this piece of code inside center() function, and add these blue changes
Quote
function center() {
...
$result = mysql_query($query_articles);
$numrows = mysql_num_rows($result);
if (!$result || !$numrows) {echo '

'.l('not_found').'

';}
else {
# display paginator (set in admin contents pane) if there's more articles than defined in article_limit and if viewing categories page
/*paginator begin*/

if (!empty($currentPage) && ($numrows_articles > $article_limit) && s('display_pagination') == 'on') {
paginator($categorySEF, $currentPage, $totalPages, '', l('paginator'));
}
/*paginator end*/
while ($r = mysql_fetch_array($result)) {
$infoline = $r['displayinfo'] == 'YES' ? true : false;
...
}
There's the same paginator module (the blue part) applied somewhere at the bottom of center() function. If you don't want it there, just remove it ;)
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version

cpmv2

  • Newbie
  • *
  • Karma: 0
  • Posts: 25
Move the paginator?
« Reply #2 on: December 13, 2006, 04:31:38 pm »

That's great Mika, thank you!
Logged