PWP wiki processor

UserManual

TextRules . SimpleTextRules . Installation . Configuration
UserManual . FAQ . »find more online

 -Variables
 -Icons
 -Columns
 -Calendar
 -Bibliography
 -Glossary

Variables

Variables are short text fragments which are stored at a central point in your configuration. A variable in a Wiki page will be replaced by its contents at the time of the page delivery. If the contents of a variable has to be changed, you will do this once in your configuration - otherwise you had to look through all your Wiki pages and change the text manually!

Variables may contain plain text, HTML and Wiki mark-up code. It is guaranteed that variable replacement will be done before any other Wiki code translation takes place. For the tricky ones among you: Defining a variable inside a variable will not work. (See TextRules for the syntax to be applied.)

PWP can be configured to allow variable editing via web interface. In this case, variables must not contain double quotes ". These quotes will be silently replaced by single quotes.

You should consider one important point when you are using variables: Your Wiki mark-up, i.e. your data cannot be exchanged with different Wiki installations unless they define exactly the same variables with the same values!

If PWP encounters an undefined variable, it will print its {Name} like this. Names are case sensitive.

What can I do with variables?

Names, Phone numbers, Disclaimers

Things you have to repeat on several pages which are subject to change could be stored inside a variable. For example the name and phone number of a sales person:

Please contact our business representative {v:Sales}.

might expand to:

Please contact our business representative Mr. Bob Smith (555-976388).

Menus

Just define a menu for your most important pages in a variable. it is possible to mix HTML and Wiki mark-up, your menu may contain Wiki links! Now you can include your menu on every page by a call to {v:MyMenuVariable}.

News linking

You create a news page every month. You want to link to the current news page from several other pages? Just define a variable containing a Wiki link to this month's news and link to the news page using the variable:

 $this->mVars['NewsLink'] = "[[News_2004_07]]"

 {v:NewsLink}

Icons

PWP is distributed with several icons. You include the icons either as images using the common link/image syntax or you can define a variable containing the image tag. Storing an icon image tag or - in the case of a rating - several image tags in a variable will save a lot of typing.

The icons have a size of 12x12 pixel. This is much smaller than the usual size of 16x16 pixel. The 12 pixel size will fit into a single line of text in most cases. 16 pixel are often too high and will cause a greater line spacing. Anyway, you can replace the icons by whatever size you prefer! Here are a few samples:

Icons and the naming convention have been changed in PWP 1.4.0. Here is a sample:

 i12b_attention_red.gif

"i12" is a common identifier for all icons. The following "b" means "border". These icons have a black outer border an can be included in non-white backgrounds. All other icons will work with a white background only. The next part is the meaning of the icon. The main color forms the last part of an icon's name.

Columns

Have you wondered how the two column layout of the start page was done? That's an easy trick. I defined four variables: {v:OpenTable}, {v:CloseTable}, {v:ShiftCol} and {v:ShiftRow} with this contents:

<table width='100%' border='0' cellspacing='8' class='layout'>
  <tr><td class='layout' valign='top'>

  </td></tr></table>

  </td><td class='layout' valign='top'>

  </td></tr><tr><td class='layout' valign='top'>

Using these elements I can divide up a page in an N x M matrix. One word to the style class 'layout'. The PWP style sheet defines colours and font sizes for tables in general. For an invisible layout table two different style classes are required; they are already defined in PWP's standard style sheet.

Calendar

Calendar pages are created by a simple click on a link in the menu "Extras". There you will find two links, one for the current year and one for the following year. A calendar consists of an annual overview and one page per month.

A click on the calendar link will never overwrite an already existing page, i.e. an active Wiki page or a page in the trash bin.

You can predefine holidays, events (e.g. birthdays) and actual entries in your configuration file, see Configuration. The first two items will be shown in the title line of a day, the entries end up in the 'body area' of a day. It is possible to map the configuration settings to variables and edit them within a web interface. Of course, later changes do not affect any already existing calendar pages.

The calendar pages can be used a kind of web log (blogging) with a short entry per day linking to bigger stories on further pages.

One last note: The names of weekdays and months are not hard coded, but taken from PHP. Ideally, PHP would receive this information from the current system.

Bibliography

This is an easy task: Just create a Wiki page Bibliography and enumerate all books and other material used. You can point to the bibliography using a Wiki link like [[Bibliography|(Meyer82)]] It will look like this in your Wiki page: (Meyer82).

Inside Wiki links you can also use a variable to load an icon: [[Bibliography|{v:Goto}Meyer82]] will expand to BibliographyMeyer82

You cannot link directly to "Meyer82" on the bibliography page. PWP will just link to the page, not to a named anchor inside a page.

Glossary

Create a Wiki page Glossary and use a definition list for terms and definitions:

 ;Term1:Definition
 ;Term2:Definition

In your page you can link to the glossary using [[Glossary|(G)]]. It will look like this: (G). If you use a variable containing an image tag for an icon, you could write [[Glossary|{v:Glossary}]] to get a better looking link: Glossary.

You cannot link directly to a term or definition within the glossary, just to the page in whole.

Wanna go to TextRules, Installation or Download?

   (Powered by PWP Version 1-4-3)