Tru Visions



 
Tru Visions :: Head Quaters :: Resources :: [PB] PM Loading Bar - View Topic
Topic Rating: *****
Reply Printable View
Russell
Administrator
*****
Status: Offline
Gender: Male
Reputation: 2%
Joined:  
Posts: 64
pmmsnicq
[PB] PM Loading Bar (17th Feb 08 at 4:46pm GMT)Quote Reply
Global Headers
For Full Effect add javascript section to Global Footers.

HTML Section
Code:
 
  1. <table align="center" width="755" class="bordercolor" cellpadding="3" cellspacing="1">
  2.     <tr>
  3.     <td class="titlebg" width="100%" id="hold">
  4.     <div style="font-size:10px;">Loading... ... ...</div>
  5.  
  6.     </td>
  7.     </tr>
  8.     </table>
 


Javascript Section
Code:
 
  1. <script>
  2.     //PM/Loading Bar
  3.     //Coded By Russell
  4.     var td=document.getElementsByTagName("td");
  5.  
  6.     if(td[2].innerHTML.match(/action=pm">(\d+)\s/i)) {
  7.     var pmTot = RegExp.$1
  8.     }
  9.     if(td[2].innerHTML.match(/, (\d+)\ (are|is) new./i)){
  10.     var pmNum = RegExp.$1
  11.     }
  12.     var pm = document.getElementById("hold");
  13.     if(td[3].innerHTML.match(/admin/)){
  14.     var alink = "<a href='/index.cgi?action=admin'>Admin Panel</a> - ";
  15.     }else{
  16.     var alink ="";
  17.     }
  18.     pm.innerHTML="";
  19.     if(pb_username!=="Guest"){
  20.     pm.innerHTML+="<div style='font-size:10px;'>"+alink+"Welcome <a href='/index.cgi?action=viewprofile&user="+pb_username+"'>"+pb_displayname+"</a> (<a href='/?action=logout'>Logout</a>) Inbox: [New <a href='/index.cgi?action=pm'>"+pmNum+"</a> Old <a href='/index.cgi?action=pm'>"+pmTot+"</a>]</div>";
  21.     }else{
  22.     pm.innerHTML+="<div style='font-size:10px;'>Welcome Guest, please <a href='/?action=login'>login</a> or <a href='/?action=register'>register</a></div>";
  23.     }
  24.     </script>
 

Be bee buzz buzz
 Reply Printable View


Copyright © Tru Visions 2008
All times are GMT+0 :: The current time is 10:10am
Page generated in 0.1228 seconds
with 20 Database Queries and 0 cache files
This Forum is Powered By vForums (v2.3)
Create a Forum for Free | Find Forums