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

Login with username, password and session length

JoomlaTune Support Forum    JComments component    General discussion    Topic: Any way to highlight or change the color of a comment made by an administrator.
Pages: 1 [2]   Go Down
  Print  
Author Topic: Any way to highlight or change the color of a comment made by an administrator.  (Read 3395 times)
0 Members and 3 Guests are viewing this topic.
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #15 on: October 11, 2011, 03:17:53 »

This style is applyed to whole div with class comment-box and it contains not only comment-body but title and other elements. But if you want you can surround all block with some new div and move these styles some lines higher...

I mean that you can move code:
Code: (php)
$comment_number = $this->getVar('comment-number', 1);
$thisurl = $this->getVar('thisurl', '');

$commentBoxIndentStyle = ($this->getVar('avatar') == 1) ? ' avatar-indent' : '';

if (isset($comment->usertype)) {
$commentBoxIndentStyle .= ' usertype-' . $comment->usertype;
}

$commentVote = intval($comment->isgood) - intval($comment->ispoor);
if ($commentVote != 0)  {
$commentBoxIndentStyle .=  (($commentVote >= 0) ? ' positive-' : ' negative-') . ($commentVote - ($commentVote % 5));
}

right after line:
Code: (php)
// return all comment item

Change code:
Code: (php)
?>
<div class="rbox"><div class="rbox_tr"><div class="rbox_tl"><div class="rbox_t">&nbsp;</div></div></div><div class="rbox_m">
<?php
with (we've added <div> with style)
Code: (php)
?>
<div class="<?php echo trim($commentBoxIndentStyle); ?>">
<div class="rbox"><div class="rbox_tr"><div class="rbox_tl"><div class="rbox_t">&nbsp;</div></div></div><div class="rbox_m">
<?php

And change:
Code: (php)
?>
</div><div class="rbox_br"><div class="rbox_bl"><div class="rbox_b">&nbsp;</div></div></div></div>
<?php
with (extra </div> added)
Code: (php)
?>
</div><div class="rbox_br"><div class="rbox_bl"><div class="rbox_b">&nbsp;</div></div></div></div></div>
<?php

I did not tested this code but I hope it will work Wink I want to show you the idea...
Logged

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

Karma: -17
Offline Offline

Posts: 13


« Reply #16 on: October 12, 2011, 02:21:21 »

smart, what would the css be for our new div class, which I presume is this one:

<div class="<?php echo trim($commentBoxIndentStyle); ?>">

Thanks a lot.
Logged
Thatoo
Newbie
*

Karma: 0
Offline Offline

Posts: 10


« Reply #17 on: March 20, 2012, 06:16:37 »

Hello,

It worked very great before with the previous version, as I said in the previous page?
However, now, I update to the new 2.3 version and I don't manage to do it.
Why it doesn't work any more?
What should I change?
Logged
Thatoo
Newbie
*

Karma: 0
Offline Offline

Posts: 10


« Reply #18 on: March 26, 2012, 06:16:33 »

It doesn't work any more on Joomla 1.5, neither on Joomla 2.5....
So sad!!!!
Logged
Thatoo
Newbie
*

Karma: 0
Offline Offline

Posts: 10


« Reply #19 on: March 28, 2012, 16:54:24 »

Nobody knows why that doesn't work anymore on Jcomments 2.3.
Does someone manage to keep this function?
Logged
gregloones
Newbie
*

Karma: 0
Offline Offline

Posts: 1


« Reply #20 on: March 30, 2012, 21:33:06 »

I can't get it to work either Thatoo. It seems like the usertype code was removed again from the tpl_comment.php file in version 2.3.

If anyone knows how or where to add the code again I'd be much obliged.

I love this extension by the way!  Cool
Logged
Pages: 1 [2]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    General discussion    Topic: Any way to highlight or change the color of a comment made by an administrator.
 
Jump to: