Change default sortby

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sinucello
    Senior Member
    • Mar 2006
    • 133
    • 4.2.X

    Change default sortby

    Hi,

    in the output of search.php, the default value for the "Sort Results by" field is "Last posting date". How can I change the default value to "Relevancy"?

    I`m not a programmer but I looked into search.php and found this lines:
    // get correct sortby value
    $vbulletin->GPC['sortby'] = strtolower($vbulletin->GPC['sortby']);
    switch($vbulletin->GPC['sortby'])

    So $vbulletin->GPC['sortby'] seems to return the value "lastpost". How can I change it to "rank"? Is there some option in the admincp I didn`t see?

    Thank you - all the best,
    Sacha
    Thermomix, Rezepte und Küchenmaschinen
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    I looked at the code and there doesn't appear to be any option to set the default. You would have to modify the code itself. For help with this I recommend you post on www.vbulletin.org.

    Comment

    • sinucello
      Senior Member
      • Mar 2006
      • 133
      • 4.2.X

      #3
      Hello Jake,
      Originally posted by Jake Bunce
      I looked at the code and there doesn't appear to be any option to set the default. You would have to modify the code itself. For help with this I recommend you post on www.vbulletin.org.
      thanks for your reply. I changed line 316 of search.php like this:
      PHP Code:
      // set default sortby if not specified or unrecognized
      default:
      $vbulletin->GPC['sortby'] = 'rank'
      but that doesn`t seem to have any effect. So I`ll walk over to vb.org and ask for help there.

      all the best,
      Sacha
      Thermomix, Rezepte und Küchenmaschinen

      Comment

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