These are some guidelines for people who want to share complex cookbook recipes with other PmWiki users.
- Choose a good name for your extension. Below, we use "foo"; that's not a good name!
- Put your extension into a tarball or zip file (or both).
- The tarball or zip file should create a directory with the name of the extension and the version number, like
- Include license information (such as a COPYING file).
- Include a README file, with installation and other instructions.
- The files in the directory should lay out like this:
foo-0.1/ COPYING.foo (license info) README.foo (install & other instructions) 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
- Installation should consist of opening the tarball, copying the files recursively to the PmWiki directory ("
cp -r foo-0.1/* pmwiki"), throwing a
local/config.phpfile, and that should be it. Have reasonable defaults for any configuration variables.
- In the first couple of lines of your extension, define a constant for your extension so other code can tell that it's loaded.
- Try to follow PmWiki's variable- and function-naming practices (CamelCase for everything). That makes it easier for everyone.
- For configuration variables, prefix the variable name with the name of your extension, to avoid clashes. For example, don't use a variable
- Use the
SDV()function for your config variables.
from IP: 220.127.116.11 ip should be disabled by default for security reasons