phpBB.com     phpBB Academy     phpBB Modders     phpBB Weekly     ktuk     phpBB Hacks     Vlad Studio  

New PM information Box

Please a box like the disable board message, but for new PM's (pm count included)

Not enough for a full proper MOD, but too useful not to share
Forum rules
Please read over our forum guidelines

New PM information Box

Postby kenny » 19 Feb 2009, 16:09

Probably one of the shortest snippets I've done so far, but something I wanted to have on this site. Basically, it produces a little box exactly like the "disable board" information box. The box only shows if you have unread private messages. There is also a link to take you straight to your inbox. Sometimes I miss getting PM's - i.e. maybe don't notice them.

OPEN: styles/prosilver/template/overall_header.html
FIND:
Code: Select all
   <div id="page-body">

AFTER ADD:
Code: Select all
       <!-- IF S_USER_UNREAD_PRIVMSG -->
      <div id="message" class="rules">
         <div class="inner"><span class="corners-top"><span></span></span>
            <strong>{L_INFORMATION}:</strong> {L_NEW_PM_NOTICE} - Click <a href="{U_PRIVATEMSGS}">here</a> to go to your Inbox.
         <span class="corners-bottom"><span></span></span></div>
      </div>
      <!-- ENDIF -->

OPEN: language/en/common.php
FIND:
Code: Select all
   'NEW_MESSAGES'            => 'New messages',

AFTER ADD:
Code: Select all
   'NEW_PM_NOTICE'         => 'You have new messages waiting to be read',


I know this goes against what I've said before, but as it's such a small and easy snippet, here is some code for subSilver2. This is a one-off and probably won't be provided again ;)

OPEN: styles/subSilver2/template/overall_header.html
FIND:
Code: Select all
   <div id="menubar">

AFTER ADD:
Code: Select all
   <!-- IF S_USER_UNREAD_PRIVMSG -->
      <table class="tablebg" width="100%" cellspacing="1" cellpadding="0" style="margin-top: 5px;">
      <tr>
         <td class="row1">
            <p class="breadcrumbs"><strong>{L_INFORMATION}:</strong> {L_NEW_PM_NOTICE} - Click <a href="{U_PRIVATEMSGS}">here</a> to go to your Inbox.</p>
         </td>
      </tr>
      </table>
      <br />
   <!-- ENDIF -->


Remember to purge your cache after makeing template changes.
To test that this works, send a PM to yourself. As soon as you see the confirmation screen, go straight to your board index or another page e.g faq :)
|| 6 String Romance || Myspace || phpBB.com || Need Freelance Work? ||
If you need one of my MODs installed - click here


Are you a musician in the Glasgow area interested in acoustic events? The ArtBox
User avatar
kenny kenny is probably rawking out on RockBand \m/
Project Leader
Project Leader
 
Posts: 647
Joined: 06 Jun 2008, 11:38
Location: Airdrie, UK

Donate to 6 String MODs
If you like any of the work that I do here, please consider donating.
click the image on the left for a list of some of the advantages of donating



New PM information Box

Postby JohanNL » 19 Feb 2009, 19:04

Looks funny. Maybe I'll use it (some template edits ofcourse :) )



Why don't you use the built-in function where you'll get a pop-up? :P
Image
User avatar
JohanNL JohanNL is my name
V.I.P
V.I.P
 
Posts: 148
Joined: 27 Sep 2008, 07:24

New PM information Box

Postby kenny » 19 Feb 2009, 22:13

I do, but on the occasions when I'm on a browser that silently blocks them I think this might be handy. Also it may be useful for people that hate the pop-ups :)
If you must know, I was really bored in work today :P
|| 6 String Romance || Myspace || phpBB.com || Need Freelance Work? ||
If you need one of my MODs installed - click here


Are you a musician in the Glasgow area interested in acoustic events? The ArtBox
User avatar
kenny kenny is probably rawking out on RockBand \m/
Project Leader
Project Leader
 
Posts: 647
Joined: 06 Jun 2008, 11:38
Location: Airdrie, UK

New PM information Box

Postby JohanNL » 20 Feb 2009, 09:43

kenny wrote:If you must know, I was really bored in work today :P

Explains a lot :P
Image
User avatar
JohanNL JohanNL is my name
V.I.P
V.I.P
 
Posts: 148
Joined: 27 Sep 2008, 07:24

Re: New PM information Box

Postby vonhazey » 08 Jan 2010, 12:28

I like this a lot as I know users don't always use the pop up option and miss pm's this way its unmissable.
User avatar
vonhazey vonhazey has donated to 6 String MODs
Donator
Donator
 
Posts: 58
Joined: 03 Dec 2009, 13:43
Location: Deepcar, UK

Re: New PM information Box

Postby Pete » 24 Feb 2010, 10:59

I actually found this snippet on another board you shared on. I find it very useful. thanks!
User avatar
Pete
Registered User
Registered User
 
Posts: 3
Joined: 24 Feb 2010, 10:40




Return to Code Snippets

Who is online

Google [Bot], MSN [Bot]


cron