Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Blocks
Author Message
kenno
Worker
Worker



Joined: Jul 26, 2009
Posts: 117
Location: Scunthorpe, UK

PostPosted: Fri Apr 02, 2010 11:01 am Reply with quote

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
 
View user's profile Send private message
jakec
Site Admin



Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom

PostPosted: Fri Apr 02, 2010 3:10 pm Reply with quote

Have you tried pasting the code directly into block using the WYSIWYG editor, set to source mode?
 
View user's profile Send private message
jakec







PostPosted: Fri Apr 02, 2010 3:22 pm Reply with quote

BTW the code you posted above appears to missing some '<' .
 
kenno







PostPosted: Fri Apr 02, 2010 3:34 pm Reply with quote

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







PostPosted: Fri Apr 02, 2010 3:36 pm Reply with quote

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







PostPosted: Fri Apr 02, 2010 3:38 pm Reply with quote

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







PostPosted: Fri Apr 02, 2010 3:46 pm Reply with quote

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







PostPosted: Fri Apr 02, 2010 3:54 pm Reply with quote

Please turn on error reporting in the config.php file.
 
kenno







PostPosted: Fri Apr 02, 2010 4:02 pm Reply with quote

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

PostPosted: Sun Apr 11, 2010 8:58 am Reply with quote

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! 
View user's profile Send private message Visit poster's website
kenno







PostPosted: Sun Apr 11, 2010 10:22 am Reply with quote

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
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Blocks

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©