Home » Forum
NoNumber!

Joomla!® Websites & Extensions
development  -  support  -  consultancy

I try to respond within 48 hours (excluding weekends).
If I haven't responded by then, feel free to post a reminder or bug me via email.

My last reply was: 16 Hours, 31 Minutes ago.

Welcome, Guest
Please Login or Register.    Lost Password?

just wanted to say...
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: just wanted to say...
#7858
just wanted to say... 1 Year, 11 Months ago  
... what you are doing with the colors in this forum is amazing. i never knew that kunena can do this
mbms
Posts: 26
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#7862
Re: just wanted to say... 1 Year, 11 Months ago  
Kunena can't by default. It needs a little code tweaking.
The colors are defined by some weird calculation I let loose on the username.

On the table cell that holds this message I have this:
<?php
$colid = crc32( md5( 'ABCDEF'.$msg_username ) );
        // set color of admin to grey (example userid 123, is probably 62)
if ( $fmessage->userid == 123 ) {
$colid = 1000000;
}
$colparts = array();
$colparts['r'] = substr( $colid, -6, 2 ) * 0.6 ;
$colparts['g'] = substr( $colid, -4, 2 ) * 0.8;
$colparts['b'] = substr( $colid, -2, 2 ) * 1;

$lightness = 3;
$colrgb = array();
$colrgb['r'] = ( 255 - round( 100 / $lightness ) ) + round( $colparts['r'] / $lightness );
$colrgb['g'] = ( 255 - round( 100 / $lightness ) ) + round( $colparts['g'] / $lightness );
$colrgb['b'] = ( 255 - round( 100 / $lightness ) ) + round( $colparts['b'] / $lightness );
?>
        <td class = "fb-msgview-right fb-msgview-id_<?php echo $fmessage->userid; ?>" style="background-color: rgb( <?php echo $colrgb['r'].', '.$colrgb['g'].', '.$colrgb['b']; ?> );">
Peter van Westen
Admin
Posts: 9165
User OfflineClick here to see the profile of this user
Last Edit: 2010/03/16 23:56 By peter.
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
Go to topPage: 1
Moderators: Peter van Westen
MaxCDN | Content Delivery Network | Accelerate your site to the max
hosting joomla
Open Source Training | Online Joomla! Training and Support