Useful Resources for sNusers

Print This Page
Pages:  Main  Custom Modules  Page Splitting
Custom modules package

Custom Modules add-on

Posted: by keyrocks, August 26, 2006

Assumptions:
  • This tutorial is provided in detail to assist users who are relatively new to working with PHP.
  • You should have a good code editor such as PHP Designer 2006 to edit your code files in.
  • Preferrably, you will have the Apache Server environment installed and running on your computer,
  • ... and your sNews site is installed in the htdocs folder and functioning properly.
Modules for sNews 1.4

If you are looking for a way to display static content in your sNews site using a module system that functions independently of the site's MySQL database, then this Custom Modules add-on should do the trick. By static content, I mean content that will remain the same without the need for editing... for a very long time. As one example, the Installs, Mods, Addons and Resources sections of this website... including the page you are now reading... are contained and displayed using this Custom Modules add-on.

Let's go over a few points to give you an idea of how flexible this module system is. All modules go in a Modules folder in the site's root directory. Any number of modules can be added to the Modules folder. All content in any module is created and saved to the module folder as either plain text (.txt) or basic html files. Content files are served by a small PHP (engine) file within the module. Page display is integrated to work seamlessly within the site's existing template (index.php) file. You can add as many pages to a module as you wish, and use the module's 'home' page as the directory page. If your site's database malfunctions, all module contents remain intact since they are not stored in the database. Modifications are minor and easily added to your snews.php or/and your index.php file.

This tutorial will cover installation, set-up and operation of the Custom Modules add-on, as well as how to customize a module and create Search Engine Friendly URLs to the pages within a module. Now... let's move on to installing our modules.