Page 9 of 31

PhpBB3 Countdown MOD

Posted: 14 Mar 2012, 01:20
by Rhyno
Ok will do thanks mate

Looks like it's all sweet now and working like it should, just finished styling it, gotta shrink it a little and should be good to go

PhpBB3 Countdown MOD

Posted: 14 Mar 2012, 01:58
by martin123456
Glad your working now.

Here is the 2nd benefit of having the countdown mod installed
offline.png

PhpBB3 Countdown MOD

Posted: 20 Mar 2012, 00:52
by Rhyno
If I only want this on the main index page, can you just move the code there so it doesn't appear on all pages?

PhpBB3 Countdown MOD

Posted: 20 Mar 2012, 07:04
by Stoker
Yes, put it on index_body.html instead.

PhpBB3 Countdown MOD

Posted: 20 Mar 2012, 11:10
by martin123456
Code bellow.

PhpBB3 Countdown MOD

Posted: 20 Mar 2012, 11:31
by Rhyno
Bl4d3 x wrote:Dont forget to use this path of jquery

Code: Select all

<!-- IF COUNTDOWN_ENABLE -->
<script src="{ROOT_PATH}script/jquery.min.js" type="text/javascript"></script>
<script src="./script/jquery.jcountdown1.3.3.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,
		htmlTemplate: "<span class='cd-time'>{COUNTDOWN_TEXT}</span>  %{d} <span class=\"cd-time\">{L_DAYS}</span> %{h} <span class=\"cd-time\">{L_HOURS}</span> %{m} <span class=\"cd-time\">{L_MINUTES}</span> %{s} <span class=\"cd-time\">{L_SECONDS}</span>",
		direction: "<!-- IF COUNTDOWN_DIRECTION -->down<!-- ELSE -->up<!-- ENDIF -->"
	});
});
// ]]>
</script>
<!-- ENDIF -->
tried and tested remove this part from overall_header and place it where stoker says.

I found it also works with out this line too

Code: Select all

<script src="{ROOT_PATH}script/jquery.min.js" type="text/javascript"></script>
LOL was about to message you actually :)

Moved it over but i stuff something up, got it to appear on the main page only which is fine, but now the collapse categories doesnt work :(

PhpBB3 Countdown MOD

Posted: 20 Mar 2012, 11:59
by martin123456
Open overall_header.html
Find and delete

Code: Select all

<!-- IF COUNTDOWN_ENABLE -->
<script src="{ROOT_PATH}script/jquery.min.js" type="text/javascript"></script>
<script src="./script/jquery.jcountdown1.3.3.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,
      htmlTemplate: "<span class='cd-time'>{COUNTDOWN_TEXT}</span>  %{d} <span class=\"cd-time\">{L_DAYS}</span> %{h} <span class=\"cd-time\">{L_HOURS}</span> %{m} <span class=\"cd-time\">{L_MINUTES}</span> %{s} <span class=\"cd-time\">{L_SECONDS}</span>",
      direction: "<!-- IF COUNTDOWN_DIRECTION -->down<!-- ELSE -->up<!-- ENDIF -->"
   });
});
// ]]>
</script>
<!-- ENDIF -->


Then Find: (in overall_header.html)

Code: Select all

<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js"></script>
Add after:

Code: Select all

<script src="{ROOT_PATH}script/jquery.min.js" type="text/javascript"></script>
<script src="./script/jquery.jcountdown1.3.3.min.js" type="text/javascript"></script>
open index_body.html

Find:

Code: Select all

<!-- INCLUDE overall_header.html -->
ADD After:

Code: Select all

<!-- IF COUNTDOWN_ENABLE -->
<script type="text/javascript">
// <![CDATA[
$(document).ready(function(){
   $("#time").countdown({
      date: "{COUNTDOWN_DATE}",
      onComplete: function( event ) {
      
         $(this).html("{COUNTDOWN_COMPLETE}");
      },
      leadingZero: true,
      htmlTemplate: "<span class='cd-time'>{COUNTDOWN_TEXT}</span>  %{d} <span class=\"cd-time\">{L_DAYS}</span> %{h} <span class=\"cd-time\">{L_HOURS}</span> %{m} <span class=\"cd-time\">{L_MINUTES}</span> %{s} <span class=\"cd-time\">{L_SECONDS}</span>",
      direction: "<!-- IF COUNTDOWN_DIRECTION -->down<!-- ELSE -->up<!-- ENDIF -->"
   });
});
// ]]>
</script>
<!-- ENDIF -->
tested on localhost and works with collapse :D

Do not add this part of the code to the index_body.html

Code: Select all

<script src="{ROOT_PATH}script/jquery.min.js" type="text/javascript"></script>
<script src="./script/jquery.jcountdown1.3.3.min.js" type="text/javascript"></script>
Demo http://www.blades-place.co.uk

PhpBB3 Countdown MOD

Posted: 20 Mar 2012, 13:05
by Rhyno
Yep that worked a treat thanks :)

Although weirdly enough it made all my forums boxes almost full width of screen now, where as before when i had code around opposite it was reversed

PhpBB3 Countdown MOD

Posted: 21 Mar 2012, 01:34
by Rhyno
I've attached a Screenshot to show you what i mean, any ideas as to why this happens?

Image

PhpBB3 Countdown MOD

Posted: 21 Mar 2012, 01:58
by martin123456
Cant see no reason why but the width is controlled here

open style/theme/common.css

Find:

Code: Select all

/* Main blocks
---------------------------------------- */
#wrap {
	padding: 0 0px;
	min-width: 650px;
Add inline:

Code: Select all

max-width: 1000px;
margin: 0 auto;

change 1000 to your needs edit: i just found my back up of that theme ;)