private message coloured notification

Guides & Snippets for phpBB3. Try the Snippets here and share Your own Snippets
There is no support here! Only Read Access!
User avatar
Steve
BBCoder VI
BBCoder VI
Posts: 803
Joined: 05 Mar 2010, 01:10
Extra Rank: Donator.png
BBCodes: 2000
Favourite BBCode: porn tube
Favourite MOD: Non of Stokers
Location: up your bum
Contact:

private message coloured notification

Post 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 ;)
NAPWR wrote: Nice, Stoker is Hot
User avatar
Fire-Fox
BBCoder IV
BBCoder IV
Posts: 275
Joined: 22 Mar 2010, 13:24
Location: Denmark

Re: private message coloured notification

Post by Fire-Fox »

Great :)

thanks
User avatar
Inner Circle
BBCoder III
BBCoder III
Posts: 107
Joined: 20 Mar 2010, 20:25
Location: Germany
Contact:

Re: private message coloured notification

Post by Inner Circle »

awesome!

thanks for the snippet!
User avatar
Oliver
BBCoder III
BBCoder III
Posts: 120
Joined: 07 Mar 2010, 11:55

Re: private message coloured notification

Post by Oliver »

Thats good, but if you have black nawbar then the normall pm links not show.

skybule theme,, there are "white" links.
User avatar
Fire-Fox
BBCoder IV
BBCoder IV
Posts: 275
Joined: 22 Mar 2010, 13:24
Location: Denmark

Re: private message coloured notification

Post by Fire-Fox »

Then replace with some color that match the theme :)
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

Re: private message coloured notification

Post by cisco007 »

yes oliver replace this #FF0000 with whichever color you want!
User avatar
Oliver
BBCoder III
BBCoder III
Posts: 120
Joined: 07 Mar 2010, 11:55

Re: private message coloured notification

Post 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 -->
Last edited by Oliver on 25 Mar 2010, 21:54, edited 2 times in total.
User avatar
Steve
BBCoder VI
BBCoder VI
Posts: 803
Joined: 05 Mar 2010, 01:10
Extra Rank: Donator.png
BBCodes: 2000
Favourite BBCode: porn tube
Favourite MOD: Non of Stokers
Location: up your bum
Contact:

Re: private message coloured notification

Post 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 -->
NAPWR wrote: Nice, Stoker is Hot
User avatar
Oliver
BBCoder III
BBCoder III
Posts: 120
Joined: 07 Mar 2010, 11:55

Re: private message coloured notification

Post by Oliver »

Thanks Vectra. Its perfect ;)
User avatar
kevinviet
BBCoder III
BBCoder III
Posts: 123
Joined: 06 Mar 2010, 04:52

Re: private message coloured notification

Post by kevinviet »

Thank you very much vectra-mods, very useful Snippet :)
Locked