Colorize the cells when a new message is posted Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

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.
2 posters

    Colorize the cells when a new message is posted

    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13246
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Tutorial Colorize the cells when a new message is posted

    Post by Ange Tuteur October 10th 2014, 12:40 pm

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



    TonnyKamper likes this post

    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15167
    Reputation : 1696
    Language : English,Greek
    Location : Greece

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

    Post by skouliki February 9th 2020, 3:29 pm

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

    updated 09.02.2020 by skouliki

    TonnyKamper likes this post