Change CSS styling in NSP module in League News

Premium sports magazine Joomla template with clean, easy to customize and unique design.
GK User
Mon Nov 05, 2012 4:44 pm
How can I change the css styling in the category info (that is generated from additional info %CATEGORY) so as it looks exactly like, lets say, the Module Title (in CSS styling), BUT without changing the styling of all other info (for example %DATE or %AUTHOR)?

How can I separate the styling from other generated info? Because everything including the category info is under the css ".nspInfo"
User avatar
Senior Boarder

teitbite
Tue Nov 06, 2012 12:58 pm
Hi

Please edit /modules/mod_news_pro_gk4/tmpl/layout.parts.php
There find an info() function which is responsible for article system You are using (K2, regular joomla, vm, etc) and change this line:

Code: Select all
            $info_category = ($config['category_link'] == 1) ? '<a href="'.(($news_id !== 0) ? JRoute::_(ContentHelperRoute::getCategoryRoute($news_cid)) : JRoute::_('index.php?option=com_user&view=login')).'" >'.$news_catname.'</a>' : $news_catname;


to

Code: Select all
            $info_category = ($config['category_link'] == 1) ? '<a href="'.(($news_id !== 0) ? JRoute::_(ContentHelperRoute::getCategoryRoute($news_cid)) : JRoute::_('index.php?option=com_user&view=login')).'" ><span class="cat_info">'.$news_catname.'</span></a>' : . '<span class="cat_info">' . $news_catname . '</span>';


after that You will be able to use css selector:

Code: Select all
span.cat_info {}


to style it.
User avatar
Moderator

GK User
Tue Nov 06, 2012 5:35 pm
You are awesome! will try that! thanx again!
User avatar
Senior Boarder

GK User
Tue Nov 06, 2012 11:20 pm
So,

I found the line refering to K2, but it looks different than you suggested in line 381:
Code: Select all
$info_category = ($config['category_link'] == 1) ? '<a href="'.urldecode(JRoute::_(K2HelperRoute::getCategoryRoute($news_cid.':'.urlencode($news_cat_alias)))).'" >'.$news_catname.'</a>' : $news_catname;


So, I thought that change seen below would do the trick:
Code: Select all
$info_category = ($config['category_link'] == 1) ? '<a href="'.urldecode(JRoute::_(K2HelperRoute::getCategoryRoute($news_cid.':'.urlencode($news_cat_alias)))).'" ><span class="cat_info">'.$news_catname.'</span></a>' : . '<span class="cat_info">' . $news_catname . '</span>';


But it didn't:
Code: Select all
syntax error in line 381
:D

What do you suggest?

The line you posted refers to the joomla content, the above stated is in K2 content.
User avatar
Senior Boarder

teitbite
Wed Nov 07, 2012 12:07 pm
Hi

Ok. I thought You were using a regular joomla content. Try this instead:

Code: Select all
$info_category = ($config['category_link'] == 1) ? '<a href="'.urldecode(JRoute::_(K2HelperRoute::getCategoryRoute($news_cid.':'.urlencode($news_cat_alias)))).'" ><span class="cat_info">' . $news_catname.'</span></a>' : '<span class="cat_info">' . $news_catname . '</span>';
User avatar
Moderator

GK User
Wed Nov 07, 2012 10:23 pm
It worked perfectly... Solved!
User avatar
Senior Boarder

GK User
Thu Nov 08, 2012 6:30 pm
Ok, regarding this matter (I think it would be best nto to open a new post)...

When the module suffix is "dark column nsp" although everything appears right (the titles & text change to white color to be visible) the "info" (date, category, author..) still appear in the same color as they normally do (grey/black). So their are really not visible at all (because of dark text + dark background)

How can I fix that? :?
User avatar
Senior Boarder

teitbite
Thu Nov 08, 2012 11:55 pm
Hi

Please show me a page where You have this issue.
User avatar
Moderator

teitbite
Sat Nov 10, 2012 2:30 am
Hi

Please add this to css:

Code: Select all
.dark .nspArt p.nspInfo {
    color: #FFFFFF;
}
User avatar
Moderator

GK User
Sat Nov 10, 2012 5:29 pm
Yes, that also worked flawlessly. Thank you!
User avatar
Senior Boarder

teitbite
Sun Nov 11, 2012 8:26 pm
Hi

No problem. Glad I could help :)
User avatar
Moderator


cron