This site is READ ONLY!! No support will be given! Everything in here is just for archiving purposes!
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
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:
Post
by Steve » Fri Sep 17 2010 8:17 am
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!!
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:
Post
by Ooopsie » Mon Oct 11 2010 2:11 pm
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 -->
cisco007
Ciscox
Posts: 2843 Joined: Thu Sep 16 2010 3:25 pm
Country Flag: Mexico
Post
by cisco007 » Mon Oct 11 2010 2:16 pm
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!
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:
Post
by Ooopsie » Mon Oct 11 2010 2:19 pm
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
Post
by Boots » Sat Aug 20 2011 9:23 am
this is a good one thanks for this
Boots
Post
by Boots » Sat Aug 20 2011 5:27 pm
thnaks for this this is a good snippet
Potku
Stars
Posts: 9 Joined: Wed Jun 15 2011 3:03 pm
Post
by Potku » Tue Apr 17 2012 3:41 am
Nice one, thanks!