A.G.E. Designs
« Hello message edit »

Welcome Guest. Please Login or Register.
Dec 16, 2009, 10:13am




[+------------+]
hh:mm:ss
[+------------+]







Chat box \/


A.G.E. Designs :: Coding :: Code database :: Hello message edit
   [Search This Thread][Reply] [Send Topic To Friend] [Print]
 AuthorTopic: Hello message edit (Read 76 times)
Arry
Administrator
member is offline



Arry 4 ever



Joined: Jan 2008
Gender: Male
Posts: 10
Location: I dunno'...
 Hello message edit
« Thread Started on Mar 16, 2008, 5:28pm »
[Quote]

This code goes in your global headers.
Edit only where you are told to.
This includes a live 24-hour clock based on your PC configuration (hh:mm:ss), and PM notifier.

The separator can be a character, two or multiple characters

Preview: anywhere on A.G.E. Designs

Code:
<script type="text/javascript">
<!--

/* Hello message edit. © Arry 2008 */

// This code must not be posted outside of A.G.E. Designs without authorisation
// Please do not remove this header



// The variables. Edit them for your ProBoard

var siteID = 'THE NAME OF YOUR SITE'
var stsp1 = 'START SEPARATOR 1'
var fnsp1 = 'FINISH SEPARATOR 1'
var stsp2 = 'START SEPARATOR 2'
var fnsp2 = 'FINISH SEPARATOR 2'
var grtm = 'MESSAGE TO DISPLAY AT THE END'

// Don't edit below unless you know what you are doing!!!

var pb_un = pb_displayname;

pbCells = document.getElementsByTagName('TD');
if(pbCells[2].innerHTML.match(/Hey, (.+?), you/i)){
ObjUser = RegExp.$1
}

if(pbCells[2].innerHTML.match(/action=pm">(\d+) messages/i)){
ObjMsg = RegExp.$1
}

if(pbCells[2].innerHTML.match(/, (\d+) (\w+) new./i)){
ObjNew = RegExp.$1
}

pbCells[2].style.display='none'

ObjTable = document.getElementsByTagName('Table')[2].insertRow(1)

ObjCell = ObjTable.insertCell(0)


if(pbCells[2].innerHTML.match(/Guest/i)){

ObjCell.innerHTML = '<center><font class="2"><br><br>'+stsp1+'Welcome to '+siteID+''+fnsp1+'<br>'+stsp1+'<a href="?action=login">You are not logged in</a>'+fnsp1+'<br>'+stsp2+''+grtm+''+fnsp2+''
}else{

ObjCell.innerHTML = '<center><font class="2"><br><br>'+stsp1+'Welcome to '+siteID+''+fnsp1+'<br>'+stsp1+'<sup>_</sup><a href="?action=viewprofile">Logged in as '+pb_un+'</a><sup>_</sup>'+fnsp1+'<br>'+stsp2+'<sup>_</sup>'+fnsp2+'<br>'+stsp2+'PM status'+fnsp2+'<br>'+stsp2+''+ObjNew+' new out of a '+ObjMsg+' total'+fnsp2+'<br>'+stsp2+''+grtm+''+fnsp2+'</font></center>'
}

//-->

<!--
function startTime()
{
var today=new Date();
var h=today.getHours();
var m=today.getMinutes();
var s=today.getSeconds();
// add a zero in front of numbers<10
m=checkTime(m);
s=checkTime(s);
document.getElementById('txt').innerHTML=h+":"+m+":"+s;
t=setTimeout('startTime()',500);
}

function checkTime(i)
{
if (i<10)
{
i="0" + i;
}
return i;
}

//-->
</script>

<center><br>[+------------+]<body onload="startTime()"><div id='txt'></div>[+------------+]</center>
Link to Post - Back to Top  IP: Logged
   [Search This Thread][Reply] [Send Topic To Friend] [Print]

Affiliates
Charmed Hogwarts... New beginings Five Dragons Bite War Kage War Dark Ages Legends Journey Across Middle-Earth Games for any AGE!
Click here to affiliate



Chat box
Rules



1. No swearing.

2. No advertising.

3. Talk about anything except A.G.E. products.

4. Use your display name when using the chat.

5. Don't tell anybody to click the link in your name.

6. No swearing. (again!)

7. Respect these rules.



Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!