Colorize the cells when a new message is posted

Go down

Tutorial Colorize the cells when a new message is posted

Post by Ange Tuteur on October 10th 2014, 7:40 am

Colourize the cells when a new message is posted


The following tutorial will allow you to colourize the cells of your Forumotion forum when a new is message posted. Below you will find an example with phpbb3 :
Colorize the cells when a new message is posted Captu165


Installing

Go to Administration Panel > Modules > JavaScript Codes Management and create a new script.

Title : Your choice
Placement : In the homepage
Paste the script below which corresponds to your forum version :

phpbb3 :
Code:
$(function() {
  $('dl.icon[style*="https://illiweb.com/fa/empty.gif"]').addClass('newpost');
  $('dl.icon[style*="https://illiweb.com/fa/empty.gif"]').addClass('newpost');
});

phpbb2, punbb, and invision :
Code:
$(function() {
  $('img[src="https://illiweb.com/fa/empty.gif"]').closest('tr').addClass('newpost');
  $('img[src="https://illiweb.com/fa/empty.gif"]').closest('tr').addClass('newpost');
});

Modifications :
Replace https://illiweb.com/fa/empty.gif by the URL of your image which indicates a new message. Attention ! The script has two similar lines, because you need to include the new message image for categories and forums. When finished making modifications, save and submit your script.


Modifying the CSS

Once the script is installed, you only need to customize the CSS in order to apply color to the cells when new messages are posted. Go to Administration Panel > Display > Colors > CSS stylesheet and paste the code which corresponds to your forum version.

phpbb3 :
Code:
dl.newpost { background-color:#COLOR !important }

phpbb2, punbb, and invision :
Code:
tr.newpost td { background-color:#COLOR !important }

Modifications :
For both versions, replace #COLOR by the color code of your choice.
- Help : Find a color code

Save your modifications and it's done !  :wouhou:



Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13225
Reputation : 2963
Language : EN, JA, FR
Location : Macungie, PA

View user profile

Back to top Go down

Tutorial Re: Colorize the cells when a new message is posted

Post by skouliki on February 9th 2020, 9:29 am

This code was updated to fit in with the new HTTPS address

updated 09.02.2020 by skouliki
skouliki
skouliki
Manager
Manager

Female Posts : 8258
Reputation : 1093
Language : English,Greek
Location : Greece

View user profile http://iconskouliki.forumgreek.com

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum