Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • etnasci Friend
    #145516

    In janews2 module the categories are ordinating with joomla ID. I wold change this order, but this fuction is not possible in module setting. I would select the categories that appares in homepage. Help me please. Sorry for my bad english!

    Dario

    Anonymous Moderator
    #321674

    Hi

    Open modulesmod_janews2helper.php file, find following code:


    function getAllCategoriesBySection($sectionid) {
    $db = & JFactory::getDBO ();
    $query = "SELECT id,title FROM #__categories WHERE section = $sectionid;";

    $db->setQuery ( $query );
    $cats = $db->loadObjectList ();

    return $cats;
    }

    and change to:


    function getAllCategoriesBySection($sectionid) {
    $db = & JFactory::getDBO ();
    $query = "SELECT id,title FROM #__categories WHERE section = $sectionid;";

    $query .= " order by ordering";

    $db->setQuery ( $query );
    $cats = $db->loadObjectList ();

    return $cats;
    }

    etnasci Friend
    #321723

    Hi Mark, thank you for you response. But it isn’t resolve the problem. The code not order section by my personal order and is not change.

    With new code return in user panel control:

    Warning: Invalid argument supplied for foreach() in /web/htdocs/www.etnasci.it/home/new/modules/mod_janews2/tmpl/usersetting_form.php on line 39

    So I want modify order of the categories in janews2 and not in user panel only.

    Thank you, Dario

    etnasci Friend
    #321885

    Hi Mark,
    help me, please!!!

    zorroh Friend
    #322914

    i tried, not working. same error as etnasci

    Anonymous Moderator
    #323210

    Hi all,

    i am sorry. Please kindly check this thread: http://www.joomlart.com/forums/topic/ja-news-2-order-categories/

Viewing 6 posts - 1 through 6 (of 6 total)

This topic contains 6 replies, has 3 voices, and was last updated by Anonymous 15 years ago.

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