Sorting Threads Default...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • edpak
    Member
    • Jan 2001
    • 93

    Sorting Threads Default...

    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"...
    Last edited by edpak; Fri 16 Feb '01, 10:32am.
  • Robert Basil
    Senior Member
    • Sep 2000
    • 242
    • 2.0.x

    #2
    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>

    Comment

    • edpak
      Member
      • Jan 2001
      • 93

      #3
      I know exactly where it is.... LOL...

      Then what???

      Comment

      • Wayne Luke
        vBulletin Technical Support Lead
        • Aug 2000
        • 74172

        #4
        It changes depending on the users current selection. This is controlled in the code.
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API

        Comment

        • edpak
          Member
          • Jan 2001
          • 93

          #5
          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...

          Comment

          • Freddie Bingham
            Former vBulletin Developer
            • May 2000
            • 14057
            • 1.1.x

            #6
            forumdisplay.php

            Comment

            • edpak
              Member
              • Jan 2001
              • 93

              #7
              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';
              <<<

              Comment

              • Freddie Bingham
                Former vBulletin Developer
                • May 2000
                • 14057
                • 1.1.x

                #8
                That would default the lists to be sorted by title.

                Comment

                • edpak
                  Member
                  • Jan 2001
                  • 93

                  #9
                  Hot Damn I'm getting good at guessing this stuff out...

                  Even at 50 the friggin brain cells still keep on ticking...


                  ThankYou Sir...

                  Comment

                  • edpak
                    Member
                    • Jan 2001
                    • 93

                    #10
                    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..

                    Comment

                    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                    Working...