This website can use cookies to improve the user experience

This website can use cookies to improve the user experience and to provide certain services and functions to users. Cookies contain small amounts of information (such as login information and user preferences) and will be stored on your device.

Enable All Cookies Privacy Policy

Channel article sorting


avatar
ReviewStud 135
From: -
Channel article sorting

Is there a way to sort the news articles in each channel by the article's title and not by the date posted?

Notice

This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


1 Re: Channel article sorting
avatar
Editor
0
From: -
Open modules/news/newschannels.php in an editor and find:

              $query = $database -> dbquery( "SELECT newsstory_id, newsstory_author, newsstory_channels, newsstory_title, newsstory_seo, newsstory_story, newsstory_extendedstory, newsstory_link, newsstory_tags, newsstory_teaser, newsstory_comments, newsstory_thread, newsstory_date, newsstory_fields, newsstory_views, newsstory_rating, newsstory_votes, newsstory_source, newsstory_sourceid FROM " . DB_PREFIX . "esselbach_ct_newsstories WHERE newsstory_channels LIKE ('%" . $key . "%') AND " . $newsstory_status . " AND (newsstory_website = '0' OR newsstory_website = '" . $preferences[ 'current_website' ] . "')" . $news_expire_sql . " ORDER BY newsstory_id DESC LIMIT " . intval( $stories ) );


Then replace this line with:

         $query = $database -> dbquery( "SELECT newsstory_id, newsstory_author, newsstory_channels, newsstory_title, newsstory_seo, newsstory_story, newsstory_extendedstory, newsstory_link, newsstory_tags, newsstory_teaser, newsstory_comments, newsstory_thread, newsstory_date, newsstory_fields, newsstory_views, newsstory_rating, newsstory_votes, newsstory_source, newsstory_sourceid FROM " . DB_PREFIX . "esselbach_ct_newsstories WHERE newsstory_channels LIKE ('%" . $key . "%') AND " . $newsstory_status . " AND (newsstory_website = '0' OR newsstory_website = '" . $preferences[ 'current_website' ] . "')" . $news_expire_sql . " ORDER BY newsstory_title LIMIT " . intval( $stories ) );

Notice

This topic is archived. New comments cannot be posted and votes cannot be cast.