The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Colorize the cells when a new message is posted

2 posters

Go down

Tutorial Colorize the cells when a new message is posted

Post by Ange Tuteur 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 :
COLOR - 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://2img.net/i/fa/empty.gif"]').addClass('newpost');
  $('dl.icon[style*="https://2img.net/i/fa/empty.gif"]').addClass('newpost');
});

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

Modifications :
Replace https://2img.net/i/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 : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

TonnyKamper likes this post

Back to top Go down

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

Post by skouliki 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 : 15153
Reputation : 1696
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

TonnyKamper likes this post

Back to top Go down

Back to top

- Similar topics

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