I've scripted several of my own modules for PHPNuke while learning PHP (i'm still learning 😃 ). I did this simply because PHPNuke is an ok starting point, but is becoming pretty bloated pretty quick.
First off, the main thing to remember is that the module is only outputting to the body of the page. Header, etc are already created. So create yourself a folder named NewModule, and create index.php within that folder.
Within index.php start with this...
<?php
if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
/**********************************/
/* You can change this: */
/* $index = 0; (right side off) */
/**********************************/
$index = 0;
/**********************************************************/
include("header.php");
echo "HELLO WORLD!";
include("footer.php");
?>
Go to your new module: http://www.<insertsitehere>.com/modules.php?name=NewModule
You'll see that you can use this basis do do anything you wish with that module. Just remember this is not an Admin module, so any security only goes as far as either activating or deactivating.
I find it's MUCH more satisfying an outcome to start from scratch with this, rather than using an existing module which who knows how many ppl have touched.