Module layout in psl0.8
Joe Stewart <[email protected]> Fri, 16 Jan 2004 10:45:01 -0600
| Newsgroups | gmane.comp.cms.phpslash.devel |
|---|---|
| Message-ID | <[email protected]> |
Module layout in psl0.8
modules are located in include/modules/modulename/
This modulename directory is mapped to what the registered name for psl is in the ini
file. Modules not defined there are not available.
admin.php - if there is any administration for the module
index.php - public access
any class files in this module are located here.
templates subdirectory - module templates should be located in this directory. These
are english templates applied to the default/top parent skin. Any skin/language
changes should be done in the include/templates directory.
plugins - the options mechanism can call plugins much the same way as block_render
classes.. plugins requested will be searched for here.
index.php -
for psl modules, we add the required classes and bring in $_PSL, and $ary - note
that we are not in the global namespace.
get the content - The environment available is the session, auth, perm, $_PSL,
$ary, and functions.inc.
return the content - no direct output. All output is to be returned to the caller.
non psl modules can use output buffering to capture output and return.
admin.php -
for psl modules, we add the required classes, etc.
parse _POST variables into $ary
apply actions in the "submit" _GET or _POST variable as required and approved.
return the output
any other pages needed can be called via _GET variables.
blocks needed can be called via block_options. There probably isn't any need for new
block_render_classes. They should just be another module page or template.
Joe
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn