Page 1 of 3 123 LastLast
Results 1 to 15 of 38

Thread: Pagination hack and problem

  1. #1
    Join Date
    Aug 2002
    Location
    Germany
    Posts
    1,180

    Default Pagination hack and problem

    Hello,

    today I did the mod_rewrite for the pagination and it is working fine without 2 problems:

    1. On the second site I lost the category path "You are here".
    2. And on the second site I lost the pagination view to go back.

    Did anyone also pagination for mod_rewrite an can help ?

    And do you know what should I change to use this only for the browse-pagination ?

    Frank

  2. #2
    Join Date
    Aug 2002
    Location
    Germany
    Posts
    1,180

    Default ?

    Hmpf, no one here is using mod_rewrite also for pagination ?
    I can't believe what are you doing with your sites...

    esm: perhaps I have a small order for you, because I need this to be fixed urgently.

    Frank

  3. #3
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    mod_rewrite is not my area of expertise. not that I wouldn't mind looking at it for you .

    I'm just a little behind in my work!
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  4. #4
    Join Date
    Aug 2002
    Location
    Germany
    Posts
    1,180

    Default ....

    Hmpf, I think knowledge about mod_rewrite isn't relay important because I have it done, but to know how pagaination will work could be helpful, because the biggest problems are:

    1. Now no pagination on the second site
    2. need own pagination only for browse

    Frank

  5. #5
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default Re: ....

    Originally posted by Frank71
    Hmpf, I think knowledge about mod_rewrite isn't relay important because I have it done, but to know how pagaination will work could be helpful...
    Frank
    OK, here goes but you are not going to like my answer.

    you must pass the page parameter to the mod_rewrite function ( not sure about how to word that )

    for example, pg_which=2 or pg_which=4 or pg_which=44

    that is how the pagination works.

    actually, they are a number of other parameters passed. just mouseover the page numbers and you will see.

    how all that would work with the mod_rewrite, I do not have a clue.

    but at least you know what the pagination process needs to work.
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  6. #6
    Join Date
    Aug 2002
    Location
    Germany
    Posts
    1,180

    Default hm

    Thats what I have done and it works, but on the second page the pagination link is gone...
    Thats my problem, I can't go back...

    Frank

  7. #7
    Join Date
    Aug 2002
    Location
    Germany
    Posts
    1,180

    Question DODY ???

    Dody may be you can help ??

    Frank

  8. #8
    Join Date
    Dec 2003
    Posts
    28

    Default Mod_Rewrite and Pagination

    Originally posted by Frank71
    Hmpf, no one here is using mod_rewrite also for pagination ?
    I can't believe what are you doing with your sites...

    esm: perhaps I have a small order for you, because I need this to be fixed urgently.

    Frank
    Attached are the changes I made for user friendly URLs and how I worked the pagination problem. Hope this helps -- write if you need more info.
    Attached Files Attached Files

  9. #9
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    in anticipation that it works, Frank is going to love you!
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  10. #10
    Join Date
    Aug 2002
    Location
    Germany
    Posts
    1,180

    Default ??

    Ähm, thanks, but tell me, how should this -->

    http://www.mysite.com/cat_more1-3.html

    appear in the url through the script ?

    There is no sense if the "static" url won't created dynamic by the script ?!

    Frank

  11. #11
    Join Date
    Aug 2002
    Location
    Germany
    Posts
    1,180

    Default Hm

    Bestfx, can you post your site ?

    As I wrote I don't understand how you display the changed URL and it seems, that you changed the order of cat and pg_which - are you sure your hack is working ?

    I played a little bit more (because I forgot to save my runing version...) and now I got urls like this:

    browse.php-2-94

    But ever I try to remove .PHP in the path, the mod won't work ?!

    Frank

  12. #12
    Join Date
    Dec 2003
    Posts
    28

    Default Re: ??

    Originally posted by Frank71
    Ähm, thanks, but tell me, how should this -->

    http://www.mysite.com/cat_more1-3.html

    appear in the url through the script ?

    There is no sense if the "static" url won't created dynamic by the script ?!

    Frank
    There are 7 places in /lib/pagination.class.php where the url is created dynamiclly as noted in the previous modifications text file.

    Your right... I did change the order from browse.php?page_which=3&cat=2 to browse.php?cat=2&page_which=3 because the first method just didn't make sense and kept fouling up the code... both will point to the 3rd page of the 2nd category however.

    Now, just follow the directions in the previously attached text doc and make sure you include the following in your .htaccess file.

    Code:
    RewriteRule ^cat_more(.*)-(.*).html browse.php?cat=$1&pg_which=$2
    NOTE: using ^category2-3.html in the .htaccess seems to mess up on my machine and simply call the 1st page.

    My site (still under intense development and design) is located at http://www.bestfx.com/category3.html... category 3 being the test category for pagination.

    Write if I can be of further assistance.

    Good luck.
    Last edited by bestfx; 12-27-2003 at 08:58 PM.

  13. #13
    Join Date
    Aug 2002
    Location
    Germany
    Posts
    1,180

    Default ?

    Hm, I have to look to your file again.
    Are your sure you add the change to reform the pagination url to something like that :

    http://www.bestfx.com/cat_more3-2.html ?

    The rewrite rule is no problem, but I didn't see the change to that in your pagination.class

    Frank

  14. #14
    Join Date
    Aug 2002
    Location
    Germany
    Posts
    1,180

    Unhappy hm

    ai,

    ok, I checked it again, but in your mod I can't see any way how the last and important rule should be work:

    RewriteRule ^cat_more(.*)-(.*).html browse.php?cat=$1&pg_which=$2

    Please can you check that again, seems you missed something.

    Frank

  15. #15
    Join Date
    Dec 2003
    Posts
    28

    Default Re: hm

    Originally posted by Frank71
    ai,

    ok, I checked it again, but in your mod I can't see any way how the last and important rule should be work:

    RewriteRule ^cat_more(.*)-(.*).html browse.php?cat=$1&pg_which=$2

    Please can you check that again, seems you missed something.

    Frank
    Okay, here's my pagination.classs.php file in text format... look for the lines that start:

    // MOD START

    below are the lines that make the necessary calls from my .htaccess files...

    Code:
    # ADDED TO RUN STATIC PAGES FROM INDEX DIRECTORY
    RewriteRule ^category(.*).html browse.php?cat=$1
    RewriteRule ^detail(.*).html detail.php?id=$1
    RewriteRule ^cat_more(.*)-(.*).html browse.php?cat=$1&pg_which=$2
    All I can say is it works for me...

    Be careful that you are not trying to call single pages, ie;

    category1.html

    and the subsequent paginated pages as;

    category1-2.html

    That dawg just ain't gonna hunt... your call will be looking for a category numbered 1-2 instead of the second page of category number 1.
    Attached Files Attached Files

Similar Threads

  1. Top Rated - Problem
    By fastfriend in forum v5.x
    Replies: 2
    Last Post: 06-28-2004, 06:31 PM
  2. title problem.
    By lewisw in forum v3.2
    Replies: 2
    Last Post: 12-26-2003, 11:34 AM
  3. hack v.0.2 (stable)
    By dody in forum v3.2
    Replies: 11
    Last Post: 10-03-2003, 08:32 AM
  4. Fixed Url Spider problem
    By Shamdoodie in forum v3.2
    Replies: 1
    Last Post: 09-11-2002, 06:36 PM
  5. pagination hack?
    By Hart_House in forum v3.2
    Replies: 9
    Last Post: 04-06-2002, 04:35 AM

Posting Permissions

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