Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
Test /
Module GuidelinesSummary: Outline of ideas for people who want to create and maintain cookbook recipes. Version: Prerequisites: Status: Maintainer: Categories: Uncategorized Questions answered by this recipeDescriptionNotesDistributed recipes go in the cookbook/ subdirectory.PmWiki's distribution has a specific file/directory structure. Pm recommends that authors of Cookbook recipes, especially those packaged into archives of some sort, place such recipes in the cookbook/ directory. If the recipe includes publicly accessible files such as images or CSS stylesheets, they should go in a subdirectory of pub/. Archive files (i.e., 'zipfiles' or 'tarballs') should be organized in the following layout: package-0.1/
COPYING.package (license info)
README.package (install & other instructions)
cookbook/
package.php (single script, loads others if necessary)
package/
bar.php
baz.php
pub/
package/
[any skins, images, etc.]
wikilib.d/
Package.HomePage (documentation in PmWiki format)
Package.OtherDocumentation
This way, the files can be copied recursively (" Prevent accidental execution of cookbook scriptsTo prevent scripts from being run outside of the PmWiki framework, the following line should occur inside any .php files and before any other command. <?php if (!defined('PmWiki')) exit();
Other tips
/** \file filename
* \brief a brief, one-line module description
*
* a see-also line with a full URL to the Cookbook
* (or other) page where the documentation is kept.
* A longer description of your file, usage, etc.
*/
CommentsProposal for a Simpler ApproachI propose a much simpler recipe structure as follows:
package-0.01/
cookbook/
README.txt (introduction and installation instructions)
LICENSE.txt (license information)
package.php (single script that loads others if necessary)
package/
foo.php
bar.php
bundlepages.php (script that Adds a page storage location)
wikilib.d/
Site.Package (documentation or whatever)
Site.PackageXLPage (translatable strings)
[any pages you want to bundle]
pub/
package/
[any skins, images, etc.]
Here's bundlepages.php:
<?php if (!defined('PmWiki')) exit();
// Add a custom wikipage storage location for bundles pages.
global $WikiLibDirs;
$PageStorePath = dirname(__FILE__)."/wikilib.d/\$FullName";
$where = count($WikiLibDirs);
if ($where>1) $where--;
array_splice($WikiLibDirs, $where, 0,
array(new PageStore($PageStorePath)));
Here are some proof-of-concept archives that should greatly speed up the process of getting a new recipe started: Among other things, this approach would make removing a recipe as simple as deleting two directories and taking the single line out of config.php. HaganFox August 20, 2005 It would be nice to add a guideline how to prepare your recipe for localization. It seems that most are without. Could that be added to the guidelines? Kenneth, 28 feb 2006.
The Cookbook page says "feel free to add your own contributions". I can create the recipe page itself; however editing Cookbook page requires a password. Or is it up to some admins to add recipes to the list? NeARAZ
See Also
Contributors |
0: 00.00 00.00 config start 1: 00.00 00.00 config end 2: 00.07 00.07 MarkupToHTML begin 3: 00.13 00.12 ReadApprovedUrls SiteAdmin.ApprovedUrls begin 4: 00.14 00.13 ReadApprovedUrls SiteAdmin.ApprovedUrls end 5: 00.26 00.25 MarkupToHTML end 6: 00.27 00.26 MarkupToHTML begin 7: 00.31 00.30 MarkupToHTML end 8: 00.32 00.30 MarkupToHTML begin 9: 00.33 00.32 MarkupToHTML end 10: 00.41 00.33 now