Simple Machine Codes
November 22, 2009, 11:56:57 pm
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to SMC, the best place for your SMF For Free Codes
 
  Home Help Search Arcade Affiliates Code Index Staff List Calendar Members Login Register  

Show the number of new PMs a user has (V2)


Pages: [1]   Go Down
  Print  
Author Topic: Show the number of new PMs a user has (V2)  (Read 273 times)
0 Members and 1 Guest are viewing this topic.
Celebrus
Artificially Conscious
Administrator

Offline Offline

Gender: Male
Posts: leet


aka Omikron


View Profile WWW
« on: October 15, 2007, 02:36:46 am »

Code:
<script>
// Made by Omikron 9861
// Please leave this header intact
// Show the number of new PMs a user has (V2)
var pmtotal, url;
$(".maintab_back").each(function(){
if(this.innerHTML.match(/My Messages \[<strong>(\d+)<\/strong>\]/)) {
pmtotal=RegExp.$1;
} else {
pmtotal=0;
}
});
if(location.href.match(/http:\/\/(\S+)\/index.php/)) {
url=RegExp.$1;
}
document.write("<center><div class='tborder'>You have <a href='http://"+url+"/index.php?action=pm'>"+pmtotal+"</a> new personal messages.</div></center>");
</script>

This code is like V1 except that this one includes a link to the PM page that shows the PMs that a user has. Simply copy-paste the code to your footers, into a sidebar or into a board description.
Report Spam   Logged

Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,664



View Profile WWW
« Reply #1 on: October 15, 2007, 06:31:47 am »

I like this code.  I am using on here Wink
Report Spam   Logged

Celebrus
Artificially Conscious
Administrator

Offline Offline

Gender: Male
Posts: leet


aka Omikron


View Profile WWW
« Reply #2 on: October 15, 2007, 11:20:54 am »

I'm honoured... lol
Report Spam   Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2006, Simple Machines LLC
ServerBeach Coupon