Results 1 to 10 of 10

Thread: Sort links By Rating.

  1. #1
    DGTALGOODIES is offline Active Member
    Join Date
    Jun 2007
    Location
    Quebec
    Posts
    242

    Default Sort links By Rating.

    HI

    How can i make listings be sorted by default to Rating.

  2. #2
    FSGDAG's Avatar
    FSGDAG is offline Moderator
    Join Date
    May 2007
    Location
    NJ, United States
    Posts
    1,651

    Default

    Ohhh... I know this one... I know this one....

    *wait*

    I cant remember now!

    I'm sure Bruce or echo@ knows. Its just changing a setting in a file
    FSGDAG | IndexU Hosting | Owner
    Website | NiceCoder Script Hosting and More! | Web4URL is For Sale!
    Follow Us On Twitter | FaceBook Profile | YouTube Videos

  3. #3
    Bruceper is offline Active Member
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    browse.php line 113

    $links_obj->query .= " order by premium desc, $_COOKIE[COOKIE_SORT_BY] $_COOKIE[COOKIE_SORT_ORDER]";

    change the order by premum desc to whatever you'd like

  4. #4
    DGTALGOODIES is offline Active Member
    Join Date
    Jun 2007
    Location
    Quebec
    Posts
    242

    Smile

    Does the line 116 need to be changed?

    And when i browse the top rated listings r at the bottom.
    Last edited by DGTALGOODIES; 01-26-2009 at 04:48 AM.

  5. #5
    Bruceper is offline Active Member
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    you would need to add multiple items to sort by, such as

    order by premium desc, bid desc, votes

  6. #6
    DGTALGOODIES is offline Active Member
    Join Date
    Jun 2007
    Location
    Quebec
    Posts
    242

    Default

    I don't get it it still shows top rated listings last, this is what i used.

    if ($_COOKIE['COOKIE_SORT_BY']) {
    $links_obj->query .= " order by rating, premium desc, $_COOKIE[COOKIE_SORT_BY] $_COOKIE[COOKIE_SORT_ORDER]";
    }
    else {
    $links_obj->query .= " order by rating, premium desc";
    }

    Thanks for the help!

  7. #7
    Bruceper is offline Active Member
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    Your browser could have them sorted differently (set by cookie) and your browse.php could be cached. Clear your browser cookies and your template cache.

  8. #8
    DGTALGOODIES is offline Active Member
    Join Date
    Jun 2007
    Location
    Quebec
    Posts
    242

    Default

    This way it works.

    if ($_COOKIE['COOKIE_SORT_BY']) {
    $links_obj->query .= " order by rating desc, $_COOKIE[COOKIE_SORT_BY] $_COOKIE[COOKIE_SORT_ORDER]";
    }
    else {
    $links_obj->query .= " order by rating desc";

    and don't forget power_search.php

    Just one last thing how can i remove the option rating in the sort by drop down option.

    Thanks
    Last edited by DGTALGOODIES; 01-26-2009 at 09:09 PM.

  9. #9
    Bruceper is offline Active Member
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    That should be in block.sort_links.html

  10. #10
    DGTALGOODIES is offline Active Member
    Join Date
    Jun 2007
    Location
    Quebec
    Posts
    242

    Default

    Thank You

Similar Threads

  1. Sort by PageRank
    By whatcomweb in forum Blocks and Modification
    Replies: 1
    Last Post: 09-19-2007, 05:09 PM
  2. Sort by price
    By prowler in forum Blocks and Modification
    Replies: 3
    Last Post: 09-13-2007, 01:54 PM
  3. Replies: 6
    Last Post: 09-11-2003, 09:00 AM
  4. External rating for admin links ?
    By Frank71 in forum v5.x
    Replies: 2
    Last Post: 10-14-2002, 03:39 AM
  5. Sort URL
    By Toana in forum v5.x
    Replies: 0
    Last Post: 09-23-2001, 02:19 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
  •