Articles not displaying in order specified by administrator

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
srumberg
Posts: 41
Joined: Thu Feb 07, 2013 11:33 am

Articles not displaying in order specified by administrator

Post by srumberg »

Script URL:
Version of script:
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: article order

Write your message below:

In the Knowledgebase admin panel, Articles show in the specified order (i.e. 1,2, 3, 4). In the user view, however, they display in a different order (2, 4, 1, 3).
Last edited by srumberg on Sun Feb 10, 2013 9:54 am, edited 2 times in total.
srumberg
Posts: 41
Joined: Thu Feb 07, 2013 11:33 am

Re: Articles not displaying in order specified by administra

Post by srumberg »

In knowledgebase.php, line 457, the order is affected by the number of views. The more views an article has, the higher in the list of output:

Code: Select all

ORDER BY `sticky` DESC, `views` DESC, `art_order`
To ignore the views and output the articles according to the specified display order, use this:

Code: Select all

ORDER BY `sticky` DESC, `art_order`
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Articles not displaying in order specified by administra

Post by Klemen »

Also note that you can make articles "Sticky" - these will always show on top, regardless of views.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply