Viewing 5 posts - 16 through 20 (of 20 total)
  • Author
    Posts
  • cre8 Friend
    #326190

    I don’t know if you figured it out and solved the problem but I kinda fixed it; as I had this problem also… I wanted every category that has the latest article to be first and so on….

    I edited the query for the categories selection. The query is not perfect and if anyone has a better and more improved version of it in mind, please submit it here so I can use it too!

    Anyway here’s the changes you have to make:

    At the file: modules/mod_janews2/helper.php find the function named: loadCategories

    In there change the query from:

    [PHP]$query = “SELECT `id`, `title`, `description`, CASE WHEN CHAR_LENGTH(`alias`) THEN CONCAT_WS(“:”, `id`, `alias`) ELSE `id` END as `slug` FROM `#__categories` s WHERE published = 1 and section=” . ( int ) $sid . $where;[/PHP]

    to:

    [PHP]$query = “SELECT a.created, s.id, s.title, s.description, CASE WHEN CHAR_LENGTH(s.alias) THEN CONCAT_WS(“:”, s.id, s.alias) ELSE s.id END as slug FROM #__categories s, #__content a WHERE a.catid = s.id AND s.published = 1 and s.section=” . ( int ) $sid . $where;
    $query .= ” ORDER BY a.created DESC”;[/PHP]

    In my site this works partially, so the code needs some cleaning up which i don’t know yet how to do it…

    Merry Xmas & a Happy new year to all!

    kryptos Friend
    #327254

    <em>@zorroh 155565 wrote:</em><blockquote>ok, i’ll try to talk with my friend who can me help with this..</blockquote>

    Hi,

    did you find any solution for this problem?

    sjmorris Friend
    #327264
    kryptos Friend
    #327268

    Thanx sjmorris, I’ll try that too.

    zorroh Friend
    #353363

    yes, my friend solved this problem.. so my site now works like it is supposed to..

Viewing 5 posts - 16 through 20 (of 20 total)

This topic contains 20 replies, has 7 voices, and was last updated by  zorroh 14 years, 2 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum