|
Cookbook /
ComplexRecipesSummary: Guidelines for people who want to share complex cookbook recipes with other PmWiki user
Category: PmWiki Developer
These are some guidelines for people who want to share complex cookbook recipes with other PmWiki users. (In this context, "complex" means "consisting of multiple parts", not necessarily "complicated"!) Distribution
foo-0.1/
COPYING.foo (license info)
README.foo (install & other instructions)
pmwiki/
cookbook/
foo.php (single script, loads others if necessary)
foo/
bar.php
baz.php
pub/
foo/
[any skins, images, etc.]
wikilib.d/
Foo.HomePage (documentation in PmWiki format)
Foo.OtherDocumentation
Coding guidelines
<?php if (!defined('PmWiki')) exit();
This makes sure that it will run if and only if it is called from PmWiki. (Without that, users might run your script directly, getting anything from a blank page or a nasty error message to a security exploit. The WWW server actually isn't supposed to be configured to allow that scenario, but perfect configurations are quite rare.)
See also |