-
AuthorPosts
-
February 26, 2010 at 9:54 pm #149057
Hello, I have sections that are not using the com_content component but I would still like for those sections to use the color configured in the Ja News2 module.
How can I do that? Can I set a default color for each section without using the Ja News2 module?
Thanks.
Anonymous ModeratorJA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
March 1, 2010 at 10:18 am #334193Hi danhgarcia
We are using colors from sections in ja news module for our template
I am sorry for not being of much help in the case.
March 1, 2010 at 3:28 pm #334234<em>@JA Developer 166905 wrote:</em><blockquote>Hi danhgarcia
We are using colors from sections in ja news module for our template
I am sorry for not being of much help in the case.</blockquote>
Ok so there is no way to hack this? Any help whatsoever would be useful. I mean, the CSS files are there, all you have to do is make the code change somewhere….I would think anyway.
Thanks.
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
March 2, 2010 at 10:21 am #334373hello danhgarcia!
this is a heavy customization i have not many time to do this for u, at the moment . i only give you simple step to you begin to customize this:
1) open the file: templates/ja_telineiii/libs/ja.template.helper.php and find codes:
[PHP]
function getThemeForSection () {
//get the most parent menu id
$query = “select params from #__modules where `module`=’mod_janews2′”;
$database =& JFactory::getDBO();
$database->setQuery($query);
$params = new JParameter($database->loadResult());
$sections = $params->get(‘sections’, ”);
if (!$sections) return ”;global $Itemid;
$mid = $Itemid;
$pid = $mid;
$menu = &JSite::getMenu();if(!$menu) return;
while ($pid) {
$mid = $pid;
$pmenu = $menu->getItem($mid);
$pid = $pmenu?$pmenu->parent:0;
}
//Get menu item
$menuitem = $menu->getItem($mid);
//parse link
$urls = parse_url($menuitem->link);
$querystring = $urls[‘query’];
$output = null;
parse_str ($querystring,$output);
$sectionid = 0;
if($output[‘view’]==’section’){
$sectionid = $output[‘id’];
}
else if($output[‘view’]==’category’){
$catid = $output[‘id’];
$sectionid = $this->getSectionId($catid);
}if($sectionid) {
$sectionids = preg_split(‘/[n,]|<br />/’, $sections);
for ($i = 0; $i < count($sectionids); $i++) {
$temp = split(‘:’,$sectionids[$i]);
if(isset($temp[0]) && $temp[0]==$sectionid) {
return isset($temp[1])? ‘-‘.trim($temp[1]):”;
}
}
}
return ”;
}
[/PHP]pls try to get knowledge from above codes.
Good luck
-
AuthorPosts
This topic contains 4 replies, has 3 voices, and was last updated by Saguaros 14 years, 1 month ago.
We moved to new unified forum. Please post all new support queries in our New Forum