1
bradburn
World Cup Count down
  • 2006/1/26 11:07

  • bradburn

  • Not too shy to talk

  • Posts: 105

  • Since: 2005/1/26


Hi there,

I have a small company intranet using XOOPS (2.0.3 - a bit old school now days!),

I would really like a block that has a count down in days to the World Cup in Germany.

I would like everyone to see it (there are no user accounts except admin) on the main page if possible....

Does anyone know of a way I can do this or has seen a module which can do something similiar?

Thanks for any help,
Rob

2
bluenova
Re: World Cup Count down

There are loads of countdown scripts which can be added to a block in xoops, just do a search in google for countdown. here is an example:
<script type="text/javascript"
<!-- 
Countdown script distributed by http://www.hypergurl.com var today=new 
Date() //Enter the date for your countdown. Month first then day. Example 6th 
month 26th day. var countdown=new Date(today.getFullYear(), 626//Enter your 
message hereChange words below to suit var beforedayText="left until whatever 
day you want" 
var ondaytext="Today is the day. Happy Whatever Day!" 
var monthtext=new Array("Jan","Feb","Mar","April","May","June","July","Aug","Sep","Oct","Nov","Dec"
countdown.setMonth(countdown.getMonth()-1//change to 0-11 month format var showdate="("+monthtext[countdown.getMonth()]+" 
"+countdown.getDate()+")" var one_day=1000*60*60*24 var calculatediff="" 
calculatediff=Math.ceil((countdown.getTime()-today.getTime())/(one_day)) if (calculatediff<0){ 
var nextyeartoday=new Date() nextyeartoday.setFullYear(today.getFullYear()+1) 
calculatediff=Math.ceil((nextyeartoday.getTime()-today.getTime())/(one_day)+calculatediff) 
} var pluraldayornot=(calculatediff==1)? "
day" : "days" if 
(calculatediff>0) document.write("
<b>"+calculatediff+" 
"+pluraldayornot+" "+beforedayText+" "+showdate+"
!</b>") 
else if (calculatediff==0) document.write("
<b>"+ondaytext+" 
"+showdate+"
!</b>") --> </script>

3
bradburn
Re: World Cup Count down
  • 2006/1/27 11:39

  • bradburn

  • Not too shy to talk

  • Posts: 105

  • Since: 2005/1/26


Wasnt able to get that to work when I pasted it in a new 'php' block,

Thanks anyway, I will try searching google - havent had any luck so far though!

Cheers,
Rob

4
bluenova
Re: World Cup Count down

Make it an 'html' block

Login

Who's Online

138 user(s) are online (86 user(s) are browsing Support Forums)


Members: 0


Guests: 138


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jun 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits