Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Bulakbol on January 15, 2008, 09:45:48 PM

Title: ColorizePost
Post by: Bulakbol on January 15, 2008, 09:45:48 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1061)

Author: JohnyB    Mod Name: ColorizePost    Version: 1.0    Tested: Freshly installed SMF 1.1.4

Colorize Post 1.0
  - This mod will optionally colorize an individual member's post if his/her group is given permission.
  - To give a group permission to enter their own color, tick the checkbox in
     ~ Admin > Permissions > Allow this group to use own color in post.
  - To enable color, enter color name (e.g. red) or hex (e.g. #ff0000) in
     ~ Profile > Look and Layout Preference > Enter the desired color for your post.
 - To use the default color in posts, leave the color textbox blank.
 - If no color is entered in their profile, the color of text in their Personal messages will be
        either group or post group color if there is one.
Title: Re: ColorizePost
Post by: Eliana Tamerin on January 16, 2008, 01:18:54 AM
Once again, JohnyB, you mod works well and does its job. I had been hoping for this ever since the mod that allowed user-specific BBC in a post by default, but that was too cumbersome.

Couple of things. Perhaps users would have the option to select whether or not this will apply to their past posts, which would be especially useful when changing their color. Also, what about the different themes? White on a dark theme would be nearly invisible on a lighter theme. In a board with a good variety of skin variations, a conflict is sure to arise in one of them.
Title: Re: ColorizePost
Post by: edi67 on January 16, 2008, 03:10:27 AM
let me try thx for this lovely mod

Italian Translation Jonnhy :)

default/languages/ManagePersmissions.italian.php
// JohnyB: ColorizePost Version: 1.0
$txt['permissionname_use_post_color'] = 'Abilita questo gruppo ad usare un colore personale nei post';
$txt['permissionhelp_use_post_color'] = 'Questo comando abiliterà o disabiliterà gli utenti di questo gruppo ad usare un colore personale nei loro profili. Spunta l\'opzione per abilitare questo gruppo.';

default/languages/Profile.italian.php
// JohnyB: ColorizePost Version: 1.0
$txt['personal_color'] = 'Immetti qui il colore che desideri per i tuoi post';
Title: Re: ColorizePost
Post by: edi67 on January 16, 2008, 03:49:06 AM
very funny one thing in personal message the colour of message is as the colour of user groups nice nice not change it  ;)
Title: Re: ColorizePost
Post by: Bulakbol on January 16, 2008, 05:54:35 PM
Quote from: Eliana Tamerin on January 16, 2008, 01:18:54 AM
Once again, JohnyB, you mod works well and does its job. I had been hoping for this ever since the mod that allowed user-specific BBC in a post by default, but that was too cumbersome.

Couple of things. Perhaps users would have the option to select whether or not this will apply to their past posts, which would be especially useful when changing their color. Also, what about the different themes? White on a dark theme would be nearly invisible on a lighter theme. In a board with a good variety of skin variations, a conflict is sure to arise in one of them.

Thanks Eliana. My members asked for this and I am sharing it for those who are interested.

You got me thinking now. :) Possible way is to remember the date this mod was installed and compare the date of their post. I'll look into this.

About the different colors of themes. I think it's up to the members what theme to use and what text color they want for that theme. I tried to use light and dark theme in different boards and it's not really good to my eyes.  What would you suggest? 
Title: Re: ColorizePost
Post by: Eliana Tamerin on January 16, 2008, 06:01:29 PM
Well, there's two things I can think of.

One is that you could just display the entry field along with each available theme name, so that members can select how they want their posts to appear on each theme.

The other is that you could do the same as above, but only display for the themes that are used. That would probably require more database queries, but it might reduce the complexity for members who aren't forum savvy.

Might also be worth adding in an option for members to either use specific colors on different themes or using a single color for all themes. That would also cut down on complexity for members who aren't forum savvy.
Title: Re: ColorizePost
Post by: Bulakbol on January 16, 2008, 06:02:01 PM
Quote from: edi67 on January 16, 2008, 03:49:06 AM
very funny one thing in personal message the colour of message is as the colour of user groups nice nice not change it  ;)

Thanks for the Italian language conversion edi67. I added it already and updated the file.

Yes, that's what I said. :) It will use either the post group color or primary group color in their personal messages until they enter new color in their profile. It looks cute to me so I included it in the mod.
Title: Re: ColorizePost
Post by: Bulakbol on January 16, 2008, 06:55:06 PM
Quote from: Eliana Tamerin on January 16, 2008, 06:01:29 PM
Well, there's two things I can think of.

One is that you could just display the entry field along with each available theme name, so that members can select how they want their posts to appear on each theme.

Not sure if I can detect all themes each member use. If I can, it requires additional fields in their profile and each theme will have its color entry. I will see what infos I can gather.

Quote from: Eliana Tamerin
The other is that you could do the same as above, but only display for the themes that are used. That would probably require more database queries, but it might reduce the complexity for members who aren't forum savvy.

Might also be worth adding in an option for members to either use specific colors on different themes or using a single color for all themes. That would also cut down on complexity for members who aren't forum savvy.

I am thinking of the way of how to do it. Maybe I can add it to the next version.

If you installed the mod but does not want to use the color in other themes, do not modify the Display.template.php of that theme although the color still show in their profile.
Title: Re: ColorizePost
Post by: kermitthefrog on January 17, 2008, 04:48:16 AM
I have installed this mod, however it looks like the DB hasn't been updated.

Quote
Unknown column 'mem.post_color' in 'field list'
File: /home/.sites/137/site24/web/Sources/Load.php
Line: 893
Title: Re: ColorizePost
Post by: Bulakbol on January 17, 2008, 05:19:38 AM
Quote from: kermitthefrog on January 17, 2008, 04:48:16 AM
I have installed this mod, however it looks like the DB hasn't been updated.

Quote
Unknown column 'mem.post_color' in 'field list'
File: /home/.sites/137/site24/web/Sources/Load.php
Line: 893

Hi Kermit. Is there any error in your error log when you installed the mod?  It's probably not istalled properly. Try loading your Sources/Load.php anf look for

mem.birthdate, mem.ICQ, mem.AIM, mem.YIM, mem.MSN, mem.posts, mem.lastLogin, mem.karmaGood,

and add

mem.post_color,

Should look like this.

mem.birthdate, mem.ICQ, mem.AIM, mem.YIM, mem.MSN, mem.posts, mem.lastLogin, mem.karmaGood, mem.post_color,

if you still have problem, let me know. I might pull the mod and check it again.


<EDIT>

I apologize. When I added the Italian laguage, for some odd reason, one of the file wasn't included. Please uninstall and install the updated one.

Please let me know if you still have problem with the last update.

</EDIT>
Title: Re: ColorizePost
Post by: CiOooo on January 17, 2008, 06:03:37 AM
Hello ;)
If you want to publish the turkish translation of this mod,
Here it is ;)
tchau..

<!-- default/languages/ManagePermissions.turkish.php  -->
<file name="$languagedir/ManagePermissions.english.php">
<operation>
<search position="end"></search>
<add><![CDATA[
$txt['permissionname_use_post_color'] = 'Bu gruba mesajını renklendirebilmesi için izin ver';
$txt['permissionhelp_use_post_color'] = 'Bu özellik, bu grupta bulunan üyelere, profillerinden mesaj renklerini aktif/deaktif etme imkanı verir. İzin vermek için kutucuğu işaretleyin';
]]></add>
</operation>
</file>



<!-- default/languages/Modifications.turkish.php -->
<file name="$languagedir/Profile.english.php">
<operation>
<search position="before"><![CDATA[$txt['no_buddies'] = 'Arkadaş listen boş';]]></search>
<add><![CDATA[
$txt['personal_color'] = 'Mesajınız için istediğiniz rengi seçin';
]]></add>
Title: Re: ColorizePost
Post by: Bulakbol on January 17, 2008, 06:16:06 AM
Thanks CiOooo. I will add it now and update the file again.
Title: Re: ColorizePost
Post by: jamesit05 on January 17, 2008, 06:47:09 AM
I cann't to install this mods T T
i'm using SMF 1.1.4
help me please !!!
Title: Re: ColorizePost
Post by: Bulakbol on January 17, 2008, 06:50:41 AM
Quote from: jamesit05 on January 17, 2008, 06:47:09 AM
I cann't to install this mods T T
i'm using SMF 1.1.4
help me please !!!

Can you post the error? If you downloaded the earlier file, download it again because there was missing file when I added the additional language file. It's corrected now.
Title: Re: ColorizePost
Post by: PfalzNacht on January 17, 2008, 07:01:13 AM
Which files are missing in the 1st version?

I installed it and it works perfect with the first version.
Title: Re: ColorizePost
Post by: Bulakbol on January 17, 2008, 07:05:20 AM
Quote from: Cybertec on January 17, 2008, 07:01:13 AM
Which files are missing in the 1st version?

I installed it and it works perfect with the first version.

I made a mistake when I added the Italian language. That was yesterday.  Maybe you have the original file without the additional language. I was careless. My fault.
Title: Re: ColorizePost
Post by: PfalzNacht on January 17, 2008, 08:00:52 AM
Ya, i have the version without the languages.

I translated it into german, because we are a german board.  ;)
Title: Re: ColorizePost
Post by: Bulakbol on January 17, 2008, 08:10:41 AM
I see. You know what you are doing so you are ok. If you can give me German language translation, I can add it to this mod.
Title: Re: ColorizePost
Post by: GN/Henny on January 17, 2008, 01:32:41 PM
I tried to install it on my board,
the installation was ok, but I can't see it anywere.. I have a Dutch version board, is that the problem?
Title: Re: ColorizePost
Post by: Bulakbol on January 17, 2008, 02:14:46 PM
Quote from: GN/Henny on January 17, 2008, 01:32:41 PM
I tried to install it on my board,
the installation was ok, but I can't see it anywere.. I have a Dutch version board, is that the problem?

Hi GN/Henny.  I am not sure if the language is the problem. Try going to Admin -> Permission >(select the group that you want to give permission) then under the Member Profiles, you can find Allow this group to enter own color in post. Click the checkbox and mark it with checkmark. Then save the changes. They can now go to their Profile -> Look and Layout Preference -> Enter the desired color for your post.

If you still have problem, let me know.

Check the picture here,

http://custom.simplemachines.org/mods/index.php?mod=1061
Title: Re: ColorizePost
Post by: GN/Henny on January 17, 2008, 02:41:05 PM
I can't see anything... only> at permissions I see this;
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi10.tinypic.com%2F6q3j1gh.jpg&hash=4c7677f1254dd2bae3ea1fc5bae2c46fbb4ea5bf) (no text in front of this line

and in profile;

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi15.tinypic.com%2F6jwwtfs.jpg&hash=67cd2ebe905707b14eee25f15d0d7cbd6f5cfb7b)

again no text, and when I put for example  'yellow' in it, it doesn't work
Title: Re: ColorizePost
Post by: Bulakbol on January 17, 2008, 02:52:27 PM
 Here, copy these lines ang add it to your language file.

Open default/languages/ManagePermissions.dutch.php and add these two lines at the very end before the ?> tag.

$txt['permissionname_use_post_color'] = 'Allow this group to enter own color in post';
$txt['permissionhelp_use_post_color'] = 'This will enable or disable members in this group to enter own color in their profile. Tick the checkbox to allow this group.';


Then open default/languages/Profile.dutch.php and add this line at the very end too before the ?> tag.

$txt['personal_color'] = 'Enter the desired color for your post';

You can translate those if you want. Let me know if problem pesist.
Title: Re: ColorizePost
Post by: GN/Henny on January 17, 2008, 03:15:03 PM
ok, now I see it, but when I put 'yellow' in it.. it stays white
Title: Re: ColorizePost
Post by: GN/Henny on January 17, 2008, 03:21:03 PM
in my profile it's yellow, but not in my texts

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi4.tinypic.com%2F6odlm9x.jpg&hash=6db22acf5171aed20687a92ab0a7c8b8200ca56c)
Title: Re: ColorizePost
Post by: Bulakbol on January 17, 2008, 03:25:19 PM
You have to edit your theme manually because you are using custom theme. Check your personal messages. If they are in color, it's working. Try using the deault theme and see if it work there. What theme are you using?

Do you know how to edit your Display.template.php?
Title: Re: ColorizePost
Post by: kermitthefrog on January 17, 2008, 03:29:53 PM
JohnyB,

Thanks for the reply, the mod was installed without a single error.
I have added manually the table in the database.

I believe your zip file doesn't contain anything about the DB.
Title: Re: ColorizePost
Post by: GN/Henny on January 17, 2008, 03:31:52 PM
Quote from: JohnyB on January 17, 2008, 03:25:19 PM
You have to edit your theme manually because you are using custom theme. Check your personal messages. If they are in color, it's working. Try using the deault theme and see if it work there. What theme are you using?

Do you know how to edit your Display.template.php?


no I don't know anythong of the dispaly.template..
I use helios
Title: Re: ColorizePost
Post by: Bulakbol on January 17, 2008, 03:34:15 PM
Quote from: kermitthefrog on January 17, 2008, 03:29:53 PM
JohnyB,

Thanks for the reply, the mod was installed without a single error.
I have added manually the table in the database.

I believe your zip file doesn't contain anything about the DB.

Yes. Sorry. I added the language file and I forgot to include the db file. It's updated now. Download it agian. Sorry about that. Let me know if still missing. Thanks for letting me know.
Title: Re: ColorizePost
Post by: Bulakbol on January 17, 2008, 03:36:48 PM
Quote from: GN/Henny on January 17, 2008, 03:31:52 PM
Quote from: JohnyB on January 17, 2008, 03:25:19 PM
You have to edit your theme manually because you are using custom theme. Check your personal messages. If they are in color, it's working. Try using the deault theme and see if it work there. What theme are you using?

Do you know how to edit your Display.template.php?


no I don't know anythong of the dispaly.template..
I use helios

Attach your Display.template.php here and I'll edit it for you.
Title: Re: ColorizePost
Post by: GN/Henny on January 17, 2008, 03:41:09 PM
this is from the heliosmap

thanks for helping me  :D
Title: Re: ColorizePost
Post by: Bulakbol on January 17, 2008, 03:44:55 PM
Quote from: GN/Henny on January 17, 2008, 03:41:09 PM
this is from the heliosmap

thanks for helping me  :D

I got it. I will look at it. I'll get back to you. You are welcome.

<edit>
Try this one and if still won't work, let me know.
</edit>
Title: Re: ColorizePost
Post by: GN/Henny on January 17, 2008, 03:55:57 PM
it works (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.kellyfamily.nl%2Fforum%2FSmileys%2Fdefault%2Fhail.gif&hash=be528681aeff63891259baa07ebaf690883c541e)

Thanks again (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.kellyfamily.nl%2Fforum%2FSmileys%2Fdefault%2F1112.gif&hash=4e8d5844349e5379d846648e72f61058288def97)
Title: Re: ColorizePost
Post by: Bulakbol on January 17, 2008, 04:07:12 PM
Quote from: GN/Henny on January 17, 2008, 03:55:57 PM
it works (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.kellyfamily.nl%2Fforum%2FSmileys%2Fdefault%2Fhail.gif&hash=be528681aeff63891259baa07ebaf690883c541e)

Thanks again (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.kellyfamily.nl%2Fforum%2FSmileys%2Fdefault%2F1112.gif&hash=4e8d5844349e5379d846648e72f61058288def97)

You're welcome. I'm glad it's working now. :)
Title: Re: ColorizePost
Post by: PfalzNacht on January 17, 2008, 06:38:10 PM
 Here's the german translation

$txt['permissionname_use_post_color'] = 'Der Gruppe erlauben ihre eigene Farbe im Beitrag zu benutzen';
$txt['permissionhelp_use_post_color'] = 'Dies erlaubt oder verbietet den Usern in der Gruppe ihre eigene Farbe im Profil einzustellen. Benutze die Checkbox um es zu erlauben.';


$txt['personal_color'] = 'Gebe eine Farbe für deine Beiträge ein.';

Title: Re: ColorizePost
Post by: Bulakbol on January 17, 2008, 08:04:34 PM
Thanks Cybertec. I added the German language already and the mod is now updated.
Title: Re: ColorizePost
Post by: PfalzNacht on January 17, 2008, 08:06:04 PM
No Problem.  ;)

And now i install your other 2 mods.  :D
Title: Re: ColorizePost
Post by: GN/Henny on January 19, 2008, 04:29:39 AM
I searching for 2 other things, I don't know if that is possible, but is there a mod, so that you not only can put your color in your profile, but also a font or bold/italic
Title: Re: ColorizePost
Post by: Bulakbol on January 19, 2008, 05:11:52 AM
Quote from: Cybertec on January 17, 2008, 08:06:04 PM
No Problem.  ;)

And now i install your other 2 mods.  :D

Sure, if you can use it why not. :)  Thanks for using my mods.

Quote from: GN/Henny on January 19, 2008, 04:29:39 AM<br />I searching for 2 other things, I don't know if that is possible, but is there a mod, so that you not only can put your color in your profile, but also a font or bold/italic<br />

Sorry GN/Henny.  It is possible but not at the present.  I'll see what I can do when I have time. Thanks.
Title: Re: ColorizePost
Post by: Bulakbol on January 19, 2008, 05:21:47 AM
Quote from: Eliana Tamerin on January 16, 2008, 01:18:54 AM
Couple of things. Perhaps users would have the option to select whether or not this will apply to their past posts, which would be especially useful when changing their color. Also, what about the different themes? White on a dark theme would be nearly invisible on a lighter theme. In a board with a good variety of skin variations, a conflict is sure to arise in one of them.

I can do the date but requires additional field in members' fieldlist. 0000-00-00 means all posts. But is it neccessary?

Regarding different themes. It requires query to the themes database for all available themes and I am avoiding queries because of performance. What I can do is just use the personal color only if the user's theme is the same as the poster's theme, otherwise, it will use the default color. I can do it only in Display.template.php and not in recent posts and personal messages though.
Title: Re: ColorizePost
Post by: Eliana Tamerin on January 19, 2008, 12:38:31 PM
Fair enough. That essentially eliminates the need for different theme options anyhow.

And as for the date, no, I suppose it's not. It was just an idea is all.
Title: Re: ColorizePost
Post by: tiger5226 on January 19, 2008, 01:56:31 PM
its not letting me download the mod :(

I have been waiting for a mod like this until now and I cannot download it!!!  It just takes me to black page and cannot right click save it. :(

Mark
Title: Re: ColorizePost
Post by: phedo on January 19, 2008, 05:12:38 PM
Same problem. :(

Where can I download this mod ?

Phedo
Title: Re: ColorizePost
Post by: Eliana Tamerin on January 19, 2008, 05:43:46 PM
Don't worry. It's probably either an issue with the download area or JohnyB's just reuploading it.
Title: Re: ColorizePost
Post by: Bulakbol on January 19, 2008, 08:31:57 PM
I don't know what is going on. Maybe they are updating something.
Title: Re: ColorizePost
Post by: gamerxgirl on January 19, 2008, 11:48:24 PM
I think the not being able to download (because I'm having the same issue as well), is related to the server downtime, because the preview images also aren't working.

JohnnyB, maybe you could please re-upload it? Or perhaps its just server related.
Title: Re: ColorizePost
Post by: Bulakbol on January 20, 2008, 04:12:57 AM
Quote from: gamerxgirl on January 19, 2008, 11:48:24 PM
I think the not being able to download (because I'm having the same issue as well), is related to the server downtime, because the preview images also aren't working.

JohnnyB, maybe you could please re-upload it? Or perhaps its just server related.

I am not sure what is going on. I also tried to download it but I get only blank screen.  The last time I tried, the number of downloads was 316. Now it's 343. Some can download and others cant?  If I will reupload it, it's probably better to upload the updated version. I am working on the one that use the color if user and poster use the same theme.  It's for forum that use multiple theme.  If you still have issue with the download and want a copy of the mod, pm me and I'll send you a copy through email.

<EDIT>
I re-uploaded the mod today. It seems to work now.
</EDIT>
Title: Re: ColorizePost
Post by: gamerxgirl on January 21, 2008, 12:15:06 PM
Thanks, all is working now  :D
Title: Re: ColorizePost
Post by: Bulakbol on January 21, 2008, 12:22:48 PM
Quote from: gamerxgirl on January 21, 2008, 12:15:06 PM
Thanks, all is working now  :D

Good to know it's working now. ;) You're welcome.
Title: Re: ColorizePost
Post by: Bulakbol on January 21, 2008, 09:13:42 PM
Updated ColorizePost to version 1.1 It's Eliana Tamerin's idea for multi theme forums. Thanks Eliana.

Please uninstall version 1.0 before installing version 1.1. if you don't want to lose your old colors, unzip version 1.0, modify package-info.xml and comment-out the line with
<code>ColorizePostDB.php</code>

should look like this when commented-out.

<!-- <code>ColorizePostDB.php</code> -->

ColorizePost1.1
   Additional feature:
          - Color will be used in Message index, Recent posts and Personal messages if both user and poster
              use the same theme, otherwise it will use the default color. If no color is specified in their profile,
              primary group or post group color will be used instead if there is one.
Title: Re: ColorizePost
Post by: Apllicmz on January 21, 2008, 11:30:01 PM
thank you
Nice Work
Title: Re: ColorizePost
Post by: Apllicmz on January 21, 2008, 11:55:07 PM
Portuguese Translation

She work Good

<!-- default/languages/ManagePersmissions.portuguese.php  -->
<file name="$languagedir/ManagePermissions.portuguese.php">
<operation>
<search position="end"></search>
<add><![CDATA[
$txt['permissionname_use_post_color'] = 'Permitir que esse grupo para entrar na própria cor poste';
$txt['permissionhelp_use_post_color'] = 'Isto irá ativar ou desativar os membros deste grupo a entrar na sua própria cor perfil. Assinale a caixa de seleção para permitir que este grupo.';
]]></add>
</operation>
</file>
<!-- default/languages/Profile.portuguese.php -->
<file name="$languagedir/Profile.portuguese.php">
<operation>
<search position="before"><![CDATA[$txt['no_buddies'] = 'A sua lista de amigos est&aacute; actualmente vazia';]]></search>
<add><![CDATA[
$txt['personal_color'] = 'Digite a cor desejada para o seu poste';
]]></add>
</operation>
</file>


Thank you Again
Title: Re: ColorizePost
Post by: mersindost on January 22, 2008, 10:24:26 AM
Nice Mod

Thank You  :)
Title: Re: ColorizePost
Post by: Bulakbol on January 22, 2008, 03:31:28 PM
Thanks Joomlamz for the translation.


Thanks mersindost for the compliment. ;)
Title: Re: ColorizePost
Post by: JimM on January 25, 2008, 08:55:38 AM
Great mod.  It installed without a problem.  Every now and then I get an error in the log that looks like this.  Haven't been able to figure it out.  Any ideas?

Error message '8: Undefined index: theme
File: /var/www/xxxxx/mydomain.com/xxxxxxx/smf/Themes/default/Display.template.php (eval?)
Line: 418'
Title: Re: ColorizePost
Post by: Bulakbol on January 25, 2008, 04:57:08 PM
Hi JimM. If the error don't show all the time, maybe SMF is missing to read the "theme" once in a bluemoon. Try to eliminate by adding (note: there's opening curly bracket)

if(isset($message['member']['theme']))
{

just after the

// Show the post itself, finally!

then add another closing curly bracket on top of the other one just above the "else". It should look like this.

// Show the post itself, finally!
if(isset($message['member']['theme']))
{
if($message['member']['theme'] == $settings['theme_id'] || $message['member']['id'] == $context['user']['id'])
{
echo '
</td>
</tr></table>
<hr width="100%" size="1" class="hrcolor" />
<div class="post"', $message['can_modify'] ? ' id="msg_' . $message['id'] . '"' : '', '>';
if (!empty($message['member']['post_color']))
echo '<span style="color: '. $message['member']['post_color']. ';">';
elseif (!empty($message['member']['group_color']))
echo '<span style="color: '. $message['member']['group_color']. ';">';
elseif (!empty($message['member']['post_group_color']))
echo '<span style="color: '. $message['member']['post_group_color']. ';">';
echo $message['body'], (!empty($message['member']['post_color']) || !empty($message['member']['group_color']) || !empty($message['member']['post_group_color']) ? '</span>' : ''), '</div>', $message['can_modify'] ?
'<img src="' . $settings['images_url'] . '/icons/modify_inline.gif" alt="" align="right" id="modify_button_' . $message['id'] . '" style="cursor: pointer; display: none;" onclick="modify_msg(\'' . $message['id'] . '\', \'' . $context['session_id'] . '\')" />' : '' , '
</td>
</tr>';
}
}


Let's see if that will solve the problem.


For those who use nneonneo's shoutbox and want to color members' name and shout.
ColorizePost must be installed. In yshout/yshout.php, look for

// $newText = preg_replace("(http:\/\/(.+?) )is", "<a href=\"http://$1\" target=\"_blank\">http://$1</a> ", $newText);

and below it, add

global $user_profile;
    loadMemberData(array($user['id']));
    if (!empty($user_profile[$user['id']]['post_color']))
$color = ' style="color: ' . $user_profile[$user['id']]['post_color'] . '"';
    elseif (!empty($user_profile[$user['id']]['member_group_color']))
       $color = ' style="color: ' . $user_profile[$user['id']]['member_group_color'] . '"';
    elseif (!empty($user_profile[$user['id']]['post_group_color']))
       $color = ' style="color: ' . $user_profile[$user['id']]['post_group_color'] . '"';
    else
       $color = '';
       
    if (!empty($user_profile[$user['id']]['member_group_color']))
    $name_color = ' style="color: ' . $user_profile[$user['id']]['member_group_color'] . '"';
    elseif (!empty($user_profile[$user['id']]['post_group_color']))
       $name_color = ' style="color: ' . $user_profile[$user['id']]['post_group_color'] . '"';
    else
    $name_color = '';


then few lines down below, look for

if($user['is_logged'])
$writeText.="<a href=\"index.php?action=profile;u=$userID\">$shoutName</a>";
else
$writeText.="$shoutName";
$writeText.=":</em> $newText</p>\n";


and replace with

if($user['is_logged'])
$writeText.="<a href=\"index.php?action=profile;u=$userID\"><span $name_color>$shoutName</span></a>";
else
$writeText.="$shoutName";
$writeText.=":</em><span $color> $newText</span></p>\n";


Codes are from original version 1.8 of nneonneo's shoutbox. Hope that helps.
Title: Re: ColorizePost
Post by: ASF on January 27, 2008, 11:32:46 AM
can i see a example on a forum?
Title: Re: ColorizePost
Post by: Bulakbol on January 27, 2008, 02:30:11 PM
I don't know why you need to see a sample. My board is private so I will PM you the link as well as the temporary account to use.
Title: Re: ColorizePost
Post by: tiger5226 on January 28, 2008, 10:40:34 PM
Hey guys I installed the mod and I but I had an install error on the sources/load.php file so I installed anyway and went to the package parser on smfhacks.com and it said that the xml file in noncompliant with smf edits???

Can anyone tell the me the edits for the sources/load.php file so it will work...

if anyone knows thanks in advance.

Mark
Title: Re: ColorizePost
Post by: Bulakbol on January 28, 2008, 10:59:55 PM
Sources/Load.php, find

mem.karmaGood, mem.ID_POST_GROUP,
add or insert the following.
mem.post_color, mem.ID_THEME,


Look for
mem.birthdate, mem.ICQ, mem.AIM, mem.YIM, mem.MSN, mem.posts, mem.lastLogin, mem.karmaGood,
add or insert the following line.
mem.post_color,


Find the next line again
'name' => &$profile['realName'],
and add these two lines below the above codes.
'post_color' => &$profile['post_color'],
'theme' => &$profile['ID_THEME'],



and the last one, find
'local_time' => timeformat(time() + ($profile['timeOffset'] - $user_info['time_offset']) * 3600, false),
);

and add after that line.

if ($memberContext[$user]['theme'] == 0)
$memberContext[$user]['theme'] = $modSettings['theme_guests'];


Post here when you still have problem.
Title: Re: ColorizePost
Post by: JimM on January 30, 2008, 03:26:04 PM
Added the edits you suggested last night and no errors today.  I think that may have fixed it.  Thanks for a great mod.   :)
Title: Re: ColorizePost
Post by: Bulakbol on January 30, 2008, 03:39:57 PM
Quote from: JimM on January 30, 2008, 03:26:04 PM
Added the edits you suggested last night and no errors today.  I think that may have fixed it.  Thanks for a great mod.   :)

Cool. That's good because I am worried.  :)
Title: Re: ColorizePost
Post by: Sakae on January 30, 2008, 05:13:37 PM
Hey JohnnyB, two things:

1) On this piece of code, on the second line (here), I think it should be if ($message..., with a space between if and [/b]($messag[/b]..., shouldn't? It only works when I add a space on my display.template.php manual edit.

// Show the post itself, finally!
if($message['member']['theme'] == $settings['theme_id'] || $message['member']['id'] == $context['user']['id'])
{
echo '
</td>
</tr></table>
<hr width="100%" size="1" class="hrcolor" />
<div class="post"', $message['can_modify'] ? ' id="msg_' . $message['id'] . '"' : '', '>';
if (!empty($message['member']['post_color']))
echo '<span style="color: '. $message['member']['post_color']. ';">';
elseif (!empty($message['member']['group_color']))
echo '<span style="color: '. $message['member']['group_color']. ';">';
elseif (!empty($message['member']['post_group_color']))
echo '<span style="color: '. $message['member']['post_group_color']. ';">';
echo $message['body'], (!empty($message['member']['post_color']) || !empty($message['member']['group_color']) || !empty($message['member']['post_group_color']) ? '</span>' : ''), '</div>', $message['can_modify'] ?
'<img src="' . $settings['images_url'] . '/icons/modify_inline.gif" alt="" align="right" id="modify_button_' . $message['id'] . '" style="cursor: pointer; display: none;" onclick="modify_msg(\'' . $message['id'] . '\', \'' . $context['session_id'] . '\')" />' : '' , '
</td>
</tr>';
}
else


2) Is it possible to add two fields, one for front color and second for back color? I'm using KarlBenson's mod Color & BgColor Clickable BBCode Bar v3.3 (http://www.simplemachines.org/community/index.php?topic=108664.0), that might be useful to integrate..
Title: Re: ColorizePost
Post by: Bulakbol on January 30, 2008, 05:38:06 PM
Hi softcore. I usually use space between the "if" and the opening bracket but I guess I missed that one.  My live site and test site didn't throw any error so I assumed the space does not really matter. Maybe I am wrong but I will stand corrected. :)  To avoid errors for the next users, I will update the file now. Thank you for letting me know.

Yes, it will be nice if I can integrate Karlbenson's BBCode bar. If I can do the integration, then I will as well integrate to the other colorize mods. I don't know if I can because I know very little about javascript.
Title: Re: ColorizePost
Post by: lexi_be on February 01, 2008, 02:09:26 AM
thx for this lovely mod!!!!

But with some users the color is not shown? In the profile a color is selected, in the post it is not shown. What can be wrong?

thx Lexi
Title: Re: ColorizePost
Post by: Bulakbol on February 01, 2008, 02:19:32 PM
Quote from: lexi_be on February 01, 2008, 02:09:26 AM
thx for this lovely mod!!!!

But with some users the color is not shown? In the profile a color is selected, in the post it is not shown. What can be wrong?

thx Lexi

Hi Lexi. You are welcome. And thank you too for using this mod.

Are you using more than one theme?  The color in their profile willl be used only if the user (reader) is using the same theme as the message' poster. The color will show if they are both using the same theme.
Title: Re: ColorizePost
Post by: angelsluver on March 11, 2008, 01:25:18 AM
I don't know if i am in the right place to ask. But i want to add text modifications like bold, italics and different fonts and sizes. Is it possible with this mod? What i want is not only to automate the color but also the font, sizes and the bold/italics of the post, to lessen the work of members who post, they will not have to click the icons in the reply page to make the modification.

I'm sorry because i only have limited knowledge about mods and php, I only apply mods thru the package uploader in the admin panel.
Title: Re: ColorizePost
Post by: Bulakbol on March 12, 2008, 07:29:03 AM
Hi angelluver. I wish I could extend the mod to parse bbc but it is limited to colors only. If I will take it out of the body of the code, it will generate a lot of errors and to fix it, I have to rewrite the whole mod. I'm sorry angelluver.  :(
Title: Re: ColorizePost
Post by: angelsluver on March 13, 2008, 08:50:16 AM
I see. I guess what i want require a lot of work. I will have to forget about it.

Thanks so much JohnnyB.
Title: Re: ColorizePost
Post by: Bulakbol on March 14, 2008, 03:55:35 AM
Quote from: angelsluver on March 13, 2008, 08:50:16 AM
I see. I guess what i want require a lot of work. I will have to forget about it.

Thanks so much JohnnyB.

No worries angelluver.  ;)
Title: Re: ColorizePost
Post by: Lasalle on March 21, 2008, 05:14:33 AM
OK, colors with nneonneo's shoutbox work. But what i have to do to turn off colors in posts? I want diffrent colors only on SB.
Title: Re: ColorizePost
Post by: Bulakbol on March 21, 2008, 11:09:05 AM
Quote from: Lasalle on March 21, 2008, 05:14:33 AM
OK, colors with nneonneo's shoutbox work. But what i have to do to turn off colors in posts? I want diffrent colors only on SB.

Hi Lasalle. If you don't want it in post, you have to edit your Display.template.php. This mod, will use the color in their profile in any. If none, it will use the primary group color. If none, it will use the post group color.

Do you like to remove them all? In Display.template.php, find the following block of code and comment out or delete.
if($message['member']['theme'] == $settings['theme_id'] || $message['member']['id'] == $context['user']['id'])
{
echo '
</td>
</tr></table>
<hr width="100%" size="1" class="hrcolor" />';
if (!empty($message['member']['post_color']))
echo '<div style="color: '. $message['member']['post_color']. ';" class="post"', $message['can_modify'] ? ' id="msg_' . $message['id'] . '"' : '', '>';
elseif (!empty($message['member']['group_color']))
echo '<div style="color: '. $message['member']['group_color']. ';" class="post"', $message['can_modify'] ? ' id="msg_' . $message['id'] . '"' : '', '>';
elseif (!empty($message['member']['post_group_color']))
echo '<div style="color: '. $message['member']['post_group_color']. ';" class="post"', $message['can_modify'] ? ' id="msg_' . $message['id'] . '"' : '', '>';
echo $message['body'], '</div>', $message['can_modify'] ?
'<img src="' . $settings['images_url'] . '/icons/modify_inline.gif" alt="" align="right" id="modify_button_' . $message['id'] . '" style="cursor: pointer; display: none;" onclick="modify_msg(\'' . $message['id'] . '\', \'' . $context['session_id'] . '\')" />' : '' , '
</td>
</tr>';
}
else


Title: Re: ColorizePost
Post by: Lasalle on March 23, 2008, 04:42:57 PM
:) Thanks
Title: Re: ColorizePost
Post by: Bulakbol on March 24, 2008, 01:34:30 PM
Quote from: Lasalle on March 23, 2008, 04:42:57 PM
:) Thanks

No worries LaSalle.  ;) Thanks for trying/using this mod.
Title: Re: ColorizePost
Post by: Bulakbol on March 25, 2008, 05:27:39 PM
Updated today for SMF 2.0 Beta 3 Public.  Please post error if there's any.

Colorize Post 1.2.2 - for SMF 2.0 Beta 3 Public
- This mod will optionally colorize an individual member's messages if his/her group is given permission.
- To give a group permission to enter their own color, tick the checkbox in
    ~ Admin > Permissions > Allow this group to colorize their messages?
- To enable color, enter color name (e.g. red) or hex (e.g. #ff0000) in
    ~ Profile > Look and Layout Preference > Enter color for your messages.
- Color will be used in Message index, Recent posts, Profile Show Posts and Personal messages if both user
     and poster use the same theme. If no color is specified in their profile, primary group or post
     group online color will be used instead.

Supported Themes
- Babylon
- Classic
- Default Core


Thanks for trying this mod.
Title: Re: ColorizePost
Post by: Manu.G on March 27, 2008, 02:43:27 PM
I had installed the mod and it worked perfect, but there is only a little problem and I hope you can help me to solve it.

We have different member groups in our forum, with different online colors.
After I have installed the mod, the default font color of the members group changed into
the color of the member group. Is it possible to switch this off?

I really don't know how to explain.
The mod was using automatic the color of the member group for the color font, but
I wont have it. The default color font for the member groups should be the default color of the forum,
cause we wanna allow only different member groups to use this mod.

Hope you can understand what I'm asking for.  :-\
Title: Re: ColorizePost
Post by: Bulakbol on March 27, 2008, 03:04:15 PM
Hi Menu0372. So you want only cetain groups to use the color? We have to change a bit of code. You have to hardcode the group id who can use the color. Tell me more. Right now, the mod will look for color in their profile. If none, it will look for primary group color (admin GM etc.) and if not available, it will use the post group color.  What would you like mo to do for you?

Would you like the mod only to check for members who have colors in their profile? And if none, it will use the default color? I'll get back to you.

[edit]
Display.template.php
Code (look for) Select
$color = !empty($message['member']['post_color']) ? $message['member']['post_color'] : (!empty($message['member']['group_color']) ? $message['member']['group_color'] : (!empty($message['member']['post_group_color']) ? $message['member']['post_group_color'] : ''));

Code (replace) Select
$color = !empty($message['member']['post_color']);

Only those who enter color in their profile will get the color. Meaning, if you don't give them permission, they can't enter a color. No color, mod will use the default one.

[/edit]
Title: Re: ColorizePost
Post by: Manu.G on March 27, 2008, 03:59:38 PM
Quote from: JohnyB on March 27, 2008, 03:04:15 PM
Would you like the mod only to check for members who have colors in their profile? And if none, it will use the default color? I'll get back to you.

That's exactly what I want to have.
As long the member hasn't add a color code in the profile, the color font of his/her
postings should be the default color font of the forum and not of the member group
the member is.
After I had installed the mod, the text in my postings were red, cause the color of
my group "Administrator" is red, as in most of the forums. I hadn't add a color code
in my profile. To be honest when I saw this I was shocked.

So I have to change some codes to the codes you showed? Is this correct?

[edit]
Display.template.php
Code (look for) Select
$color = !empty($message['member']['post_color']) ? $message['member']['post_color'] :   (!empty($message['member']['group_color']) ? $message['member']['group_color'] : (!empty($message['member']['post_group_color']) ? $message['member']['post_group_color'] : ''));

Code (replace) Select
$color = !empty($message['member']['post_color']);
[/edit]
Title: Re: ColorizePost
Post by: Bulakbol on March 27, 2008, 04:02:23 PM
Yes Menu0372. Find the long line and replace it with the short one. Let me know how it goes. It it doesn't work (it should work) then we'll use different approach.
Title: Re: ColorizePost
Post by: Manu.G on March 27, 2008, 05:44:28 PM
Works perfect  :D

JohnyB, thanks for your quick help!!! :D
Title: Re: ColorizePost
Post by: Bulakbol on March 27, 2008, 06:00:59 PM
awww are you okay now? You're welcome. Thank you too for using this mod.  ;D

BTW, recent post and profile page use the same logic, so if you want to edit them too, you can search for the variable $color and replace with the code I gave you. Recent.template.php and Profile.template.php. If you need assistance, just post here.
Title: Re: ColorizePost
Post by: Manu.G on March 27, 2008, 06:17:42 PM
After I took a close look at the codes, I could change the code in
Recent.template.php and Profile.template.php. Everything is now as it should
be. :D

I will see, if I can get some more translations for this mod. ;)
Title: Re: ColorizePost
Post by: Bulakbol on March 27, 2008, 06:24:06 PM
wooo congratz! You actually helped me help you.  :D Translation is welcome.
Title: Re: ColorizePost
Post by: Manu.G on March 27, 2008, 08:25:04 PM
I think there is still a problem.  :-\
Our 2nd Admin tried to change the color of her posts, but the change isn't
to see in her postings. In her profile she can see the change of the color, but
not in her postings.
What went wrong?

Btw, here is the French translation:

ManagePermissions.french.php
$txt['permissionname_use_post_color'] = 'Autoriser ce groupe de colorier ses messages?';
$txt['permissionhelp_use_post_color'] = 'Ce va activier ou d&eacute;brayer les membres de ce groupe  d\'entrer la couleur pour les messages dans se profile. Marquer le  bo&icirc;tier de contr&ocirc;le pour activier ce groupe.';


Profile.french.php
$txt['personal_color'] = 'Ins&eacute;rer la couleur pour votre messages';
Title: Re: ColorizePost
Post by: Bulakbol on March 27, 2008, 08:36:52 PM
Hi Manu0372. First of all, you must have the same theme to see the color. If the poster is using default theme and the user is using babylon theme, the mod will not use the color.

Let's change the code from (first I gave you)
$color = !empty($message['member']['post_color']);

to this.
$color = !empty($message['member']['post_color']) ? $message['member']['post_color'] : '';




<edit>
Thanks for the French translation. I will add it now and update the package.
</edit>
Title: Re: ColorizePost
Post by: Manu.G on March 27, 2008, 08:42:35 PM
We're using in our forum only the default theme, none is having the permission to
change the theme.

I changed the code you showed, now it seems it works.
The color our 2nd Admin has chose is seen now in her postings. :D

Thanks again for your quick reply.
I think the next few days some more translations will follow. If you need
translations for your other mods, let me know. I will see what I can do for you. ;)
Title: Re: ColorizePost
Post by: Bulakbol on March 27, 2008, 08:49:03 PM
Glad it's working now. I thank you for the language translation. Sure, you can post the other mod's translation in their support thread. I am updating the package for 1.1.4 now.

<edit>
  Language update is done.
</edit>
Title: Re: ColorizePost
Post by: Manu.G on March 28, 2008, 06:53:47 AM
Sorry, it's me again.  :-\
The mod is working as it should, but now I get some error messages in the
error log.  :-\
It's nothing really bad I think, but can you please take a look at it, cause I think
the error has to do with the mod, or better said with the codes we changed.  :-\

Quote8: Undefined index:  theme
File: /is/htdocs/..../..../..../Themes/default/Display.template.php (eval?)
Line: 486

Here is Line 486 + 487 of our Display.template.php:

if ($message['member']['theme'] == $context['user']['theme_id'])
$color = !empty($message['member']['post_color']) ? $message['member']['post_color'] : '';


Our users haven't the permission to change the theme. We use in our forum only the default theme.
Title: Re: ColorizePost
Post by: Bulakbol on March 28, 2008, 12:54:32 PM
Sorry about that. I don't know why you're getting that error. Change this

if ($message['member']['theme'] == $context['user']['theme_id'])

to this line

if (isset($message['member']['theme']) &&  $message['member']['theme'] == $context['user']['theme_id'])

and if you still get errors, let me know so  I can  recode the other lines for you.
Title: Re: ColorizePost
Post by: Manu.G on March 28, 2008, 01:06:31 PM
Thx JohnyB. :D
I think the errors aren't that much bad, but I thought it will better to inform you
about it. I will check soon the error log, after I have change the code.

Here is the Dutch translation:

ManagePermissions.dutch.php
$txt['permissionname_use_post_color'] = 'Deze groep toestaan hun berichten te kleuren?';
$txt['permissionhelp_use_post_color'] = 'Dit zal het voor leden in deze groep mogelijk of onmogelijk maken een eigen kleur te typen in hun profiel.
Vink het hokje aan om het deze groep toe te staan..';


Profile.dutch.php
$txt['personal_color'] = 'Typ de kleur voor jouw berichten';
Title: Re: ColorizePost
Post by: Bulakbol on March 28, 2008, 01:20:12 PM
Hi Manu0372. That's what I thought. It misses some other members theme but not all. The code I gave you should eliminate the error.

Thanks for the Dutch language translation. I will update the package now.
Title: Re: ColorizePost
Post by: Eliana Tamerin on March 28, 2008, 02:56:57 PM
JohnyB, if the fix worked, would it be possible to include that as an option on the next version? To only use colors for people who have chosen them?
Title: Re: ColorizePost
Post by: Bulakbol on March 28, 2008, 03:09:41 PM
Quote from: Eliana Tamerin on March 28, 2008, 02:56:57 PM
JohnyB, if the fix worked, would it be possible to include that as an option on the next version? To only use colors for people who have chosen them?

Hi Eliana. Yes, through their Profile if their group is given permission to use any color. Thanks. 
Title: Re: ColorizePost
Post by: Manu.G on March 28, 2008, 05:32:11 PM
I checked my error log, there weren't any errors.
I have changed the code hours before. ;)

Thanks a lot for your help to make the mod working as I wanted to have. :-*

Here is the Romanian translation:

ManagePermissions.romanian.php
$txt['permissionname_use_post_color'] = 'Permiti acestui grup sa-si coloreze mesajele?';
$txt['permissionhelp_use_post_color'] = 'Prin aceasta membrii acestui grup vor putea sau nu vor putea sa foloseasca culori proprii in profilul lor pentru a le folosi in mesajele acestora.';


Profile.dutch.php
$txt['personal_color'] = 'Insereaza culoarea pentru mesajele dumneavoastra.';
Title: Re: ColorizePost
Post by: Bulakbol on March 28, 2008, 06:08:34 PM
Hi Manu0372. Hope there will be no more error.  :)

Thanks for the translation. Are there any more translated languages to come? If so, I'll wait for them before updating the package.  ;)
Title: Re: ColorizePost
Post by: Manu.G on March 28, 2008, 08:13:28 PM
I'm not sure, but I think some translations will come, how many I don't know.
When I posted the last translation, I thought "Why haven't you wait till you got
all translations" ;)
Title: Re: ColorizePost
Post by: Mystiquo on March 29, 2008, 10:35:10 AM
hi i have a problem i have cerberus theme and italian version i have modify manuallly, i have a list of the problem
1) i don't understand i enable the member for the color
2 ) i'm color first section with  <span style="color: #FFDD00;">, i have delete this and ihave write in box #FFDD00, in the admin pannel it's yellow but in forum it's a default color why?
with your mod
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg403.imageshack.us%2Fimg403%2F5530%2Fimmagine1ks1.jpg&hash=9a7f36872d96d704b3d18b328e4f267ea75bedaa)

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg403.imageshack.us%2Fimg403%2F9976%2Fimmaginemn1.jpg&hash=0763a923500ad9da1e237bb1ceb2f3af95803d9d)

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg518.imageshack.us%2Fimg518%2F2612%2Fimmagine2nl8.jpg&hash=3095d28400010e68c4736eefcece222ce3487435)

nothing your mod

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg153.imageshack.us%2Fimg153%2F1183%2Fimmagine4hm5.jpg&hash=f992c4fb7b0d588c96fc048f80c300694e2a9844)

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg403.imageshack.us%2Fimg403%2F259%2Fimmagine5nx5.jpg&hash=f7b9910b91f428ed37e40db896e17d6f04d6167f)

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg153.imageshack.us%2Fimg153%2F2153%2Fimmagine3hh7.jpg&hash=b27fddc8f5f33ff5d0dda717a2edec5d7ac245f1)

3) And i want know if i can color title of the post threadhow the section

thanks for all
Title: Re: ColorizePost
Post by: Eliana Tamerin on March 29, 2008, 11:44:02 AM
Are you sure the BoardIndex.php was modified correctly? Check to see that you edited correctly.
Title: Re: ColorizePost
Post by: Bulakbol on March 29, 2008, 08:01:45 PM
@Manu0372. Thanks again for the language translation. Let me know if it is the last one so I can add them all and update the package.

@Mystiquo. Sorry about that but if you deleted something, maybe it's not reading it properly anymore. I would like to see your BoardIndex.template.php. Attach it to your next post. Thanks.

@Eliana. Maybe it was not properly installed or missed a code. I will find out when I get a hold of his/her BoardIndex.template.php.
Title: Re: ColorizePost
Post by: Mystiquo on March 30, 2008, 07:57:18 AM
this is: BoardIndex.template.php in themes/cerberus/

<?php
// Version: 1.1; BoardIndex

function template_main()
{
        global 
$context$settings$options$txt$scripturl$modSettings;

        
// Show some statistics next to the link tree if SP1 info is off.
        
echo '
<table width="100%" cellpadding="3" cellspacing="0">
        <tr>
                <td valign="bottom">'
theme_linktree(), '</td>
                <td align="right">'
;
        if (!
$settings['show_sp1_info'])
                echo 
'
'
$txt[19], ': '$context['common_stats']['total_members'], ' &nbsp;&#38;#8226;&nbsp; '$txt[95], ': '$context['common_stats']['total_posts'], ' &nbsp;&#38;#8226;&nbsp; '$txt[64], ': '$context['common_stats']['total_topics'], '
'
, ($settings['show_latest_member'] ? '<br />' $txt[201] . ' <b>' $context['common_stats']['latest_member']['link'] . '</b>' $txt[581] : '');
        echo 
'
                </td>
        </tr>
</table>'
;

        
// Show the news fader?  (assuming there are things to show...)
        
if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
        {
                echo 
'
<div class="tborder" style="margin-bottom: 2ex;">
        <table border="0" width="100%" cellspacing="1" cellpadding="4">
                <tr class="titlebg" align="center">
                        <td>'
$txt[102], '</td>
                </tr>
                <tr>
                        <td valign="middle" align="center" height="60">'
;

                
// Prepare all the javascript settings.
                
echo '
                                <div id="smfFadeScroller" style="width: 90%; padding: 2px; "><b>'
$context['news_lines'][0], '</b></div>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
                                        // The fading delay (in ms.)
                                        var smfFadeDelay = '
, empty($settings['newsfader_time']) ? 5000 $settings['newsfader_time'], ';
                                        // Fade from... what text color?  To which background color?
                                        var smfFadeFrom = {"r": 250, "g": 250, "b": 250}, smfFadeTo = {"r": 40, "g": 40, "b": 40};
                                        // Surround each item with... anything special?
                                        var smfFadeBefore = "<b>", smfFadeAfter = "</b>";

var foreColor, backEl, backColor;

if (typeof(document.getElementById(\'smfFadeScroller\').currentStyle) != "undefined")
{
foreColor = document.getElementById(\'smfFadeScroller\').currentStyle.color.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};

backEl = document.getElementById(\'smfFadeScroller\');
while (backEl.currentStyle.backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined")
backEl = backEl.parentNode;

backColor = backEl.currentStyle.backgroundColor.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
smfFadeTo = {"r": eval("0x" + backColor[1]), "g": eval("0x" + backColor[2]), "b": eval("0x" + backColor[3])};
}
else if (typeof(window.opera) == "undefined" && typeof(document.defaultView) != "undefined")
{
foreColor = document.defaultView.getComputedStyle(document.getElementById(\'smfFadeScroller\'), null).color.match(/rgb\((\d+), (\d+), (\d+)\)/);
smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};

backEl = document.getElementById(\'smfFadeScroller\');
while (document.defaultView.getComputedStyle(backEl, null).backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined" && typeof(backEl.parentNode.tagName) != "undefined")
backEl = backEl.parentNode;

backColor = document.defaultView.getComputedStyle(backEl, null).backgroundColor.match(/rgb\((\d+), (\d+), (\d+)\)/);
smfFadeTo = {"r": parseInt(backColor[1]), "g": parseInt(backColor[2]), "b": parseInt(backColor[3])};
}

// List all the lines of the news for display.
var smfFadeContent = new Array(
"'
implode('",
"'
$context['fader_news_lines']), '"
);
// ]]></script>
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/fader.js"></script>
</td>
</tr>
</table>
</div>'
;
        }

        
/* Each category in categories is made up of:
                id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?),
                new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down iamge),
                and boards. (see below.) */
        
foreach ($context['categories'] as $category)
        {
                echo 
'
<div class="tborder"><table border="0" width="100%" cellspacing="1" cellpadding="5">
        <tr>
                <td colspan="4" class="catbg'
$category['new'] ? '2' '''" height="18">';

                
// If this category even can collapse, show a link to collapse it.
                
if ($category['can_collapse'])
                        echo 
'
                        <a href="'
$category['collapse_href'], '">'$category['collapse_image'], '</a>';

                echo 
'
                        '
$category['link'], '
                </td>
        </tr>'
;

                
// Assuming the category hasn't been collapsed...
                
if (!$category['is_collapsed'])
                {
                        
/* Each board in each category's boards has:
                                new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.),
                                children (see below.), link_children (easier to use.), children_new (are they new?),
                                topics (# of), posts (# of), link, href, and last_post. (see below.) */
                        
foreach ($category['boards'] as $board)
                        {
                                echo 
'
        <tr>
<td class="windowbg" width="6%" align="center" valign="top"><a href="'
$scripturl'?action=unread;board='$board['id'], '.0">';

                                
// If the board is new, show a strong indicator.
                                
if ($board['new'])
                                        echo 
'<img src="'$settings['images_url'], '/on.gif" alt="'$txt[333], '" title="'$txt[333], '" border="0" />';
                                
// This board doesn't have new posts, but its children do.
                                
elseif ($board['children_new'])
                                        echo 
'<img src="'$settings['images_url'], '/on2.gif" alt="'$txt[333], '" title="'$txt[333], '" border="0" />';
                                
// No new posts at all!  The agony!!
                                
else
                                        echo 
'<img src="'$settings['images_url'], '/off.gif" alt="'$txt[334], '" title="'$txt[334], '" border="0" />';
// Colorize board mod start
echo '</a>
</td>
<td class="windowbg2">
<strong><a href="'
$board['href'], '" name="b'$board['id'], '">';
if (!empty($board['bcolor']))
echo '<span style="color: '$board['bcolor'], ';">'$board['name'], '</span>';
else
echo $board['name'];
echo '</a></strong>';
if (!empty($board['description']))
{
echo '<br />';
if (!empty($board['dcolor']))
echo '<span style="color: '$board['dcolor'], ';">'$board['description'], '</span>';
else
echo $board['description'];
}
// Colorize board mod ends

                        
                                // Show the "Moderators: ".  Each has name, href, link, and id. (but we're gonna use link_moderators.)
                                
if (!empty($board['moderators']))
                                        echo 
'
                        <div style="padding-top: 1px;" class="smalltext"><i>'
count($board['moderators']) == $txt[298] : $txt[299], ': 'implode(', '$board['link_moderators']), '</i></div>';

                                
// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
                                
if (!empty($board['children']))
                                {
                                        
// Sort the links into an array with new boards bold so it can be imploded.
                                        
$children = array();
                                        
/* Each child in each board's children has:
                                                id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
                                        
foreach ($board['children'] as $child)
                                        {
                                                
$child['link'] = '<a href="' $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' $txt[330] . ': ' $child['topics'] . ', ' $txt[21] . ': ' $child['posts'] . ')">' $child['name'] . '</a>';
                                                
$children[] = $child['new'] ? '<b>' $child['link'] . '</b>' $child['link'];
                                        }

                                        echo 
'
                        <div style="padding-top: 1px;" class="smalltext"><i>'
$txt['parent_boards'], ': 'implode(', '$children), '</i></div>';
                                }

                                
// Show some basic information about the number of posts, etc.
                                // Colorize board start
echo '
</td>
<td class="windowbg" valign="middle" align="center" style="width: 12ex;">'
;
if (!empty($board['bcolor']))
echo '<span style="color: '$board['bcolor'], ';" class="smalltext">';
else
echo '<span class="smalltext">';
echo '
'
$board['posts'], ' '$txt[21], ' <br />
'
$board['topics'],' '$txt[330], '
</span></td>
<td class="windowbg2" valign="middle" width="22%">
<span class="smalltext">'
;
// Colorize board ends

                                /* The board's and children's 'last_post's have:
                                        time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
                                        link, href, subject, start (where they should go for the first unread post.),
                                        and member. (which has id, name, link, href, username in it.) */
                                
if (!empty($board['last_post']['id']))
                                        echo 
'
                        '
$txt[22], ' '$txt[30], ' '$board['last_post']['time'], '<br />
                        '
$txt['smf88'], ' '$board['last_post']['link'], ' '$txt[525], ' '$board['last_post']['member']['link'];

                                echo 
'
                </span></td>
        </tr>'
;
                        }
                }

                echo 
'
</table></div>
<br />'
;
        }

        if (
$context['user']['is_logged'])
        {
                echo 
'
<div class="tborder" style="padding: 3px;"><table border="0" width="100%" cellspacing="0" cellpadding="5">
        <tr class="titlebg">
<td align="'
, !$context['right_to_left'] ? 'left' 'right''" class="smalltext">
                        <img src="' 
$settings['images_url'] . '/new_some.gif" alt="" border="0" align="middle" /> '$txt[333], '
                        <img src="' 
$settings['images_url'] . '/new_none.gif" alt="" border="0" align="middle" style="margin-left: 4ex;" /> '$txt[334], '
                </td>
<td align="'
, !$context['right_to_left'] ? 'right' 'left''" class="smalltext">';
                
// Show the mark all as read button?
if ($settings['show_mark_read'] && !empty($context['categories']))
                        echo 
'
<a href="'
$scripturl'?action=markasread;sa=all;sesc=' $context['session_id'] . '">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/markread.gif" alt="' $txt[452] . '" border="0" />' $txt[452]), '</a>';
                echo 
'
                </td>
        </tr>
</table></div>'
;
        }

        
// Here's where the "Info Center" starts...
        
echo '
<br />
<div class="tborder"><table border="0" width="100%" cellspacing="1" cellpadding="4">
        <tr class="titlebg">
                <td align="center" colspan="2">'
$txt[685], '</td>
        </tr>'
;

        
// This is the "Recent Posts" bar.
        
if (!empty($settings['number_recent_posts']))
        {
                echo 
'
        <tr>
                <td class="catbg" colspan="2">'
$txt[214], '</td>
        </tr>
        <tr>
                <td class="windowbg" width="20" valign="middle" align="center">
                        <a href="'
$scripturl'?action=recent">
                                <img src="'
$settings['images_url'], '/post/xx.gif" alt="'$txt[214], '" border="0" /></a>
                </td>
                <td class="windowbg2">'
;

                
// Only show one post.
                
if ($settings['number_recent_posts'] == 1)
                {
                        
// latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.)
                        
echo '
                        <b><a href="'
$scripturl'?action=recent">'$txt[214], '</a></b>
                        <div class="smalltext">
                                '
$txt[234], ' &quot;'$context['latest_post']['link'], '&quot; '$txt[235], ' ('$context['latest_post']['time'], ')<br />
                        </div>'
;
                }
                
// Show lots of posts.
                
elseif (!empty($context['latest_posts']))
                {
                        echo 
'
                        <table width="100%" border="0">'
;
                        
/* Each post in latest_posts has:
                                board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
                                subject, short_subject (shortened with...), time, link, and href. */
                        
foreach ($context['latest_posts'] as $post)
                                echo 
'
                                <tr>
                                        <td align="right" valign="top" nowrap="nowrap">['
$post['board']['link'], ']</td>
                                        <td valign="top">'
$post['link'], ' '$txt[525], ' '$post['poster']['link'], '</td>
                                        <td align="right" valign="top" nowrap="nowrap">'
$post['time'], '</td>
                                </tr>'
;
                        echo 
'
                        </table>'
;
                }
                echo 
'
                </td>
        </tr>'
;
        }

        
// Show information about events, birthdays, and holidays on the calendar.
        
if ($context['show_calendar'])
        {
                echo 
'
        <tr>
                <td class="catbg" colspan="2">'
$context['calendar_only_today'] ? $txt['calendar47b'] : $txt['calendar47'], '</td>
        </tr><tr>
                <td class="windowbg" width="20" valign="middle" align="center">
                        <a href="'
$scripturl'?action=calendar">
                                <img src="'
$settings['images_url'], '/icons/calendar.gif" width="20" alt="'$txt['calendar24'], '" border="0" /></a>
                </td>
                <td class="windowbg2" width="100%">
                        <span class="smalltext">'
;

                
// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.
                
if (!empty($context['calendar_holidays']))
                        echo 
'
                                <span style="color: #'
$modSettings['cal_holidaycolor'], ';">'$txt['calendar5'], ' 'implode(', '$context['calendar_holidays']), '</span><br />';

                
// People's birthdays.  Like mine.  And yours, I guess.  Kidding.
                
if (!empty($context['calendar_birthdays']))
                {
                        echo 
'
                                <span style="color: #'
$modSettings['cal_bdaycolor'], ';">'$context['calendar_only_today'] ? $txt['calendar3'] : $txt['calendar3b'], '</span> ';
                        
/* Each member in calendar_birthdays has:
                                id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) */
                        
foreach ($context['calendar_birthdays'] as $member)
                                echo 
'
                                <a href="'
$scripturl'?action=profile;u='$member['id'], '">'$member['is_today'] ? '<b>' ''$member['name'], $member['is_today'] ? '</b>' '', isset($member['age']) ? ' (' $member['age'] . ')' '''</a>'$member['is_last'] ? '<br />' ', ';
                }
                
// Events like community get-togethers.
                
if (!empty($context['calendar_events']))
                {
                        echo 
'
                                <span style="color: #'
$modSettings['cal_eventcolor'], ';">'$context['calendar_only_today'] ? $txt['calendar4'] : $txt['calendar4b'], '</span> ';
                        
/* Each event in calendar_events should have:
                                title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. */
                        
foreach ($context['calendar_events'] as $event)
                                echo 
'
'
$event['can_edit'] ? '<a href="' $event['modify_href'] . '" style="color: #FF0000;">*</a> ' ''$event['href'] == '' '' '<a href="' $event['href'] . '">'$event['is_today'] ? '<b>' $event['title'] . '</b>' $event['title'], $event['href'] == '' '' '</a>'$event['is_last'] ? '<br />' ', ';

                        
// Show a little help text to help them along ;).
                        
if ($context['calendar_can_edit'])
                                echo 
'
                                (<a href="'
$scripturl'?action=helpadmin;help=calendar_how_edit" onclick="return reqWin(this.href);">'$txt['calendar_how_edit'], '</a>)';
                }
                echo 
'
                        </span>
                </td>
        </tr>'
;
        }

        
// Show a member bar.  Not heavily ornate, but functional at least.
        
if ($settings['show_member_bar'])
        {
                echo 
'
        <tr>
                <td class="catbg" colspan="2">'
$txt[331], '</td>
        </tr>
        <tr>
<td class="windowbg" width="20" valign="middle" align="center">
'
$context['show_member_list'] ? '<a href="' $scripturl '?action=mlist">' '''<img src="'$settings['images_url'], '/icons/members.gif" alt="'$txt[332], '" border="0" />'$context['show_member_list'] ? '</a>' '''
</td>
<td class="windowbg2" width="100%">
<b>'
$context['show_member_list'] ? '<a href="' $scripturl '?action=mlist">' $txt[332] . '</a>' $txt[332], '</b>
<div class="smalltext">'
$txt[200], '</div>
</td>
</tr>'
;
        }

        
// Show YaBB SP1 style information...
        
if ($settings['show_sp1_info'])
        {
                echo 
'
        <tr>
                <td class="catbg" colspan="2">'
$txt[645], '</td>
        </tr>
        <tr>
                <td class="windowbg" width="20" valign="middle" align="center">
                        <a href="'
$scripturl'?action=stats">
                                <img src="'
$settings['images_url'], '/icons/info.gif" alt="'$txt[645], '" border="0" /></a>
                </td>
                <td class="windowbg2" width="100%">
                        <table border="0" width="90%"><tr>
                                <td class="smalltext">
<div style="float: '
, !$context['right_to_left'] ? 'left' 'right''; width: 50%;">'$txt[490], ': <b>'$context['common_stats']['total_topics'], '</b></div>'$txt[489], ': <b>'$context['common_stats']['total_posts'], '</b><br />', !empty($context['latest_post']) ? '
                                        ' 
$txt[659] . ': &quot;' $context['latest_post']['link'] . '&quot;  (' $context['latest_post']['time'] . ')<br />' '''
                                        <a href="'
$scripturl'?action=recent">'$txt[234], '</a>'$context['show_stats'] ? '<br />
                                        <a href="' 
$scripturl '?action=stats">' $txt['smf223'] . '</a>' '''
                                </td>
                                <td width="32%" class="smalltext" valign="top">
'
$txt[488], ': <b><a href="'$scripturl'?action=mlist">'$context['common_stats']['total_members'], '</a></b><br />
'
$txt[656], ': <b>'$context['common_stats']['latest_member']['link'], '</b><br />';
                
// If they are logged in, show their unread message count, etc..
                
if ($context['user']['is_logged'])
                        echo 
'
                                        '
$txt['smf199'], ': <b><a href="'$scripturl'?action=pm">'$context['user']['messages'], '</a></b> '$txt['newmessages3'], ': <b><a href="'$scripturl'?action=pm">'$context['user']['unread_messages'], '</a></b>';
                echo 
'
                                </td>
                        </tr></table>
                </td>
        </tr>'
;
        }

        
// "Users online" - in order of activity.
        
echo '
        <tr>
                <td class="catbg" colspan="2">'
$txt[158], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
'
$context['show_who'] ? '<a href="' $scripturl '?action=who">' '''<img src="'$settings['images_url'], '/icons/online.gif" alt="'$txt[158], '" border="0" />'$context['show_who'] ? '</a>' '''
</td>
<td class="windowbg2" width="100%">'
;

if ($context['show_who'])
echo '
<a href="'
$scripturl'?action=who">';

echo $context['num_guests'], ' '$context['num_guests'] == $txt['guest'] : $txt['guests'], ', ' $context['num_users_online'], ' '$context['num_users_online'] == $txt['user'] : $txt['users'];

// Handle hidden users and buddies.
if (!empty($context['num_users_hidden']) || ($context['show_buddies'] && !empty($context['show_buddies'])))
{
echo ' (';

// Show the number of buddies online?
if ($context['show_buddies'])
echo $context['num_buddies'], ' '$context['num_buddies'] == $txt['buddy'] : $txt['buddies'];

// How about hidden users?
if (!empty($context['num_users_hidden']))
echo $context['show_buddies'] ? ', ' ''$context['num_users_hidden'] . ' ' $txt['hidden'];

echo ')';
}

if ($context['show_who'])
echo '</a>';

echo '
<div class="smalltext">'
;

        
// Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
        
if (!empty($context['users_online']))
                echo 
'
                                '
$txt[140], ':<br />'implode(', '$context['list_users_online']);

        echo 
'
                                <br />'
$context['show_stats'] && !$settings['show_sp1_info'] ? '
                                <a href="' 
$scripturl '?action=stats">' $txt['smf223'] . '</a>' '''
</div>
                </td>
        </tr>'
;

        
// If they are logged in, but SP1 style information is off... show a personal message bar.
        
if ($context['user']['is_logged'] && !$settings['show_sp1_info'])
        {
                echo 
'
        <tr>
                <td class="catbg" colspan="2">'
$txt[159], '</td>
        </tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
'
$context['allow_pm'] ? '<a href="' $scripturl '?action=pm">' '''<img src="'$settings['images_url'], '/message_sm.gif" alt="'$txt[159], '" border="0" />'$context['allow_pm'] ? '</a>' '''
</td>
                <td class="windowbg2" valign="top">
                        <b><a href="'
$scripturl'?action=pm">'$txt[159], '</a></b>
                        <div class="smalltext">
                                '
$txt[660], ' '$context['user']['messages'], ' '$context['user']['messages'] == $txt[471] : $txt[153], '.... '$txt[661], ' <a href="'$scripturl'?action=pm">'$txt[662], '</a> '$txt[663], '
                        </div>
                </td>
        </tr>'
;
        }

        
// Show the login bar. (it's only true if they are logged out anyway.)
        
if ($context['show_login_bar'])
        {
                echo 
'
        <tr>
                <td class="catbg" colspan="2">'
$txt[34], ' <a href="'$scripturl'?action=reminder" class="smalltext">(' $txt[315] . ')</a></td>
        </tr>
        <tr>
                <td class="windowbg" width="20" align="center">
                        <a href="'
$scripturl'?action=login">
                                <img src="'
$settings['images_url'], '/icons/login.gif" alt="'$txt[34], '" border="0" /></a>
                </td>
                <td class="windowbg2" valign="middle">
                        <form action="'
$scripturl'?action=login2" method="post" style="margin: 0;">
                                <table border="0" cellpadding="2" cellspacing="0" align="center" width="100%"><tr>
                                        <td valign="middle" align="left">
                                                <label for="user"><b>'
$txt[35], ':</b><br /><input type="text" name="user" id="user" size="15" /></label>
                                        </td>
                                        <td valign="middle" align="left">
                                                <label for="passwrd"><b>'
$txt[36], ':</b><br /><input type="password" name="passwrd" id="passwrd" size="15" /></label>
                                        </td>
                                        <td valign="middle" align="left">
                                                <label for="cookielength"><b>'
$txt[497], ':</b><br /><input type="text" name="cookielength" id="cookielength" size="4" maxlength="4" value="'$modSettings['cookieTime'], '" /></label>
                                        </td>
                                        <td valign="middle" align="left">
                                                <label for="cookieneverexp"><b>'
$txt[508], ':</b><br /><input type="checkbox" name="cookieneverexp" id="cookieneverexp" checked="checked" class="check" /></label>
                                        </td>
                                        <td valign="middle" align="left">
                                                <input type="submit" value="'
$txt[34], '" />
                                        </td>
                                </tr></table>
                        </form>
                </td>
        </tr>'
;
        }

        echo 
'
</table></div>'
;
}

?>

Title: Re: ColorizePost
Post by: Bulakbol on March 30, 2008, 04:43:38 PM
@Eliana Tamerin.  Thanks Eliana.

@Mystiquo. I'll get back to you after editing your BoardIndex.template.php.

<EDIT>
I have to apologize for being mixed-up Mystiquo. It's the Display.template.php that I need. Luckily, there's no Display.template.php in Cerberus theme so you are okay. No files to be edited. This mod should work. Go to Admin -> Permissions -> (select group). Under "Members Profiles" category, tick the "Allow this group to colorize their messages?". Then go to your Profile -> Look and Layout Preferences, and at the bottom, enter the color you want for your messages.
</EDIT>
Title: Re: ColorizePost
Post by: Mystiquo on March 30, 2008, 09:19:19 PM
nothing italian
nothing english
you see it
Title: Re: ColorizePost
Post by: Bulakbol on March 31, 2008, 01:19:22 AM
Hi Mystiquo. It looks like the mod wasn't installed properly. Are there any errors when you installed the mod?  Can you provide a link to your forum?
Title: Re: ColorizePost
Post by: Manu.G on March 31, 2008, 05:45:59 AM
Quote from: JohnyB on March 29, 2008, 08:01:45 PM
@Manu0372. Thanks again for the language translation. Let me know if it is the last one so I can add them all and update the package.

I think that was it for the moment with translations. When I get more translations,
I will gather them and send all together to you. ;)
Title: Re: ColorizePost
Post by: Mystiquo on March 31, 2008, 07:48:09 PM
what do you file want?
Can  do you do list of file that i do edit? and  what?
Title: Re: ColorizePost
Post by: Mystiquo on March 31, 2008, 09:12:02 PM
scuse me for all but now it's ok
i'm confused with colorize board
but
   
How can I have the object of the post color? And have the function enables or disables single object for the post?
Thanks thanks thanks
Title: Re: ColorizePost
Post by: Bulakbol on April 01, 2008, 01:11:55 AM
@Manu0372. Thanks. I'll update the package today with your translations.


@Mystiqou. This mod if you give your members permission to use it, they can enter a color in their Profile. If there's nothing in their profile, this mod will use the membergroup color or postgroup color if defined. Let me know what you want to do with the color and I'll tell you which codes to delete.

To disable the color, leave the textbox blank. To disable all colors, uninstall the mod.   :D
Title: Re: ColorizePost
Post by: Mystiquo on April 01, 2008, 03:58:31 AM
but the object of post? it's possible have color?
Title: Re: ColorizePost
Post by: Bulakbol on April 01, 2008, 04:04:50 AM
You mean the subject? Nope. This mod colorize only the message or post. Coloring a subject (topic) is different and there's no mod yet AFAIK. But if you want to color a topic, there's a topic about it.
Title: Re: ColorizePost
Post by: Mystiquo on April 01, 2008, 01:30:06 PM
yes i want thanks for all
Title: Re: ColorizePost
Post by: Bulakbol on April 02, 2008, 08:03:44 PM
Quote from: Mystiquo on April 01, 2008, 01:30:06 PM
yes i want thanks for all

If you want to color your topic, see this topic.

http://www.simplemachines.org/community/index.php?topic=231197.0

Title: Re: ColorizePost
Post by: Manu.G on April 07, 2008, 05:50:03 PM
Hi it's me again.

Today we made some changes in our forum, we have add 2 color themes in our
forum, everything looks good, but there is a little different between the themes.
In the blue theme the colorize posts are to seen, but not in the red theme.
In the red theme in the posts is still the default font color of the theme to see.

None of the new themes is having own templates, the layouts are only color schemes,
but why aren't to see in both layouts?
Title: Re: ColorizePost
Post by: Bulakbol on April 07, 2008, 06:59:26 PM
Hi Manu0372. The program will check to see if the poster and the viewer have the same theme. If they use the same theme, it uses the color from your profile, otherwise it will use the default color. The purpose is if you use light color and the theme is light color too, it will be no good. Try using the same theme and you'll see the color.
Title: Re: ColorizePost
Post by: Manu.G on April 07, 2008, 07:28:02 PM
Ah ok (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fforum.arseniums.com%2FSmileys%2Fdefault%2F40.gif&hash=4dd185f59556b5cdf88880d46069911cc2f2b197)
And I thought I made a mistake. (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fforum.arseniums.com%2FSmileys%2Fdefault%2F18.gif&hash=30a5198b5ebcb1a4098152692f734a73241c1818)

When I checked it with the colorize posts I was using an other theme than
the poster was using.
Doesn't matter, most of our members will use the same theme and wont see the
different. ;)

Thanks for your quick reply.  :)
Title: Re: ColorizePost
Post by: Bulakbol on April 07, 2008, 07:32:55 PM
You are welcome Manu0372. Just post when you need assistance so I can hide.  :P haha (kidding)  :D
Title: Re: ColorizePost
Post by: Violat3r on April 23, 2008, 11:52:26 PM
Hey JohnyB, i dont know if its just my forum or not, but does this mod work with the QuickEdit feature? because it doesnt with my forum. Any time i use the Quick Edit, it will post normally with the default color and not the color we choose as our posting color.
Title: Re: ColorizePost
Post by: Mystiquo on April 29, 2008, 06:12:20 AM
hello excuse me, but it is possible to make sure that if I write with a color posts that I have already written not change color?
Title: Re: ColorizePost
Post by: Bulakbol on May 02, 2008, 01:29:52 PM
@Violat3r.
     Sorry for the late reply. It should work because what it does is read the color from profile and use it before displaying a post. It only work after posting and not while posting.

@Mystiquo.
   Sorry Mystiquo. This mod does not add any bbc code to any post so, the color will change whenever they change their color.

Title: Re: ColorizePost
Post by: Marcus Forsberg on May 17, 2008, 02:44:02 AM
Could u help me install this on Kelo-lt?
Title: Re: ColorizePost
Post by: Bulakbol on May 17, 2008, 03:41:44 PM
What help are you seeking MTF95?
Title: Re: ColorizePost
Post by: Marcus Forsberg on May 17, 2008, 03:53:33 PM
The theme uses custom files so the posts reamains uncolored.
Could you edit the files for me so that it works?
Title: Re: ColorizePost
Post by: Bulakbol on May 18, 2008, 12:20:46 AM
It's very easy. Only 5 lines to add in your Display.template.php. Use the Parser and in Display.template.php, find $message['body']. 
Title: Re: ColorizePost
Post by: Violat3r on June 12, 2008, 09:54:25 PM
Quote from: JohnyB on May 02, 2008, 01:29:52 PM
@Violat3r.
     Sorry for the late reply. It should work because what it does is read the color from profile and use it before displaying a post. It only work after posting and not while posting.

Lol sorry, it now took ME forever to respond. But yea, i was messing around with it more and i realized it DOES work with the quick edit, and as you said AFTER everything. I tried to quick edit and then save a post and it didnt turn green after i did it it just went back to the forum default (white). But once i REFRESHED the page, it turned green again lol. So yea, thanx for showing me my wee little mistake lol Peace ~ Vio
Title: Re: ColorizePost
Post by: TheEffortless on July 19, 2008, 09:52:52 AM
Hey having some problems..

I installed your mod a while ago (can't remember when sorry) but uninstalled a few days later because it just wasn't for me. Then recently my forum started going slow so i did a bit of investigating and checked out my errors.

Every time a page is loaded i get spammed with 26 errors. It is really just 2 errors but im getting each 13 times one after the other, normally i wouldn't care but this is mounting up at a ridiculous rate lol

The errors are;

Quote8: Undefined index: post_group_color
File: /home/adam121/public_html/saints/forum/Sources/Display.php
Line: 915

Quote8: Undefined index: post_color
File: /home/adam121/public_html/saints/forum/Themes/default/Display.template.php (eval?)
Line: 440


this is the area around line 915 in display.php (i've marked line our line 915)

),
'body' => $message['body'],


'post_color' => $memberContext['post_group_color'],                                                          // this isn't in the file, this is just me saying this is line 915.
'new' => empty($message['isRead']),
'first_new' => isset($context['start_from']) && $context['start_from'] == $counter,
'can_modify' => (!$context['is_locked'] || allowedTo('moderate_board')) && (allowedTo('modify_any') || (allowedTo('modify_replies') && $context['user']['started']) || (allowedTo('modify_own') && $message['ID_MEMBER'] == $ID_MEMBER && (empty($modSettings['edit_disable_time']) || $message['posterTime'] + $modSettings['edit_disable_time'] * 60 > time()))),
'can_remove' => allowedTo('delete_any') || (allowedTo('delete_replies') && $context['user']['started']) || (allowedTo('delete_own') && $message['ID_MEMBER'] == $ID_MEMBER && (empty($modSettings['edit_disable_time']) || $message['posterTime'] + $modSettings['edit_disable_time'] * 60 > time())),
'can_see_ip' => allowedTo('moderate_forum') || ($message['ID_MEMBER'] == $ID_MEMBER && !empty($ID_MEMBER)),
)


this is the area around line 440 in Display.template.php (i've marked out line 440)

// Show the post itself, finally!

$board_post_color_array = explode(",",$modSettings['board_post_color']);
if (!in_array($board['id'], $board_post_color_array))
{
$message['body'] = '<span style="color: '.$message['member']['post_color'].'">'.$message['body'].'</span>';                                           // this isn't in the file, this is just me saying this is line 440.
}
echo '


In the past iv'e just sat down and tried to work out these errors on my own but last time i did that i ended up causing more problems then i had in the first place.. so i decided this time ill ask the experts :)

any help with getting rid of these errors will be much appreciated :D if you need any other details please just ask :)
Title: Re: ColorizePost
Post by: JimM on July 19, 2008, 03:24:09 PM
It appears that the mod didn't uninstall completely.  You can use the mod parser on the modifications page to see what the edits are and remove them manually.
Title: Re: ColorizePost
Post by: Bulakbol on July 19, 2008, 06:49:49 PM
Maybe he tried JimM but he didn't find it. It is because this mod does not modify the Sources/Display.php.

@TheEffortless
   This mod use the variable $message['member']['post_color'] in the Display.template.php but I'm afraid it is not the one that you posted.  This mod does not use the in_array function. You probably installed another mod that conflicted with this mod. Sorry, I can't help you.
Title: Re: ColorizePost
Post by: TheEffortless on July 19, 2008, 07:34:31 PM
Quote from: JohnyB on July 19, 2008, 06:49:49 PM
Maybe he tried JimM but he didn't find it. It is because this mod does not modify the Sources/Display.php.

@TheEffortless
   This mod use the variable $message['member']['post_color'] in the Display.template.php but I'm afraid it is not the one that you posted.  This mod does not use the in_array function. You probably installed another mod that conflicted with this mod. Sorry, I can't help you.

No problem :) i wasn't 100% sure it was this mod but the color thing pointed me in this direction. Ill go hunt around some more :D
Title: Re: ColorizePost
Post by: ArkServer on July 19, 2008, 07:40:09 PM
I havent read all the pages yet but is it possible to set a color to an entire group but no one can change their post color individually?
Title: Re: ColorizePost
Post by: TheEffortless on July 19, 2008, 07:42:49 PM
Ok i think i found what caused my problem, havn't checked yet but if it worked ill edit this.

The mod was http://custom.simplemachines.org/mods/index.php?mod=525
Title: Re: ColorizePost
Post by: Bulakbol on July 19, 2008, 08:24:01 PM
@ArkServer
   You can use post group color or membergroup color without using any mod. Which one would you like to use first? Membergroup color if available or post group color if not?

@TheEffortless
   I checked that mod and you found the right one. Good luck.
Title: Re: ColorizePost
Post by: ArkServer on July 20, 2008, 03:55:52 PM
Is that a trick question ? :D uhm.. let me think. :D!
Title: Re: ColorizePost
Post by: Bulakbol on July 22, 2008, 06:37:56 AM
You can use $message['member']['post_group_color'] variables to change post color in default/Display.template.php. Try this. Find
<div class="post"', $message['can_modify'] ? ' id="msg_' . $message['id'] . '"' : '', '>', $message['body'], '
and replace with
<div class="post"', $message['can_modify'] ? ' id="msg_' . $message['id'] . '"' : '', ' style="color:', $message['member']['post_group_color'], ';">', $message['body'], '
Title: Re: ColorizePost
Post by: Bulakbol on August 17, 2008, 11:56:16 PM
I am thinking about adding font face and font size together with the color. I wonder if you people will use it.  I'll use dropdown menu for all three. Image attached.

Title: Re: ColorizePost
Post by: Eliana Tamerin on August 18, 2008, 06:27:47 AM
I dislike the color dropdown. IMHO, the color input like we have now is better, it allows for more variety.
Title: Re: ColorizePost
Post by: Bulakbol on August 19, 2008, 08:26:59 PM
It's true Eliana. Maybe I should leave the color prompt as it is. The font face and font size that I am thinking of adding will use drop down menu.
Title: Re: ColorizePost
Post by: gheybo on October 02, 2008, 02:57:45 AM
Hello JohnyB,

Thank you for such a wonderful mod, I really like it. However the drop down menu for the Colors and Font Face is not showing any samples. The only one that is working fine is the Font Size.

So I had to do a trial and error, as it was all blank I just chose whichever and then save that hoping I got the right color and font size hahaha

Hope this could be fix, nevertheless it's a wonderful work. Thank you!
Title: Re: ColorizePost
Post by: Bulakbol on October 03, 2008, 02:41:33 PM
@gheybo
Maybe the mod wasn't installed properly. Attach your Profile.template.php and I'll check it for you and edit it if needed.
Title: Re: ColorizePost
Post by: Atheo on December 11, 2008, 12:16:04 PM
Hi Bulakbol,

I am using 1.1.7 with a custom theme. Anyway of installing this mod for that? Thank you.
Title: Re: ColorizePost
Post by: Bulakbol on December 11, 2008, 07:01:56 PM
@Atheo
You have to edit your Display.template.php manually. Which theme? Attach your custom Display.template.php and I'll see what I can do.
Title: Re: ColorizePost
Post by: Bulakbol on February 25, 2009, 10:14:41 PM
Update released for version SMF 2.0 RC1.
Title: Re: ColorizePost (are we allowed to ask about it here?)
Post by: gbsothere on February 27, 2009, 01:21:42 AM
My board is SMF 1.1.8.  I installed ColorizePost 2.0 (found here) (http://custom.simplemachines.org/mods/index.php?mod=1061) because my posters were clamoring for a default font color.  I found it by choosing the link in Modifications that says "search for mods for your own version" and clicked on 1.1.8 to search.  It was installed via the Packages Manager in Admin.   It might actually work well, if I could just get past this point.  When I test it in my profile and choose a default color, I get this message:

Unknown column 'post_color' in 'field list'
File: /var/www/vhosts/whereikeepmystuff.com/httpdocs/smf/Sources/Subs.php
Line: 631

Here's where I'm confused.   I pulled the file directly off my ftp and looked at it, even using my text editors full search and found line 631 but I can't find anything that the error is referring to.  The words 'post_color' simply aren't there.  Then I took the Subs file out of the SMF folder that sits on my desktop and uploaded it again, but I get this same error.  It's a bummer, because the posters have been begging for this feature and I was pretty excited to spring it on them.

I'm new at this, so I apologize in advance if my question is ignorant.  I would just let it go, but, as I said, we were so looking forward to something like this.
Title: Re: ColorizePost
Post by: spazz on February 27, 2009, 09:12:55 AM
okie dokie

my tech support actually installed this mod. i don't see it under premissions. But it seems like in the profile under layout options that the code is there. but the scroll bars are blank accept for text? I have no idea.

Title: Re: ColorizePost
Post by: gbsothere on March 01, 2009, 03:56:51 PM
I was finally able to install ColorizePost 2.0 (SMF 1.1.8 ) and my posters are ecstatic.  This is, by far, their favorite feature of the entire forum.


I only have two questions; they may be issues you've heard of before but I've not found them on this thread.

1.)  Is it normal that when you have a default color/font set in your profiles and you quote someone in a post, the quote loses all its color and font and becomes very small and hard to read? 

2.)  Is it normal that what you type appears black as you type, no matter what your default is and doesn't appear as color in Preview (even though it does post correctly)?



If these are not normal and there are file edits you recommend, I would really appreciate it.



It is an amazing mod and my posters just love it.   There is a "What Is Your Favorite Feature" thread and this won, hands down. 


EDIT:  I  just read back over this and I somehow manage to make the word "normal" seem sarcastic.  I don't mean to do that, at all.  I botched that.  *grin*  Thanks.
Title: Re: ColorizePost
Post by: Bulakbol on March 02, 2009, 09:52:03 PM
@gbsothere
This mod will only use the color, size and font style for displaying posts. They are not used anywhere else (typing, previewing etc.) They are not saved in the database so when you quote a message, the features are lost. The size of text in a quoted message will depend on the text size defined in your CSS.

Title: Re: ColorizePost
Post by: gbsothere on March 05, 2009, 10:08:19 PM
Quote from: Bulakbol on March 02, 2009, 09:52:03 PM
@gbsothere
This mod will only use the color, size and font style for displaying posts. They are not used anywhere else (typing, previewing etc.) They are not saved in the database so when you quote a message, the features are lost. The size of text in a quoted message will depend on the text size defined in your CSS.


Thank you for explaining it; I understand, now.

My posters have always asked me to try to find something that would let them set a default color in their profiles so that they wouldn't have to select a color every time they post and they are ecstatic about this mod; I can't tell you how happy they are.  *grin*

Thanks so much!


Title: Re: ColorizePost
Post by: Tracey12 on March 19, 2009, 06:58:31 PM
How do I get this modification to work on other themes?
Title: Re: ColorizePost
Post by: xxwckdxx on March 21, 2009, 03:21:55 AM
I got a problem....when i installed the mod i got a "Load.php" error so i manually edited load.php.....then i installed the mod....when i got to the profiles it is there i select a color save profile and the color is displayed as it should above the drop down menus.....but when i post with it.....it doesnt work for all members...for instance my "Admin" username it works for but my other username "Rss Feed Bot" it doesnt....ive installed this mod before on other forums and never got any errors....but the other forums never had "google map mod" either and i see its in a section of the load.php where i had to manually add the codes i dont know if something with it is causing the problem.....

thanks in advance

xxwckdxx
Title: Re: ColorizePost
Post by: xxwckdxx on March 21, 2009, 03:34:23 AM
heres my load.php

Title: Re: ColorizePost
Post by: Bulakbol on March 28, 2009, 02:20:57 PM
@Tracey12
Quote from: Tracey12 on March 19, 2009, 06:58:31 PM
How do I get this modification to work on other themes?

If your custom theme isn't supported, you have to edit your Display.template.php file manually.

@xxwckdxx
I'll get back to you.

<edit>
Your Load.php looks fine.  This mod detects the theme a poster is using and the color works only if the poster and the reader are using the same theme.
Title: Re: ColorizePost
Post by: xxwckdxx on March 28, 2009, 02:24:43 PM
Bulakol sorry didnt update this post i restored a backup because i was having a couple other problems and i got it working anyway to add "bold, italic, underline" in the future?
Title: Re: ColorizePost
Post by: Bulakbol on March 28, 2009, 02:35:04 PM
Opps sorry. I didn't notice your reply. I am not sure if I will add those features. I was thinking that posters can use the bbc so I did only the color, font and size.
Title: Re: ColorizePost
Post by: Tracey12 on April 09, 2009, 10:25:13 PM
Quote from: Bulakbol on March 28, 2009, 02:20:57 PM
@Tracey12
Quote from: Tracey12 on March 19, 2009, 06:58:31 PM
How do I get this modification to work on other themes?

If your custom theme isn't supported, you have to edit your Display.template.php file manually.


What do I need to add to my Display.template.php file?
Title: Re: ColorizePost
Post by: Bulakbol on April 11, 2009, 03:08:00 AM
@Tracey12
Which theme are you using?
Title: Re: ColorizePost
Post by: Tracey12 on April 12, 2009, 06:29:33 PM
Quote from: Bulakbol on April 11, 2009, 03:08:00 AM
@Tracey12
Which theme are you using?

OverViewLight.
Title: Re: ColorizePost
Post by: Bulakbol on April 12, 2009, 11:36:20 PM
@Tracey12
Attach your Display.template.php and I'll try to look at it when I have time.
Title: Re: ColorizePost
Post by: flamechica on May 15, 2009, 02:55:02 PM
I am using SMF 1.1.8 & downloaded the first version on this mod (because I did not like the drop down color choices. I wanted to give my members the option of using hex codes). How would I go about removing the part of this mod that makes it so the poster and the reader have to be using the same theme for this to work? I use the Highlight Message Backgrounds mod and made it so every theme displays the same light gray background so that all font colors are possible to read no matter what theme a member is using. So, this part of this mod is useless to me. Thanks in advance for your help. This is a great mod.
Title: Re: ColorizePost
Post by: Bulakbol on May 17, 2009, 02:38:21 AM
@flamechica
Thanks for using/trying this mod. I am very busy right now and rarely have time to look at my mods. But I will check the code when I have time and remove the theme checking lines.
Title: Re: ColorizePost
Post by: flamechica on May 17, 2009, 12:26:44 PM
Thanks that would be greatly appreciated.
Title: Re: ColorizePost
Post by: flamechica on June 30, 2009, 12:34:05 AM
Did you forget about me?  :(
Title: Re: ColorizePost
Post by: Citizen Erased on July 01, 2009, 02:52:04 PM
I have the same question as flamechica.

Is there a way to show the font color in all the themes (at the same time)?

I made some weird changes in load.php, but none of them work, so I need help.

Please, (God) help us! (?)
Title: Re: ColorizePost
Post by: Bulakbol on July 04, 2009, 01:12:00 PM
Sorry guys. Very busy still. I will let you know when I am done removing the theme checking lines.
Title: Re: ColorizePost
Post by: gbsothere on August 01, 2009, 12:19:38 AM
Hi,

I'm getting this error in my forum:

8: Undefined index: font_size
File: /var/www/vhosts/mywebsite.com/httpdocs/smf/Themes/default/PersonalMessage.template.php (folder sub template - eval?)
Line: 415


Line 415 is this bit of code for ColorizePost:

echo '<div class="post" style="color: '. $color. '; font-family: ', $message['member']['font_face'], ';  font-size: ', $message['member']['font_size'], ';">', $message['body'], '</div></div>





So......   font size?   The mod works fine, but the forum fills up with errors related to PMs.  Nothing to worry about?  Anything to edit?


Thanks.

Title: Re: ColorizePost
Post by: Bulakbol on August 01, 2009, 12:33:42 AM
Quote from: gbsothere on August 01, 2009, 12:19:38 AM
echo '<div class="post" style="color: '. $color. '; font-family: ', $message['member']['font_face'], ';  font-size: ', $message['member']['font_size'], ';">', $message['body'], '</div></div>


Change that line with this to get rid of the error. Thanks for trying/using this mod.
echo '<div class="post" style="color: '. $color. '; font-family: ', $message['member']['font_face'], ';  font-size: ', !empty($message['member']['font_size']) ? $message['member']['font_size'] : '', ';">', $message['body'], '</div></div>
Title: Re: ColorizePost
Post by: gbsothere on August 01, 2009, 12:38:44 AM
That was fast!   :)  I must have caught you working. 


We love this mod; we wouldn't give it up for anything.


Thanks so much for the fix!





Title: Re: ColorizePost
Post by: gbsothere on August 01, 2009, 04:43:10 PM
I'm sorry, I'm afraid the exact same error is back today.   Same file, same line error. 


Is there anything else I can do? 







Title: Re: ColorizePost
Post by: Bulakbol on August 01, 2009, 04:48:56 PM
gbsothere
Sorry but the edit I gave you should suppress the error. Make sure you edited the right file and uploaded correctly.  Or attach the file in question to your next post and I'll check it for you.
Title: Re: ColorizePost
Post by: gbsothere on August 01, 2009, 04:55:05 PM
Hi again.   :)

Here's the file and I have SMF 1.1.10/Default (although my forum was either 1.1.8 or 1.1.9 when I installed the mod).  I did a manual install of both the mod and all of my SMF upgrades, as well, since I do have a few mods. 

I do notice on the errors that the URL action is always action=pm or a variation on that, such as index.php?action=pm;f=inbox;l=-1.


Thanks so much! 


ETA:  it was installed when the forum was 1.1.8
Title: Re: ColorizePost
Post by: Bulakbol on August 01, 2009, 05:15:12 PM
Sorry. I'll get back to you.

<edit>
Can you attach your Sources/Profile.php please. It should not give you problem like this.
Title: Re: ColorizePost
Post by: gbsothere on August 01, 2009, 05:22:00 PM
Here it is and thanks, again, for taking the time to check this for me.   :)
Title: Re: ColorizePost
Post by: Bulakbol on August 01, 2009, 05:40:26 PM
@gbsothere
The mod was installed properly. I cannot find the problem. I guess I have to check your Sources/Load.php now.
Title: Re: ColorizePost
Post by: gbsothere on August 01, 2009, 05:46:13 PM
Here it is, but, if nothing becomes apparent, I'll just let it go, since the mod is performing beautifully.  (I may actually have all your mods, come to think of it.)   :)

I'm beginning to wonder if the subsequent upgrades from 1.1.8 to 1.1.9 and on to 1.1.10 might have had something to do with this, although I did run the upgrade.php. 

Title: Re: ColorizePost
Post by: Bulakbol on August 01, 2009, 05:59:30 PM
@gbsothere
Sorry, I failed to find the problem. The mod was perfectly installed in all the files that I asked to check. How would you like to remove the font_size in PersonalMessage.template.php? Change the line I previously gave you with this to get rid of the error. I'll check the code again when I have enough time.

echo '<div class="post" style="color: '. $color. '; font-family: ', $message['member']['font_face'], ';">', $message['body'], '</div></div>
Title: Re: ColorizePost
Post by: gbsothere on August 01, 2009, 06:02:22 PM
I'll do that on my test forum and do quite a bit of posting and personal message testing this evening, since I notice that I'm getting the same errors there as I am on my main forum.   :)


Thank you so much for taking the time to check!  We're big fans of your mods on my forums.   :)
Title: Re: ColorizePost
Post by: Bulakbol on August 01, 2009, 06:07:13 PM
No problem. Thank you too. I'll check my codes. Maybe the upgrade affected some codes that I am not /wasn't aware of.
Title: Re: ColorizePost
Post by: gbsothere on August 01, 2009, 06:10:07 PM
Ha!  I just tried this on my test forum and sent a PM to another test account and got 8 of those errors.   :D 

I really am starting to think it's the upgrade. 

Still... the mod is performing just fine, so I'll clear out those logs and just wait, in case you discover something in the future about this.   No urgency and thank you again. 


EDIT:   well....   font_face this time, instead of font_size. 

8: Undefined index: font_face
File: /var/www/vhosts/mywebsite.com/httpdocs/smf/Themes/default/PersonalMessage.template.php (folder sub template - eval?)
Line: 415


:D



I really am okay to wait, until you have more time for this.  I know you have a lot of other things going on. 
Title: Re: ColorizePost
Post by: Bulakbol on August 03, 2009, 01:42:24 AM
@gbsothere
Sorry. I went and check my mod but empty handed. I think you are right. I will check if it conflicts with other mods. Thanks for the info.
Title: Re: ColorizePost
Post by: flamechica on August 03, 2009, 03:47:28 AM
Bulakbol,
I noticed you have been replying on this thread....any time to check this yet??? I would really appreciate it. Thanks!!!

Quote from: flamechica on May 15, 2009, 02:55:02 PM
I am using SMF 1.1.8 & downloaded the first version on this mod (because I did not like the drop down color choices. I wanted to give my members the option of using hex codes). How would I go about removing the part of this mod that makes it so the poster and the reader have to be using the same theme for this to work? I use the Highlight Message Backgrounds mod and made it so every theme displays the same light gray background so that all font colors are possible to read no matter what theme a member is using. So, this part of this mod is useless to me. Thanks in advance for your help. This is a great mod.
Title: Re: ColorizePost
Post by: Bulakbol on August 03, 2009, 05:40:23 AM
@flamechica
I was thinking about making two versions after updating all my mods. It is not easy but will be done. I haven't found enough time and inclination yet. I'll let you know. :)
Title: Re: ColorizePost
Post by: ralliart on August 03, 2009, 08:54:07 AM
Hi bulakbol, pinoy? Will this work for 2.0 RC1.2? Thanks!
Title: Re: ColorizePost
Post by: Bulakbol on August 06, 2009, 06:39:12 AM
@ralliart
It should work kabayan. Please let me know if it doesn't work.
Title: Re: ColorizePost
Post by: flamechica on August 07, 2009, 04:15:17 AM
Quote from: Bulakbol on August 03, 2009, 05:40:23 AM
@flamechica
I was thinking about making two versions after updating all my mods. It is not easy but will be done. I haven't found enough time and inclination yet. I'll let you know. :)

Ok, thanks. Sorry for being a pest. I've got some members that really want it and they have been pestering me.
Title: Re: ColorizePost
Post by: Bulakbol on August 08, 2009, 11:28:58 PM
@flamechica
You can manually remove the theme checking from posts. In Display.template.php, find
if (isset($message['member']['theme']) && $message['member']['theme'] == $context['user']['theme_id'])
$color = !empty($message['member']['post_color']) ? $message['member']['post_color'] : (!empty($message['member']['group_color']) ? $message['member']['group_color'] : (!empty($message['member']['post_group_color']) ? $message['member']['post_group_color'] : ''));
else
$color = '';

replace with
$color = !empty($message['member']['post_color']) ? $message['member']['post_color'] : (!empty($message['member']['group_color']) ? $message['member']['group_color'] : (!empty($message['member']['post_group_color']) ? $message['member']['post_group_color'] : ''));

If that works, you can also remove the same code from PersonalMessage.template.php. It is a temporary until I update the mod.
Title: Re: ColorizePost
Post by: flamechica on August 12, 2009, 01:21:14 AM
Sorry it took me a few days to see this. It worked! THANK YOU SO MUCH!!!!
Title: Re: ColorizePost
Post by: Bulakbol on August 12, 2009, 11:31:10 PM
flamechica
My pleasure. If you have other issues or request, let me know.  ;)
Title: Re: ColorizePost
Post by: flamechica on August 26, 2009, 03:27:11 PM
Sorry to be a pain, but I recently noticed that this mod must be having issues the with Member Color Link mod. So, the default color for every member is the color of the membergroup color instead of black. Could you help me fix this?
Title: Re: ColorizePost
Post by: Bulakbol on August 29, 2009, 09:02:41 PM
@flamechica
If no color is specified in their profile, primary group or post group online color will be used instead. Would you like to use the default color if they don't choose any color for their post/message?

Title: Re: ColorizePost
Post by: flamechica on August 31, 2009, 01:51:14 AM
Yes, I think the default color would work better. The way it is now is confusing my members. lol.
Title: Re: ColorizePost
Post by: gbsothere on September 17, 2009, 10:29:06 AM
Bulakbol, I went ahead on my RC1.2 test forum and set the emulator for RC1 and installed this, since I'll be moving my posters up from 1.1.10 soon and they will be angry with me if we don't still have this mod.   :)

It works beautifully, but, if you have time, could I PM you a test login so that you can set up your profile defaults and try posting in order to take a look at a strange behavior that occurs in the reply box as a poster is actually typing?   The words in the reply box become invisible as you're typing and you must drag your mouse back over them to see them.  It's not a big issue and I can live with it, but I wondered, since I installed the RC1 on a RC1.2 forum, if some file will eventually have to be modified when this is made available for RC1.2?

Title: Re: ColorizePost
Post by: mycousinvinny on September 17, 2009, 01:52:52 PM
Bulakbol, I applied this mod and it works great. Thanks for a very cool addition!!

Vinny
Title: Re: ColorizePost
Post by: flamechica on September 20, 2009, 11:19:26 PM
Quote from: flamechica on August 26, 2009, 03:27:11 PM
Sorry to be a pain, but I recently noticed that this mod must be having issues the with Member Color Link mod. So, the default color for every member is the color of the membergroup color instead of black. Could you help me fix this?

So, is there a way to change the default color to black?
Title: Re: ColorizePost
Post by: linette97 on November 09, 2009, 08:23:52 PM
Great Mod!! Works perfect with 2.0RC 1.2!!
I wanted more color options to the drop down menu, Was disappointed because the earlier version I was able to type in the color I wanted BUT that didn't stop me  :P

So I went into ./Themes/default/Profile.template.php OR if you have a custom theme
./Themes/your custom theme/Profile.template.php

I looked for this

<option value="black"

Copied this
<option value="black" style="color: black;">', $txt['black'], '</option>

Pasted it anywhere within the color selections

                    <option value="red" style="color: red;">', $txt['red'], '</option>
<option value="yellow" style="color: yellow;">', $txt['yellow'], '</option>
<option value="pink" style="color: pink;">', $txt['pink'], '</option>
<option value="green" style="color: green;">', $txt['green'], '</option>
<option value="orange" style="color: orange;">', $txt['orange'], '</option>
<option value="purple" style="color: purple;">', $txt['purple'], '</option>
<option value="blue" style="color: blue;">', $txt['blue'], '</option>
<option value="beige" style="color: beige;">', $txt['beige'], '</option>
<option value="brown" style="color: brown;">', $txt['brown'], '</option>
<option value="teal" style="color: teal;">', $txt['teal'], '</option>
                                         
<option value="navy" style="color: navy;">', $txt['navy'], '</option>
<option value="maroon" style="color: maroon;">', $txt['maroon'], '</option>
<option value="limegreen" style="color: limegreen;">', $txt['limegreen'], '</option>


Renamed to the color I wanted
                                        <option value="black" style="color: black;">', $txt['black'], '</option>
               <option value="red" style="color: red;">', $txt['red'], '</option>
               <option value="yellow" style="color: yellow;">', $txt['yellow'], '</option>
               <option value="pink" style="color: pink;">', $txt['pink'], '</option>
               <option value="green" style="color: green;">', $txt['green'], '</option>
               <option value="orange" style="color: orange;">', $txt['orange'], '</option>
               <option value="purple" style="color: purple;">', $txt['purple'], '</option>
               <option value="blue" style="color: blue;">', $txt['blue'], '</option>
               <option value="beige" style="color: beige;">', $txt['beige'], '</option>
               <option value="brown" style="color: brown;">', $txt['brown'], '</option>
               <option value="teal" style="color: teal;">', $txt['teal'], '</option>
               <option value="navy" style="color: navy;">', $txt['navy'], '</option>
            <option value="indianred" style="color: indianred;">', $txt['indianred'], '</option>
               <option value="maroon" style="color: maroon;">', $txt['maroon'], '</option>
               <option value="limegreen" style="color: limegreen;">', $txt['limegreen'], '</option>


THEN I went to ./Themes/default/languages/Profile.english.php OR if your custom them has it
./Themes/yourcustomtheme/languages/Profile.english.php

I found this

$txt['personal_color']

I copied this
$txt['black'] = 'Black';

Then Pasted it within the color list
$txt['red'] = 'Red';

$txt['yellow'] = 'Yellow';
$txt['pink'] = 'Pink';
$txt['green'] = 'Green';
$txt['orange'] = 'Orange';
$txt['purple'] = 'Purple';
$txt['blue'] = 'Blue';
$txt['beige'] = 'Beige';
$txt['brown'] = 'Brown';
$txt['teal'] = 'Teal';
$txt['navy'] = 'Navy';


Should look like this
$txt['red'] = 'Red';
$txt['indianred'] = 'indianRed';
$txt['yellow'] = 'Yellow';
$txt['pink'] = 'Pink';
$txt['green'] = 'Green';
$txt['orange'] = 'Orange';
$txt['purple'] = 'Purple';
$txt['blue'] = 'Blue';
$txt['beige'] = 'Beige';
$txt['brown'] = 'Brown';
$txt['teal'] = 'Teal';
$txt['navy'] = 'Navy';

And your Done!!
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi35.tinypic.com%2F345hd9u.png&hash=0b48b8501ad3769636f60da135794eef74cad8b2)

But I still would like this option to add your own color without going through this.. Is there a way to do this??? Thanks for your help!!
Title: Re: ColorizePost
Post by: HELLSXD on December 10, 2009, 06:22:50 PM
I have a problem, I uninstalled the mod, then I tried to install it again and I got:

Duplicate entry 'board_post_color' for key 1

any help?
Title: Re: ColorizePost
Post by: linette97 on December 10, 2009, 06:26:34 PM
Can anyone help with the question above that I posted a month ago?
http://www.simplemachines.org/community/index.php?topic=217033.msg2349408#msg2349408

Thanks!

EDIT: 1/19/2010 (Yet ANOTHER MONTH HAS PASSED :-[)
I had to un-install the mod since I upgraded to 2.0 RC2. Many of my members are asking for this feature back.. Will this be updated to work with RC2? & if so why not have it like it was before with choosing your own color text to type in like I mentioned above
Title: Re: ColorizePost
Post by: XtcruleZ on January 18, 2010, 05:47:02 PM
Will this work for SMF 2.0 RC2?
Title: Re: ColorizePost
Post by: XtcruleZ on January 22, 2010, 05:53:45 PM
Anyone care to update this thread or maybe even the MOD itself to work with RC2 ?
Title: Re: ColorizePost
Post by: XtcruleZ on January 26, 2010, 04:07:22 PM
Anyone? Bueller............?
Title: Re: ColorizePost
Post by: DilSe on February 11, 2010, 12:37:01 AM
Quote from: XtcruleZ on January 18, 2010, 05:47:02 PM
Will this work for SMF 2.0 RC2?

hello to all please any help for 2.0 RC2 thanks
Title: Re: ColorizePost
Post by: distante on March 07, 2010, 09:24:22 AM
Looks like I'm not the only one who wants this excellent mod for RC2 :(
Title: Re: ColorizePost
Post by: XtcruleZ on March 09, 2010, 07:49:21 PM
You are not the only one, but it seems no one wants to do it for us.
Title: Re: ColorizePost
Post by: !RFAN on April 24, 2010, 02:39:22 PM
and for smf 2 rc3 ?? :(
Title: Re: ColorizePost
Post by: Shades. on April 29, 2010, 11:51:31 AM
I too would like this mod to be updated for RC3! 8)
Title: Re: ColorizePost
Post by: distante on April 29, 2010, 02:58:18 PM
Good Luck with that BoZilla, I'm still need this for Rc2 :P

Title: Re: ColorizePost
Post by: Arantor on April 29, 2010, 03:37:00 PM
Quote from: distante on April 29, 2010, 02:58:18 PM
Good Luck with that BoZilla, I'm still need this for Rc2 :P



I'd strongly encourage you to upgrade to RC3 for the fixes to multiple secure vulnerabilities.
Title: Re: ColorizePost
Post by: !RFAN on April 30, 2010, 09:11:01 AM
yes we need upgrade :(
Title: Re: ColorizePost
Post by: Xavi-Nena on May 30, 2010, 04:58:13 PM
I am finally getting around to trying to resolve this again. I have been getting this error since installing the mod ages ago

8: Undefined index: font_size
File: /Themes/default/PersonalMessage.template.php

Any and all help is appreciated.

Here is the PersonalMessage.template.php
Title: Re: ColorizePost
Post by: distante on June 22, 2010, 05:42:21 PM
This mod never was update to RC2 or RC3 don't :(
Title: Re: ColorizePost
Post by: gbsothere on June 22, 2010, 06:07:28 PM
Quote from: Xavi-Nena on May 30, 2010, 04:58:13 PM
I am finally getting around to trying to resolve this again. I have been getting this error since installing the mod ages ago

8: Undefined index: font_size
File: /Themes/default/PersonalMessage.template.php

Any and all help is appreciated.

Here is the PersonalMessage.template.php



Upload this one, then clear your errors, muck about in your messages, check your log and see if you still generate errors.

:)



Edit:  To anyone else using 1.1.x, if you're getting these font size and/or font face errors (pertaining to this mod and template), try finding:

';
if (isset($message['member']['theme']) && $message['member']['theme'] == $context['user']['theme_id'])
$color = !empty($message['member']['post_color']) ? $message['member']['post_color'] : (!empty($message['member']['group_color']) ? $message['member']['group_color'] : (!empty($message['member']['post_group_color']) ? $message['member']['post_group_color'] : ''));
else
$color = '';
echo '<div class="post" style="color: '. $color. '; font-family: ', $message['member']['font_face'], ';  font-size: ', $message['member']['font_size'], ';">', $message['body'], '</div></div>



and replacing it with

';
if (isset($message['member']['theme']) && $message['member']['theme'] == $context['user']['theme_id'])
$color = !empty($message['member']['post_color']) ? $message['member']['post_color'] : (!empty($message['member']['group_color']) ? $message['member']['group_color'] : (!empty($message['member']['post_group_color']) ? $message['member']['post_group_color'] : ''));
else
$color = '';
echo '<div class="post" style="color: '. $color. '; font-family: ', empty($message['member']['font_face']) ? 'verdana' : $message['member']['font_face'], ';  font-size: ', empty($message['member']['font_size']) ? '100%' : $message['member']['font_size'], ';">', $message['body'], '</div></div>
Title: Re: ColorizePost
Post by: sattninja on August 16, 2010, 04:43:15 PM
can we get an update for RC3


Please
Title: Re: ColorizePost
Post by: Bagheera on January 19, 2011, 11:04:55 PM
 :( that's what i was looking for and it won't work on RC4 :(
I really hope the developer will update this mod.
Title: Re: ColorizePost
Post by: Arantor on January 20, 2011, 03:30:35 AM
From Bulakbol's profile:
Last Active: November 27, 2009, 06:01:36 AM

:(
Title: Re: ColorizePost
Post by: Xavi-Nena on February 27, 2011, 01:00:04 PM
Quote from: gbsothere on June 22, 2010, 06:07:28 PM
Quote from: Xavi-Nena on May 30, 2010, 04:58:13 PM
I am finally getting around to trying to resolve this again. I have been getting this error since installing the mod ages ago

8: Undefined index: font_size
File: /Themes/default/PersonalMessage.template.php

Any and all help is appreciated.

Here is the PersonalMessage.template.php



Upload this one, then clear your errors, muck about in your messages, check your log and see if you still generate errors.

:)



Edit:  To anyone else using 1.1.x, if you're getting these font size and/or font face errors (pertaining to this mod and template), try finding:

';
if (isset($message['member']['theme']) && $message['member']['theme'] == $context['user']['theme_id'])
$color = !empty($message['member']['post_color']) ? $message['member']['post_color'] : (!empty($message['member']['group_color']) ? $message['member']['group_color'] : (!empty($message['member']['post_group_color']) ? $message['member']['post_group_color'] : ''));
else
$color = '';
echo '<div class="post" style="color: '. $color. '; font-family: ', $message['member']['font_face'], ';  font-size: ', $message['member']['font_size'], ';">', $message['body'], '</div></div>



and replacing it with

';
if (isset($message['member']['theme']) && $message['member']['theme'] == $context['user']['theme_id'])
$color = !empty($message['member']['post_color']) ? $message['member']['post_color'] : (!empty($message['member']['group_color']) ? $message['member']['group_color'] : (!empty($message['member']['post_group_color']) ? $message['member']['post_group_color'] : ''));
else
$color = '';
echo '<div class="post" style="color: '. $color. '; font-family: ', empty($message['member']['font_face']) ? 'verdana' : $message['member']['font_face'], ';  font-size: ', empty($message['member']['font_size']) ? '100%' : $message['member']['font_size'], ';">', $message['body'], '</div></div>


THANK YOU SO MUCH GBSOTHERE! This has so far worked. I had fixed it slightly but could not get every error out.....untill now! woo woo thanks again. :)
Title: Re: ColorizePost
Post by: !RFAN on February 28, 2011, 05:41:46 AM
any hope for update??
Title: Re: ColorizePost
Post by: The Wizard on May 02, 2011, 03:36:23 PM
Anybody have a Idea how to make this work on 1.1.13 ???
Title: Re: ColorizePost
Post by: Xavi-Nena on September 09, 2011, 07:29:59 PM
Has anyone been able to get this to work on 2.0 gold?
Title: Re: ColorizePost
Post by: maximus23 on September 09, 2011, 11:18:10 PM
Hi,

I have modified the "Colorize Post" for my personal use.
Backup your personal files. Use at your own risk.
Tested : Freshly installed SMF 2.0 and Curve Only.
I am not supporting the attached package.
Please !!! You should use the mod authors version once he updates it !!!
 
Title: Re: ColorizePost
Post by: mextremex on September 22, 2011, 05:51:36 AM
Quote from: maximus23 on September 09, 2011, 11:18:10 PM
Hi,

I have modified the "Colorize Post" for my personal use.
Backup your personal files. Use at your own risk.
Tested : Freshly installed SMF 2.0 and Curve Only.
I am not supporting the attached package.
Please !!! You should use the mod authors version once he updates it !!!


omg nice job bro , is working in 2.0.1  just i need  to fix fontface dropbox cuz is empy :(
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi28.fastpic.ru%2Fbig%2F2011%2F0922%2F64%2Fc55d3905df94915bda96659e6df18c64.jpg&hash=747cfe3af6246c92634465cbe5206114bdc68b2c)


edit:
fixed



./Themes/default/languages/Profile.english.php
Find: [Select]
$txt['no_buddies'] = 'Your buddy list is currently empty';
Add After: [Select]

$txt['personal_color'] = 'Select font Color, font Face and font Size for your messages.';
$txt['color'] = 'and Color';
$txt['default_color'] = 'Default Color';
$txt['default_face'] = 'Default Face';
$txt['default_size'] = 'Default Size';
$txt['black'] = 'Black';
$txt['red'] = 'Red';
$txt['yellow'] = 'Yellow';
$txt['pink'] = 'Pink';
$txt['green'] = 'Green';
$txt['orange'] = 'Orange';
$txt['purple'] = 'Purple';
$txt['blue'] = 'Blue';
$txt['beige'] = 'Beige';
$txt['brown'] = 'Brown';
$txt['teal'] = 'Teal';
$txt['navy'] = 'Navy';
$txt['maroon'] = 'Maroon';
$txt['limegreen'] = 'LimeGreen';
$txt['arial'] = 'Arial';
$txt['arial_black'] = 'Arial Black';
$txt['comic_sans_ms'] = 'Comics Sans MS';
$txt['courier_new'] = 'Courier New';
$txt['georgia'] = 'Georgia';
$txt['times_new_roman'] = 'Times New Roman';
$txt['tahoma'] = 'Tahoma';
$txt['verdana'] = 'Verdana';
$txt['trebuchet_ms'] = 'Trebuchet MS';
$txt['impact'] = 'Impact';

Code




thanks!!!




Title: Re: ColorizePost
Post by: maximus23 on September 22, 2011, 03:13:09 PM
Hi,

Ok Thank's :)

Fixed in the package :)



Title: Re: ColorizePost
Post by: Grammy on July 11, 2016, 10:30:09 AM
Regarding gbsothere's advice on this post:  http://www.simplemachines.org/community/index.php?topic=217033.msg2676782#msg2676782 (http://www.simplemachines.org/community/index.php?topic=217033.msg2676782#msg2676782)

I'm getting the same font_face and font_size errors when I try to send a PM, but in 2.0.11.  The action throwing the error is:  http://example.com/index.php?action=pm;f=inbox;l=-1;done=sent


My block of code is:

if (isset($message['member']['theme']) && $message['member']['theme'] == $context['user']['theme_id'])
$color = !empty($message['member']['post_color']) ? $message['member']['post_color'] : (!empty($message['member']['group_color']) ? $message['member']['group_color'] : (!empty($message['member']['post_group_color']) ? $message['member']['post_group_color'] : ''));
else
$color = '';
echo '<div style="color: '. $color. '; font-family: ', $message['member']['font_face'], ';  line-height: 1.3em; font-size: ', $message['member']['font_size'], ';">', $message['body'], '</div></div>



Would someone please help me adapt his edit to my code?  I keep throwing a template parse error because I don't know what I'm doing.   :)

My template is attached.
Title: Re: ColorizePost
Post by: Grammy on July 11, 2016, 06:36:02 PM
Sorry for bumping; I couldn't modify my last post.


Actually, his fix seems to work as is, even though it was for 1.X.X.  Seems to have fixed the errors.   :)
Title: Re: ColorizePost
Post by: Siirist on July 19, 2016, 10:18:17 AM
Hi,

Would like to install this, however, it calls for a modification of the ./Themes/default/style.css

Code (Find:) Select
.post, .personalmessage
{
overflow: auto;

Code (Replace With:) Select
.post, .personalmessage
{
overflow: auto;
padding-bottom: 2px;


I do NOT have a ./Themes/default/style.css   ???

Here is what I do have:
./Themes/default/css/

I believe that if I "force" install that my entire forum will be screwed because it is a .css file.

What are your thoughts about this?

Thanks in advance.

Be Well,
Siirist
Title: Re: ColorizePost
Post by: Grammy on July 19, 2016, 11:13:16 AM
Quote from: Siirist on July 19, 2016, 10:18:17 AM
Hi,

Would like to install this, however, it calls for a modification of the ./Themes/default/style.css

Code (Find:) Select
.post, .personalmessage
{
overflow: auto;

Code (Replace With:) Select
.post, .personalmessage
{
overflow: auto;
padding-bottom: 2px;


I do NOT have a ./Themes/default/style.css   ???

Here is what I do have:
./Themes/default/css/

  • admin.css
  • compat.css
  • editor.css
  • editor_ie.css
  • ie6.css
  • ie7.css
  • index.css
  • install.css
  • report.css
  • rtl.css
  • tinychildboards2.css
  • webkit.css
  • wireless.css
  • index.php

I believe that if I "force" install that my entire forum will be screwed because it is a .css file.

What are your thoughts about this?

Thanks in advance.

Be Well,
Siirist


It was style.css in 1.1.x. I'm actually sitting in traffic (not driving) but I have a 2.0.x zip of this.  PM me if you want it and when I'm back I'll get it to you.  :)
Title: Re: ColorizePost
Post by: Siirist on July 26, 2016, 09:29:11 PM
Well, it was working for about a week, yet, I made a change to the index.css this afternoon

Topic: Increase size of font in a quote (http://www.simplemachines.org/community/index.php?topic=547584.msg3884531)

And then, no more.   :(
See attached Screenshots that show it not functioning when posted, but functioning when looking at posts through profile. Weird

FYI: My custom theme failed as well, but I have someone experienced working on that.

NOTE: This is the downside of manual edits to files, those that come to help you don't know what has been done.
Doing it through a Mod, then the concept is listed in your list of installed mods.