The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Javascript

3 posters

Go down

Javascript Empty Javascript

Post by zerohack Wed Jun 17, 2009 10:08 pm

Hello...how i can add javascript on modules? or is there anyway how to add javascript?

I want to add this:

<style>
#time {
background-image:url(/sites/www.gamersfirst.com.warrock/themes/warrock/images/time-background.jpg);
width:207px;
height:42px;
display:block;
position:relative;
left:503px;
top:-47px;
>top:-45px;
}
#servertime {
position:relative;
left:35px;
top:10px;
font-weight:bold;
font-size:13px;
}

</style>
<script type="text/javascript">

// Current Server Time script (SSI or PHP)- By JavaScriptKit.com (http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
// This notice must stay intact for use.

//Depending on whether your page supports SSI (.shtml) or PHP (.php), UNCOMMENT the line below your page supports and COMMENT the one it does not:
//Default is that SSI method is uncommented, and PHP is commented:

//var currenttime = '<!--#config timefmt="%B %d, %Y %H:%M:%S"--><!--#echo var="DATE_LOCAL" -->' //SSI method of getting server date
var currenttime = 'June 17, 2009 10:03:41' //PHP method of getting server date

///////////Stop editting here/////////////////////////////////

var montharray=new Array("Jan.","Feb.","Mar.","Apr.","May.","Jun.","Jul.","Aug.","Sept.","Oct.","Nov.","Dec.")
var serverdate=new Date(currenttime)

function padlength(what){
var output=(what.toString().length==1)? "0"+what : what
return output
}

function displaytime(){
serverdate.setSeconds(serverdate.getSeconds()+1)
/*var datestring=montharray[serverdate.getMonth()]+" "+padlength(serverdate.getDate())+", "+serverdate.getFullYear()*/
var datestring="War Rock Time "
/*var timestring=padlength(serverdate.getHours())+":"+padlength(serverdate.getMinutes())+":"+padlength(serverdate.getSeconds())*/
var timestring=padlength(serverdate.getHours())+":"+padlength(serverdate.getMinutes())
document.getElementById("servertime").innerHTML=datestring+" "+timestring
}

window.onload=function(){
setInterval("displaytime()", 1000)
}

</script>
avatar
zerohack
Forumember

Posts : 84
Reputation : 0
Language : Finnish & english

Back to top Go down

Javascript Empty Re: Javascript

Post by Dark Takua Wed Jun 17, 2009 11:43 pm

ACP>Modules>Forum Widgets management>Create custom block>Insert>done.
Dark Takua
Dark Takua
Active Poster

Male Posts : 1012
Reputation : 23
Language : English

http://gzpower.forumotions.net

Back to top Go down

Javascript Empty Re: Javascript

Post by roflmao Sat Jun 20, 2009 7:11 am

Explicit Content Removed
avatar
roflmao
Forumember

Posts : 57
Reputation : 0
Language : nbgfdbh

Back to top Go down

Javascript Empty Re: Javascript

Post by roflmao Sat Jun 20, 2009 7:24 am

Explicit Content Removed
avatar
roflmao
Forumember

Posts : 57
Reputation : 0
Language : nbgfdbh

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum