Author |
Message |
kenno
Worker
Joined: Jul 26, 2009
Posts: 117
Location: Scunthorpe, UK
|
Posted:
Fri Apr 02, 2010 11:01 am |
|
Hope someone can help me a newbie a little.
I am trying to add a countdown timer to my site, maybe as a block on the left somewhere.
I have found a timer which I would like to use which is here http://www.gieson.com/Library/projects/utilities/countdown/
I have added the files to my site as described (http://www.yoursite.com/countdown/), and edited the swf file so it refers to where the countdown files are on the site.
I have then tried to add this to a block file, but when adding the block and activating it, all I get is a blank white page with the timer in the upper left corner (not counting down)
Can anyone help me in creating the block file for this sort of countdown, this is the blockfile I have used, which is obviously wrong.
Like I said I am a novice but am eager to learn in what I am doing wrong
Code:<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if ( !defined('BLOCK_FILE') ) {
Header("Location: ../index.php");
die();
}
$content = "<script src=\"http://www.mysite.co.uk/countdown/countdown.js\"></script>";
$content .= "script>";
$content .= "deadline(\"2010-7-23-0-0-0\");</textarea>";
$content .= "/script>";
$content .= "/textarea>";
?>
|
Thanks in advance for any help
Thanks Kenno |
|
|
|
|
jakec
Site Admin
Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom
|
Posted:
Fri Apr 02, 2010 3:10 pm |
|
Have you tried pasting the code directly into block using the WYSIWYG editor, set to source mode? |
|
|
|
|
jakec
|
Posted:
Fri Apr 02, 2010 3:22 pm |
|
BTW the code you posted above appears to missing some '<' . |
|
|
|
|
kenno
|
Posted:
Fri Apr 02, 2010 3:34 pm |
|
Just tried adding the code directly in the editor using source mode, but it did not work.
Where are the missing '<'. I got that code directly from the site I linked above |
|
|
|
|
jakec
|
Posted:
Fri Apr 02, 2010 3:36 pm |
|
Before script and textarea.
It should look like this:
Code:<script src="http://www.yoursite.com/countdown/countdown.js"></script>
<script>
deadline("2010-5-6-0-0-0");</textarea>
</script>
</textarea>
|
|
|
|
|
|
jakec
|
Posted:
Fri Apr 02, 2010 3:38 pm |
|
When you say it doesn't work what happens?
Remember if you are getting a blank page you need to turn on error reporting to see if there are any errors generated. |
|
|
|
|
kenno
|
Posted:
Fri Apr 02, 2010 3:46 pm |
|
I just added the block file with the missing '<' but now what it does is it just does not show up the block at all, also with this file added to the site I can now no longer view the block admin page until it is deleted.
I must have done something else wrong other then the block file maybe ? |
|
|
|
|
jakec
|
Posted:
Fri Apr 02, 2010 3:54 pm |
|
Please turn on error reporting in the config.php file. |
|
|
|
|
kenno
|
Posted:
Fri Apr 02, 2010 4:02 pm |
|
Did that, and when adding that block it says this at the bottom of the site
Code:Parse error: syntax error, unexpected T_STRING in /home/vwgolfm/public_html/blocks/block-Countdown.php on line 33
|
|
|
|
|
|
montego
Site Admin
Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Sun Apr 11, 2010 8:58 am |
|
kenno, please re-post the full contents of this block PHP script here so we can take a look. Since I don't know what is in your .js file, we're not going to know if your HTML is correct (such as the added </textarea> closing tags... these just don't look right to me. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
|
kenno
|
Posted:
Sun Apr 11, 2010 10:22 am |
|
Thanks for the replies.
I have since got this working, or shall I say someone else got this working for me.
Many thanks for the replies though
Kenno |
|
|
|
|
|