Results 1 to 10 of 10

Thread: Pagination - Page number layout

  1. #1
    Join Date
    May 2004
    Location
    New Zealand
    Posts
    600

    Post Pagination - Page number layout

    Back with version 5, or a version just after that, I reworked the the pagination file so that the page numbers at the bottom of the page were alittle easier on the eyes, I set it up so that you can easily change the colors to suit your site etc, using variables at the top of the page,

    However, Ive went to put it into the current pagination and the files are much differant, and so i figured if im going to change it again, maybe other people would like to come up with abit of advice, in regards to should i use css to style it, I used a table around the code in my example, but im wondering if its time to move on from the table and try and use css.

    Ill attach a screenshot of the final result.

    Maybe if people like my idea, dody could help impliment it into the script which would stop the need to redo it every upgrade.

    Cheers Ezy
    Attached Images Attached Images

  2. #2
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,732

    Default

    Let me know css do you use. It would be better to use css

  3. #3
    Join Date
    May 2004
    Location
    New Zealand
    Posts
    600

    Default

    I used tables for that, Im not the greatest at css, but i notice the file has changed alot since i did mine, so ill try and redo it tomorrow with the 5.3 version of pagination

  4. #4
    Join Date
    May 2004
    Location
    New Zealand
    Posts
    600

    Default

    ok, at this stage, Ive still not got it to css, but thats just because im no css expert.

    I have however got it to a stage that works nicely

    Ill upload the file here, and if anyone wants to test it on their site. feel free,
    If you want to edit the colors, this can be done inside the file itself in the variables at the top.

    Im not sure on its effect on the First or Last because my site doesnt have enough links in it as yet to test, so if someone can let me know if its ok that would be awesome.

    Remember this is from version 5.3, so please only use this if your using 5.3 and ***IMPORTANT*** Backup you orignial file just in case you wanna go back to it.

    Hope you like it.

    Oh before I forget, you will have to goto the english.php file in the lang directory and update the nav_page text to the following

    $lang['nav_page'] = 'Page ';

    Cheers Ezy
    Last edited by ezykiwi; 09-25-2006 at 11:39 AM.

  5. #5
    Join Date
    Nov 2004
    Posts
    1,822

    Default

    sweet i will try this later
    Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )

  6. #6
    Join Date
    May 2004
    Location
    New Zealand
    Posts
    600

    Default

    Ive just found a bug in it,

    Instead of showing the correct number of pages, its showing the number of links in the text on the left,

    Ill play around some more with it....

  7. #7
    Join Date
    May 2004
    Location
    New Zealand
    Posts
    600

    Default

    Dody,
    What variable in the Pagination contains the total number of pages.

    In the old version there was a value that counted them... I think it was called $this->pg_count

  8. #8
    Join Date
    May 2004
    Location
    New Zealand
    Posts
    600

    Default

    Right, Ive found the problem,
    since the first version i modified, the value which holds the number of pages in total doesnt appear to be used now, so ive put it back in...

    $this->pg_count = ceil($this->rec_count / $this->pg_size);

    Ive declared it as a variable at the top also. Ive attached the newer version.

    Ezy
    Attached Files Attached Files

  9. #9
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,732

    Default

    I tested your new pagination class. Work well here, nice.

    But there's a small bug, you forgot to add a space
    Pages10 of 215

    It would better to add class/css for each section, so it would be easier to change the appearance.

  10. #10
    Join Date
    May 2004
    Location
    New Zealand
    Posts
    600

    Default

    Quote Originally Posted by dody View Post
    I tested your new pagination class. Work well here, nice.

    But there's a small bug, you forgot to add a space
    Pages10 of 215

    It would better to add class/css for each section, so it would be easier to change the appearance.
    Dody, If you read up the page, you have to also change the english.php file to update that text....

    Is there much point making it CSS, it will probibly only be altered once or twice... at most....

    I guess it would be good if we could have it says in the styles.css file.... maybe someone who is alittle more familiar with CSS could help point me in the right direction on this one....

    Even if someone has example code of css tables, just so I could play around with it... Im just not sure how to link it over to the styles.css file ....
    Last edited by ezykiwi; 09-26-2006 at 01:50 AM.

Similar Threads

  1. Number of links par page
    By Mickey in forum Blocks and Modification
    Replies: 14
    Last Post: 09-10-2006, 05:32 PM
  2. Replies: 4
    Last Post: 08-20-2006, 07:52 PM
  3. Replies: 1
    Last Post: 02-14-2005, 08:38 PM
  4. Number of Columns in links page
    By marko in forum v5.x
    Replies: 10
    Last Post: 08-17-2004, 09:52 PM
  5. Replies: 0
    Last Post: 05-27-2003, 04:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •