Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: oOo--STAR--oOo on August 19, 2011, 10:44:12 AM

Title: Board color and icons
Post by: oOo--STAR--oOo on August 19, 2011, 10:44:12 AM
Board Color and Icons


Author: aljo1985 aka Star (http://www.simplemachines.org/community/index.php?action=profile;u=194453) || Link to Modification (http://custom.simplemachines.org/mods/index.php?mod=3023) || Support Topic (http://www.simplemachines.org/community/index.php?topic=447219.0)


Live Demo (http://codes.uniquez-home.com/forums/index.php?action=community) (Look at color boards and icons.)

Description

This simple mod will ligthen up your forums with some color and custom icons on your boards.
This is my 1st mod that I have created for SMF. I have great interest in modding SMF.

Initial Release


Package Information
Version: 1.1
Package: Board colour and icons
Supports SMF 2.0

Need Help or have any suggestions for improvement??

If you need help with this modification, please don't hesitate to post in the support thread.

Also we welcome all feed back and improvements that can be made to this modification.
Title: Re: Board color and icons
Post by: crustybum on August 23, 2011, 05:03:18 AM
I cant find anywhere in admin where i use this?  i am using SMF 2.0 9it is not in miscalleneous either (mod installed ok)
Title: Re: Board color and icons
Post by: oOo--STAR--oOo on August 25, 2011, 08:10:38 AM
Quote from: crustybum on August 23, 2011, 05:03:18 AM
I cant find anywhere in admin where i use this?  i am using SMF 2.0 9it is not in miscalleneous either (mod installed ok)

You use this when you goto forum -> boards -> modify boards ->
Then when you either create or edit a board, you have 2 options for Color and Icons under board name.
Title: Re: Board color and icons
Post by: razors edge on August 25, 2011, 10:46:11 AM
Nice mod, Now to create some icons for each of the forum sections. Thanks!

Title: Re: Board color and icons
Post by: oOo--STAR--oOo on August 29, 2011, 11:52:49 AM
Quote from: aljo1985 on August 25, 2011, 08:10:38 AM
Quote from: crustybum on August 23, 2011, 05:03:18 AM
I cant find anywhere in admin where i use this?  i am using SMF 2.0 9it is not in miscalleneous either (mod installed ok)

You use this when you goto forum -> boards -> modify boards ->
Then when you either create or edit a board, you have 2 options for Color and Icons under board name.

Category.. Hmmm
I may look into adding that also.
Title: Re: Board color and icons
Post by: jaisi on August 29, 2011, 12:52:36 PM
thanks for providing nice but. but wow to get icon now??
Title: Re: Board color and icons
Post by: gldkelly on August 30, 2011, 03:38:15 PM
Hi aljo1985,

Is there anyway to make this Mod compatible with 1.1.14?

This is exactly what I need for my forum!  ;D
Title: Re: Board color and icons
Post by: oOo--STAR--oOo on September 04, 2011, 12:02:05 PM
Quote from: gldkelly on August 30, 2011, 03:38:15 PM
Hi aljo1985,

Is there anyway to make this Mod compatible with 1.1.14?

This is exactly what I need for my forum!  ;D

I suppose. If you send me the required scripts that need edits I can make them compatible for you.
Title: Re: Board color and icons
Post by: oOo--STAR--oOo on September 04, 2011, 12:02:56 PM
Quote from: jaisi on August 29, 2011, 12:52:36 PM
thanks for providing nice but. but wow to get icon now??

You just insert the link to the image..
EG www.example.com/image1.png
Title: Re: Board color and icons - can not run if using any theme...
Post by: astroapps on September 10, 2011, 10:23:55 PM
hihi, thank you very much for your mod and very impressive. however, it is not working after i apply any theme.... any advise ? many thanks !
Title: Re: Board color and icons
Post by: oOo--STAR--oOo on September 23, 2011, 02:18:57 PM
Quote from: astroapps on September 10, 2011, 10:23:55 PM
hihi, thank you very much for your mod and very impressive. however, it is not working after i apply any theme.... any advise ? many thanks !

You need to install themes before applying any modifications other wise the mods will not be-able todo the required edits to the templates for the themes.
Title: Re: Board color and icons
Post by: crustybum on December 09, 2011, 07:40:24 AM
Does anyone know how i can make these icons bigger?

Thanks
Title: Re: Board color and icons
Post by: Grim Line on December 16, 2011, 10:24:29 AM
I've got a custom theme and i have succesfully added colour and an icon when it shows up in the "Manage boards and Categories" section in the ACP. However it doesn't show up in the forums. It's still the default.

I have added;

<a class="subject" href="', $board['href'], '" name="b', $board['id'], '"', !empty($board['color']) ? ' style="color: ' . $board['color'] . ';">' : '>', $board['name'];
if (!empty($board['icon']))
echo ' <img src="',  $board['icon'], '" style="width: 18px; height: 18px;" alt="" />';
echo '</a>';


To the custom theme aswell. Any advice please?
Title: Re: Board color and icons
Post by: crustybum on December 19, 2011, 06:38:19 AM
Quote from: crustybum on December 09, 2011, 07:40:24 AM
Does anyone know how i can make these icons bigger?

Thanks

Can anyone help on this ? desperatly need to make this in to a small banner...thanks!
Title: Re: Board color and icons
Post by: Maxtor on January 09, 2012, 12:14:33 PM
can you make "Recent Posts" coloured?
Title: Re: Board color and icons
Post by: DMR123 on December 02, 2012, 10:29:52 AM
The image I use is auto resized.. How can I make it bigger or disable the resize so I can have any size I like?

cheers
Title: Re: Board color and icons
Post by: kamili34 on February 05, 2014, 08:22:02 PM
How should looks example of link to ftp image icon?
Title: Re: Board color and icons
Post by: Levinity on October 07, 2014, 08:50:32 PM
Quote from: Grim Line on December 16, 2011, 10:24:29 AM
I've got a custom theme and i have succesfully added colour and an icon when it shows up in the "Manage boards and Categories" section in the ACP. However it doesn't show up in the forums. It's still the default.

I have added;

<a class="subject" href="', $board['href'], '" name="b', $board['id'], '"', !empty($board['color']) ? ' style="color: ' . $board['color'] . ';">' : '>', $board['name'];
if (!empty($board['icon']))
echo ' <img src="',  $board['icon'], '" style="width: 18px; height: 18px;" alt="" />';
echo '</a>';


To the custom theme aswell. Any advice please?
Same problem with me. Except I didn't put that code in -- or any code. I have a custom theme, and the color/icon only shows in the Admin Panel, not the actual forums. Help?
Title: Re: Board color and icons
Post by: H@M on January 24, 2015, 10:42:37 AM
I'm using Zone99 theme and it doesn't work with me any help please?
Title: Re: Board color and icons
Post by: Steve on January 24, 2015, 06:19:09 PM
As the author of this mod hasn't been here in 7 months it's unlikely you'll get much help unless someone wants to look through it to see how it works. :(
Title: Re: Board color and icons
Post by: eleex on August 10, 2015, 03:32:16 PM
ield 'icon' doesn't have a default value
File: /var/www/html/Sources/Subs-Boards.php
Line: 779


785 to 816

// Change the board according to the given specifications.
   modifyBoard($board_id, $boardOptions);

   // Do we want the parent permissions to be inherited?
   if ($boardOptions['inherit_permissions'])
   {
      getBoardTree();

      if (!empty($boards[$board_id]['parent']))
      {
         $request = $smcFunc['db_query']('', '
            SELECT id_profile
            FROM {db_prefix}boards
            WHERE id_board = {int:board_parent}
            LIMIT 1',
            array(
               'board_parent' => (int) $boards[$board_id]['parent'],
            )
         );
         list ($boardOptions['profile']) = $smcFunc['db_fetch_row']($request);
         $smcFunc['db_free_result']($request);

         $smcFunc['db_query']('', '
            UPDATE {db_prefix}boards
            SET id_profile = {int:new_profile}
            WHERE id_board = {int:current_board}',
            array(
               'new_profile' => $boardOptions['profile'],
               'current_board' => $board_id,
            )
         );
      }
Title: Re: Board color and icons
Post by: Steve on August 10, 2015, 05:34:51 PM
You might want to explain what your problem is and put that code between code tags. :)
Title: Re: Board color and icons
Post by: eleex on August 11, 2015, 08:25:08 AM
Well, the problem is that I use SMF 2.0.10-and once I put this mode, since I can not create a sub forum
The above error of assessment
Title: Re: Board color and icons
Post by: Siirist on February 01, 2016, 11:34:21 AM
Good Day,

Here is my situation. This works wonderfully when using the SMF Default Theme. forum (http://www.asanctuary.net/forum2/index.php)
I am using SMF ver 2.0.11 with the following MODs
1.    Avatar Drop Shadows
2.    Advance Fake Guests n Users Online (fguo)
3.    NChat
4.    Avatar Rounded Corners
5.    Project Snow
6.    Enhanced Dropdown
7.    Topic Solved
8.    Menu_Icons
9.    SMF Gallery Lite
10.    SMF 2.0.11 Update
11.    Board-color-and-icons

It is amazing that it even works with 1028 (Fresh Looks {Green}) without any issues.

However, it does NOT work with the Fumes or Havvo themes.
If you care to see Havvo Theme you can login with UserName=Sample Password=showme
NOTE: This account is suspended, so you do NOT have a Menu, posting or reading permissions

My guess is to make modifications to each of the following files (for these themes)
~default/BoardIndex.template.php
~default/ManageBoards.template.php
~default/MessageIndex.template.php
~core/MessageIndex.template.php
~default/languages/Modifications.english.php

Does this make sense to you, the more experienced members?

Most Sincerely,
Siirist
Title: Re: Board color and icons
Post by: Siirist on February 02, 2016, 01:15:47 PM
 :-\

*bump*   O:)
Title: Re: Board color and icons
Post by: Siirist on May 20, 2016, 12:53:47 PM
No worries, I have changed things around and got it working now.

Cheers,
Siirist
Title: Re: Board color and icons
Post by: Siirist on June 17, 2016, 05:07:50 PM
Hello,

Using SMF ver 2.0.11, with the following Mods installed:


Works on Default Core, and Ostara1, and Fresh Looks (green), HOWEVER, it does not function on Fumes which is compatible with 2.0.11.

Odd

Link to forum is in my Signature

I can PM a username and password

Thanks in advance.


Be Well,
Siriist
Title: Re: Board color and icons
Post by: Siirist on June 19, 2016, 11:18:12 AM
* nudge *     ::)
Title: Re: Board color and icons
Post by: Siirist on June 25, 2016, 11:35:15 AM
* bump *
Title: Re: Board color and icons
Post by: oOo--STAR--oOo on July 06, 2016, 11:05:51 PM
I'm sorry about this, I'll help you fix this problem!

Are there any errors or anything when installing this mod? Parse errors? What are the actual effects of the mod when you install it?
Title: Re: Board color and icons
Post by: Siirist on July 07, 2016, 09:40:59 AM
Quote from: aljo1985 on July 06, 2016, 11:05:51 PM
I'm sorry about this, I'll help you fix this problem!

Are there any errors or anything when installing this mod? Parse errors? What are the actual effects of the mod when you install it?

Thank you Alijo,

As I recall there were no errors upon installation.

Nor Parsing errors. By the way, the parse is not theme specific, ie when I looked through it everything was Themes/default or Sources and such.
You can see the parsing here -> http://custom.simplemachines.org/mods/index.php?action=parse[nofollow]

You can see what it is supposed to do in the attached screenshot

I can PM you a username and password for a regular member if you like.

Thank you again.

Be Well,
Siirist
Title: Re: Board color and icons
Post by: oOo--STAR--oOo on July 07, 2016, 02:13:24 PM
Alright, do you need help fixing anything on this with your current forum?

When I finished doing some of my things I need to do, I will update this mod and have it parse for other themes.
I also wanna allow you to change the position of the icon, before or after the board text. On my old forums, I did actually have the icon before which I think looks better.

example!
http://www.uniquez-home.com

Its old and being redesigning.
Title: Re: Board color and icons
Post by: Siirist on July 07, 2016, 10:11:56 PM
Quote from: aljo1985 on July 07, 2016, 02:13:24 PM
Alright, do you need help fixing anything on this with your current forum?

When I finished doing some of my things I need to do, I will update this mod and have it parse for other themes.
I also wanna allow you to change the position of the icon, before or after the board text. On my old forums, I did actually have the icon before which I think looks better.

example!
http://www.uniquez-home.com

Its old and being redesigning.

I will wait, thank you.

I think the icons in front do look better.

Be Well,
Siirist
Title: Re: Board color and icons
Post by: Cadilab on January 30, 2017, 12:00:31 PM
Hello, I recently installed these two mods.
The first one sorts childboards in columns and the second one is supposed to color them.
So the problem is, the boards(read parent) are colored, but the child ones are not, but when i remove Board color and icons they are.
So, does anyone know what could be the problem ? I've seen forums do this(read: changed color of child board).

Images:

(http://i.imgur.com/TCHGAMN.png)

(http://i.imgur.com/tNuPUa7.png)
Title: Re: Board color and icons
Post by: oOo--STAR--oOo on January 30, 2017, 12:59:43 PM
Quote from: Cadilab on January 30, 2017, 12:00:31 PM
Hello, I recently installed these two mods.
The first one sorts childboards in columns and the second one is supposed to color them.
So the problem is, the boards(read parent) are colored, but the child ones are not, but when i remove Board color and icons they are.
So, does anyone know what could be the problem ? I've seen forums do this(read: changed color of child board).

Images:

(http://i.imgur.com/TCHGAMN.png)

(http://i.imgur.com/tNuPUa7.png)

Hey, the mod is not compatible with the child mod you have installed. This is why the colours are not showing on your child boards.
Sorry for the late responses I am very busy as I have many projects at once. SMF is just one of them.

It would require a rewrite for it to work with that modification and could take some time for me to look into it to provide a fix for you.
Currently working on so many things. Sorry about that.

When I get some spare time I will try and have a look at this for you.
Title: Re: Board color and icons
Post by: Cadilab on January 30, 2017, 02:35:43 PM
Hey, no problem.
By any chance, do you have another mod for child boards that is compatible with your color mod ?
I have seen a forums that are using I guess your mod and child boards.
If you want I can provide a link for you in pm.
Title: Re: Board color and icons
Post by: oOo--STAR--oOo on January 30, 2017, 05:45:06 PM
Quote from: Cadilab on January 30, 2017, 02:35:43 PM
Hey, no problem.
By any chance, do you have another mod for child boards that is compatible with your color mod ?
I have seen a forums that are using I guess your mod and child boards.
If you want I can provide a link for you in pm.

Where exactly does it not show you the colour of the child boards? Is it just the main forum page where the colour of the childboards are not changing? Do you see them coloured in other places within your website?
Title: Re: Board color and icons
Post by: Cadilab on January 31, 2017, 08:13:46 AM
Yes just on the main page. When i open the board they are in colors.
Title: Re: Board color and icons
Post by: oOo--STAR--oOo on February 03, 2017, 01:57:33 PM
Are you using a paid theme because you are using a theme with a different layout the modification would need slightly different edits to display the colours. I can apply these edits for you, but if its a paid theme I am not sure if you are allowed to send me the template files I need to edit manually.

I need
/Themes/youtheme/MessageIndex.template.php
/Themes/youtheme/BoardIndex.template.php

I can possibly apply those edits for you.

Title: Re: Board color and icons
Post by: Cadilab on February 04, 2017, 05:22:36 PM
Check the pm
Title: Re: Board color and icons
Post by: KEA on January 04, 2018, 09:49:20 AM
Getting This message after upgrading to 2.0.15 and cant add any categories to the forum because of it.

Field 'board_color' doesn't have a default value
File: /home/kallen/public_html/Sources/Subs-Boards.php
Line: 790
Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.15, while your database is at version 2.0.11. The above error might possibly go away if you execute the latest version of upgrade.php.
Title: Re: Board color and icons
Post by: SaltedWeb on January 05, 2018, 10:37:21 PM
Not sure if it works for everyone but tested on a board.
This mod seems compatible with 2.0.15
http://custom.simplemachines.org/mods/index.php?mod=3023 (http://custom.simplemachines.org/mods/index.php?mod=3023)
and I had these mods tested ok for me.
1.   Board-color-and-icons 1.1   
2.   Moderator and Administrator Comment Tags 1.9   
3.   SimplePortal 2.3.7   
4.   Post Anonymously In Topic   2.7   
5.   Quick Ban on Account Delete 1.0.1   
6.   Ultimate Menu 1.0   
7.   Ohara YouTube Embed 1.2.9

Title: Re: Board color and icons
Post by: pepa on February 11, 2018, 03:57:51 AM
Quote from: KEA on January 04, 2018, 09:49:20 AM
Getting This message after upgrading to 2.0.15 and cant add any categories to the forum because of it.

Field 'board_color' doesn't have a default value
File: /home/kallen/public_html/Sources/Subs-Boards.php
Line: 790
Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.15, while your database is at version 2.0.11. The above error might possibly go away if you execute the latest version of upgrade.php.

Yes, similar problem here.  I only used this for the colour feature, not icons and it worked well.  However, I just recently need to create a new category and got the error message you mentioned.  Not sure if it's related to 2.0.15 upgrade, I didn't try to create a new category with this mod installed when I was on 2.0.14.

My error message is attached.
Title: Re: Board color and icons
Post by: pepa on February 11, 2018, 05:35:41 AM
This has just become worse.  I uninstalled the mod. Now I can create a new Category but can no longer create a new board.  I get this error message:

"Field 'img_name' doesn't have a default value
File: /home/psychol1/reformaps.net.au/forum/Sources/Subs-Boards.php
Line: 785

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.15, while your database is at version 2.0.14. The above error might possibly go away if you execute the latest version of upgrade.php."

What do I do now .. any ideas?
Title: Re: Board color and icons
Post by: Kindred on February 11, 2018, 08:04:43 AM
You either have to set a default value for those columns, delete the columns or Have your host upgrade MySQL...   this is actually an issue in several MySQL versions..
Title: Re: Board color and icons
Post by: pepa on February 11, 2018, 08:14:29 AM
Quote from: Kindred on February 11, 2018, 08:04:43 AM
You either have to set a default value for those columns, delete the columns or Have your host upgrade MySQL...   this is actually an issue in several MySQL versions..

Hmmm, thanks for the advice, I can't seem to find those columns in PhpMyAdmin?
Title: Re: Board color and icons
Post by: pepa on February 11, 2018, 08:41:08 AM
Quote from: pepa on February 11, 2018, 08:14:29 AM
Quote from: Kindred on February 11, 2018, 08:04:43 AM
You either have to set a default value for those columns, delete the columns or Have your host upgrade MySQL...   this is actually an issue in several MySQL versions..

Hmmm, thanks for the advice, I can't seem to find those columns in PhpMyAdmin?

OK, found it, dropped it and now the error message is:

"Unknown column 'b.color' in 'field list'
File: /home/psychol1/reformaps.net.au/forum/Sources/Subs-Boards.php
Line: 1064

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.15, while your database is at version 2.0.14. The above error might possibly go away if you execute the latest version of upgrade.php."

What's the procedure now?
Title: Re: Board color and icons
Post by: Kindred on February 11, 2018, 08:45:19 AM
Looks like the mod did not get fully uninstalled.

You will have to manually remove any leftover code
Title: Re: Board color and icons
Post by: pepa on February 11, 2018, 09:00:57 AM
Quote from: Kindred on February 11, 2018, 08:45:19 AM
Looks like the mod did not get fully uninstalled.

You will have to manually remove any leftover code

How would I do that?  Haven't coded around for around 10 years.
Title: Re: Board color and icons
Post by: -Rock Lee- on February 12, 2018, 04:08:31 PM
Quote from: H@M on January 24, 2015, 10:42:37 AM
I'm using Zone99 theme and it doesn't work with me any help please?

And making the modification manually does not work either? I remember that theme gives certain problems with many mods.


Regards!
Title: Re: Board color and icons
Post by: srafie on May 20, 2018, 02:04:15 AM
Quote from: oOo--STAR--oOo on July 07, 2016, 02:13:24 PM
Alright, do you need help fixing anything on this with your current forum?

When I finished doing some of my things I need to do, I will update this mod and have it parse for other themes.
I also wanna allow you to change the position of the icon, before or after the board text. On my old forums, I did actually have the icon before which I think looks better.

example!
http://www.uniquez-home.com

Its old and being redesigning.

Please, how to change icons position before the board text mannually, before you update the mod to do it in the admin panel ?

Thnks
Title: Re: Board color and icons
Post by: -Rock Lee- on May 20, 2018, 08:58:53 AM
Ah read Manual Installation of Mods (https://wiki.simplemachines.org/smf/Manual_installation_of_mods)? ... I use a dzinerstudio theme and it is possible to adapt it (search for comments and locate it where you should go).


Regards!
Title: Re: Board color and icons
Post by: srafie on May 21, 2018, 02:03:35 AM
Quote from: Rock Lee on May 20, 2018, 08:58:53 AM
Ah read Manual Installation of Mods (https://wiki.simplemachines.org/smf/Manual_installation_of_mods)? ... I use a dzinerstudio theme and it is possible to adapt it (search for comments and locate it where you should go).


Regards!

Any more tips or links please? i didn't find anythink about dzinerstudio, but i think "oOo--STAR--oOo" has the right way to do that if he reads this
Title: Re: Board color and icons
Post by: -Rock Lee- on May 21, 2018, 01:03:01 PM
Quote from: srafie on May 21, 2018, 02:03:35 AM
Any more tips or links please? i didn't find anythink about dzinerstudio, but i think "oOo--STAR--oOo" has the right way to do that if he reads this

I do not have any link since I was deducting everything by using a theme by the same author and going through several that with many modifications gave me errors ... it is a matter of putting a hand and adapting it!


Regards!