PHP Web Host - Quality Web Hosting For All PHP Applications Clan Themes! We make clans look good!!
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
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 Back to top

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
Only registered users can see links on this board!
Get registered or login to the forums!


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: 3028
Location: United Kingdom

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

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
Site Admin


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

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

BTW the code you posted above appears to missing some '<' .
View user's profile Send private message
kenno
Worker
Worker


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

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

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


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

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

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


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

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

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.
View user's profile Send private message
kenno
Worker
Worker


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

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

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


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

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

Please turn on error reporting in the config.php file.
View user's profile Send private message
kenno
Worker
Worker


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

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

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
View user's profile Send private message
montego
Former Admin in Good Standing


Joined: Aug 29, 2004
Posts: 9070
Location: Arizona

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

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


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

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

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
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum