Announcement

Collapse
No announcement yet.

What's the query for setting "Default Sort Field"?

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

  • What's the query for setting "Default Sort Field"?

    to Last Post and Descending. I've searched for this and cannot find it.

  • #2
    Post Order
    Newest first: UPDATE user SET options=options + 32768 WHERE NOT(options & 32768)
    Oldest first: UPDATE user SET options=options - 32768 WHERE options & 32768


    Comment


    • #3
      It's not that. I would have found it then.

      That controls the post order within a topic, I am looking for the topic order within a forum. "Default Sort Field"

      Comment


      • #4
        That is a per forum setting, admincp> forums > forum manager > modify the forum where you want to set this for. I am not aware of a query to set this for all the forums in one go.

        Comment


        • #5
          Looked in the code to get this.
          Code:
          UPDATE vforum SET defaultsortfield = 'lastpost'
          UPDATE vforum SET defaultsortorder = 'desc'
          Not sure if that worked(i have a sort preference, dunno how to get rid of it), although it did set the columns correctly.

          Comment


          • #6
            Hi There are two methods:

            1.
            Originally posted by Floris View Post
            That is a per forum setting, admincp> forums > forum manager > modify the forum where you want to set this for. I am not aware of a query to set this for all the forums in one go.
            2.
            UPDATE `NAME_OF_UR_DATABASE`.`forum` SET `defaultsortfield` = 'lastpost',
            `defaultsortorder` = 'desc';

            and it is will work

            Comment

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