Здравствуйте ! Написал я простой HTML модуль "Таймер ШкольнеГа" . Установка проста и идет только 1 минуту .
Здравствуйте ! Написал я простой HTML модуль "Таймер ШкольнеГа" . Установка проста и идет только 1 минуту .
Откриваєм templates/*****/main.tpl
между добавляем:
И где хотите
Ставте
Откриваєм templates/*****/main.tpl
между добавляем:
<!--Модуль Таймер ШкольнеГа by Yung3r site yung3r.org.ua-->
<!--
function newYearIn()
{
var now = new Date();
var newYear = new Date("Jan,01,2009,00:00:00");
var totalRemains = (newYear.getTime()-now.getTime());
if (totalRemains>1)
{
var RemainsSec=(parseInt(totalRemains/1000));
var RemainsFullDays=(parseInt(RemainsSec/(24*60*60)));
var secInLastDay=RemainsSec-RemainsFullDays*24*3600;
var RemainsFullHours=(parseInt(secInLastDay/3600));
if (RemainsFullHours<10){RemainsFullHours="0"+RemainsFullHours};
var secInLastHour=secInLastDay-RemainsFullHours*3600;
var RemainsMinutes=(parseInt(secInLastHour/60));
if (RemainsMinutes<10){RemainsMinutes="0"+RemainsMinutes};
var lastSec=secInLastHour-RemainsMinutes*60;
if (lastSec<10){lastSec="0"+lastSec};
var mcend = Date.parse("August 8, 2009, 00:00:00");
var mcnow = now.getTime();
var mc = ((mcend-mcnow)/10).toFixed(0).substr(8);
document.getElementById('newyear').innerHTML = "До школи осталось : "+RemainsFullDays+" дней "+RemainsFullHours+":"+RemainsMinutes+":"+lastSec+"."+mc;
setTimeout("newYearIn()",10);
}
else {document.getElementById("newyear").innerHTML = "ШкоЛьники Идут НА{censored}";}
}
//-->
<!--// Модуль Таймер ШкольнеГа by Yung3r site yung3r.org.ua-->
<!--
function newYearIn()
{
var now = new Date();
var newYear = new Date("Jan,01,2009,00:00:00");
var totalRemains = (newYear.getTime()-now.getTime());
if (totalRemains>1)
{
var RemainsSec=(parseInt(totalRemains/1000));
var RemainsFullDays=(parseInt(RemainsSec/(24*60*60)));
var secInLastDay=RemainsSec-RemainsFullDays*24*3600;
var RemainsFullHours=(parseInt(secInLastDay/3600));
if (RemainsFullHours<10){RemainsFullHours="0"+RemainsFullHours};
var secInLastHour=secInLastDay-RemainsFullHours*3600;
var RemainsMinutes=(parseInt(secInLastHour/60));
if (RemainsMinutes<10){RemainsMinutes="0"+RemainsMinutes};
var lastSec=secInLastHour-RemainsMinutes*60;
if (lastSec<10){lastSec="0"+lastSec};
var mcend = Date.parse("August 8, 2009, 00:00:00");
var mcnow = now.getTime();
var mc = ((mcend-mcnow)/10).toFixed(0).substr(8);
document.getElementById('newyear').innerHTML = "До школи осталось : "+RemainsFullDays+" дней "+RemainsFullHours+":"+RemainsMinutes+":"+lastSec+"."+mc;
setTimeout("newYearIn()",10);
}
else {document.getElementById("newyear").innerHTML = "ШкоЛьники Идут НА{censored}";}
}
//-->
<!--// Модуль Таймер ШкольнеГа by Yung3r site yung3r.org.ua-->
И где хотите
Ставте
[b]<span id="newyear"></span>[/b]