This is a general problem but i will give a specific instance for getting a clear answer.
If you use the event module and create a "new event" then the form shows all 60 minutes in the drop down. How does one change this to only show :00, :15, :30 and :45.
The easy way is to go into the event.module file and change the event_expand function at this line
for ($i = 0; $i <= 59; $i++) $options["$i"] = ($i < 10) ? "0$i" : "$i";
Solution:Change the $i++ to $i+15 (to make it increment by 15)
However, that is hacking the event module code which is NOT a good PRACTICE. If one needs to update the module later on, then you have to remember to go back and fix these issues.
So here is the GENERAL question - how does one change such specific user functionality in drupal. How do you change the function or a variables value.
Can one create a new module and copy this function and just make the needed changes - will drupal over-ride the old function
What is the recommended approach ?
Comments
You can write a patch for
You can write a patch for the module to give the user the option in the administration section of that module.
You could also use the date and calendar modules which I believe is setup so you can choose the time increment...
- Shane
thanks
okay where to i write a patch for the module and how do you link it back to the original module
does one copy the original module and then add the patch to the module itself ?
i will look into the date and calendar modules - thanks