Advertisement:

Author Topic: Member Color  (Read 1856 times)

Offline Rock Lee

  • Native Language Support Specialist
  • SMF Hero
  • *
  • Posts: 2,940
  • Gender: Male
  • I also speak english :D
    • BomberCode.Oficial on Facebook
    • RockLee-BC on GitHub
    • @Bomber_Code on Twitter
    • Bomber Code ~ La nueva era del conocimiento
Member Color
« on: August 09, 2019, 05:42:26 AM »
Link al mod

Member Color
Custom Member Color | Version 2.3
Developer: Rock Lee






Introduction

This simple modification allows you to choose the user name color, on topic display. Which you can do comfortably from Profile => Forum Profile.

Language

Is available in:
  • English
  • Latin Spanish

Compatibility

Prepared to work with the branch 2.0.x of SMF, it is tested only with the default theme.

Support

Support topic in English: Member Color
Tema de soporte en Español: Member Color

License

Copyright 2014-2019 (c) Bomber Code

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
¡Regresando como cual Fenix! ~ Bomber Code © 2018
Ayudas - Aportes - Tutoriales - Y mucho mas!!!


Ayudame via PayPal

Offline Diego Andrés

  • Customizer
  • SMF Hero
  • *
  • Posts: 3,346
  • Gender: Male
    • DiegoSetroc on GitHub
    • @bihgetter on Twitter
    • SMF Tricks - Free & Premium Themes
Re: Member Color
« Reply #1 on: August 09, 2019, 11:28:26 AM »
Nice mod

SMF Tricks - Free & Premium Responsive Themes for SMF.

Offline Rock Lee

  • Native Language Support Specialist
  • SMF Hero
  • *
  • Posts: 2,940
  • Gender: Male
  • I also speak english :D
    • BomberCode.Oficial on Facebook
    • RockLee-BC on GitHub
    • @Bomber_Code on Twitter
    • Bomber Code ~ La nueva era del conocimiento
Re: Member Color
« Reply #2 on: August 11, 2019, 11:37:29 AM »
Trank you :D
¡Regresando como cual Fenix! ~ Bomber Code © 2018
Ayudas - Aportes - Tutoriales - Y mucho mas!!!


Ayudame via PayPal

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,500
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Member Color
« Reply #3 on: August 13, 2019, 03:50:20 PM »
Hey Rock Lee, is this permission based or does it show up in everyone's profile so the members can change their own color?
Online Manual

Please do not PM me for support.

Offline Rock Lee

  • Native Language Support Specialist
  • SMF Hero
  • *
  • Posts: 2,940
  • Gender: Male
  • I also speak english :D
    • BomberCode.Oficial on Facebook
    • RockLee-BC on GitHub
    • @Bomber_Code on Twitter
    • Bomber Code ~ La nueva era del conocimiento
Re: Member Color
« Reply #4 on: August 13, 2019, 09:16:36 PM »
@Steve They can choose their own color as long as the option for groups or for all is activated.
¡Regresando como cual Fenix! ~ Bomber Code © 2018
Ayudas - Aportes - Tutoriales - Y mucho mas!!!


Ayudame via PayPal

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,500
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Member Color
« Reply #5 on: August 14, 2019, 07:18:51 AM »
Works beautifully ... great job!
Online Manual

Please do not PM me for support.

Offline Rock Lee

  • Native Language Support Specialist
  • SMF Hero
  • *
  • Posts: 2,940
  • Gender: Male
  • I also speak english :D
    • BomberCode.Oficial on Facebook
    • RockLee-BC on GitHub
    • @Bomber_Code on Twitter
    • Bomber Code ~ La nueva era del conocimiento
Re: Member Color
« Reply #6 on: August 14, 2019, 12:18:03 PM »
Thank you, now I'm trying to do the same in 2.1 it took me some time to achieve because of the failures it gives me :P
¡Regresando como cual Fenix! ~ Bomber Code © 2018
Ayudas - Aportes - Tutoriales - Y mucho mas!!!


Ayudame via PayPal

Offline shadav

  • Jr. Member
  • **
  • Posts: 208
  • Gender: Female
Re: Member Color
« Reply #7 on: August 23, 2019, 06:51:17 PM »
thank you for this :) works great on 2.0.15

question, how can I get it to work on the profile page?

Offline GigaWatt

  • The Smiley Guy
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 2,104
  • Gender: Male
    • Macedonian electronics forum
Re: Member Color
« Reply #8 on: August 23, 2019, 06:58:29 PM »
Hmmm... will definitely try it :). Great job BTW Rock Lee :).

PS: Is your avatar by any chance a guy wearing a Scorpio costume?
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Offline Rock Lee

  • Native Language Support Specialist
  • SMF Hero
  • *
  • Posts: 2,940
  • Gender: Male
  • I also speak english :D
    • BomberCode.Oficial on Facebook
    • RockLee-BC on GitHub
    • @Bomber_Code on Twitter
    • Bomber Code ~ La nueva era del conocimiento
Re: Member Color
« Reply #9 on: August 23, 2019, 08:16:37 PM »
@shadav You just have to adapt / copy what is added in display.template.php to profile.template.php and it should work without problems. At this moment I am connected from my cell phone and I cannot do tests to confirm what you have to edit but when I am on the computer I will do tests and I will tell you :D.

@GigaWatt thanks I hope you enjoy it :laugh:. If it is a scorpion costume priming some mates (infusion very taken in Argentina / Paraguay and southern Brazil). It emerged from a large event and just made a journalistic note about the video game costumes in addition to the Argentine association that was made (Even then Ermac appeared as a fernet preparer although he did not have the same impact).

References of what I say:
Mate > Fernet


Regards!
¡Regresando como cual Fenix! ~ Bomber Code © 2018
Ayudas - Aportes - Tutoriales - Y mucho mas!!!


Ayudame via PayPal

Offline shadav

  • Jr. Member
  • **
  • Posts: 208
  • Gender: Female
Re: Member Color
« Reply #10 on: August 23, 2019, 08:53:49 PM »
@shadav You just have to adapt / copy what is added in display.template.php to profile.template.php and it should work without problems. At this moment I am connected from my cell phone and I cannot do tests to confirm what you have to edit but when I am on the computer I will do tests and I will tell you :D.

@GigaWatt thanks I hope you enjoy it :laugh:. If it is a scorpion costume priming some mates (infusion very taken in Argentina / Paraguay and southern Brazil). It emerged from a large event and just made a journalistic note about the video game costumes in addition to the Argentine association that was made (Even then Ermac appeared as a fernet preparer although he did not have the same impact).

References of what I say:
Mate > Fernet


Regards!

thank you :) no rush, just whenever you get time, it's not a big issue, just would be nice ;) I tried but I failed only managed to turn the member name into #  :laugh:

Offline Rock Lee

  • Native Language Support Specialist
  • SMF Hero
  • *
  • Posts: 2,940
  • Gender: Male
  • I also speak english :D
    • BomberCode.Oficial on Facebook
    • RockLee-BC on GitHub
    • @Bomber_Code on Twitter
    • Bomber Code ~ La nueva era del conocimiento
Re: Member Color
« Reply #11 on: August 26, 2019, 02:11:29 PM »
Sorry @shadav for the delay is that I am with the university delivering final papers, I managed to have some time and I tried it with the theme default. You have to look in the Profile.template.php file on line 63 that you should see something like:

Code: [Select]
<h4>', $context['member']['name'], ' <span class="position">', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '</span></h4>
and you have to leave it:

Code: [Select]
<h4><span style="color: ' . $context['member']['color_member'] . '">', $context['member']['name'], '</span> <span class="position">', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '</span></h4>
It should work without problems as you wish if you have a custom theme and you cannot achieve it let me know to help you :).


Regards!
¡Regresando como cual Fenix! ~ Bomber Code © 2018
Ayudas - Aportes - Tutoriales - Y mucho mas!!!


Ayudame via PayPal

Offline shadav

  • Jr. Member
  • **
  • Posts: 208
  • Gender: Female
Re: Member Color
« Reply #12 on: August 26, 2019, 05:26:02 PM »
Sorry @shadav for the delay is that I am with the university delivering final papers, I managed to have some time and I tried it with the theme default. You have to look in the Profile.template.php file on line 63 that you should see something like:

Code: [Select]
<h4>', $context['member']['name'], ' <span class="position">', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '</span></h4>
and you have to leave it:

Code: [Select]
<h4><span style="color: ' . $context['member']['color_member'] . '">', $context['member']['name'], '</span> <span class="position">', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '</span></h4>
It should work without problems as you wish if you have a custom theme and you cannot achieve it let me know to help you :).


Regards!

thank you... and it's ok :) I appreciate you trying to help ;) education comes first
mines a bit different but not working this is what I did
Code: [Select]
<div class="username"><h4><span style="color: ' . $context['member']['color_member'] . '">', $context['member']['name'], '</span> <span class="position">', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '<br />', (!empty($context['member']['group_stars']) ? $context['member']['group_stars'] : ''), '</span></h4>

Offline Rock Lee

  • Native Language Support Specialist
  • SMF Hero
  • *
  • Posts: 2,940
  • Gender: Male
  • I also speak english :D
    • BomberCode.Oficial on Facebook
    • RockLee-BC on GitHub
    • @Bomber_Code on Twitter
    • Bomber Code ~ La nueva era del conocimiento
Re: Member Color
« Reply #13 on: August 27, 2019, 08:31:06 AM »
thank you... and it's ok :) I appreciate you trying to help ;) education comes first
mines a bit different but not working this is what I did
Code: [Select]
<div class="username"><h4><span style="color: ' . $context['member']['color_member'] . '">', $context['member']['name'], '</span> <span class="position">', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '<br />', (!empty($context['member']['group_stars']) ? $context['member']['group_stars'] : ''), '</span></h4>

It would have to work since I tested it (as the attached image looks like), did you clear the browser cache? Can you pass me the site url?


Regards!
¡Regresando como cual Fenix! ~ Bomber Code © 2018
Ayudas - Aportes - Tutoriales - Y mucho mas!!!


Ayudame via PayPal

Offline shadav

  • Jr. Member
  • **
  • Posts: 208
  • Gender: Female
Re: Member Color
« Reply #14 on: August 28, 2019, 12:59:13 PM »
thank you... and it's ok :) I appreciate you trying to help ;) education comes first
mines a bit different but not working this is what I did
Code: [Select]
<div class="username"><h4><span style="color: ' . $context['member']['color_member'] . '">', $context['member']['name'], '</span> <span class="position">', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '<br />', (!empty($context['member']['group_stars']) ? $context['member']['group_stars'] : ''), '</span></h4>

It would have to work since I tested it (as the attached image looks like), did you clear the browser cache? Can you pass me the site url?


Regards!
hm strange, I had cleared cache and hit ctrl f5, but it didn't work, now today it is working  ???
thank you again for your help :)

Offline Rock Lee

  • Native Language Support Specialist
  • SMF Hero
  • *
  • Posts: 2,940
  • Gender: Male
  • I also speak english :D
    • BomberCode.Oficial on Facebook
    • RockLee-BC on GitHub
    • @Bomber_Code on Twitter
    • Bomber Code ~ La nueva era del conocimiento
Re: Member Color
« Reply #15 on: August 28, 2019, 09:10:27 PM »
Glad to read that it works, sometimes the server takes time to take the changes ::)!


Regards!
¡Regresando como cual Fenix! ~ Bomber Code © 2018
Ayudas - Aportes - Tutoriales - Y mucho mas!!!


Ayudame via PayPal