ModuleGuidelines-Talk

PmWikiDeveloper
Category /
PmWikiInternals  Documentation of PmWiki Internal functions and operation
Cookbook /
ComplexRecipes  Guidelines for people who want to share complex cookbook recipes with other PmWiki user
CookbookBasics  Explains what the cookbook and its recipes are.
CookbookLicenses  A go-to for cookbook authors and wiki authors about how recipes and Cookbook entries are licensed. (beta)
CustomSyntax  Design notes of PmSyntax and custom markup rules (Beta)
DebuggingForCookbookAuthors  Share tips and tricks with other authors about PmWiki specific debugging (perpetual)
DebugMessages  Capture recipe debug messages for display by the messages directive (In use)
DisplayHtml  Markup to display the html resulting of pmwiki syntax. (Stable)
ExtensionDesign  How to create extensions compatible with ExtensionHub (Experimental)
Functions  Brief description of some of PmWiki's internal functions available to cookbook recipe authors and custom markup developers
JavaScript  Embed (static) JavaScript into wiki pages (Stable)
LinkedResourceExtras  Linked resource helper functions and scripts for recipe writers (Beta)
MarkupRulesetDebugging  Debugging Markup Ruleset (stable)
MasteringPmWikiPages  Consolidating documentation on making & breaking PmWiki pages for recipe authors. (documentation)
MessagesReplacement  A drop in replacement for the PmWiki (:messages:) directive (beta)
ModuleGuidelines  Guidelines for creating, distributing, and maintaining a recipe for the Cookbook.
ParseArgs  Description of ParseArgs function for parsing argument lists (Stable)
PmWikiDeveloper  PmWiki developer documentation
PmWikiInfo  Display of selected PmWiki Information in a wiki page (Stable)
RegularExpressions  Some basic info about PHP regular expressions.
RunCGI  Run a CGI script from a recipe illustration (As is)
SecLayer  Provide a ready-made security layer (while developing recipes) for controlling page access (Beta)
ServerInfo  Markup - Display $_SERVER Super-Global results from current Server ( Stable)
SimpleRecipeTemplate  A Simple Recipe Template to provide a framework for PmWiki recipes (Always beta)
Toolbox  Tools for recipe developers (Alpha)
WikiMail  Provide support for email for other recipes (Beta)
ZCode  Extract and highlight source code files from 7z, TAR, ZIP, or RAR archives (Experimental)
PmWiki /
BasicVariables  core variables
CustomActions  Make PmWiki respond to custom values for url parameter ?action=...
CustomMarkupAlt  Alternate introduction to custom markup for beginners
DesignNotes  Some of the features and notes about PmWiki's design decisions
EditingAPI  This page documents the API for modifying PmWiki pages via the wiki engine
EditVariables  variables used when editing pages
FunctionList  A simple list of the functions provided by PmWiki
Functions  How some of the functions in pmwiki.php work
LinkVariables  variables that control the display of links in pages
PageFileFormat  Create wiki formatted pages in bulk and for upload to your pmwiki site
PageVariables  variables that are associated with pages
RoadMap  Possible 'future states' for the next few releases of PmWiki
UpdatePage  Technical notes on the UpdatePage() function. It is updated as of 2.2.0 Beta65.
Variables  Variables available for local customisation
WikiCascades  The order of usage or selection of settings and files
PmWikiDe /
BasicVariables  Variablen aus PmWikis Kern, deren Werte Sie z. T. auch in Wikiseiten einfügen können
CustomActions  Lasse PmWiki selbstdefinierte Werte im URL-Wert 'action=...' verarbeiten
CustomMarkupAlt  Eine (alternative) Einführung in eigene Markups für Anfänger
DesignNotes  Einige Funktionen und Hinweise zum Aufbau
EditVariables  Beschreibung der Variablen, die das Bearbeiten beinflussen.
FunctionList  Eine einfache Liste der von PmWiki zur Verfügung gestellten Funktionen.
Functions  Beschreibung verschiedener innerer Funktionen und deren Arbeitsweise
LinkVariables  Diese Variablen kontrollieren das Aussehen von Verweisen in den Seiten.
PageFileFormat  Beschreibung des Dateiformats der Wikiseiten, geeignet für eigene Experimente.
PageVariables  Beschreibt die Variablen, die im Zusammenhang mit einer Seite stehen
UpdatePage  technische Hinweise zur Funktion UpdatePage()
Variables  Übersicht der verfügbaren Variablen und deren Anwendung
Profiles /
MichaelPaulukonis  
SlavomirD  
SkinTutorials /
SkinTutorials-Talk  
Test /
IncludeAll  
MarkupWriting
Cookbook /
Content  API to create external pages dependent upon text in a wiki page. (Bug fixes, referencing content from other pages)
CustomSyntax  Design notes of PmSyntax and custom markup rules (Beta)
Functions  Brief description of some of PmWiki's internal functions available to cookbook recipe authors and custom markup developers
MarkupDirectiveFunctions  Simply configured custom directives (Experimental)
MarkupRulesetDebugging  Debugging Markup Ruleset (stable)
ParseArgs  Description of ParseArgs function for parsing argument lists (Stable)
PmWikiInfo  Display of selected PmWiki Information in a wiki page (Stable)
QuickReplace  Quickly define replacement texts in wiki pages, and use them as markup or during page save. (Testing)
RegularExpressions  Some basic info about PHP regular expressions.
SchrootConverter  Converter that uses Schroot to execute commands for the Content recipe (First Release)
ServerInfo  Markup - Display $_SERVER Super-Global results from current Server ( Stable)
ShortCutsMarkup  Gives easy access to creating some types of custom markup. (Working)
SimpleRecipeTemplate  A Simple Recipe Template to provide a framework for PmWiki recipes (Always beta)
SourceHistory  Web php programming abilities from computers without any editor installed (beta)
Summary: Discussion of ModuleGuidelines
Version: 2007-04-14
Status:
Maintainer:

This is a talk page for improving ModuleGuidelines.

Additional base recipe components

Another useful line to add to every recipe is

# declare $Package for (:if enabled $Package:) recipe installation check
global $Package; $Package = 1;

Layout

Layout variables allow substitutions and additions to the page template.

CSS

$HTMLHeaderFmt can be used to reference external CSS files (recommended).

CSS can be included directly into the page using $HTMLStylesFmt.

For example if the recipe includes a package.css file, which is presumably placed in the /pub/css/ directory, the following lines would enable it in the page HTML header:

$HTMLHeaderFmt ['package-css'] = 
  "<link rel='stylesheet' type='text/css' href='\$PubDirUrl/css/package.css' />\n";

To include the CSS file only when the recipe is used (ie not for every page of the wiki), and only once (ie not for every time the markup is used in a page), place the following in the function that is called by the Markup function

# include the CSS file in the PmWiki page if required
static $css_generated = false;           // stylesheet not added to page
if (! $css_generated) {
  global $HTMLHeaderFmt;                 // reference the PmWiki HTMLHeaderFMT array
  $HTMLHeaderFmt ['package-css'] = 
    "<link rel='stylesheet' type='text/css' href='\$PubDirUrl/css/package.css' />\n";
  $css_generated = true;                 // remember the stylesheet was added to the page
  };

Talk page for the Module Guidelines recipe (users?).