Originally published here
Basic content of a module.
Open the tutorial module and you will see it has 2 php files, 1 directory called images and inside that 1 image. This is all you need to start. Now open the file xoops_version.php in an editor. You can either use a wysiwyg editor such as dreamweaver or you can use something like php Designer or Maguma Open Studio (both are free).
Now let's go through what this all means.
The very first line starts php, meaning that anything below this will get processed as php. Important note: never have empty space before <?php or you will receive "headers already sent" errors.
These 3 are self evidente, meaning as their name implies, name, version and description.
Author and credits are also evidente. Help (if used which in this case is not) should point to a file such as help.html or help.php
License is the license used for the module. Keep in mind the the core uses GPL meaning that your module also falls under the GPL license. You can read more about it here. Official is whether this is an official module or not. In most cases this is set to 0. Image is the module icon you see on the module administration menu. Dirname is the directory name for the module.
hasAdmin=0 means there is no administration part to this module. Since I want the module to appear on the main menu I've set hasMain to 1. If I had set it to 0 then it wouldn't show up on main menu. If you set hasAdmin and hasMain both to 0, it will still show up on module administration allowing you to uninstall it. The last line stops php processing.
Next Part > Using Smarty Templates