News:

Wondering if this will always be free?  See why free is better.

Main Menu

ColorizeBoards

Started by Bulakbol, December 18, 2007, 06:34:51 PM

Previous topic - Next topic

Bulakbol

Link to Mod

Optional colors for the parent board and child board's name and description. 
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

falguni1


Bulakbol

Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

binal0072003


Bulakbol

#4
Edit/modify your board and you will see the color input box under the board's name and one under the description. Check the attached pic.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

qtime

thanks nice found, now I did that job with some code settings. this will make life much easier... :).

karlbenson

Very nice indeed.

But maybe it would be good for a future version to make it choose css classes.
That way you can do a different color for each theme.

Indy74

Great Mod indeed!

I have a question: when i set diferent colors it show changes correctly in a manage board settings window but nothing is changed when on forum index. I guess something is overiding those settings but cant manage what. Any idea?

Thanks!

Fallen Angel

#8
Think the problem is in Themes.. Like Dilber MC i cant change colors with this mod..

As you see, it changes in Admin panel BUT not on the board..


But a great idea/mod btw.....

Bulakbol

#9
@karlbenson
   Thanks. You are right. The css will work on all theme but for me, css is not user friendly.

@qtime
    Sorry, I didn't get what you mean by code settings.

@Indy74
   The mod will only work with the default theme. You are probably using different theme. If so, you have to do the manual modification to BoardIndex.template.php and MessageIndex.template.php. 


Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Bulakbol

Quote from: Fallen Angel on December 19, 2007, 08:39:56 AM
Think the problem is in Themes.. Like Dilber MC i cant change colors with this mod..


But a great idea/mod btw.....

Try doing the modification manually on  BoardIndex.template.php and MessageIndex.template.php.  It should work.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Fallen Angel

#11
Quote from: JohnyB on December 19, 2007, 08:48:44 AM
Quote from: Fallen Angel on December 19, 2007, 08:39:56 AM
Think the problem is in Themes.. Like Dilber MC i cant change colors with this mod..


But a great idea/mod btw.....

Try doing the modification manually on  BoardIndex.template.php and MessageIndex.template.php.  It should work.

Can u show me the codes for those two files? Then I'll try it right now.....

Bulakbol

It's in the package. Read the install.xml under BoardIndex.template.php and MessageIndex.template.php. Anyway, here's the code.

BoardIndex.template.php, look for similar codes.


echo '</a>
</td>
<td class="windowbg2">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
', $board['description'];


and replace with


// 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


and in MessageIndex.template.php, look for


echo '</a>
</td>
<td class="windowbg2">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
', $board['description'];


and replace with


// 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


. Hope that helps.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Fallen Angel

That worked! Thanx a million!

Bulakbol

You're welcome. 'Glad you made it work.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Eliana Tamerin

#15
Wow. This is an ingenious mod, thanks JohnyB! Works like a charm, and a great way to organize the forums for the different groups I have on my board. Thanks!

EDIT: Just a suggestion, would it be possible to apply the forum title colorization to the section that says "Child Boards: Forum One, Forum Two"? I noticed that wasn't getting affected by the mod. 
Do NOT PM me for support.

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

Bulakbol

#16
Thanks Eliana. If you want to colorize the number of posts and number of topics, edit BoardIndex.template.php and MessageIndex.template.php. They are the same.

find

Quote
// Show some basic information about the number of posts, etc.
               echo '
            </td>
            <td class="windowbg" valign="middle" align="center" style="width: 12ex;"><span class="smalltext">
               ', $board['posts'], ' ', $txt[21], ' <br />
               ', $board['topics'],' ', $txt[330], '
            </span></td>
            <td class="windowbg2" valign="middle" width="22%">
               <span class="smalltext">';

and replace with

Quote
// 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

It will looks like this (except for the colorized category and child boards).
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Bulakbol

Quote from: Eliana Tamerin on December 19, 2007, 06:37:48 PM

EDIT: Just a suggestion, would it be possible to apply the forum title colorization to the section that says "Child Boards: Forum One, Forum Two"? I noticed that wasn't getting affected by the mod. 

Thanks for the suggestion. I appreciated it. It will be in version 2.0 tho. Everything will be colorized. :)


Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Eliana Tamerin

Sounds great, JohnyB. I look forward to 2.0.
Do NOT PM me for support.

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

Bulakbol

Sure. I will release it sometimes next week.  Thanks.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Advertisement: