I have just gone through Creating modules - tutorial on drupals site here:
http://drupal.org/node/206753

I have gone through each step and I cant seem to find my custom module on the module list. it just doesnt show up on the list.
from what I can make out, there should be two files, one is the .info file and the other .module file which I have uploaded.
Can anyone please help me out?
Thank you.

-Mallet

Comments

vm’s picture

please paste what you've added to the .info file here.

mallet’s picture

heres whats inside my .info file:

; $Id$
name = On this date
description = A block module that lists links to content such as blog entries or forum discussions that were created one week ago.
core = 6.x

vm’s picture

That looks ok to my eye.

The only other thing I can think of that may cause this type of problem is the editor that you've used and whether or not it is adding strange or unneed line ending to your files.

Which editor is in use?

mallet’s picture

I am just using a normal MS notepad to edit the files. the file is saved as .info file.
do I need to add opening or closing php tags on the info file?

vm’s picture

do I need to add opening or closing php tags on the info file?

No.

; $Id $
name = Event Calendar
description = Event Calendar View.
core = 6.x

I just exported a view and turned it into a module. My .info file is above. I notice spacing difference in the first line between your file and mine.

Consider getting notepad++ which is free and easily found with google.

mallet’s picture

the reason why there was a spacing difference was because I was following the drupal module guide book:
http://drupal.org/node/206756

which just has one space after the semicolon. or is there something wrong on that particular page of the drupal module guidebook?

vm’s picture

and the name of the .module file matches exactly the name of the .info file?

mallet’s picture

yes it is. I have also made sure its in the sites/all/modules/onthisdate sub folder.
is it possible to do a test by using a already working module and putting the .info and .module files in the sites/all/modules?

sdutcher’s picture

Is the folder name the same as your project, are your .module files stored in 'your_site\modules\your_module'? Sometimes it helps to create a new folder in your modules folder, create new .module files, delete the old folder, and restart your web server.

mallet’s picture

thanks very much for the replys. I can now enable my module on the list. the reason why it wasnt working was because when I uploaded my files onto the FTP which was filezilla. it ended the module file as: onthisdate.module.php so I got rid of the PHP extention at the end and it showed up on my module list. I can even have access controls to who can use it.

the problem right now, I cant see the actual block which I have assigned to the right of the page. is there a step I have missed? My default theme right now is the basic garland theme.

vm’s picture

filezilla wouldn't have added an extenstion on to an uploaded file. This reads more like a windows situation or an editor situation. In windows XP you can expose the file extenstions which you should consider doing to avoid these types of problems.

mymodule.module.php = the .php is hidden

http://www.cnet.com.au/software/security/0,239029558,240059822,00.htm for a walkthrough.