PostNuke Help

Previous
Use Standard Module Functions

Home
up

Next
Building your Module


Module Directory Structure

PostNuke modules have a very specific directory structure. This allows the PostNuke system to use a generic system to access all modules without needing to know specific information about each separate module that is built. Following the directory structure as laid out below is an absolute requirement of any PostNuke-compliant module.

Note: extra files and directories in addition to those shown below are allowed. Also, if any of the files below are not required (e.g. the module does not have database tables of its own so it does not require the pntables.php file) then they do not need to exist. However, files that perform the functions outlined below must comply with the file naming convention to allow the PostNuke system to load the suitable files at the appropriate times to ensure correct operation of the module.

Example layout

This shows the example layout that a gallery module might have. Other modules will have different names for their top-level directory and blocks as appropriate for their specific functionality.

        modules/                                   (1)
                gallery/                           (2)
                        pnadmin.php                (3)
                        pnadminapi.php             (4)
                        pnblocks/                  (5)
                                 snapshot.php      (6)
                        pnimages/                  (7)
                                 admin.png         (8)
                        pninit.php                 (9)
                        pnlang/                  (10)
                               deu/              (11)
                                   admin.php     (12)
                                   init.php      (13)
                                   manual.html   (14)
                                   snapshot.php  (15)
                                   user.php      (16)
                               eng/              (17)
                                   admin.php      (18)
                                   init.php       (19)
                                   manual.html    (20)
                                   snapshot.php   (21)
                                   user.php       (22)
                               ...
                        pntables.php              (23)
                        pnuser.php                (24)
                        pnuserapi.php             (25)
                        pnversion.php             (26)
  1. The top-level directory in PostNuke for modules

  2. The directory that contains all of the module code (in this case the module is named 'gallery')

  3. The file that contains all administrative GUI functions for the module

  4. The file that contains all administrative operational functions for the module

  5. The directory that contains all blocks associated with the module

  6. A file that contains a block associated with this module; in this case it displays a random snapshot from the gallery

  7. The directory that contains all images for the module

  8. The image for the administration icon of the module

  9. The file that contains initialisation functions for the module

  10. The directory that contains all language translation files for the module

  11. The directory that contains all German language translation files for the module

  12. The file that contains German language translations for the administrative GUI functions for the module (i.e. pnadmin.php)

  13. The file that contains German language translations for the initialisation functions for the module (i.e. pninit.php)

  14. The file that contains the German language translation of the manual for the module

  15. The file that contains German language translations for the snapshot block

  16. The file that contains German language translations for the user GUI functions for the module (i.e. pnuser.php)

  17. The directory that contains all English language translation files for the module

  18. The file that contains English language translations for the administrative GUI functions for the module (i.e. pnadmin.php)

  19. The file that containsEnglish language translations for the initialisation functions for the module (i.e. pninit.php)

  20. The file that contains the English language translation of the manual for the module

  21. The file that contains English language translations for the snapshot block

  22. The file that contains English language translations for the user GUI functions for the module (i.e. pnuser.php)

  23. The file that contains all information on database tables for the module.

  24. The file that contains all user GUI functions for the module

  25. The file that contains all user operational functions for the module

  26. The file that contains all version and credit information for the module


  27. Previous
    Use Standard Module Functions

    Home
    up

    Next
    Building your Module