While not wanting to hack Drupal's Core (OK, I do not want to kill kittens), I would like to clone one of them, typically "forum", in order to understand it better by tampering with it. The first step seems to copy the whole modules/forum directory to sites/all/modules/forum and then to modify what has to be modified... but, question, what must/must not/may be modified ? What I wonder is :
1. Is it OK if the directory name to stay the same ? In other words will sites/all/modules/forum supersede modules/forum ? Should I at least deactivate the "forum" part of the modules, or will the activation automatically be transferred to the more specific copy instead ?
2. To avoid name conflicts, should I instead change every occurrence of "forum" in every file content, file, directory to something different, like "forOOm" ? If yes, is there a tool existing somewhere that would ease the process ?
I also understand that I should change the forum.info (or fOOrum.info, in the second case) package name so it will not be "core" anymore. But the question I cannot figure out is : what is useful, what is useless ?
Any link on a solution would be welcome. If anybody has one. thanks in advance !
Comments
I just made a quick test, and
I just made a quick test, and apparently the module located in /sites/all/modules will take precedence over a module by the same name in /modules.
A better solution is to change filenames (.info, .module, etc), the value of 'Name' in the .info file, and lastly, rename all the functions, variables, etc...
Also check out...
http://drupal.org/node/176046
http://drupal.org/node/231276
http://api.drupal.org/api/file/developer/examples/node_example.module
Modules precedence
Thanks, noahb. This seems quite useful and makes it easy, I guess, to revert back to normal if things do not work anymore as they should. :-)
.
The "rule" against hacking core is meant for production sites. If all you're doing is fiddling around to see what makes it tick, just hack on the original module on your dev site.
Michelle
Thank you, Michelle
OK, I am going to try... Anyway, if I mess everything, I shall install the 6.13 to put everything back in order :-)