Request

Modifications for phpBB3.
Try the Mods here and share Your own Mods
Forum rules
You dont have to use ModX or make your mod AutoMod compatible. A simple textfile is fine
But if you post Mods here You also have to give support

Request

Post by martin123456 »

Can i request the snippets for the board online time pls in stats section

We have been online for 04 Years 00 Months 12 Days 12 Hours 01 Minutes 27 seconds

there is plenty of info out there about adding such things but none seem to have the live countdown like this one

Request

Post by Stoker »

Sure:

Code: Select all

$("#online").countdown({
		date: "{START_DATE}",
		leadingZero: true,
		offset: -1,
		yearsAndMonths: true,
		htmlTemplate: "<span class='cd-online'>We have been online for</span> <strong>%y</strong> <span class=\"cd-online\">Years</span> <strong>%m</strong> <span class=\"cd-online\">Months</span>  <strong>%d</strong> <span class=\"cd-online\">{L_DAYS}</span> <strong>%h</strong> <span class=\"cd-online\">{L_HOURS}</span> <strong>%i</strong> <span class=\"cd-online\">{L_MINUTES}</span> <strong>%s</strong> <span class=\"cd-online\">{L_SECONDS}</span>",
		direction: "up"
	});
and

Code: Select all

<span id="online"></span><br />
:D

Request

Post by martin123456 »

thank you :)

it pulls the start date fine but i think you might of forgot to post a language edit ? as it results in

$("#online").countdown({ date: "05 Mar 2012, 16:39:04", leadingZero: true, offset: -1, yearsAndMonths: true, htmlTemplate: "We have been online for %y Years %m Months %d Days %h Hours %i Minutes %s Seconds", direction: "up" });

(on localhost)

Request

Post by martin123456 »

A ;) if i may ?

Request

Post by Stoker »

Hou have to have the countdpwn mod installed

Request

Post by martin123456 »

yup the count down mod is installed and i placed the online edit on the index_body.html file

Request

Post by Stoker »

The first piece of code needs to be placed within the $(document).ready(function() {

Request

Post by martin123456 »

Got it cheers now i feel like a real nub :?

Cool snip only down fall is the counter mod needs to be enabled good job there is a test mode ;)

Change below to fix time zones

Code: Select all

offset: -1,

Request

Post by Stoker »

Bl4d3 x wrote:only down fall is the counter mod needs to be enabled
Nope, you can just move the <script src="{ROOT_PATH}script/jquery.jcountdown.min.js" type="text/javascript"></script> a little up just before the enable code.

Request

Post by martin123456 »

That killed it lol

i also removed all these in testing it

Code: Select all

<script src="{ROOT_PATH}script/jquery.min.js" type="text/javascript"></script>
<script src="{ROOT_PATH}script/jquery.jcountdown.min.js" type="text/javascript"></script>
<script src="{ROOT_PATH}script/jquery.cookie.js" type="text/javascript"></script>
<script src="{ROOT_PATH}script/jquery.totemticker.min.js" type="text/javascript"></script>
<script src="{ROOT_PATH}script/jquery.newsticker.js" type="text/javascript"></script>
<script type="text/javascript" src="{ROOT_PATH}script/collapse/jquery.cookie.js"></script>
<script type="text/javascript" src="{ROOT_PATH}script/collapse/jquery.collapse.js"></script>
<script type="text/javascript" src="{ROOT_PATH}script/charCount.js"></script>
<script type="text/javascript" src="{ROOT_PATH}script/prettySociable/js/jquery.prettySociable.js"></script>
<script type="text/javascript" src="{ROOT_PATH}script/prettyphoto/jquery.prettyPhoto.js"></script>
<script type="text/javascript" src="{ROOT_PATH}dl_mod/js/lytebox/lytebox.js"></script>
<script type="text/javascript" src="{ROOT_PATH}dl_mod/js/jquery/jquery.jcarousel.min.js"></script>
<script type="text/javascript" src="{T_TEMPLATE_PATH}/loading_indicator.js"></script>
<script type="text/javascript" src="{ROOT_PATH}mchat/jquery.titlealert.min.js"></script>
<script type="text/javascript" src="{ROOT_PATH}mchat/jquery_cookie_mini.js"></script>
<script type="text/javascript" src="{ROOT_PATH}mchat/jquery.maxlength.min.js"></script>
<script type="text/javascript" src="{ROOT_PATH}script/scrolltopcontrol.js"></script>
But im now using the latest jquery maybe a should try 1.7