-
AuthorPosts
-
October 26, 2009 at 10:50 pm #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
JA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
October 27, 2009 at 2:16 am #321674Hi
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;
}
October 27, 2009 at 8:00 am #321723Hi 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
October 28, 2009 at 11:23 am #321885Hi Mark,
help me, please!!!zorroh Friend
zorroh
- Join date:
- November 2006
- Posts:
- 422
- Downloads:
- 20
- Uploads:
- 43
- Thanks:
- 88
- Thanked:
- 80 times in 1 posts
November 8, 2009 at 3:39 am #322914i tried, not working. same error as etnasci
Anonymous
Moderator
JA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
November 11, 2009 at 9:19 am #323210Hi all,
i am sorry. Please kindly check this thread: http://www.joomlart.com/forums/topic/ja-news-2-order-categories/
-
AuthorPosts
This topic contains 6 replies, has 3 voices, and was last updated by
Anonymous 15 years, 2 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum