This site is READ ONLY!! No support will be given! Everything in here is just for archiving purposes!

private message coloured notification

Code snippets/ small mods for phpBB3- these can be used to add small but useful features to your forum.
Forum rules
You need to be a registered member to view the topics within this forum ;)
Locked
User avatar
Steve
X-Steve
X-Steve
Posts: 1920
Joined: Thu Sep 16 2010 3:19 pm
Real name: Steve© MX
Country Flag: Great Britain
Location: Up north!
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 -->
subsilver2

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

Code: Select all

<!-- IF S_DISPLAY_PM -->  <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 -->  <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 -->  <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 -->


This tweak can also be done using images for unread/read pm messages ;)
Hello! and Do NOT contact me via private message for support!!
User avatar
Ooopsie
ooopsie
ooopsie
Posts: 1046
Joined: Sat Sep 25 2010 12:15 pm
Real name: Guito :)
Country Flag: United States
Location: Index, WA. or the State of Shock most of the time.
Contact:

Re: private message coloured notification

Post by Ooopsie »

Hope I am posting in the right place this time. What exactly does that 2nd piece do in prosilver?: and is it part of the process (does not seem to be).

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 -->
User avatar
cisco007
Ciscox
Ciscox
Posts: 2843
Joined: Thu Sep 16 2010 3:25 pm
Country Flag: Mexico

Re: private message coloured notification

Post by cisco007 »

one part tells you if you have more than one un-read pm, it will tell you you have one new PM, and 5 unread! or something like that i never get that many PMs but I am sure Steve does or he will tell you!
Image
User avatar
Ooopsie
ooopsie
ooopsie
Posts: 1046
Joined: Sat Sep 25 2010 12:15 pm
Real name: Guito :)
Country Flag: United States
Location: Index, WA. or the State of Shock most of the time.
Contact:

Re: private message coloured notification

Post by Ooopsie »

cisco007 wrote:one part tells you if you have more than one un-read pm, it will tell you you have one new PM, and 5 unread! or something like that i never get that many PMs but I am sure Steve does or he will tell you!

Thanks. That's the answer I was looking for.
Boots

Re: private message coloured notification

Post by Boots »

this is a good one thanks for this
Boots

Re: PM coloured notification - where to add?

Post by Boots »

thnaks for this this is a good snippet
Potku
Stars
Stars
Posts: 9
Joined: Wed Jun 15 2011 3:03 pm

Re: private message coloured notification

Post by Potku »

Nice one, thanks! :)
Locked