PhpBB Countdown MOD

Miscaleneous modifications from Stoker
Locked
User avatar
Rhyno
BBCoder III
BBCoder III
Posts: 100
Joined: 25 Jan 2012, 06:06
BBCodes: 10
Favourite MOD: Top Stats
Location: Australia
Contact:

PhpBB3 Countdown MOD

Post 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
User avatar
martin123456
BBCoder VI
BBCoder VI
Posts: 765
Joined: 25 Jul 2011, 13:29
BBCodes: 34
Favourite MOD: Ban button
Location: Down south!
Contact:

PhpBB3 Countdown MOD

Post by martin123456 »

Glad your working now.

Here is the 2nd benefit of having the countdown mod installed
offline.png
User avatar
Rhyno
BBCoder III
BBCoder III
Posts: 100
Joined: 25 Jan 2012, 06:06
BBCodes: 10
Favourite MOD: Top Stats
Location: Australia
Contact:

PhpBB3 Countdown MOD

Post 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?
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:

PhpBB3 Countdown MOD

Post by Stoker »

Yes, put it on index_body.html instead.
Board rules! No PM support
User avatar
martin123456
BBCoder VI
BBCoder VI
Posts: 765
Joined: 25 Jul 2011, 13:29
BBCodes: 34
Favourite MOD: Ban button
Location: Down south!
Contact:

PhpBB3 Countdown MOD

Post by martin123456 »

Code bellow.
Last edited by martin123456 on 20 Mar 2012, 12:00, edited 1 time in total.
User avatar
Rhyno
BBCoder III
BBCoder III
Posts: 100
Joined: 25 Jan 2012, 06:06
BBCodes: 10
Favourite MOD: Top Stats
Location: Australia
Contact:

PhpBB3 Countdown MOD

Post 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 :(
User avatar
martin123456
BBCoder VI
BBCoder VI
Posts: 765
Joined: 25 Jul 2011, 13:29
BBCodes: 34
Favourite MOD: Ban button
Location: Down south!
Contact:

PhpBB3 Countdown MOD

Post 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
User avatar
Rhyno
BBCoder III
BBCoder III
Posts: 100
Joined: 25 Jan 2012, 06:06
BBCodes: 10
Favourite MOD: Top Stats
Location: Australia
Contact:

PhpBB3 Countdown MOD

Post 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
User avatar
Rhyno
BBCoder III
BBCoder III
Posts: 100
Joined: 25 Jan 2012, 06:06
BBCodes: 10
Favourite MOD: Top Stats
Location: Australia
Contact:

PhpBB3 Countdown MOD

Post by Rhyno »

I've attached a Screenshot to show you what i mean, any ideas as to why this happens?

Image
User avatar
martin123456
BBCoder VI
BBCoder VI
Posts: 765
Joined: 25 Jul 2011, 13:29
BBCodes: 34
Favourite MOD: Ban button
Location: Down south!
Contact:

PhpBB3 Countdown MOD

Post 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 ;)
Locked