#1 (permalink)  
Old 09-21-2006, 08:50 PM
Active Member
 
Join Date: May 2004
Location: New Zealand
Posts: 552
ezykiwi is on a distinguished road
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
File Type: gif pagination.gif (1.2 KB, 40 views)
  #2 (permalink)  
Old 09-23-2006, 05:18 AM
dody's Avatar
Nicecoder Team
 
Join Date: Aug 2001
Location: Indonesia
Posts: 3,292
dody is a name known to alldody is a name known to alldody is a name known to alldody is a name known to alldody is a name known to alldody is a name known to all
Default

Let me know css do you use. It would be better to use css
  #3 (permalink)  
Old 09-23-2006, 06:48 AM
Active Member
 
Join Date: May 2004
Location: New Zealand
Posts: 552
ezykiwi is on a distinguished road
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 (permalink)  
Old 09-25-2006, 10:31 AM
Active Member
 
Join Date: May 2004
Location: New Zealand
Posts: 552
ezykiwi is on a distinguished road
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 12:39 PM.
  #5 (permalink)  
Old 09-25-2006, 11:20 AM
Active Member
 
Join Date: Nov 2004
Posts: 1,828
inspireme is on a distinguished road
Default

sweet i will try this later
__________________
Some interesting INDEXU bits :http://www.indexu.co.uk
Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )
  #6 (permalink)  
Old 09-25-2006, 11:44 AM
Active Member
 
Join Date: May 2004
Location: New Zealand
Posts: 552
ezykiwi is on a distinguished road
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 (permalink)  
Old 09-25-2006, 11:53 AM
Active Member
 
Join Date: May 2004
Location: New Zealand
Posts: 552
ezykiwi is on a distinguished road
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 (permalink)  
Old 09-25-2006, 12:38 PM
Active Member
 
Join Date: May 2004
Location: New Zealand
Posts: 552
ezykiwi is on a distinguished road
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
File Type: zip pagination.class.zip (1.9 KB, 9 views)
  #9 (permalink)  
Old 09-25-2006, 09:05 PM
dody's Avatar
Nicecoder Team
 
Join Date: Aug 2001
Location: Indonesia
Posts: 3,292
dody is a name known to alldody is a name known to alldody is a name known to alldody is a name known to alldody is a name known to alldody is a name known to all
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 (permalink)  
Old 09-25-2006, 09:19 PM
Active Member
 
Join Date: May 2004
Location: New Zealand
Posts: 552
ezykiwi is on a distinguished road
Default

Code:
Content visible to License Owner only.
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 02:50 AM.
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Number of links par page Mickey Blocks and Modification 14 09-10-2006 06:32 PM
Limiting number of "Latest New Additions" on home page onlinewebs v5.x 4 08-20-2006 08:52 PM
Can I change the layout of the add link page in the admin morgankd v5.x 1 02-14-2005 09:38 PM
Number of Columns in links page marko v5.x 10 08-17-2004 10:52 PM
Restricting the number of HOT based in minimum number of hits esm v3.2 0 05-27-2003 05:45 PM

HACKER SAFE certified sites prevent over 99.9% of hacker crime.

All times are GMT -5. The time now is 06:06 PM.


Powered by vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO
SSL Certificate