Colorize the backgrounds of stickies and announcements
2 posters
Page 1 of 1
Colorize the backgrounds of stickies and announcements
Colorize the backgrounds of stickies and announcements |
The following tutorial will allow you to display a specific color for stickies and announcements on your Forumotion forum. This way important messages will be highlighted in your sub-forums. This tutorial is applicable to the following forum versions : phpbb2, phpbb3, punbb, and invision Before making any changes, make sure that your forum meets the following conditions : - JavaScript codes management is activated 1. The JavaScriptThe first step of this tutorial is to install the JavaScript on your board. This will allow us to add a class to the cells containing the sticky and announcement images. Go to Admin Panel > Modules > JavaScript codes management and create a new script with the following settings. Placement : In the sub-forums If you're using phpbb2, punbb, or invision paste this code :
otherwise paste this code for phpbb3 :
Modifications : In both scripts, make sure to change the image URLs with the ones you use on your theme : - https://url_image_annonce.jpg : The image URL used for announcements - https://url_image_Note.jpg : The image URL used for stickies When you're finished make sure to save the script. 2. The CSSNow that the script is installed, a class will be added to the cells of stickies and announcements. We will use these classes to apply a style to them. Go to Admin Panel > Display > Colors > CSS stylesheet and paste the code that corresponds to your forum version. phpBB2, punBB and Invision :
phpBB3 :
Modifications : For both versions, replace #COLOR with the color code of your choice. - tool : http://www.colorpicker.com/ Note : If you are familiar with CSS, you can apply a more perfect style on stickies and announcements, such as a specific font color, a different typeface, etc.. Extra : topic icons, global announcements, etc..The tutorial above is mainly focused on changing the background color of stickies and announcements, you can apply this to different cells in your forum by modifying the base script. For example you can apply it to global announcements using the URL of the image associated with global announcements, or to topics icons, using the URL of the images used for your various icons. For example, if we want to add a color for cells containing the icon , simply use the script and CSS below : phpBB2, punBB and Invision :
phpbb3 :
phpBB2, punBB and Invision :
phpbb3 :
Explanation : In the script, we simply change the URL of the image, and the class added here : addClass("resolu"); ( thus changes from "annonce" or "Note" to "resolu" ). If you do not change this class, the script will not work correctly. Don't hesitate, be creative ! |
This tutorial was written by Matriochka of the French Support Forum, and translated to English by Ange Tuteur. |
TonnyKamper and trajce like this post
Re: Colorize the backgrounds of stickies and announcements
This code was updated to fit in with the new HTTPS address
updated 13.03.2022 by skouliki
updated 13.03.2022 by skouliki
TonnyKamper likes this post
Similar topics
» Nav bar Image colorize
» colorize code problem
» Colorize the code tags
» so, stickies...
» Colorize the cells when a new message is posted
» colorize code problem
» Colorize the code tags
» so, stickies...
» Colorize the cells when a new message is posted
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum