View Full Version : Sorting Threads Default...
edpak
Fri 16th Feb '01, 3:28pm
I've been scouring all the templateds for the past few hours and I'll be damned if I can find the template that allows you to change the default from this:
<select name="sortorder">
<option value="asc" >ascending</option>
<option value="desc" selected>descending</option>
</select>
<b>To This:
<select name="sortorder">
<option value="asc" selected>ascending</option>
<option value="desc" >descending</option>
</select>
Can anybody please advise me where to go and locate the correct template or file???...
I would also like to change the default for "sorting titles" from "Last Post Time" to "Thread Title"...
Robert Basil
Fri 16th Feb '01, 3:58pm
Originally posted by edpak
I've been scouring all the templateds for the past few hours and I'll be damned if I can find the template that allows you to change the default from this:
<select name="sortorder">
<option value="asc" >ascending</option>
<option value="desc" selected>descending</option>
</select>
<b>To This:
<select name="sortorder">
<option value="asc" selected>ascending</option>
<option value="desc" >descending</option>
</select>
Can anybody please advise me where to go and locate the correct template or file???...
Ed:
Template:
forumdisplay_threadslist
Look for this text:
<select name="sortorder">
<option value="asc" $order[asc]>ascending</option>
<option value="desc" $order[desc]>descending</option>
</select>
edpak
Fri 16th Feb '01, 4:01pm
I know exactly where it is.... LOL...:)
Then what???
Wayne Luke
Fri 16th Feb '01, 4:25pm
It changes depending on the users current selection. This is controlled in the code.
edpak
Fri 16th Feb '01, 4:33pm
Wayne...
Do you know which file one can go to to change the code... It would be very simple to do If I knew which file it was sitting in...
I need this change because of the nature of my site... (ton's of corporate names) and we like them in alphabetical order...
Easiest solution for me would be to have the page's default into an ascending order and by thread title's.. Would save a lot of repetitious threads and give the site some order...
Freddie Bingham
Fri 16th Feb '01, 4:47pm
forumdisplay.php
edpak
Fri 16th Feb '01, 4:58pm
Freddie... Thank You sir and one last question if you don't mind...
I take it this is the area that I have to change from this...
>>>switch ($sortfield) {
case 'title':
case 'lastpost':
case 'replycount':
case 'views':
case 'postusername':
case 'voteavg':
break;
default:
$sortfield='lastpost';<<<
To this....
>>>switch ($sortfield) {
case 'title':
case 'lastpost':
case 'replycount':
case 'views':
case 'postusername':
case 'voteavg':
break;
default:
$sortfield='title';<<<
Freddie Bingham
Fri 16th Feb '01, 4:59pm
That would default the lists to be sorted by title.
edpak
Fri 16th Feb '01, 5:02pm
Hot Damn I'm getting good at guessing this stuff out...
Even at 50 the friggin brain cells still keep on ticking... :D:D:D
ThankYou Sir...
edpak
Fri 16th Feb '01, 5:14pm
Oh... OH...
Methinks I jumped for joy a tad to soon...
The Ascending/Descending default has got me screwed up...
I have no idea as how to change this (and I'm assuming I'm in the right spot)...
// look at sorting options:
if ($sortorder!='asc') {
$sqlsortorder='DESC';
$order['desc']='selected';
} else {
$sqlsortorder='';
$order['asc']='selected';//
Please advise..
Powered by vBulletin™ Version 4.0.0 Beta 2 Copyright © 2009 vBulletin Solutions, Inc. All rights