WebmasterSite.net: PHP scripts to enable your creativity
WSN Links PHP Directory Software
PHP Scripts Webmaster Links Support Forums

Register | Forgot Password

Secondary Sort Order
Can't get it to work right.

Version: 3.15
printPrint


Secondary Sort Order
stujoe
Beginner

Usergroup: Customer
Joined: May 11, 2005
Total Topics: 2
Total Posts: 4
Posted 05/16/05 - 06:15 PM:
quote post
#1
I don't know if I am doing something wrong or not. I have my primary sorting of links as rating descending but no matter what I make the secondary sort order, it won't display them in that order after rating.



Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 57
Total Posts: 6316
Posted 05/17/05 - 08:46 AM:
quote post
#2
If there are many votes, it seems unlikely that there would be absolutely exact ties in rating.

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
stujoe
Beginner

Usergroup: Customer
Joined: May 11, 2005
Total Topics: 2
Total Posts: 4
Posted 05/17/05 - 01:48 PM:
quote post
#3
Obviously, But it is noticeable on the links that do not have votes yet. Hence they are all 0 rating. The site was just started a couple of days ago so many are not rated yet.
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 57
Total Posts: 6316
Posted 05/21/05 - 09:23 AM:
quote post
#4
In index.php, change
else if ($todo == 'orderlinks')
{
$orderlinks = "ORDER BY $orderlinks $ascdesc";
if ($settings->orderlinks2 != '') $orderlinks .= str_replace('ORDER BY ', ',', $settings->orderlinks2);
}

to
else if ($todo == 'orderlinks')
{
$orderlinks = "ORDER BY $orderlinks $ascdesc";
}
if ($settings->orderlinks2 != '') $orderlinks .= str_replace('ORDER BY ', ',', $settings->orderlinks2);

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
stujoe
Beginner

Usergroup: Customer
Joined: May 11, 2005
Total Topics: 2
Total Posts: 4
Posted 05/21/05 - 12:41 PM:
quote post
#5
Thank you! You guys who can code amaze me. I looked for a good while to try and figure it out and came up totally empty!

Thnaks again.
Search thread for
Download thread as


You don't have permission to post.

Please login or register.

   
 
© 2008 Paul Knierim. All rights reserved.