WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You

WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You


You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

BIG_C_23


Registered Member
Registered Member
So im trying to get my ticker to say "Welcome Back, "NICKNAME". As one announcement and "It is currently "DATE" "TIME". as another announcement. followed by my regular announcements. So could any one tell me what i need to put?

ankillien

ankillien
Administrator
Administrator
Hello,

For "Welcome Back, "NICKNAME", you can use this code...

Code:
Welcome Back, {USERNAME}

For current date and time, you need to add the following javascript...

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

var currentDate = new Date()
var day = currentDate.getDate()
var month = currentDate.getMonth()
var year = currentDate.getFullYear()

var hours = currentDate.getHours()
var minutes = currentDate.getMinutes()

var suffix = "AM";
if (hours >= 12) {
suffix = "PM";
hours = hours - 12;
}
if (hours == 0) {
hours = 12;
}

if (minutes < 10)
minutes = "0" + minutes;

document.write(hours + ":" + minutes + " " + suffix + " ")
document.write(day + "/" + month + "/" + year + " ")
 
</script>

You can add the script in the scrolling announcement.

BIG_C_23


Registered Member
Registered Member
Thanks!

ankillien

ankillien
Administrator
Administrator
Glad I could help Very Happy

Solved > Locked

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

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