Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

JoomlaTune Support Forum    Other extensions    Modules    Topic: Latest Comment Module > Bold usernames
Pages: [1]   Go Down
  Print  
Author Topic: Latest Comment Module > Bold usernames  (Read 4390 times)
0 Members and 1 Guest are viewing this topic.
xanderbok
Newbie
*

Karma: 0
Offline Offline

Posts: 4


« on: May 05, 2010, 23:47:03 »

Hi,

1st of all I Would like to thank you for a great component / module. I switched from jomcomment to JComment and things are looking way better and importing comments worked flawless!

One question though which I can't figure out after several hours playing with it;
How can I get to display the names/usernames bold in the Latest comment module?

There is no separate css for this module so it has to be done somewhere in these lines of code in mod_jcomments.php;

Code:
switch( $show_author ) {
case 0:
break;
case 1:
echo '<br />' . ($label4author != '' ?  $label4author . ' ' : '') . $row->name;
break;
case 2:
echo '<br />' . ($label4author != '' ?  $label4author . ' ' : '') . ($row->username ? $row->username : $row->name);
break;
}

echo '</li>'."\n";
}
echo '</ul>'."\n";

Thanks!
Xander Bok

Edit
Typo
/Edit
« Last Edit: May 05, 2010, 23:49:20 by xanderbok » Logged
smart
Administrator
Hero Member
*****

Karma: 146
Offline Offline

Gender: Male
Posts: 2579



WWW
« Reply #1 on: May 06, 2010, 01:26:09 »

Yes, in current module version this task could be done only by edit module's code... I'll fix this in next module version...
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
xanderbok
Newbie
*

Karma: 0
Offline Offline

Posts: 4


« Reply #2 on: May 06, 2010, 01:31:43 »

Smart,

thanks. could you please explain to me what in the code I have to edit / add to make this work?
Logged
smart
Administrator
Hero Member
*****

Karma: 146
Offline Offline

Gender: Male
Posts: 2579



WWW
« Reply #3 on: May 06, 2010, 01:55:39 »

Of course...

Just change:

Code: (php)
echo '<br />' . ($label4author != '' ?  $label4author . ' ' : '') . $row->name;
with
Code: (php)
echo '<br />' . ($label4author != '' ?  $label4author . ' ' : '') . '<b>'.$row->name.'</b>';

and

Code: (php)
echo '<br />' . ($label4author != '' ?  $label4author . ' ' : '') . ($row->username ? $row->username : $row->name);
with
Code: (php)
echo '<br />' . ($label4author != '' ?  $label4author . ' ' : '') . '<b>'.($row->username ? $row->username : $row->name).'</b>';

Or if won't use <b>, you could replace <b> with <span class="author"> and </b> with </span>. And then you could define author's names style via CSS...
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
xanderbok
Newbie
*

Karma: 0
Offline Offline

Posts: 4


« Reply #4 on: May 06, 2010, 14:00:12 »

Thanks, that worked! Exactly what I want!

One more (and my last :-)) question, how can I put in a blank line between comments?

As you can see on our community site http://www.hbb-scheveningen.nl in the left column, there is no space between the latest comments and I would like to have a blank line between them, if possible.


Thanks again smart.
Logged
smart
Administrator
Hero Member
*****

Karma: 146
Offline Offline

Gender: Male
Posts: 2579



WWW
« Reply #5 on: May 06, 2010, 14:22:05 »

Add in your Joomla's template CSS (or JComments template CSS) next style:

Code: (css)
ul.jclist li {padding-bottom: 10px;}
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
xanderbok
Newbie
*

Karma: 0
Offline Offline

Posts: 4


« Reply #6 on: May 06, 2010, 14:33:32 »

smart, you are the man

tnx
Logged
jrussell
Newbie
*

Karma: 0
Offline Offline

Posts: 3


« Reply #7 on: June 19, 2010, 01:55:09 »

This is great - really helped me out. One thing I can't work out is how do I make the comments in the module appear left aligned? Right now it's centered.
Logged
mediawarna
Newbie
*

Karma: 0
Offline Offline

Posts: 3


« Reply #8 on: October 05, 2010, 22:19:26 »

Add in your Joomla's template CSS (or JComments template CSS) next style:

Code: (css)
ul.jclist li {padding-bottom: 10px;}

im don't know how to create this css code. i mean where do i have to put it? i try add those code on my joomla template css file, but nothing's change.
Logged
smart
Administrator
Hero Member
*****

Karma: 146
Offline Offline

Gender: Male
Posts: 2579



WWW
« Reply #9 on: October 06, 2010, 00:55:34 »

i try add those code on my joomla template css file, but nothing's change.
Could you show me your site? If you place this code in your Joomla's template CSS all must work.
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
mediawarna
Newbie
*

Karma: 0
Offline Offline

Posts: 3


« Reply #10 on: October 06, 2010, 14:27:23 »

Smart thanks for your quick reply. sorry to bother you. it's already done. works like a charm. it just need a little effort for me (since i'm not so familiar with codes) working with the extra span on mod_Jcomments.

Thanks again for this great component.

Now i'm working on the next task, giving it a social media connection button just before comment form.

*my site is still under construction - mediawarna.com
Logged
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    Other extensions    Modules    Topic: Latest Comment Module > Bold usernames
 
Jump to: