Welcome Guest [Log In] [Register]



Add Reply
A request
Topic Started: Jan 18 2007, 01:29 PM (407 Views)
King Elemento
3a4a1
Administrators
Erm... I'd like a [now] tag, which replaces text saying [now] displays the date and time, and counts up in years, months, days, hours, minutes, seconds, and milliseconds*. If this can be done, excellent!

*Only prefered.
Offline Profile Quote Post Goto Top
 
rig
1a5a6a4
Administrators
Is it alright if i re-edit your re-edited code? :huh:
Posted Image
Offline Profile Quote Post Goto Top
 
ari_aaron
Member Avatar
1a4
Root Administrator
He can't really give you permission, only James (who originally made it).

It is very simple, but my list of codes to make is currently to long to add any others to.

My msn: Posted Image
Posted Image
If anyone wants GMail or Windows Live Messenger invites, PM me!
Offline Profile Quote Post Goto Top
 
King Elemento
3a4a1
Administrators
XD
Ok. Cool, sure.
I wish you COULD give me one though...
And I don't really want a box around it. Just plain text.
Offline Profile Quote Post Goto Top
 
rig
1a5a6a4
Administrators
ari_aaron
Jan 18 2007, 09:11 PM
He can't really give you permission, only James (who originally made it).

It is very simple, but my list of codes to make is currently to long to add any others to.

Lol... yeah you are right. Almost done with it right now and im probably gonna re-edit in a minute or so.

Edit: Hmm... Im not exactly sure on what you want so ill give you two srcripts. Also one might only work in IE. Try the bottom one. If the bottom one doesnt work for you try the top one. Personally, I never tested these :lol:

Quote:
 
<script>
//TimeTag-Rig
now="[now]"
mydate= new Date()
theyear=mydate.getFullYear()
themonth=mydate.getMonth()+1
thetoday=mydate.getDate()
hour=mydate.getHours()+1
minute=mydate.getMinutes()
second=mydate.getSeconds()
thetime=hour+":"+minute+":"+second
iDiv=document.getElementsByTagName("DIV")
for(i=0;i<iDiv.length;i++){
for(n=0;n<100;n++){
if(iDiv.innerHTML.match(now) != null){
iDiv.innerHTML = iDiv.innerHTML.replace(now,thetoday+"/"+themonth+"/"+theyear+" "+thetime);
}
}
}
</script>


Quote:
 
<div id="post">
[now]
</div>
<script>
//TimeTag-Rig
//V2 Test
now="[now]"
mydate= new Date()
theyear=mydate.getFullYear()
themonth=mydate.getMonth()+1
thetoday=mydate.getDate()
hour=mydate.getHours()+1
minute=mydate.getMinutes()
second=mydate.getSeconds()
thetime=hour+":"+minute+":"+second
thepost=document.getElementById('post')
if(thepost.innerHTML.match(now) != null){
thepost.innerHTML=thepost.innerHTML.replace(now,thetoday+"/"+themonth+"/"+theyear+" "+thetime);
}
</script>
Posted Image
Offline Profile Quote Post Goto Top
 
King Elemento
3a4a1
Administrators
I'll try them both, and I take it they go in the footers.

EDIT: It takes the page too long to load, and the second one doesn't work. Sorry.
Offline Profile Quote Post Goto Top
 
rig
1a5a6a4
Administrators
I might make there be a button instead of you typing the tag maybe... so you just press the button and it adds the current date for the second one. Im probably missing something thats obvious though.
Posted Image
Offline Profile Quote Post Goto Top
 
ari_aaron
Member Avatar
1a4
Root Administrator
If you don't mind the output being like this:
Quote:
 
Sat Jan 20 2007 22:56:35 GMT-0500 (Eastern Standard Time)


You can just use date()

My msn: Posted Image
Posted Image
If anyone wants GMail or Windows Live Messenger invites, PM me!
Offline Profile Quote Post Goto Top
 
fsd
3a4

i think he might want an updating date
"mmmmm i love the internet. every time i go to a website i get a cookie HOW AWESOME IS THAT!" - Quote from me


"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." - Albert Einstein
"Imagination is more important than knowledge."- Albert Einstein
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · InvisionFree Scripts · Next Topic »
Add Reply


Theme designed by Sith of Outline