I downloaded the CountdownTimer module and installed it as per the instructions (at least I think). I activated the module, updated the database, added a new block and in the block body I put this:

<?php 
drupal_add_js('countdowntimer/timerjs');
?>
<b>Thanksgiving is in</b>
<span id="TG1" class="countdowntimer">2007-11-23 20:30:00</span>

And it does absolutely nothing. Just sits there. I wish I had a dog this obedient LOL
Can someone help me please?
Thanks

Comments

vm’s picture

you used the php input filter ? when creating this block body ?

Wildkarrde’s picture

Yes, just saw that and reloaded and saved my block - same results.

dwees’s picture

Are you sure the path to the JS is correct?

If you are using Firefox, you can use an extension called 'JSView' which allows you to view any external javascript files a website has called.

I'd test, using this extension, to see if the file is actually being used. I used the javascript countdown timer myself on a website, and it worked fine, and I think I had to adjust the path.

Dave

Wildkarrde’s picture

How would I know the path to it? Was I supposed to upload something else to the web before using this?

jvandervort’s picture

View source on the html and look for the
script type="text/javascript" src="/countdowntimer/timerjs">

also note, if you are using a sub-dir, it'd be:
script type="text/javascript" src="/subdir/countdowntimer/timerjs">

I'd copy the url from the src attribute to your browser bar and see if it returns javascript
or not.

This library doesn't need any other items/modules.

-JV

-John

Wildkarrde’s picture

Ok, I see what has happened. I had downloaded countdowntimer from somewhere NOT countdown from Drupal. Soooo... my questions is this now (and thanks for the patience to listen to this), Step number three in the correct module says:

3. Configure the block in administer -> blocks -> Countdown configure.
The block configuration is where to set the event name,
accuracy of the output, and the target date/time.

I do not know how to do this part. What would I type in order to get this to work? I do not know PHP and what I showed you above was from the incorrect version of something I downloaded and I just used their example. So can one of you tell me what to put in this bloock so it displays that Thankssgiving text for instance?
THANKS!

jvandervort’s picture

I was talking about the javascript countdown timer project at drupal.

Which has this as its demo site:

http://www.vandervortsweb.com/drupal50/

-John

-John

Wildkarrde’s picture

Ok, it was exactly as I has said. I put the incorrect module into the modules directory. Right now I have one that works, that I got from this site up in the downloads section http://ftp.osuosl.org/pub/drupal/files/projects/countdown-4.7.0.tar.gz It does not refresh unless you refresh the page. I like the one you have John. How do I go about getting that package?
Thanks.

jvandervort’s picture

http://drupal.org/project/countdowntimer

The latest release is for drupal-4-7

-John

-John

Wildkarrde’s picture

Yeah, that's the one I just can't get working. What code do you have in any of those you have running? Maybe I'll paste what you have into mine and see what happens.

Wildkarrde’s picture

Can anyone help me here? From the looks of this to me I would need a driectory called countdowntimer and a file called timerjs to run this. If not, how is Drupal handling this differently?

dwees’s picture

What's the URL to the countdown timer so we can see it not working?

Dave

Wildkarrde’s picture

Well I have moved past it now. I uninstalled the module and instead ran up a new block that has code in it that points to a countdown timer.js script I put on my web site. I appreciate the help, but just got discouraged with that one enough to move forward in the process.
Thanks

varugger’s picture

I'm having the same problem. Is there suppose to be a file called "timerjs" in the distro? Only thing besides the documentation is coundowntimer.module

Thanks.

-J

jvandervort’s picture

The timerjs file is provided directly by url from the countdowntimer.module itself.
If your dev link is public, I could check out the path for you. Also, which drupal version
and timer version are you running?

-John

-John

wucolin’s picture

I think the return_javascript() function is not being called. When I extracted the jstimer(), start(), set_countdown() etc functions to a file called timerjs it started working properly. I'm using drupal 4.7.4

jvandervort’s picture

Strange. I'd be interested in your configuration. I haven't seen this issue before.
You should be able to see the javascript using

h/ttp://yoursite.com/drupal_sub_dir/countdowntimer/timerjs

-John

-John

jvandervort’s picture

The issue has been added to the modules readme.txt file. It describes the different usages for cleanurls and dirtyurls:)

-John

-John

prupert’s picture

Hi

I have the exact same problem as described above. The countdown timer just does not show up, and my appache error logs state that the timerjs file is missing.

I could not see anything in the readme.txt relating to clean and dirty URLs (maybe I am not techie enough to decipher the comment?), but I guess this might be the issue, as my site is configured only for dirty URLs (enabling clean URLs seems a bit tricky for a noober like me). Any ideas what I am doing wrong?

jvandervort’s picture

There was a fix for js aggregation for the people who set: admin/performance js optimization to true.
The newer versions of countdown timer should fix this for the drupal-6 branches
(6.x-2.5 or higher) or ( countdown timer 6.x-1.5 or higher)

What version of countdown are you using and what is your js setting in admin/performance?

-John

-John

jsgammato’s picture

I had a similar problem. I also got a javascript error on line 8 at character 54.
A web developer colleague at work tracked it down for me - his email says:
John,

The script error is due to a string in timerjs that spans multiple lines.

At this URL:
http://www.oldcolonyclub.org/members/countdowntimer/timerjs

Change

var formats = ['(%dow% %moy%%day%)
%days% days + %hours%:%mins%:%secs% ','Only %days% days, %hours% hours, %mins% minutes and %secs% seconds left ', '%days% shopping days left ', '(%dow% %moy%%day%)
%days% days + %hours%:%mins%:%secs% '];

To

var formats = ['(%dow% %moy%%day%)
%days% days + %hours%:%mins%:%secs% ','Only %days% days, %hours% hours, %mins% minutes and %secs% seconds left ', '%days% shopping days left ', '(%dow% %moy%%day%)
%days% days + %hours%:%mins%:%secs% '];

(All on one line - copy and paste should work)

Or

var formats = ['(%dow% %moy%%day%)
%days% days + %hours%:%mins%:%secs% ',
'Only %days% days, %hours% hours, %mins% minutes and %secs% seconds left ',
'%days% shopping days left ',
'(%dow% %moy%%day%)
%days% days + %hours%:%mins%:%secs% '];

(Copy and paste that and it should work - Outlook is mangling the format as usual). The strings in the array are all on one line while the array spans multiple lines, which is legal.
---------------------------
back to me:
I disabled countdown timer for now, because I am launching this website to a bunch of old guys who will get confused by the error message. I will gladly add it later. We have an annual event in December to comemmorate the landing of the pilgrims at Plymouth Rock. It is eagerly anticipated, and marked with a parade and two feasts - a perfect candidate for the countdowntimer!

jvandervort’s picture

I checked all four releases and none of them splits this line.
Which release did you start with, and was it modified for anything?

Also, let's create new posts for new issues. This one is pretty old.

-John

-John

BAJV’s picture

I have a blank page and broken link problems when activating the Countdown Timer block on Drupal 6 website.

What might cause such problems and is there any solution to this?

Thanks for any response.

[]::[ T-Shirt ]::[]