Simple Colorizer

Started by Diego Andrés, June 26, 2011, 10:03:48 PM

Previous topic - Next topic

Michael Pfaff

Quote from: Sir Cumber-Patcher on January 27, 2014, 12:27:17 PM
Pretty much impossible because this looks for a *link* to the profile, the member group name is not a link.

Right on. Thanks for the quick reply. Maybe I'll get used to the way it looks.

Mac2213

hello is there a way to put in this mod that user profile be also colorized depend on which group user have? thanks

Badboy

Open Profile.template.php

Code (FIND) Select
<div class="username"><h4>', $context['member']['name'], ' <span class="position">', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '</span></h4><>

Code (REPLACE) Select
<div class="username"><h4>', $context['member']['link'], ' <span class="position">', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '</span></h4><>
Nothing is true, everything is permitted.

Dave J

For those who get this error or similar

QuoteApply Filter: Only show the error messages of this URL
http://....../forum/index.php?action=admin;area=forumfirewall
Apply Filter: Only show the errors with the same message
2: preg_match_all() [<a href='function.preg-match-all'>function.preg-match-all</a>]: Unknown modifier 'c'
Apply Filter: Only show the errors from this file
File: /home/......./public_html/forum/Sources/Subs-SimpleColorizer.php
Line: 18

Uninstall it and install this

http://custom.simplemachines.org/mods/index.php?mod=111

Go into 'Admin' / 'Features & Options' / 'Member Color Link' in admin  Check out which options you want to select.

I did as in the attached image

No more errors



If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

FragaCampos

Quote from: Badboy on June 23, 2014, 03:54:34 PM
Open Profile.template.php

Code (FIND) Select
<div class="username"><h4>', $context['member']['name'], ' <span class="position">', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '</span></h4><>

Code (REPLACE) Select
<div class="username"><h4>', $context['member']['link'], ' <span class="position">', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '</span></h4><>

This was very useful. Thanks, Badboy!

Rain Forest

2: preg_match_all(): Unknown modifier 'g'
Apply Filter: Only show the errors from this file
File: ../Sources/Subs-SimpleColorizer.php
Line: 18


Line 18:


$user_ids = preg_match_all($regex[0], $buffer, $matches) ? array_unique($matches[1]) : array();


:-\

Deprecated

This is one of the most puzzling mods I have ever seen, mainly because the only description is "it just works!"

But strange enough, I installed it and I think it did work! :) -- That's SMF 2.1.10

I think what it is doing is go to Admin -> Membergroups -> Modify (for the group you want to change the color) and set "Color in online list" to the color you want.

The setting does change your color in the online list (duh!) but I wanted it to change my username color in posts and the setting didn't do that. But I installed the mod package and bam!!! Got my user color name right in posts too!!!

I had also changed the star image to the new color (that worked) and I've ended up with the result I wanted. I am the owner of the forum and also admin of course, but I wanted MY username and stars to be a unique color (different from other admins), and the changes to the Membergroup setting + creating a new colored star + this mod package got it done! :D

Now all I have to do is get a few members signed up and verify it works for them too.

Thank you very much for this mod! :D

Rogerd

I know this is an old thread but could someone tell me how to get rid of this error, I'm using  2.0.11

2: preg_match_all() [<a href='function.preg-match-all'>function.preg-match-all</a>]: Unknown modifier 'r'

File: /home/************/public_html/Sources/Subs-SimpleColorizer.php
Line: 18

Dave J

Quote from: Rogerd on June 26, 2016, 10:50:57 AM
I know this is an old thread but could someone tell me how to get rid of this error, I'm using  2.0.11

2: preg_match_all() [<a href='function.preg-match-all'>function.preg-match-all</a>]: Unknown modifier 'r'

File: /home/************/public_html/Sources/Subs-SimpleColorizer.php
Line: 18


If you look up a couple of posts you'll see the answer....or at least it worked for me.
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Rogerd

Quote from: davejo on June 26, 2016, 10:56:01 AM
Quote from: Rogerd on June 26, 2016, 10:50:57 AM
I know this is an old thread but could someone tell me how to get rid of this error, I'm using  2.0.11

2: preg_match_all() [<a href='function.preg-match-all'>function.preg-match-all</a>]: Unknown modifier 'r'

File: /home/************/public_html/Sources/Subs-SimpleColorizer.php
Line: 18


If you look up a couple of posts you'll see the answer....or at least it worked for me.

Thank's very much, I must be going blind.

Rogerd

No that didn't work, still getting this error, it's strange that the bold part of the error wasn't there when I copied the error from the log, it appeared when I pasted it here.

2: preg_match_all() [<a href='function.preg-match-all'>function.preg-match-all</a>]: Unknown modifier 'r'Apply Filter: Only show the errors from this file File: /home/************/public_html/Sources/Subs-SimpleColorizer.php
Line: 18

-Rock Lee-

Hello @Diego Andrés as you can see in the Spanish forum raised the problem but I can not fix testing variants and different things, not problem because it takes the host variables null or empty

8: Undefined index: post_group_colorAplicar filtro: Solamente muestra los errores de este archivo Archivo: /***/public_html/Themes/default/Display.template.php
Línea: 238


Basically the line is:
if ($shown)
echo '
</ul>
</li>';
}


The problem arose basically to be a registered user to delete your account and generandome this error, as will several pages. Try any form even looking at the page php but simply gives me error syntasis or seems not directly take me exepcion ...


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

Diego Andrés

Quote from: Rock Lee on June 26, 2016, 06:32:35 PM
Hello @Diego Andrés as you can see in the Spanish forum raised the problem but I can not fix testing variants and different things, not problem because it takes the host variables null or empty

8: Undefined index: post_group_colorAplicar filtro: Solamente muestra los errores de este archivo Archivo: /***/public_html/Themes/default/Display.template.php
Línea: 238


Basically the line is:
if ($shown)
echo '
</ul>
</li>';
}


The problem arose basically to be a registered user to delete your account and generandome this error, as will several pages. Try any form even looking at the page php but simply gives me error syntasis or seems not directly take me exepcion ...


Regards!

I'll take a look during the week

SMF Tricks - Free & Premium Responsive Themes for SMF.

FireDitto

Hi all,

I'm using this mod, in combination with this mod - however, between the two of them, nothing is colouring the users when viewing the forum or boards.

I'm way out of the loop with coding so I'm failing miserably at figuring out what is wrong and how to fix it and make it work.

forum link - honey love should be blue and Bjin should be purple but obviously neither are coloured outside the default

Does anyone have any idea how to fix it?

(I checked the default Curve layout, and it is also not working properly on that one.)

Thanks in advance!
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

Diego Andrés

I see the colors just as you stated, honey is blue and the other one is purple

SMF Tricks - Free & Premium Responsive Themes for SMF.

Grammy

Quote from: Diego Andrés on July 19, 2016, 01:55:51 AM
I see the colors just as you stated, honey is blue and the other one is purple


That's odd; for me, they're both purple.   :-\

Actually, on the board, they're both purple.  On the second screenshot (Online users) one is blue.  Not sure why they're different in different locations....

FireDitto

Yes. They are coloured on the Online list but that is the only place they rae coloured properly.
They should be coloured on the Forum as well, but they are not - see my included image.

How do I get them to colour on the forum?

Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

Grammy

Quote from: FireDitto on July 19, 2016, 01:31:32 PM
Yes. They are coloured on the Online list but that is the only place they rae coloured properly.
They should be coloured on the Forum as well, but they are not - see my included image.

How do I get them to colour on the forum?


If you switch back to the default theme, are the colors correct?

FireDitto

#98
nope; I tested that last night :( It isn't working on the default either.


ETA: If I change the "Shorthand name (used for CSS class):" to #000000 everything will go black, across the board.

It appears that the CSS mod and the Colourize mod are not working together.


ETA2; I'm a dork. The answers to my questions were a page back. Hurpderp

Thanks guys <3
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

Grammy

Quote from: FireDitto on July 19, 2016, 02:47:08 PM


ETA2; I'm a dork. The answers to my questions were a page back. Hurpderp

Thanks guys <3

:D

Advertisement: