I have initiated a backport (requiring minimal effort) of this module to Drupal 5.
With jQuery Update 5.x-2.0 installed the examples on the admin help page appear, but don't work due to the following JavaScript runtime error:
Error: Drupal.behaviors is undefined
Source File: http://mysite/sites/all/modules/jquery_countdown/jquery_countdown.js
Line: 6
Line 6 of jquery_countdown.js reads:
Drupal.behaviors.jquery_countdown = function(context) {
I'm still investigating the matter, but thought I would throw this out there in case someone has a quick solution.
Comments
Comment #1
johnhanley commentedThe above is due to the introduction of the Drupal.behaviors object in Drupal 6.
Comment #2
robloachhttp://drupal.org/cvs?commit=295108 :-)
Adding the following fixed what you were running into:
jQuery Countdown 5.x-1.x-dev opened up. If you run into problems with it, please feel free to post a comment here, or open up a new issue ;-) .
Comment #3
johnhanley commentedSweet--that's exactly what was needed. My prelim testing now shows everything working as expected.
In summary the backport changes simply amounted to:
above function added to jquery_countdown.js
jquery_countdown_help() parameter and switch change in jquery_countdown.module
definition differences in jquery_countdown.info
jquery_countdown.jq.inc unchanged
cleared $id$ values in above files
The system variable 'preprocess_js' doesn't exist in Drupal 5, but I don't see any reason to change the logic in jquery_countdown_add(), do you?
Comment #4
robloachAlso, I don't think global $language was around then either. Not sure how to translate JavaScript in Drupal 5...... hmmm.
Comment #5
johnhanley commentedWell, for authenticated users (and assuming the Locale module is enabled) we can do this:
I haven't ever messed with multilingual support for anonymous users. There might be a third-party module available to mimic Drupal 6 behavior.
Comment #6
Letharion commentedWith D5 core not being supported anymore, I think we can close this one.