vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Mini Mods - YoBroMoFo - Countdown Timer (https://vborg.vbsupport.ru/showthread.php?t=234060)

mmacrypt 04-17-2010 02:35 AM

Quote:

Originally Posted by PHILLYFAN (Post 2022506)
how did u get it to move to the left corner? Also how did u add color to the timer?
thanks

I moved it as the 2nd line in the header, here is my code starting at the top of the header.
Code:

  <div id="newnav">
<div style="font-weight:bold;float:left;padding:0 0 0 15px"><!--yobromofo.com countdown timer start-->
<li><font color="#FF0000"><span id="yobromofo-countdown-timer"></span> seconds <a style="color:#2B60DE" href="http://mmacrypt.com/forum/showthread.php?7002-UFC-113-Machida-vs.-Shogun-II">until UFC 113</a></font></li>
<!--yobromofo.com countdown timer end-->


Hall of Famer 04-17-2010 10:00 AM

Screenshots please?

mmacrypt 04-17-2010 03:06 PM

Quote:

Originally Posted by Hall of Famer (Post 2022616)
Screenshots please?

Not sure if this was for me or not but this is how I have it set up, upper left.

https://vborg.vbsupport.ru/external/2010/04/44.png

PHILLYFAN 04-17-2010 04:17 PM

mmacrypt could u copy your js and paste it here so I can see how you have it set up? I would greatly appreciate it man?

mmacrypt 04-18-2010 04:19 AM

I'm a bit spent, I will do it tomorrow buddy.

PHILLYFAN 04-18-2010 06:49 PM

ok.......

PHILLYFAN 04-20-2010 12:21 AM

anything guys?

mmacrypt 04-21-2010 02:52 AM

Sorry buddy, got super busy. Here is how I have mine set up, didn't change much at all.

Code:

ar month = '5'; // 1 through 12 or '*' within the next month, '0' for the current month
var day = '8';  // day of month or + day offset
var dow = 0;    // day of week sun=1 sat=7 or 0 for whatever day it falls on
var hour = 20;    // 0 through 23 for the hour of the day
var min = 0;    // 0 through 59 for minutes after the hour
var tz = -6;    // offset in hours from UTC to your timezone
var lab = 'yobromofo-countdown-timer';  // id of the entry on the page where the counter is to be inserted

function start() {displayCountdown(setCountdown(month,day,hour,min,tz),lab);}
loaded(lab,start);

// Countdown Javascript
// copyright 20th April 2005, 1st November 2009 by Stephen Chapman
// permission to use this Javascript on your web page is granted
// provided that all of the code in this script (including these
// comments) is used without any alteration
// you may change the start function if required
// code adapted for vbulletin by timberfloorau of yobromofo.com british expats australia
var pageLoaded = 0; window.onload = function() {pageLoaded = 1;}
function loaded(i,f) {if (document.getElementById && document.getElementById(i) != null) f(); else if (!pageLoaded) setTimeout('loaded(\''+i+'\','+f+')',100);
}
function setCountdown(month,day,hour,min,tz) {var m = month; if (month=='*') m = 0;  var c = setC(m,day,hour,tz); if (month == '*' && c < 0)  c = setC('*',day,hour,tz); return c;} function setC(month,day,hour,tz) {var toDate = new Date();if (day.substr(0,1) == '+') {var day1 = parseInt(day.substr(1));toDate.setDate(toDate.getDate()+day1);} else{toDate.setDate(day);}if (month == '*')toDate.setMonth(toDate.getMonth() + 1);else if (month > 0) { if (month <= toDate.getMonth())toDate.setFullYear(toDate.getFullYear() + 1);toDate.setMonth(month-1);}
if (dow >0) toDate.setDate(toDate.getDate()+(dow-1-toDate.getDay())%7);
toDate.setHours(hour);toDate.setMinutes(min-(tz*60));toDate.setSeconds(0);var fromDate = new Date();fromDate.setMinutes(fromDate.getMinutes() + fromDate.getTimezoneOffset());var diffDate = new Date(0);diffDate.setMilliseconds(toDate - fromDate);return Math.floor(diffDate.valueOf()/1000);}
function displayCountdown(countdn,cd) {if (countdn < 0) document.getElementById(cd).innerHTML = "Sorry, you are too late."; else {var secs = countdn % 60; if (secs < 10) secs = '0'+secs;var countdn1 = (countdn - secs) / 60;var mins = countdn1 % 60; if (mins < 10) mins = '0'+mins;countdn1 = (countdn1 - mins) / 60;var hours = countdn1 % 24;var days = (countdn1 - hours) / 24;document.getElementById(cd).innerHTML = days+' days '+hours+' hours '+mins+' minutes '+secs;setTimeout('displayCountdown('+(countdn-1)+',\''+cd+'\');',999);}}


emath 03-23-2011 08:56 PM

works with vb4.1.2? anyone knows?


All times are GMT. The time now is 08:30 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01253 seconds
  • Memory Usage 1,743KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete