News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

ColorizePost

Started by Bulakbol, January 15, 2008, 09:45:48 PM

Previous topic - Next topic

tiger5226

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

phedo

Same problem. :(

Where can I download this mod ?

Phedo

Eliana Tamerin

Don't worry. It's probably either an issue with the download area or JohnyB's just reuploading it.
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

Bulakbol

I don't know what is going on. Maybe they are updating something.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

gamerxgirl

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.
Xenaverse.net Xena: Warrior Princess Forums | Gallery | Reviews | Fan Fiction

Bulakbol

#45
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>
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

gamerxgirl

Thanks, all is working now  :D
Xenaverse.net Xena: Warrior Princess Forums | Gallery | Reviews | Fan Fiction

Bulakbol

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.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Bulakbol

#48
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.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Apllicmz




Apllicmz

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



mersindost

I Am Simple Machines Hero, Because I LOVE Simple Machines

Bulakbol

Thanks Joomlamz for the translation.


Thanks mersindost for the compliment. ;)
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

JimM

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'
Jim "JimM" Moore
Former Support Specialist

Bulakbol

#54
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.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

ASF

can i see a example on a forum?

Bulakbol

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.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

tiger5226

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

Bulakbol

#58
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.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

JimM

Added the edits you suggested last night and no errors today.  I think that may have fixed it.  Thanks for a great mod.   :)
Jim "JimM" Moore
Former Support Specialist

Advertisement: