Finally!!!

timtimar - December 27, 2006 - 22:53
Project:Christmas Snow
Version:4.7.x-1.x-dev
Component:Miscellaneous
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

I cannot get this to work. It installed without error but will not run.
No errors in the log nothing.
Install dir matches the INSTALL.txt.

#1

deathgod - January 5, 2007 - 15:46

I have the same problem, if no one comes up with a fix, i'll try calling it through the theme instead of as a module, maybe that will get it to work. But for now, it is not at the top of my list of priorities so I'll just leave things till I have the opportunity to play around with it.

#2

felixsmile - January 6, 2007 - 17:50
Title:Does not work» Does not work - same for me

I'm using it on a Windows system, but I don't think this is the reason. It doesn't work both on Firefox and Opera, but the example file provided with the script works.

Thanks for your help, funny idea,

Felix.

#3

felixsmile - January 6, 2007 - 19:42
Title:Does not work - same for me» Finally!!!
Version:5.x-1.0» 4.7.x-1.x-dev
Status:active» fixed

It's solved, I got it. Maybe it's not perfectly elegant, but it works fine:

<?php
/*
* Drupal Module: Christmas Snow
* Adds Christmas Snow to your site

*
* @author: introfini <www.josefernandes.pt>
* @modified by felixsmile
*/

function christmas_snow_help($section) {
  switch (
$section) {
    case
'admin/modules#description':
      return
t('Add Christmas Snow to your site.');
    case
'admin/settings/christmas_snow':
      return
t('Add Christmas Snow to your site.');
  }
}



function
christmas_snow_menu($may_cache) {
$path = drupal_get_path('module', 'christmas_snow');
$js = drupal_add_js($path . '/script/snowstorm.js');

 
}
?>

How does it work?

christmas_snow_menu because we want snow everywhere, I decided, and because this is the only way I managed to convince it to work.

In the scriptfile, you adapt this line:

  var imagePath = 'christmassnow/snow/'; // relative path to snow images

and you put the snowflakes in the specified folder (starting from the root folder), i.e. you DON'T put them inside the module folder. The reason is that in the standard install of Drupal 4.7.5, a .htaccess file does not allow to access the modules folder. Simple.

Have fun,

Felix.

#4

Anonymous - January 20, 2007 - 19:46
Status:fixed» closed

#5

devendra.ishaya - August 29, 2007 - 04:50

I couldn't get this to work under Drupal 5.2 and tried out the previous fix by felixsmile, but found an easier way.

I simply commented out this line from snowstorm.js:

  var imagePath = 'image/snow/'; // relative path to snow images

to be

//var imagePath = 'image/snow/'; // relative path to snow images

Now it works as it should.

I think this should be mentioned in the README.txt file.

 
 

Drupal is a registered trademark of Dries Buytaert.