Announcement

Collapse
No announcement yet.

Change default sortby

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

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


    • #3
      Hello Jake,
      Originally posted by Jake Bunce View Post
      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...
      X