Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: ScopeXL on April 15, 2010, 07:42:32 PM

Title: Custom Username Color
Post by: ScopeXL on April 15, 2010, 07:42:32 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2506)


Custom Username Color v1.2
Created by ScopeXL (http://custom.simplemachines.org/mods/index.php?action=profile;u=208312)


Compatibility
For SMF 2.0 RC3 - SMF 2.0 RC5

Information
Let your members choose what color their username should be (on topic display)

Each member can edit his/her own color by true color (red, green, blue) or by hexadecimal color (#FFFFFF, #000000) etc.
Each member modifies his/her color from Profile -> Forum Profile.

Make sure to uninstall any previous version of this modification before upgrading.

Changelog
1.2 - April 27, 2011
o Fixed error messages "Undefined index".
o All users can now see colors, even if not permitted to change their own.


1.1 - April 28, 2010
o Added group permission to change username color. Located in "Member Profiles" in Permissions.

1.0 - March 27, 2010
o First release of modification

This modification was tested on a fresh install of SMF 2.0 RC5.
Title: Re: Custom Username Color
Post by: luismanson on April 16, 2010, 10:19:10 AM
Great idea, thanks! could you evaluate the chance to add group permissions ?
Title: Re: Custom Username Color
Post by: ScopeXL on April 17, 2010, 01:43:32 AM
Quote from: luismanson on April 16, 2010, 10:19:10 AM
Great idea, thanks! could you evaluate the chance to add group permissions ?

Yea, I'll look into adding that for the next version. First SMF mod, so still getting to know everything about it.
Title: Re: Custom Username Color
Post by: Mu3rt3 on April 23, 2010, 01:32:50 PM
Great mod! Can it used so that only moderator/admin can edit users color?
Title: Re: Custom Username Color
Post by: oOo--STAR--oOo on April 23, 2010, 02:13:54 PM
Great mod would be good if only admins/mods can change the colour orfor certain member groups..
There will be to many Reds Lmfao
Title: Re: Custom Username Color
Post by: ScopeXL on April 23, 2010, 06:00:31 PM
Quote from: Mu3rt3 on April 23, 2010, 01:32:50 PM
Great mod! Can it used so that only moderator/admin can edit users color?

I will add a membergroup specific permission in the next version to be released soon ;)
Title: Re: Custom Username Color
Post by: erorcun on April 23, 2010, 07:49:59 PM
Turkish translation :)

$txt['custom_color_title'] = 'Özelleştirilebilir Kullanıcı Adı Rengi';
$txt['custom_color_subtext'] = 'Biçim: red, green, blue VEYA #FFFFFF, #000000';
$txt['custom_color_profile'] = 'Profiline bak';
Title: Re: Custom Username Color
Post by: wynnyelle on April 25, 2010, 08:51:23 PM
There a way to make this so it gives members more than one colour like alternating or looping throughout the name? I want rainbow names options. Thanks!
Title: Re: Custom Username Color
Post by: Arantor on April 25, 2010, 08:56:12 PM
Quote from: Groovystar on April 25, 2010, 08:51:23 PM
There a way to make this so it gives members more than one colour like alternating or looping throughout the name? I want rainbow names options. Thanks!

Not without a complete rewrite of the mod.
Title: Re: Custom Username Color
Post by: dagwood on April 26, 2010, 12:12:19 AM
Is there something like this that is compatable with 1.1.11.  If there is haven't been able to find it
Title: Re: Custom Username Color
Post by: ishy on April 26, 2010, 08:37:24 AM
I look forward to an update with group permissions!
Title: Re: Custom Username Color
Post by: Arantor on April 26, 2010, 08:38:55 AM
ScopeXL: Guide to adding permissions for 2.0 can be found: http://www.simplemachines.org/community/index.php?topic=345127.0
Title: Re: Custom Username Color
Post by: ScopeXL on April 28, 2010, 02:07:37 AM
Thanks Arantor, guide helped me.

New version has been released. I've added permission to specify which group can edit their color. The permission is under "Member Profiles". Any questions or comments let me know.

Thanks to all who are providing translations. I'm sorry I forgot to include them in this update, I'll be sure to do so in the next release once finals are over.

Any questions or help with the mod let me know, I'm happy to help.
Title: Re: Custom Username Color
Post by: Bugo on April 28, 2010, 05:53:52 AM
Updated russian translation
Title: Re: Custom Username Color
Post by: ishy on April 28, 2010, 06:37:56 AM
It doesn't seem to be working for me. I got the option on profiles, but nothing happened to the color when I tried to change it from the group color (admin red) to gray using hexcode and the color names.
Title: Re: Custom Username Color
Post by: luismanson on April 28, 2010, 08:10:11 AM
Grat!!! thanks! :D

Spanish:

$txt['custom_color_title'] = 'Color de nombre de usuario personalizado';
$txt['custom_color_subtext'] = 'Formato: red, green, blue O #FFFFFF, #000000';
$txt['custom_color_profile'] = 'Ver el perfil de';

//


$txt['permissionname_profile_ccolor'] = 'Cambiar color del nombre de usuario';
$txt['permissionhelp_profile_ccolor'] = 'Cambia el color del nombre de usuario a lo que éste configuró.';

Title: Re: Custom Username Color
Post by: ScopeXL on April 28, 2010, 03:18:25 PM
Quote from: ishy on April 28, 2010, 06:37:56 AM
It doesn't seem to be working for me. I got the option on profiles, but nothing happened to the color when I tried to change it from the group color (admin red) to gray using hexcode and the color names.

Are you using the option in Profile -> Forum Profile to change the color? Do not change the membergroup color, I only added the permission so that the "Custom Username Color" field would be visible/invisible if the permission was set.
Title: Re: Custom Username Color
Post by: ishy on April 29, 2010, 06:15:06 PM
Yes, I am using the option in the profiles.
Title: Re: Custom Username Color
Post by: ScopeXL on April 29, 2010, 06:40:08 PM
Quote from: ishy on April 29, 2010, 06:15:06 PM
Yes, I am using the option in the profiles.

What browser and version are you using?
Title: Re: Custom Username Color
Post by: Bugo on May 04, 2010, 02:22:28 PM
Please add a restriction (or even inhibit) on the use of ordinary users of such colors as red and the like :)
Array of colors can even be set in the settings.
Title: Re: Custom Username Color
Post by: Kisschy on May 05, 2010, 12:33:23 AM
in Thai languages  ;D
$txt['custom_color_title'] = 'ปรับแต่งสีชื่อผู้ใช้งาน';
$txt['custom_color_subtext'] = 'ฟอร์แมต: red, green, blue หรือ #FFFFFF, #000000';
$txt['custom_color_profile'] = 'ดูข้อมูลส่วนตัวของ';
Title: Re: Custom Username Color
Post by: Pa​vel on November 24, 2010, 10:33:39 PM
Will this be updated to RC4?
Title: Re: Custom Username Color
Post by: Jayne Louise on December 12, 2010, 09:14:01 PM
Using the 1.1 version of this mod. I disabled the permissions for everyone except Admin to change username colours. Then in each members profile I changed thier colors accordingly and all works as expected; all users have their set colors in their post/topic profiles.

Except, only the Admin can see those color changes. For everyone else, all names still appear as orange.

The only way around this seems to be to allow permissions for everyone to change their name colors to whatever they want which isnt what is desired.

Have I missed something or can you update this so that every one can see those color changes set by admin.
Title: Re: Custom Username Color
Post by: AllanD on March 11, 2011, 11:28:37 AM
is there going to be a 2.0 rc5 version
and only staff editable
Title: Re: Custom Username Color
Post by: AllanD on March 13, 2011, 11:45:51 AM
any update on this we would love to know
Title: Re: Custom Username Color
Post by: Rain Forest on March 13, 2011, 12:28:52 PM
Quote from: CrazieGrafix on March 11, 2011, 11:28:37 AM
is there going to be a 2.0 rc5 version
and only staff editable

In package-info
Find:
<install for="2.0 RC3">
Replace with:
<install for="2.0 RC5">

Find:
<uninstall for="2.0 RC3">
Replace with:
<uninstall for="2.0 RC5">

Then zip it.  :)
Title: Re: Custom Username Color
Post by: Arantor on March 13, 2011, 12:29:46 PM
Or better, use the option in Admin > Packages > Browse Packages > Advanced to do the same basic thing without the tedium of editing a package.
Title: Re: Custom Username Color
Post by: AllanD on March 13, 2011, 09:05:20 PM
okay great but it's still not admin editable
thank you though for posting how to get it to work though
Title: Re: Custom Username Color
Post by: hcfwesker on April 15, 2011, 05:37:03 PM
Getting this error in the error log, when viewing post messages.

8: Undefined index: custom_color

File: /home/brawldom/public_html/Themes/default/Display.template.php
Line: 312
Title: Re: Custom Username Color
Post by: hcfwesker on April 26, 2011, 10:41:18 PM


Why is it that ONLY members with the permissions can see the other members custom colors?

EDIT::  I fixed this by modifying the display.template file
Title: Re: Custom Username Color
Post by: ScopeXL on April 27, 2011, 01:27:15 AM
Update: Version 1.2 released. Basically I just fixed up what was reported. All users now see the custom colors, even if their permissions don't allow them to change their own. And I have fixed the undefined index error messages. Works on a fresh install of SMF 2.0 RC5. Let me know if you have any issues.
Title: Re: Custom Username Color
Post by: hcfwesker on May 05, 2011, 10:40:19 PM
Thank you very much for the update.  Made the edits you changed in the display.template ; and every thing's working nice, and no errors. :)
Title: Re: Custom Username Color
Post by: CoreyLewis on May 16, 2011, 02:27:06 PM
Hey great mod works perfect is there a way to keep the colour everyone except from only posts ? :)
Title: Re: Custom Username Color
Post by: ScopeXL on May 16, 2011, 04:01:43 PM
Quote from: CoreyLewis on May 16, 2011, 02:27:06 PM
Hey great mod works perfect is there a way to keep the colour everyone except from only posts ? :)

I'm not sure what your asking here.
Title: Re: Custom Username Color
Post by: CoreyLewis on May 16, 2011, 04:40:18 PM
Quote from: Scope XL on May 16, 2011, 04:01:43 PM
Quote from: CoreyLewis on May 16, 2011, 02:27:06 PM
Hey great mod works perfect is there a way to keep the colour everyone except from only posts ? :)

I'm not sure what your asking here.

I like the app

But is there a way to make it so the coloured name shows everywhere???

Because on my forum it only shows in the post :/
Title: Re: Custom Username Color
Post by: ScopeXL on May 17, 2011, 12:22:51 AM
Quote from: CoreyLewis on May 16, 2011, 04:40:18 PM
I like the app

But is there a way to make it so the coloured name shows everywhere???

Because on my forum it only shows in the post :/

Oh I see what your saying. At the moment no I haven't added the ability for color to be seen on other areas of the site. I will look into it though for future versions.
Title: Re: Custom Username Color
Post by: CoreyLewis on May 17, 2011, 02:41:56 AM
Quote from: Scope XL on May 17, 2011, 12:22:51 AM
Quote from: CoreyLewis on May 16, 2011, 04:40:18 PM
I like the app

But is there a way to make it so the coloured name shows everywhere???

Because on my forum it only shows in the post :/

Oh I see what your saying. At the moment no I haven't added the ability for color to be seen on other areas of the site. I will look into it though for future versions.

Ahh ok let me know as members are requesting for a paid subscription and not realising till i can get everyone so ill prob don8
Title: Re: Custom Username Color
Post by: anakmacan on May 20, 2011, 02:53:33 AM
how to apply this mod in "who is online" to then ?
Title: Re: Custom Username Color
Post by: ScopeXL on May 20, 2011, 04:22:17 AM
Quote from: anakmacan on May 20, 2011, 02:53:33 AM
how to apply this mod in "who is online" to then ?

You can't at the moment.
Title: Re: Custom Username Color
Post by: hcfwesker on May 20, 2011, 09:35:50 PM
Quote from: Scope XL on May 17, 2011, 12:22:51 AMAt the moment no I haven't added the ability for color to be seen on other areas of the site. I will look into it though for future versions.

I, myself, prefer it just how it is.  Makes members happy, but keeps the home page looking clean.  If you do add it forum wide, I'd like the option to just have it in the post, as originally designed, please.  :)

Though, options for color changes in PM's, Who's Online would be a nice addition.
Title: Re: Custom Username Color
Post by: anakmacan on May 21, 2011, 02:51:45 PM
Scope XL : okay then, ill just wait for the next version. Thanks for this mod btw :D
Title: Re: Custom Username Color
Post by: Wallydraigle on June 14, 2011, 08:17:48 PM
Quote from: ScopeXL on May 17, 2011, 12:22:51 AM
Quote from: CoreyLewis on May 16, 2011, 04:40:18 PM
I like the app

But is there a way to make it so the coloured name shows everywhere???

Because on my forum it only shows in the post :/

Oh I see what your saying. At the moment no I haven't added the ability for color to be seen on other areas of the site. I will look into it though for future versions.

I too would love to see this happen.
Title: Re: Custom Username Color
Post by: pixeleyes on June 18, 2012, 08:41:34 AM
Im using custom theme
how the replace below code.
Quoteecho ' <div class="topbar_post">
      <div>', $message['member'][link], '</div><span>', !empty($message['counter']) ? $txt['reply_noun'] . ' #' . $message['counter'] : '', '</span>
       </div>

into

Quoteif (!empty($message['member']['custom_color']) && $message['member']['custom_color'] != '')
      {
         echo '
               <a href="' . $scripturl . '?action=profile;u='. $message['member']['id'] . '" style="color: ' . $message['member']['custom_color'] . ';" title="' . $txt['custom_color_profile'] . ' ' . $message['member']['name'] . '">', $message['member']['name'], '</a>';
      }
      else
      {
         echo '
               ', $message['member']['link'] ,'';
      }
         echo '