Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Apr 2002
Posts: 474
Enthusiast
Enthusiast
Offline
Joined: Apr 2002
Posts: 474
Ok I added a column to my postlist.php called Version and I did what I thought looked like ti would work. But for some reason the sorters don't work The sort for the Version column dosen't work and the rating sort sorts the version column?!

I have starred at postlist.php and the tmpl for over an hour and can't figure out why?

Sponsored Links
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
would help to see em

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
wowsa your board took some time to load heres the link to the postlist.php

http://www.fmforums.com/threads/postlist.php/Cat/0/Board/upgrade

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
That's a bit involved. Not too difficult but more than I can summarize verbally. Best clue is to look at the array where the sort is handled.

Under this:
// -------------------------
// Set up some sorting stuff
if ($sb == 1) {


You'll need to setup two new $sb numbers for each field. Ascending/decending.

Under this:

// ---------------------
// Set some sorting opts

give each sort option a variable name - use the odd number that you added above.

Under this:

// -----------------------------------------------
// Make sure we are giving the proper sort options
if ($sb == 1) {
$sortsubject = 2;
} else {
$sortsubject = 1;


Add whatever variable you used int he previous section so the option properly gets "switched" when clicked.


Then there are 2 parts like this:
$sort_opt = array(

Add your options and your query code there. Add 2 lines, one for Ascending and 2 for descending.


That should cover it. Make sure you've modified each of those areas and you should be fine.

Joined: Apr 2002
Posts: 474
Enthusiast
Enthusiast
Offline
Joined: Apr 2002
Posts: 474
Ahhh. I got it.... I forgot to change a variable $sortversion.

Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)