Andy 0 Report post Posted November 27, 2003 Tach zuSammen Ich werde von meiner Freundin schon seit Tagen "terrorisiert" weil Sie unbedingt einen Counter haben möchte, der rückwärts zählt. Am allerliebsten wäre Ihr ein Counter, wie diesen hier auf der Webseite oben links, ich habe mir auch schon einen Wolf gegoogelt, aber bin leider bisher auf noch nichts brauchbares gestoßen Daher wollte ich mich mal an Euch wenden, und schauen was Ihr mir so für "rückwärtscounter" anbieten könnt Gut wäre kein Text Countdown, sondern ein Grafik Counter der rückwärts Zählt, wie eben im Beispiel Link. Sie macht eBay wie eine verrückte, und brauch das wohl für Ihre nächsten Auktionen etc. ThX schon mal für die ein oder andern Tips, mit denen Ihr mich bzw. my Girl beglücken werdet :) Share this post Link to post
Tankred 0 Report post Posted November 27, 2003 Ich könnt Dir ja was hochladen, aber das geht ja schooon wieder nicht *wahnsinnigwerd* Share this post Link to post
Helge 192 Report post Posted November 27, 2003 Hochladen? Naja, ich geb dir mal den Code, Andy Achja, sowas nennt man auch "Countdown" <script> //This script was written by Craig Humphreys for Vybin.Com, if you use the code //please leave this credits in tact. //This script has editable portions which are highlighted // It is only intended to count down within a day, so don't try to set it to count down // past 1 as it will give an event has started message. // To convert your time to GMT, double click on your computers clock, and look on the drop down list. // At 1 o clock GMT the clock resets, so the countdown will reset, and start counting to the specified time agian function countdown() { // This sets any users time to GMT, so that the count down is the same for everbody var GMT=new Date(); var onGmt=GMT.toGMTString(); // splits the time at spaces findTime=onGmt.split(' ') week = findTime[0]; day = findTime[1]; month = findTime[2]; year = findTime[3]; hms = findTime[4]; // splits the time at the colon hmstime = hms.split(':'); // assign variables to split, changing hour from char to numeric. var hour = hmstime[0] - 0; var min = hmstime[1]; // add 1 to the hour to account for GMT daylight savings //this should be removed when daylight savings put hour back. hour=hour+1 //gets the minutes, and the seconds from the users clock time= new Date() var curmin=time.getMinutes(); var cursec=time.getSeconds(); //Finds the difference so that a count down can begin, this assumes countdown is to the hour var startmin=60-curmin; var startsec=60-cursec; // This is set to allow clock to hit the 0 value, rather than just rotating over to 60 startsec=startsec-1 startmin=startmin-1 //User Can Edit Variable stopHour // stopHour should be edited to the time in GMT that the countdown will stop, using 24 hour clock e.g. 16=4 pm (MAX=24) var stopHour=24 //User Can Edit Variable minset //set minset to false if you only want clock to countdown to an hour, for example 4 o clock var minset=true; if (minset==true) { //User Can Edit Variable stopmin //set stopmin to the number of minutes past the hour you want the clock to count to (MAX 59) stopmin=30 } if (minset==false) { stopmin=0 } //adds stopmin to startmin startmin=60-curmin+stopmin; // figures out how many hours to countdown to var startHour=stopHour-hour-1 // makes sure the minutes value doesn't go over 60 if (startmin >= 60) { startmin=startmin-60; startHour=startHour+1; } // puts the values stored in the variables into the text box document.countform.counter.value=startHour + " hours " + startmin + " minutes " + startsec + " Seconds "; //repeats the function every second, giving the count down effect timer=setTimeout("countdown()",1000) //Message can be changed to whatever you want message="Event Has Started"; // Stop condition tells the user that the event has started if ((hour>=stopHour) && (startmin>=stopmin)) { clearTimeout(timer) document.countform.counter.value=message } // a second stop condition, which doesn't allow the hour value to become negative if (hour=='-') { clearTimeout(timer) document.countform.counter.value=message } } </script> There are Until the user specified time today has been reached. <script> countdown(); </script> Share this post Link to post
Andy 0 Report post Posted November 27, 2003 Ich könnt Dir ja was hochladen, aber das geht ja schooon wieder nicht *wahnsinnigwerd* Nun ja, hast Du keinen Webspace ? Ich habe es aber nun auch hier aktiviert ;) Share this post Link to post
Tankred 0 Report post Posted November 27, 2003 (edited) Ich hab halt schon den fertigen Counter mit Grafiken und solchem Schnickschnack. Ich kann ja den Code der gifs hier posten *muhaha* Ahh - Upload! Edited November 27, 2003 by Tankred Share this post Link to post
Andy 0 Report post Posted November 27, 2003 (edited) Ich hab halt schon den fertigen Counter mit Grafiken und solchem Schnickschnack. Ich kann ja den Code der gifs hier posten *muhaha* Ahh - Upload! Danke, ich werde das mal antesten ...natürlich auch Danke an Rigo Meine Freundin sucht aber einen Grafik Countdown, der Textcounter gefällt Ihr leider nicht. Ich habe es leider wirklich nicht einfach mit Ihr Ich schau mal was ich eher verbauen werde und hoffe das ich mit einen der beiden Lösungen schon zufrieden sein werde Hier schon mal mein erster Versuch aber kann es sein das ich da was auf die schnelle übersehen habe ? Wenn ich an der Stelle function mill() { today=new Date(); millennium=new Date (2001,1,1,0,0,0); das ganze mal so ändere: function mill() { today=new Date(); millennium=new Date (2004,1,1,0,0,0); Dann kommt als ergebnis 65 Tage raus, und es sind ja wohl ab heute keine 65 Tage mehr bis zum 01.01.2004, oder ? Ich denke, ich hab entweder was übersehen, oder da ist ein Millienium Bug drin *lach* Edited November 27, 2003 by Andy Share this post Link to post
Tankred 0 Report post Posted November 27, 2003 Tatsache! Der scheint sich um genau einen Monat zu verrechnen... Share this post Link to post
Andy 0 Report post Posted November 27, 2003 Nun ja, dann hoffe ich das jemand einen Rat dazu hat, ich habe imo jedenfalls keine weitere Idee ;) Share this post Link to post
Tankred 0 Report post Posted November 27, 2003 Ich blick den Code auch nicht bzw. warum der sich um einen Monat vertut. Ich hab hier aber noch was anderes: <html> <BODY TEXT="#FFFFFF" LINK="#FFFFFF" VLINK="#999999" ALINK="#00FF00" BGCOLOR="#000000" onload="clock()"> <Center> <script> var diffMonths=-1, diffDays=-1, diffHours=-1, diffMins=-1 var compDat = new Date("Dec 31, 2003 23:59:59") var msPerMonth = 31 * 24 * 60 * 60 * 1000 var msPerDay = 24 * 60 * 60 * 1000 var msPerHour = 60 * 60 * 1000 var msPerMin = 60 * 1000 var msPerSec = 1000 function clock(){ var today = new Date() var changeD = diffDays var changeH = diffHours var changeMin = diffMins var diffMs = compDat.getTime() - today.getTime() diffDays = Math.floor(diffMs / msPerDay) diffMs -= diffDays * msPerDay diffHours = Math.floor(diffMs / msPerHour) diffMs -= diffHours * msPerHour diffMins = Math.floor(diffMs / msPerMin) diffMs -= diffMins * msPerMin var diffSecs = Math.floor(diffMs / msPerSec) if(changeD!=diffDays) document.forms[0].days.value=diffDays if(changeH!=diffHours) document.forms[0].hours.value=diffHours if(changeMin!=diffMins) document.forms[0].mins.value=diffMins document.forms[0].secs.value=diffSecs timerID = setTimeout("clock()",1000)} </SCRIPT> <FORM><B><FONT FACE="Arial,Helvetica" SIZE="1">Noch <input type="text" name="days" size="2"> Tage <input type="text" name="hours" size="2"> Stunden <input type="text" name="mins" size="2"> Minuten <input type="text" name="secs" size="2"> Sekunden bis zum Ende der eBay Auktion von Andys Freundin. </B></FONT> </FORM> </CENTER> </BODY> </HTML> Das zählt auch richtig :) Share this post Link to post
Andy 0 Report post Posted November 27, 2003 Ich blick den Code auch nicht bzw. warum der sich um einen Monat vertut. Ich hab hier aber noch was anderes... Hm.. Danke. Leider ist da meine Maus absolut "unflexibel", wie Frauen eben manchmal sind *lach* Sie mag nur einen Grafik Counter, sind nichts. Naja, ich werde mal schauen ob ich den Millenium Counter irgendwie bezwingen kann :D Share this post Link to post
F!shBone 0 Report post Posted November 27, 2003 Dann stell doch einfach statt 1.1.2004 1.12.2003 ein, dann sollte es stimmen, wenn ja genau ein Monat zu viel ist. Share this post Link to post
Andy 0 Report post Posted November 27, 2003 Dann stell doch einfach statt 1.1.2004 1.12.2003 ein, dann sollte es stimmen, wenn ja genau ein Monat zu viel ist. hm.. das wäre im schlimmsten fall evtl. eine Möglichkeit, aber sowas mag ich eigentlich gar nicht ;) Share this post Link to post
TomCrow 0 Report post Posted November 22, 2004 (edited) Werd' jetzt mal diesen alten thread "aufwärmen", weil's hier irgendwie gut dazupasst.. Ich hab' auf invisionize hier eine schöne Möglichkeit gefunden, Countdowns mit BBCodes umzusetzen.. (Demo ) Geht das auch irgendwie mit 1.3 und dem Custom BBCode-Mod (von Peter)? Bzw. wie kann ich sowas ähnliches in einem Beitrag posten (script geht ja nicht mit dohtml ) mfg, Tom Edited November 22, 2004 by TomCrow Share this post Link to post