Membergroup Colors In Posts

Started by Kris, February 20, 2005, 02:05:18 AM

Previous topic - Next topic

Kris

Link to Mod

Membergroup Colors show up in Topics and Who's Online.
(updated)


_complex

#2
Open up the mod file... i guess the installer didnt work for u either??..

and also i think this mod doesnt uninstall right with package manager....


<edit file>
$themedir/Display.template.php
</edit file>

<search>
echo '
<table width="100%" cellpadding="5" cellspacing="0" style="table-layout: fixed;">
<tr>
<td valign="top" width="16%" rowspan="2" style="overflow: hidden;">
<b>', $message['member']['link'], '</b>
<span class="smalltext">';
</search>


<replace>
echo '
<table width="100%" cellpadding="5" cellspacing="0" style="table-layout: fixed;">
<tr>
<td valign="top" width="16%" rowspan="2" style="overflow: hidden;">';

if(isset($message['member']['group']) && $message['member']['group'] != '' && isset($message['member']['group_color']))
{
echo '
<span style="color : ', $message['member']['group_color'] ,';"><b>', $message['member']['link'], '</b></span><br />';
}
else (if(isset($message['member']['post_group_color'] && $message['member']['post_group'] != '' && !$message['member']['is_guest'])
{
echo '
<span style="color : ', $message['member']['post_group_color'] ,';"><b>', $message['member']['link'], '</b></span><br />';
}
else
{
echo '
<b>', $message['member']['link'], '</b><br />';
}
echo '
<span class="smalltext">';
</replace>





Quote from: trenchteam on February 20, 2005, 02:29:47 AM
How can we do this manually?

trenchteam

thanks. No it didnt work thru the installer.

Xtasy

installer didnt work for me, and when I tried manually I get the following parse error: unexpected T_IF.


Midgard

Open it: Display.template.php

Find it:
// Show the member's primary group (like 'Administrator') if they have one.
if (isset($message['member']['group']) && $message['member']['group'] != '')
echo '
', $message['member']['group'], '<br />';


Replace with:
// Show the member's primary group (like 'Administrator') if they have one.
if (isset($message['member']['group']) && $message['member']['group'] != '')
echo '<span style="font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; font-weight: normal;', !empty($message['member']['group_color']) ? ' color: ' . $message['member']['group_color'] : '', '">', $message['member']['group'], '</span><br />';

Kris

Hmm..

Anyone got any idea what I've done wrong in the mod?
I let Anguz and Unknown check first...

[Unknown]

Hmm, strange, is this the same one you posted?

else (if(isset($message['member']['post_group_color'] && $message['member']['post_group'] != '' && !$message['member']['is_guest'])

Should be:

elseif (isset($message['member']['post_group_color'] && $message['member']['post_group'] != '' && !$message['member']['is_guest'])

-[Unknown]

Kris

Was the same.

Just updated that line + version #

mennou

i ain't  see nothing .....i uploaded the mod on my forum but i don't see nothing.. it's not working ....

Javis

Quote from: Midgard on February 20, 2005, 04:12:38 AM
Open it: Display.template.php

Find it:
// Show the member's primary group (like 'Administrator') if they have one.
if (isset($message['member']['group']) && $message['member']['group'] != '')
echo '
', $message['member']['group'], '<br />';


Replace with:
// Show the member's primary group (like 'Administrator') if they have one.
if (isset($message['member']['group']) && $message['member']['group'] != '')
echo '<span style="font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; font-weight: normal;', !empty($message['member']['group_color']) ? ' color: ' . $message['member']['group_color'] : '', '">', $message['member']['group'], '</span><br />';


Thanks Midgard, that worked perfectly.

trenchteam

MIdgard, how I get this working on your MidBlue theme? ???

Midgard


edi67

Quote from: Midgard on February 20, 2005, 04:12:38 AM
Open it: Display.template.php

Find it:
// Show the member's primary group (like 'Administrator') if they have one.
if (isset($message['member']['group']) && $message['member']['group'] != '')
echo '
', $message['member']['group'], '<br />';


Replace with:
// Show the member's primary group (like 'Administrator') if they have one.
if (isset($message['member']['group']) && $message['member']['group'] != '')
echo '<span style="font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; font-weight: normal;', !empty($message['member']['group_color']) ? ' color: ' . $message['member']['group_color'] : '', '">', $message['member']['group'], '</span><br />';


strange for me nothing change ...
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

trenchteam


Midgard

WFM? Did you set a color for an membergroup?

trenchteam

of course. you can see it on my site at the bottom with your regular group mod.

Midgard

http://www.eggheads.gen.tr/attachments/Display.template.zip

This is my Display.template.php file.

Work fine for me ... Please try this file ...

Jazhawk

Where is the mod writer?  Why doesn't he figure out whats wrong with this mod?  I get a failure when I try to install this from the package manager.  It cannot or will not edit display.template.

-Jazhawk

trenchteam

Quote from: Midgard on February 22, 2005, 04:11:18 AM
http://www.eggheads.gen.tr/attachments/Display.template.zip

This is my Display.template.php file.

Work fine for me ... Please try this file ...

thanks midgard. I try this!


Midgard

Working on your pages? Your 'SYR Manager' is red colored? ...

trenchteam

Oh is that all it did? I thought the color was in the actual post list!  LOL. SOrry midgard. thanks. :P

kncye

i did change like Midgard showed ! but nothing show up or change ! any help, thanks

Kris

First, I have no time checking why this mod doesn't work. It works for me.
Maybe some mod developers can check it.
Then I will put an update online.

By the way the discussion is way offtopic, Midgard is talking about something completely different. he tals about the groupnames to colour them and not the usernames.

Locked untill I find the time.

Advertisement: