Countdownzähler

  • Hallo,
    Ich habe im Internet folgendes Script gefunden:



    Ich mag eigentlich alles an dem Script. Nur will ich nicht den Countdownzähler für den 1.1.2005 sondern jeweils andere Daten. Ich habe kapiert, wo man das Datum ändern kann. Das einzige Problem, das ich da habe ist, dass dieses Countdownscript immer auf ein bestimmtes Datum um 0:00 zählt. Ich will aber das Datum 29.12.2004 um 11:00h als Zielzeit. Kann mir jemand das Script umschreiben oder mir sonst weiterhelfen? Danke für all eure Hilfe!!!

    • Anzeige

    Hallo!

    Wenn du gerade an deiner Website arbeitest oder dein aktuelles Hosting überdenkst: Wir betreiben mit NetzLiving eine Hosting-Plattform, die speziell auf Performance, Sicherheit und einfache Verwaltung ausgelegt ist.

    • ✔️ Schnelle Ladezeiten (optimiert für WordPress, WoltLab & Co.)
    • ✔️ Deutsche Server & DSGVO-konform
    • ✔️ Persönlicher Support (kein 0815-Ticket-System)

    Mehr erfahren

  • Also ich habe in meinem Forum dieses Script am laufen. Dieses ist individuell einzustellen. Man braucht nur die Bilder mit 0 - 9 als gif (also 1c.gif, 2c.gif, usw).

  • hey freakezoid ändere doch einfach das datum wie folgt (nur ändern was rot makiert is):

    <table style="width:{$style['tableinwidth']}">
    <tr>
    <td align="center"><span class="tabletitle">
    <script language="JavaScript1.2">
    function setcountdown(theyear,themonth,theday) {
    yr=theyear;mo=themonth;da=theday
    }

    setcountdown(2006,01,01)

    var occasion="Jahreswechsel 2005!"
    var message_on_occasion="ALLEN USERN VON $master_board_name EIN FROHES NEUES JAHR !"
    var countdownwidth='510px'
    var countdownheight='22px'
    var countdownbgcolor=''
    var opentags=''
    var closetags=''
    var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
    var crosscount=''

    function start_countdown(){
    if (document.layers)
    document.countdownnsmain.visibility="show"
    else if (document.all||document.getElementById)
    crosscount=document.getElementById&&!document.all?document.getElementById("countdownie") : countdownie
    countdown()
    }

    if (document.all||document.getElementById)
    document.write('<span id="countdownie" style="width:'+countdownwidth+'; background-color:'+countdownbgcolor+'"></span>')

    window.onload=start_countdown


    function countdown(){
    var today=new Date()
    var todayy=today.getYear()
    if (todayy < 1000)
    todayy+=1900
    var todaym=today.getMonth()
    var todayd=today.getDate()
    var todayh=today.getHours()
    var todaymin=today.getMinutes()
    var todaysec=today.getSeconds()
    var todaystring=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec
    futurestring=montharray[mo-1]+" "+da+", "+yr
    dd=Date.parse(futurestring)-Date.parse(todaystring)
    dday=Math.floor(dd/(60*60*1000*24)*1)
    dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1)
    dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1)
    dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1)
    //if on day of occasion
    if(dday<=0&&dhour<=0&&dmin<=0&&dsec<=1&&todayd==da){
    if (document.layers){
    document.countdownnsmain.document.countdownnssub.document.write(opentags+message_on_occasion+closetags)
    document.countdownnsmain.document.countdownnssub.document.close()
    }
    else if (document.all||document.getElementById)
    crosscount.innerHTML=opentags+message_on_occasion+closetags
    return
    }
    //if passed day of occasion
    else if (dday<=-1){
    if (document.layers){
    document.countdownnsmain.document.countdownnssub.document.write(opentags+"Occasion already passed! "+closetags)
    document.countdownnsmain.document.countdownnssub.document.close()
    }
    else if (document.all||document.getElementById)
    crosscount.innerHTML=opentags+"Occasion already passed! "+closetags
    return
    }
    //else, if not yet
    else{
    if (document.layers){
    document.countdownnsmain.document.countdownnssub.document.write(opentags+dday+ " days, "+dhour+" hours, "+dmin+" minutes, and "+dsec+" seconds left until "+occasion+closetags)
    document.countdownnsmain.document.countdownnssub.document.close()
    }
    else if (document.all||document.getElementById)
    crosscount.innerHTML=opentags+dday+ " Tage, "+dhour+" Stunden, "+dmin+" Minuten und "+dsec+" Sekunden bis "+occasion+closetags
    }
    setTimeout("countdown()",1000)
    }
    </script>

    <ilayer id="countdownnsmain" width=&{countdownwidth}; height=&{countdownheight}; bgColor=&{countdownbgcolor}; visibility=hide><layer id="countdownnssub" width=&{countdownwidth}; height=&{countdownheight}; left=0 top=0></layer></ilayer>
    </span></td>
    </table>


    skript kann so wie er oben steht kopiert werden :D :huepf2:

  • Ich möchte das vor dem xx Tage, xx Stunden xx... bis zum xxxxx noch etwas steht! Wie kan ich das machen?

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!