Page 1 of 2

private message coloured notification

Posted: 25 Mar 2010, 14:32
by Steve
This little phpbb3 snippet displays unread private messages as red.

Can be used on other styles other than prosilver and subsilver2
instructions

prosilver

open styles/prosilver/template/overall_header.html

find:

Code: Select all

<!-- IF S_DISPLAY_PM --> (<a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a>)<!-- ENDIF -->
replace with:

Code: Select all

<!-- IF S_USER_NEW_PRIVMSG or PRIVATE_MESSAGE_INFO_UNREAD --><a href="{U_PRIVATEMSGS}" style=" color: #FF0000;">({PRIVATE_MESSAGE_INFO})<!-- IF S_USER_NEW_PRIVMSG --><!-- ELSE --><!-- ENDIF --></a>
		                <!-- ELSE -->(<a href="{U_PRIVATEMSGS}" >{PRIVATE_MESSAGE_INFO}</a>)<!-- ENDIF -->
to display unread pm info,
use this code:

Code: Select all

	<!-- IF S_USER_LOGGED_IN --><!-- IF S_USER_NEW_PRIVMSG -->(<a href="{U_PRIVATEMSGS}" style="color:#FF0000;">{PRIVATE_MESSAGE_INFO}</a>)<!-- IF S_USER_NEW_PRIVMSG --><!-- ELSE --><!-- ENDIF -->
		<!-- ELSE -->(<a href="{U_PRIVATEMSGS}" >{PRIVATE_MESSAGE_INFO}</a>)<!-- ENDIF --><!-- ENDIF -->
		<!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->
		(<a href="{U_PRIVATEMSGS}" style="color:#FF0000;">{PRIVATE_MESSAGE_INFO_UNREAD}</a>)<!-- ENDIF -->
unr.PNG
Image

subsilver2

open styles/subsilver2/template/overall_header.html
find:

Code: Select all

<!-- IF S_DISPLAY_PM --> &nbsp;<a href="{U_PRIVATEMSGS}"><img src="{T_THEME_PATH}/images/icon_mini_message.gif" width="12" height="13" alt="*" /> {PRIVATE_MESSAGE_INFO}<!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->, {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF --></a><!-- ENDIF -->
replace with:

Code: Select all

					<!-- IF S_USER_NEW_PRIVMSG or PRIVATE_MESSAGE_INFO_UNREAD --> &nbsp;<a href="{U_PRIVATEMSGS}" style=" color: #FF0000;"><img src="{T_THEME_PATH}/images/icon_mini_message.gif" width="12" height="13" alt="*" /> {PRIVATE_MESSAGE_INFO}<!-- IF S_USER_NEW_PRIVMSG --><!-- ELSE --><!-- ENDIF --></a>
                    <!-- ELSE --> &nbsp;<a href="{U_PRIVATEMSGS}" ><img src="{T_THEME_PATH}/images/icon_mini_message.gif" width="12" height="13" alt="*" /> {PRIVATE_MESSAGE_INFO}</a><!-- ENDIF -->
to display unread pm info,
use this code:

Code: Select all

	    <!-- IF S_USER_LOGGED_IN --><!-- IF S_USER_NEW_PRIVMSG --><a href="{U_PRIVATEMSGS}" style="color:#FF0000;"><img src="{T_THEME_PATH}/images/icon_mini_message.gif" width="12" height="13" alt="*" /> {PRIVATE_MESSAGE_INFO}</a><!-- IF S_USER_NEW_PRIVMSG --><!-- ELSE --><!-- ENDIF -->
        <!-- ELSE --><a href="{U_PRIVATEMSGS}" >{PRIVATE_MESSAGE_INFO}</a><!-- ENDIF --><!-- ENDIF -->
        <!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->
        <a href="{U_PRIVATEMSGS}" style="color:#FF0000;"> , {PRIVATE_MESSAGE_INFO_UNREAD}</a><!-- ENDIF -->
spur.PNG
Image

This tweak can also be done using images for unread/read pm messages ;)

Re: private message coloured notification

Posted: 25 Mar 2010, 16:43
by Fire-Fox
Great :)

thanks

Re: private message coloured notification

Posted: 25 Mar 2010, 17:39
by Inner Circle
awesome!

thanks for the snippet!

Re: private message coloured notification

Posted: 25 Mar 2010, 17:50
by Oliver
Thats good, but if you have black nawbar then the normall pm links not show.

skybule theme,, there are "white" links.

Re: private message coloured notification

Posted: 25 Mar 2010, 20:12
by Fire-Fox
Then replace with some color that match the theme :)

Re: private message coloured notification

Posted: 25 Mar 2010, 20:26
by cisco007
yes oliver replace this #FF0000 with whichever color you want!

Re: private message coloured notification

Posted: 25 Mar 2010, 21:51
by Oliver
We need a different code skyblue theme. Where do I put this code, then it does not become a private message to the entire region is not displayed on a black background. In this style comes standard with white links. If I switch to that color of what you said so, it seems only arrived of detail in the message.




That my original code.. Style is Skyblue...

Code: Select all

<!-- IF S_DISPLAY_PM --> (<a  class="white" href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a>)<!-- ENDIF -->

Re: private message coloured notification

Posted: 25 Mar 2010, 21:53
by Steve
Oliver ยป 25 Mar 2010, 20:51 wrote:We need a different code skyblue theme. Where do I put this code, then it does not become a private message to the entire region is not displayed on a black background. In this style comes standard with white links. If I switch to that color of what you said so, it seems only arrived of detail in the message.




That my original code.. Style is Skyblue...

Code: Select all

<!-- IFS S_DISPLAY_PM --> (<a  class="white" href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a>)<!-- ENDIF -->

try this:

Code: Select all

                   <!-- IF S_USER_NEW_PRIVMSG or PRIVATE_MESSAGE_INFO_UNREAD --> &nbsp;<a href="{U_PRIVATEMSGS}" style=" color: #FF0000;"><img src="{T_THEME_PATH}/images/icon_mini_message.gif" width="12" height="13" alt="*" /> {PRIVATE_MESSAGE_INFO}<!-- IF S_USER_NEW_PRIVMSG --><!-- ELSE --><!-- ENDIF --></a>
                        <!-- ELSE --> &nbsp;<a class="white" href="{U_PRIVATEMSGS}" ><img src="{T_THEME_PATH}/images/icon_mini_message.gif" width="12" height="13" alt="*" /> {PRIVATE_MESSAGE_INFO}</a><!-- ENDIF -->

Re: private message coloured notification

Posted: 25 Mar 2010, 22:11
by Oliver
Thanks Vectra. Its perfect ;)

Re: private message coloured notification

Posted: 25 Mar 2010, 22:38
by kevinviet
Thank you very much vectra-mods, very useful Snippet :)