1 (edited by Gizzmo 2004-10-01 01:08)

Topic: Change Page Link

If there are any problems please contact me. This is my first mod.
And with step 7&8 just edit your language you use.

##
##
##        Mod title: Change Page Links
##
##       Mod version:  1.0
##       Only Tested on 1.1.5
##       Release date:  2007-09-10
##       Author:  Michael Lanman (justgiz@justgizzmo.com)
##
##       Description:  Addes the Next and Back Link Where There are Page Numbers!
##
##       Affected files:  include/functions.php
##                        lang/en/en_common.php          
##
##       Affects DB:  Yes
##
##       Note: I beleave it will work on all virsions but i have not tested it 
##           on any other one cept 1.1.5
##
##       DISCLAIMER:  Please note that "mods" are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##
##


#
#---------[ 1. OPEN ]---------------------------------------------------------
#

include/functions..php


#
#---------[ 2. FIND (line: 363) ]---------------------------------------------
#

function paginate($num_pages, $cur_page, $base_url)
{

#
#---------[ 3. ADD AFTER ]-------------------------------------------------
#

    global $lang_common;

    if($cur_page != $num_pages){
        $next_page_number =  $cur_page+1;
        $next_page = '<a href="'.$base_url.'&p='.$next_page_number.'">'.$lang_common['Next'].'»</a>';
    }
    if($cur_page > 1){
        $back_page_number = $cur_page-1;
        $back_page = '<a href="'.$base_url.'&p='.$back_page_number.'">«'.$lang_common['Back'].'</a>';
    }


#
#---------[ 5. Find (line: 393) ]-------------------------------------------------
#

    return $string;


#
#---------[ 6. ADD BEFOR ]-------------------------------------------------
#

    $string = ' '.$back_page.' '.$string.' '.$next_page;

#
#---------[ 7. OPEN]-------------------------------------------------
#

lang/en/en_common.php

#
#---------[ 8. ADD]-------------------------------------------------
#

'Next'    =>    'Next',
'Back'    =>    'Back',

2

Re: Change Page Link

Cool smile (As I think this would be a basic feature)

Re: Change Page Link

i don't really see the point in this as the numbers are good enough and as the current one is not a hyperlink its easy to go back and next

Re: Change Page Link

well i think pressing a big word like next insetd of lookin for the next page from the one your on. and i wanted to make some thing to take up my time and sence im still new at php scriptin it was funn

Re: Change Page Link

ok i see the having a bigger button, although numbers are big enough for me big_smile