PhpBB Countdown MOD

Miscaleneous modifications from Stoker
Locked
T-Bone
BBCoder II
BBCoder II
Posts: 13
Joined: 26 Mar 2014, 23:43
BBCodes: 1

PhpBB Countdown MOD

Post by T-Bone »

If you are you referring to the overall_header.html file in the styles/prosilver/template directory, I can't find that code in that file.
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

PhpBB Countdown MOD

Post by Stoker »

overall_header.html
This code is in the wrong place:

Code: Select all

<!-- IF COUNTDOWN_ENABLE -->
<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 type="text/javascript">
// <![CDATA[
$(document).ready(function(){
	$("#time").countdown({
		date: "{COUNTDOWN_DATE}",
		onComplete: function( event ) {
		
			$(this).html("{COUNTDOWN_COMPLETE}");
		},
		leadingZero: true,
		<!-- IF COUNTDOWN_OFFSET_ENABLE -->
		offset: {COUNTDOWN_OFFSET},
		<!-- ENDIF -->
		<!-- IF COUNTDOWN_YEAR or COUNTDOWN_MONTH -->
		yearsAndMonths: true,
		<!-- ENDIF -->
		htmlTemplate: "<span class='cd-time'>{COUNTDOWN_TEXT}</span><!-- IF COUNTDOWN_YEAR and COUNTDOWN_MONTH --> %y <span class=\"cd-time\">{L_COUNT_YEARS}</span><!-- ENDIF --><!-- IF COUNTDOWN_YEAR or COUNTDOWN_MONTH --> %m <span class=\"cd-time\">{L_COUNT_MONTHS}</span><!-- ENDIF -->  %d <span class=\"cd-time\">{L_COUNT_DAYS}</span> %h <span class=\"cd-time\">{L_COUNT_HOURS}</span> %i <span class=\"cd-time\">{L_COUNT_MINUTES}</span> %s <span class=\"cd-time\">{L_COUNT_SECONDS}</span>",
		direction: "<!-- IF COUNTDOWN_DIRECTION -->down<!-- ELSE -->up<!-- ENDIF -->"
	});
});
// ]]>
</script>
<!-- ENDIF -->
It should be after this line:

Code: Select all

<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js"></script>
Board rules! No PM support
T-Bone
BBCoder II
BBCoder II
Posts: 13
Joined: 26 Mar 2014, 23:43
BBCodes: 1

PhpBB Countdown MOD

Post by T-Bone »

Stoker,

I made suggested changes, refreshed templates and page cache, still no countdown mod showing on the page using IE or Safari. Sorry this has become as challenging as it has.

Any other ideas?

Terry
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

PhpBB Countdown MOD

Post by Stoker »

Then its your setting in ACP. Make sure to use the right date format. There is an example in ACP where you set the date.
Board rules! No PM support
T-Bone
BBCoder II
BBCoder II
Posts: 13
Joined: 26 Mar 2014, 23:43
BBCodes: 1

PhpBB Countdown MOD

Post by T-Bone »

Example shows '2012/11/30 00:00:00'

I tried '2014/9/5 00:00:00', '2014/09/05 00:00:00', '09/05/2014 00:00:00', '2014/09/05', and other derivatives - still nothing showing up. I can see the parameters setup in the config file are being passed to the index files.

Code from index page:

<script src="./script/jquery.min.js" type="text/javascript"></script>
<script src="./script/jquery.jcountdown.min.js" type="text/javascript"></script>
<script type="text/javascript">
// <![CDATA[
$(document).ready(function(){
$("#time").countdown({
date: "2014/09/05 00:00:00",
onComplete: function( event ) {

$(this).html("We're at the BMW Sipapu Rally, September 5-7, 2014");
},
leadingZero: true,

offset: ,

htmlTemplate: "<span class='cd-time'>Days until the 2014 Sipapu Rally</span> %d <span class=\"cd-time\">{ COUNT_DAYS }</span> %h <span class=\"cd-time\">{ COUNT_HOURS }</span> %i <span class=\"cd-time\">{ COUNT_MINUTES }</span> %s <span class=\"cd-time\">{ COUNT_SECONDS }</span>",
direction: "down"
});
});
// ]]>
</script>
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

PhpBB Countdown MOD

Post by Stoker »

Weird, are you using special characters in countdown text or countdown complete text?
Board rules! No PM support
T-Bone
BBCoder II
BBCoder II
Posts: 13
Joined: 26 Mar 2014, 23:43
BBCodes: 1

PhpBB Countdown MOD

Post by T-Bone »

Agreed, weird.

No 'special' chars, only apostrophe, comma and hyphen "Countdown Complete Text", from index page source code:

$(this).html("We're at the BMW Sipapu Rally, September 5-7, 2014");

I removed everything but text and tried again...did CTRL F5 and no countdown showing.

And no specials chars in the "Countdown Text", from index page source code:

<span class='cd-time'>Days until the 2014 Sipapu Rally</span>

ACP config won't save my timezone offset either, enter that info and save, go back and it's gone. Maybe something else going on?
T-Bone
BBCoder II
BBCoder II
Posts: 13
Joined: 26 Mar 2014, 23:43
BBCodes: 1

PhpBB Countdown MOD

Post by T-Bone »

Have narrowed down problem...I had 'Enable Timezone" set to Yes, but "Timezone Settings" was blank (won't remember my entry). When I set Enable Timezone to No it displays the Countdown. Yeah!

However, it's ugly, showing this on header:

Days until the 2014 Sipapu Rally 160 { COUNT_DAYS } 11 { COUNT_HOURS } 06 { COUNT_MINUTES } 08 { COUNT_SECONDS }
T-Bone
BBCoder II
BBCoder II
Posts: 13
Joined: 26 Mar 2014, 23:43
BBCodes: 1

PhpBB Countdown MOD

Post by T-Bone »

index page source shows:

htmlTemplate: "<span class='cd-time'>Days until the 2014 Sipapu Rally</span> %d <span class=\"cd-time\">{ COUNT_DAYS }</span> %h <span class=\"cd-time\">{ COUNT_HOURS }</span> %i <span class=\"cd-time\">{ COUNT_MINUTES }</span> %s <span class=\"cd-time\">{ COUNT_SECONDS }</span>",
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

PhpBB Countdown MOD

Post by Stoker »

You need to do the edit to the language file.
Board rules! No PM support
Locked