Intermediate Wiki

Variables & Plugins

hand See also:

Intermediate Wiki - Variables & Plugins

  • Intended Audience
    • Anyone at who has been using Wiki

  • Pre-requisites
    • Familiarity with Wiki Essentials: webs, topics, adding/editing content
    • Knowledge of HTML helpful, but not required

What You Can Expect

Become an "Informed Consumer"

These training presentations won't turn you into you a Wiki expert in a few hours. However, you can expect to gain new perspective, hear about a few tips and tricks, add some insights, and see many examples.

We also hope you'll learn at least one new thing you didn't know before!

Beyond This Class

  • Tips, tricks, and tutorials can be found in the Help web.

Who Are You?

  • What's your experience with Wiki?

  • What's your experience with Wiki variables or plugins?

  • Do you have programming experience?

  • Are there any specific things you'd like to see covered in this session?

What's Covered

  • Variables
    • Using
    • Setting
    • Examples
  • Plugins
    • Using
    • Examples
  • Power! SEARCH, INCLUDE, COMMENT, CALC)
  • Appendix: User-defined Variables
  • Appendix: Web and Topic Customizations
  • References

Quick Review (Essentials)

  • Web = "folder"; Topic = "page"

  • Shared Namespace (MeetingNotes)
    • Naming Conventions

  • Raw View (How did they do that?)

  • 60-minute Editing timer
    • Revisions not tracked on every Save
    • Simultaneous editing

  • Creating pages

  • Making links
    • WikiWords
    • <nop>, <noautolink>,
    • [[Wiki Training Int]]

  • Attach (manage or upload)

Start presentation

Slide 1: Wiki "Enterprise" Features

More than just content

  • Variables (functions) add shortcuts
    today's date, topic name, colored text

  • Access control restrict topic view/change
    to users/groups

  • Plugins (extensions) extend functionality
    calendars, arithmetic, slide shows

  • Embedded Applications
    blog, team directory, project tracker

Slide 2: Variables

variable (n): A symbol or name that stands for a value.

Variables play an important role in computer programming because they enable programmers to write flexible programs. Rather than entering data directly into a program, a programmer can use variables to represent the data. Then, when the program is executed, the variables are replaced with real data. Examples: name, date, size ...

Wiki variables (aka macros) are special text strings that expand "on the fly" to display user data or system information.

hand See: webopedia.com, System.Macros

Slide 3: Wiki Variables

  • Text strings that expand into content whenever a topic is rendered for viewing

  • Provide useful information (e.g. today's date)

  • May let you override default settings (e.g. Access control to pages)

Slide 4: Using Variables

A variable is used by naming it on the page, wrapped in %...%.

Variable name: DATE

Usage: %DATE%

Result: 26 Jun 2017

Slide 5: Types of Variables

  • Predefined - value is defined internally by Wiki code or a plugin; do not re-set!

  • Preference - initial value is defined but users are free to change

  • User-defined - create your own

Slide 6: Predefined Variables

  • Defined by the Wiki installation or by Plugins

  • Value should not be changed by users

  • May act like programming functions or macros, accepting "arguments" that affect the value they return

  • By convention, all variables predefined by Wiki are all UPPERCASE (user-created variables may use lowercase).

Slide 7: Demo Page

Run Demo

Slide 8: Pre-defined Variables (Examples)

Hundreds of variables are installed with the Wiki distribution. Wiki Plugins also add and define their own variables. (We'll get to plugins in a bit...)

   ALLOWTOPICVIEW
   ATTACHURL
   BR
   BULLET
   DATE
   FORMFIELD{"fieldname"}
   ICON{"name"} 
   ICONURL{"name"} 
   INCLUDE{"page"} 
   ...
   RED
   SEARCH{"text"} 
   SERVERTIME{"format"}
   SPACEOUT{"string"} 
   TOC
   TOPIC
   WEB
   WIKINAME
   ...

hand See System.Macros for the full list of predefined variables, with documentation for using them.

Slide 9: Variables With Arguments

Some pre-defined variables accept arguments that modify the results.

Use %VARIABLENAME{ argument="value" }%

Example

%SERVERTIME%

produces:

26 Jun 2017 - 15:26

%SERVERTIME{"$hou:$min"}%

produces:

15:26

Slide 10: Pre-defined Variables - Examples

Some common variables you may see

  • WEB

  • TOPIC

  • WIKINAME

  • SPACEOUT

  • ATTACHURL

  • PUBURL

  • TOC

Slide 11: WEB, TOPIC, WIKINAME

The current web, current topic, and WikiName of the current user.

   %WEB%
   %TOPIC%
   %WIKINAME%

Example:
Hi %WIKINAME% - you're looking at the %TOPIC% 
topic in the %WEB% Web.

Hi WikiGuest - you're looking at the WikiTrainingInt
topic in the Help Web.

Slide 12: SPACEOUT

Inserts spaces after lower case letters that are followed by a digit or a capital letter, and after digits that are followed by a capital letter.

   %SPACEOUT{LongWikiLikeWordWithEmbeddedCaps}%

produces: Long Wiki Like Word With Embedded Caps

   %SPACEOUT{%TOPIC%}%

produces: Wiki Training Int

Note: SPACEOUT _inserts a space between a lower case letter and the following digit or uppercase letter._
It won't understand where to put spaces in something like YMGQACMRProcess.

Slide 13: ATTACHURL, PUBURL

ATTACHURL

URL to attachments in the current topic.

If you attach a file and check "Create a link to the attached file", the Wiki creates the link using %ATTACHURL%.

ATTACHURL "knows" the name of the current Web and Topic.

<img src="%ATTACHURL%/picture.jpg" alt="screenshot" width='432' height='156' />

PUBURL

URL to attachments in another topic.

If you want to access an attachment from another page, you need to tell the Wiki how to find it.
You'll need to specify Web and Topic.

<img src="%PUBURL%/FooBaz/WebHome/picture.jpg" alt="screenshot" width='432' height='156' />

Slide 14: TOC

Table of contents (based on headers).

%TOC%

Result

screenshot - TOC

To prevent a given header from showing in the Table of Contents, add !! after the last +.
---+!! WikiTrainingInt 

Slide 15: TOC

You can specify an optional title for the TOC. You can also limit the maximum depth of header level shown. For example, depth="2" only shows header levels 1 and 2.

%TOC{title="On This Page" depth="2"}%

Result

screenshot

Slide 16: More Examples

  • Variables for Coloring Text

  • Variables to display graphics HELP

  • Variables to display certain characters •

Slide 17: Variables for Coloring Text

Wiki defines variables for many colors.

Use %COLORNAME% (e.g. %RED%, %GREEN%, %BLUE% ...) to start coloring text. Use %ENDCOLOR% to go back to "normal". (Same end variable regardless of color.)

Pre-defined color variables:

  • YELLOW = normal bold
  • ORANGE = normal bold
  • RED = normal bold
  • PINK = normal bold
  • PURPLE = normal bold
  • TEAL = normal bold
  • NAVY = normal bold
  • BLUE = normal bold
  • AQUA = normal bold
  • LIME = normal bold
  • GREEN = led-green normal bold
  • OLIVE = normal bold
  • MAROON = normal bold
  • BROWN = normal bold
  • BLACK = normal bold
  • GRAY = normal bold
  • SILVER = normal bold
  • WHITE = normal bold (with gray background)

Slide 18: Variables to Display Graphics

Wiki defines many small graphics as easy-to-use variables.

The pre-defined %ICON% variables represent graphics that are 16 x 16 pixels in size.

  • %B% %B%
  • %H% HELP
  • %I% IDEA!
  • %L% %L%
  • %M% MOVED TO...
  • %N% NEW
  • %P% REFACTOR
  • %Q% QUESTION?
  • %S% PICK
  • %T% TIP
  • %U% UPDATED
  • %X% ALERT!
  • %Y% DONE
  • ...
  • %ICON{note}% note
  • %ICON{globe}% globe
  • %ICON{hand}% hand
  • %ICON{days}% days
  • %ICON{stop}% stop
  • %ICON{target}% target
  • %ICON{wip}% wip
  • %ICON{more}% more
  • %ICON{download}% download
  • %ICONURL{todo}% todo.png
  • %ICONURL{updated}% updated.png
  • %ICON{choice-no}% choice-no.png
  • %ICON{choice-yes}% choice-yes.png
  • ...

hand See: System.DocumentGraphics for the complete set of available graphics.

Slide 19: Convenience Variables to display Breaks and Bullets

  • %BR% - line break

  • %BULLET% - bullet •

  • %BB% - line break and bullet combined
  • %BB2% - indented line break and bullet
      •
  • %BB3% - indented line break and bullet
        •
  • %BB4% - indented line break and bullet
          •

Hint: Use %BB% in places where the usual Wiki bullet syntax doesn't work as well (e.g. table cells).

Slide 20: Not All "Special Characters" Have Variables

Tip: Use HTML Entities

Code Character
&lt;
<
 
&#42;
*
 
&#91;
[

hand See HTML Entities reference

Slide 21: Preference Variables

  • Initially defined by the Wiki installation or by Wiki Plugins

  • Value may be changed by users

  • Affect how Wiki pages look and act

Slide 22: Preference Variables: Examples

  • Personal preferences: EDITBOXWIDTH, EDITBOXHEIGHT, EDITBOXSTYLE

  • Access control: ALLOWTOPICVIEW, ALLOWTOPICCHANGE

  • Plugin defaults: TABLEATTRIBUTES

Slide 23: Preference Variables

You can set preference variables:

  • In your Wiki home page (e.g. WikiGuest)
    • Available to you anywhere in Wiki

  • In any topic

Slide 24: User-defined Variables

  • Create and use your own variables

  • At least one lower-case letter recommended to avoid conflicts

  • Useful for
    • setting shortcuts for content (e.g., type %apple% instead of http://apple.com)
    • graphics that do not have predefined variables (e.g. links to local attachments)
    • aliases (e.g., type %ToDo% instead of %ICONURL{todo}%)

Caution - Do not re-set predefined variable values unless you know that is expected!

Slide 25: Rules for User-defined Variables

  • Variable names must start with a letter.

  • The other characters can be letters, numbers, or underscores '_'.

  • You can use both upper-case and lower-case letters and you can mix the characters.
    • %MYVAR%, %MyVar%, %My2ndVar%, and %My_Var% are all valid variable names.

  • Variable names are case sensitive.
    • %MyVAR% and %MYVAR% are not the same.

Note: At the present time, you cannot create user-defined variables that accept arguments.

Slide 26: How to Set Variables

Use Wiki bullet syntax to (re)set the value for a variable.

If the variable does not already exist, this will create it.

   * Set Variablename = some value

   * Set Team_Name = Service Engineering

Note: No quotes necessary

Slide 27: Where To Set Variables

  • Set for every page in the site -- set in Main.SitePreferences (wiki admins only)

  • Set for every page in your web -- set in %WEB%/WebPreferences (may be restricted to some team members)

  • Set for one page -- if you can edit the page, you can set variables)

  • Set for one user (personal preferences) -- set in your Wiki Home page

Slide 28: Preference Variables: Editing

Set in your Wiki home page:

Horizontal size of text edit box:
    * Set EDITBOXWIDTH = 60 

Vertical size of text edit box:
    * Set EDITBOXHEIGHT = 30 

Style of text edit box:
    * Set EDITBOXSTYLE = font-family: monospace; font-size: 100%; font-weight: 600; width: 95%; 

Slide 29: Preference Variables, Examples: Access Control

Set on any page.

You can control who can view or edit a topic using the ALLOWTOPICVIEW and ALLOWTOPICCHANGE variables.

You can set access privileges for individuals (by their WikiName) or for Wiki groups (groups of users). Groups must be defined in the Wiki.

  * Write-protect this page:
      * Set ALLOWTOPICCHANGE = Main.NickR, Main.VickiBrown
   * Limit Read Access to our team
      * Set ALLOWTOPICVIEW = Main.EngGroup

hand See Help.WikiTutAccess, Main.WikiGroups.

Slide 30: Tip: Hide the Settings from View

Use HTML comments to hide the variable settings. They will work, but won't be visible in "View" mode.

<!--
   * Write-protect this page:
      * Set ALLOWTOPICCHANGE = Main.NickR, Main.VickiBrown
   * Limit Read Access to our team
      * Set ALLOWTOPICVIEW = Main.EngGroup
-->

Note HTML comments only hide text. They do not prevent Wiki commands from running!

Slide 31: Access Control - CAUTION!

When locking pages:
  • Do NOT type your WikiName. Copy and paste it from the signature area below the edit box.

  • When locking a page for someone else, always include yourself until you've made sure that the other person can use it!

  • When creating a group, always use the form at Main.WikiGroups to ensure that your group is created with the proper format.

  • When creating a group, do not remove yourself from the group until it's been tested by at least one other member.

Slide 32: Access Control - TEST

Be sure to test before saving.

Use Preview mode to test access control. Many kinds of mistakes will manifest themselves in the preview.

For example, if you spelled a user or group incorrectly or made a typo in the list syntax, the items won't be underlined or they'll have question marks next to them. At that point, you can just hit Back and fix it. This isn't 100% guaranteed, but it does catch a lot of mistakes.

Note: Our Wiki admins have added a feature that will notify you of a potential "Lock Out" condition. If the Wiki says you're about to be locked out of the page, go back and fix the access control.

Slide 33: Plugins (Extensions)

Plugins (or extensions) extend the functionality of Wiki beyond what is included in a default installation.

Plugins are available that help you to

  • easily access other sites/URLs
  • add calendars
  • include comment forms
  • create tables
  • build slide shows
  • ...
Plugins also provide the basis for powerful applications such as a team directory, project tracking system, event calendar, or discussion forum.

Slide 34: Using Plugins

Plugins are

  • Installed on the Wiki server
    • Nothing to download ‡
    • Nothing to install in your Browser
    • Nothing special you need to run

  • Accessed via variables
    • Each Wiki plugin has a documentation page

Note: There are a few things referred to as "plugins" that you do need to download to use. Examples include macros that allow conversion of MS Word or Excel to Wiki format. Strictly speaking, these are not "Wiki plugins".

Slide 35: Wiki Plugins

hand See Plugins/WebHome for the list of installed (active) plugins in this Wiki.

Surprise! There's a variable that will show you the list of installed plugins!

%PLUGINDESCRIPTIONS%

  • TWikiCompatibilityPlugin (1.12, 1.12): Add TWiki personality to Foswiki
  • SpreadSheetPlugin (08 Apr 2016, 1.22): Add spreadsheet calculations like "$SUM($ABOVE())" to Foswiki tables and other topic text
  • SlideShowPlugin (08 Apr 2016, 2.31): Create web based presentations based on topics with headings
  • AutoViewTemplatePlugin (2016-04-08, 1.24): Automatically sets VIEW_TEMPLATE and EDIT_TEMPLATE
  • BeautifierPlugin (1.0, $Rev: 7136 (2010-04-09) $): Provides the %CODE% and %ENDCODE% macros to display code fragments with formatting and syntax highlighting for improved readbility in wiki topics.
  • BookmakerPlugin (1.1.0, $Rev: 15213 (2012-07-26) $): Provides a UI and an API for other extensions that support the definition and maintenance of a specific topic ordering
  • BreadCrumbsPlugin (23 Apr 2014, 2.51): A flexible way to display breadcrumbs navigation
  • CalendarPlugin (2.010, 2.010): Show a monthly calendar with highlighted events
  • ChecklistPlugin (25 Jul 2015, 1.200):
  • CommentPlugin (08 Apr 2016, 2.91): Quickly post comments to a page without an edit/save cycle
  • ConfigurePlugin (11 Apr 2016, 1.05): configure interface using json-rpc
  • EditRowPlugin (19 Mar 2016, 3.315): Inline edit for tables
  • ExplicitNumberingPlugin (1.6.2, $Rev: 12385 (2011-08-25) $): Use the ##., ##.. etc. notation to insert outline numbering sequences (1, 1.1, 2, 2.1) in topic's text. Also support numbered headings.
  • FilterPlugin (29 Apr 2016, 4.23): Substitute and extract information from content by using regular expressions
  • FlexWebListPlugin (25 Sep 2015, 2.00): Flexible way to display hierarchical weblists
  • ForEachPlugin (1.102, $Rev: 10382 (2010-12-22) $): Loop over successive elements of a list, or a range of numbers.
  • GluePlugin (2.20, 2.20): Enable markup to span multiple lines
  • GoUptoTocPlugin (0.2.2, $Rev: 9949 (2010-11-10) $): Adds a arrow to each header, which lets you jump up the TOC anchor
  • HistoryPlugin (1.13, 1.13): Shows a complete history of a topic
  • HomePagePlugin (1.23, 1.23): Allow User specified home pages - on login
  • IfDefinedPlugin (2.01, 2.01): Render content conditionally
  • InterwikiPlugin (1.23, 1.23): Link ExternalSite:Page text to external sites based on aliases defined in a rules topic
  • JQueryPlugin (10 Apr 2016, 7.04): jQuery JavaScript library for Foswiki
  • MailerContribPlugin (2.82, 2.82): Supports e-mail notification of changes
  • NatEditPlugin (06 Jan 2016, 9.07): A Wikiwyg Editor
  • PhotoGalleryPlugin: (disabled) Error encountered loading the plugin. See errors below.
  • PreferencesPlugin (1.16, 1.16): Allows editing of preferences using fields predefined in a form
  • RedirectPlugin (1.12, 1.12): Create a redirect to another topic or website.
  • RenderListPlugin (2.28, 2.28): Render bullet lists in a variety of formats
  • SendEmailPlugin (1.5.4, 1.5.4): Send e-mails through an e-mail form
  • SetVariablePlugin (2.33, 2.33): Flexible handling of topic variables
  • SubscribePlugin (06 Nov 2015, 3.5): This is a companion plugin to the MailerContrib. It allows you to trivially add a "Subscribe me" link to topics to get subscribed to changes.
  • SyntaxHighlightingPlugin: (disabled) Error encountered loading the plugin. See errors below.
  • TablePlugin (03 Feb 2016, 1.154): Control attributes of tables and sorting of table columns
  • TagCloudPlugin (01 Apr 2016, 4.00): Renders a tag cloud given a list of terms
  • TocPlugin (2.1.1, $Rev: 11472 (2011-04-15) $): Sophisticated table of contents generation
  • ToolTipPlugin (1.5, $Rev: 1340 1357 (14 Dec 2008) $):
  • TreeBrowserPlugin (2.21, 2.21): Renders a bulleted or numbered list as a collapsible/expandable tree of nodes.
  • TreePlugin (1.93, 1.93): Renders topics' parent-child relationships as hierarchical tree view. Useful for dynamic site maps and threads.
  • TwistyPlugin (1.63, 1.63): Twisty section Javascript library to open/close content dynamically
  • UpdatesPlugin (1.01, 1.01): Checks Foswiki.org for updates
  • VarCachePlugin (1.2, $Rev: 14435 (2012-03-23) $): Caches the results of expanding macros in selected topics for improved server performance
  • WysiwygPlugin (08 Apr 2016, 1.33): Translator framework for WYSIWYG editors

Slide 36: Q&A - Requesting a New Wiki Plugin

Q: What if there's some functionality I need that isn't available in our Wiki? Can I install a Wiki plugin?

A: You can't install Wiki plugins on the server yourself. However, you can request that a plugin be considered and installed.

Slide 37: Using Plugins

Nothing to install.

  • Accessed by variables

  • Variable often has matching name
    (e.g. TablePlugin, TABLE variable)

  • Wrapped in %...{}%
    %TABLE{}%

  • Any arguments go inside the braces
    %TABLE{tableborder="4"}%

Note: A small number of plugins do not use variables.

Slide 38: Some Commonly Used Plugins

  • Interwiki - easily access pages on other sites

  • Bugzilla - link to or search into Bugzilla

  • Twisty - open/close content dynamically

  • Table - Control attributes of tables

  • Editable Table - Edit Wiki tables using edit fields, date pickers and menus

  • Calendar - Show a monthly calendar with highlighted events

  • TimeTable - weekly scheduling

Slide 39: Interwiki

Interwiki provides shortcuts that map to internal and external sites. Whenever you write Site:Page, it will be linked automatically to Page on the specified Site.

hand See System/InterWikis for more.

Slide 40: Bugzilla

An alternative to the Interwiki Bug: link; includes a bug icon

%BUG{number}% -- %BUG{123}%

Slide 41: Twisty

Hide (and show) text on a page.

Example

%TWISTY{}%
 ...
 ...
%ENDTWISTY%


Result

hidden text

Do Not Forget the %ENDTWISTY%.

Slide 42: Twisty (Customized)

Customize the link text, add images, etc.

Example

%TWISTY{
  showlink="Show Me" showimg="%ICONURLPATH{toggleopen-small}%"  
  hidelink="Hide This" hideimg="%ICONURLPATH{toggleclose-small}%" 
  mode="div" 
}%
  ...
%ENDTWISTY%


Result

Amidst the mists and fiercest frosts
With barest wrists and stoutest boasts
He thrusts his fists against the posts
And still insists he sees the ghosts.

hand See: System.TwistyPlugin

Slide 43: Tables

It's easy to create a table in Wiki.

Example

%TABLE{}%
| *Name* | *Color*  | *Type*  |
| Zucchini | Green | Vegetable |
| Dog | Brown | Animal |
| Banana | Yellow | Fruit |

Note: If the table is very simple, you can even leave out the %TABLE% part!


Result

Name Color Type
Zucchini
Green
Vegetable
Dog
Brown
Animal
Banana
Yellow
Fruit

Slide 44: Tables (Customized)

Here's the same table with customizations.

Example

%TABLE{headerbg="#CCCCFF" headercolor="#660099" 
       databg="#FFFFCC,#FFCC99" tableborder="4" 
       tablewidth="300" headeralign="center"
}%
| *Name* | *Color*  | *Type*  |
| Zucchini | Green | Vegetable |


Result

Name Color Type
Zucchini
Green
Vegetable
Dog
Brown
Animal
Banana
Yellow
Fruit

hand See: System.TablePlugin

Slide 45: Tables (Editable)

Make it editable

Example

%EDITTABLE{}%
| *Name* | *Color*  | *Type*  |
| Zucchini | Green | Vegetable |

Important:

%EDITTABLE{}% can come just before or just after %TABLE%.

Note: Do not put anything else (except the %TABLE% variable) between the %EDITTABLE command and the table itself. Not a blank line; not an HTML tag; nothing that isn't "part of the table".


Result

Name Color Type
Zucchini
Green
Vegetable
Dog
Brown
Animal
Banana
Yellow
Fruit

  • screenshot:
    screenshot

hand See: System.EditTablePlugin

Slide 46: Tables (Editable; Formats)

Example

%EDITTABLE{format="| row, -1 | label | text,30 | select,1,,Animal,Vegetable,Fruit | date | textarea,3x30 |"}%
| *#* | *Name* | *Color* | *Type* | *Date* |*Notes* |
| 1 | Zucchini | Green | Vegetable | 19 August 2008 | |


Result

# Name Color Type Date Notes
1
Zucchini
Green
Vegetable
19 August 2008
One Zucchini plant can produce enough zucchini for a neighborhood!
2
Dog
Brown
Animal
4 August 2008
3
Banana
Yellow

screenshot

Slide 47: Editable Tables (Formats)

You can specify the format for each column.

  • row - dynamic row number
    row, -1

  • label - "label" fields cannot be edited

  • text - a single line of text
    specify length
    text, 3

  • textarea - a box for multiple lines of text. Breaks allowed.
    Minimum size: rows x columns
    textarea, 3x30
  • date - a date picker; date can be formatted as desired
    date, 8, %y-%m-%d

  • select - a dropdown menu
    select, 1, ,Red, Green, Yellow

  • checkbox - a set of checkboxes
    checkbox, 3, Eggs, Toast, Jam

  • radio - a set of radio buttons
    radio, 2, Male, Female

hand See: System.EditTablePlugin

Slide 48: Tip! Repeating Formats

If all following columns will use the same format, you only need to specify the format once. e.g.

%EDITTABLE{format="| label | textarea,3x30 |"}%
|*Name*|*Monday*|*Tuesday*|*Wednesday*|*Thursday*|*Friday*|

The first column will be type "label". The rest of the columns will all be text areas of the same size.

Slide 49: Dynamic Table Cell Coloring

Add color to your table data with colors highlights based on cell content (uses JavaScript and CSS).

screenshot

screenshot

Help.WikiTutColorTable

Slide 50: Calendar

Show a calendar for the current month.

Example

%CALENDAR{}%


Result

June 2017
        01 02 03
04 05 06 07 08 09 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30  

Slide 51: Calendar (Customized)

Customize with colors and events.

Example

%~~ CALENDAR{topic="Help.WikiTutCalEvents" showweekdayheaders="1" month="09"
~~~ headercolor="#22638c" weekendheadercolor="#22638c" 
~~~ weekendcontentcolor="#FFFFFF" weekendcolor="#22638c" 
~~~ weekendheadercontentcolor="#CCCCCC" todaycolor="#dfedfd" 
~~~ showweekdayheaders="1" headercontentcolor="#FFFFFF" 
}%


Result

September 2017
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
          01 02
03 04 05 06 07 08 09
10 11
Vacation Day
12 13 14
09:00 Breakfast meeting
15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

Slide 52: Time Table

Weekly scheduling.

%TIMETABLE{topic="TimeTablePluginTestData" compatmode="on" 
   wholetimerow="on" startdate="8 Sep 2008" days="7"
}%

screenshot

screenshot

Help.WikiTutCalendar

Slide 53: Power Calendar

A simple Wiki application using several Wiki plugins:

  • Calendar
  • TimeTable
  • ToolTips
  • Comment
  • Glue

All in two pages! (1 for the app; 1 for the data.)

hand Demo - Power Calendar

Slide 54: More Useful Wiki Plugins

  • TreeBrowser - Renders a list as a collapsable/expandable tree.
  • Redirect - Redirects to another page
  • SlideShow - turn a Wiki topic into a presentation. No PowerPoint. (used here!)
  • RenderList - Bullet lists with graphical icons instead of bullets.
  • Headlines - Build news portals based on RSS news feeds
  • LocalCityTime - What time is it in Bangalore? Sunnyvale? London?

Slide 55: TreeBrowser (Expandable Trees)

Turns bullet lists into expandable trees.

Example

%TREEBROWSER{"thread"  title="List"}%
   * item 1
      * item 1a
      * item 1b
   * item 2
     ...


Result

Slide 56: TOC Trees (Expandable Table of Contents)

Combine TREEBROWSER with TOC

Example
%TREEBROWSER{"thread" title="*Table of Contents*"}%
%TOC{"Help.WebHome"}%

( Note: "Show Me" demo below does not work in SlideShow mode. Go to Help.WebHome to view. )

Result

Slide 57: Redirect

  • Redirect a user to another page

  • Useful for "aliases" between two pages

%REDIRECT{"OtherPageName"}%

Slide 58: Slide Show

Turn a Wiki topic into a presentation. No PowerPoint. (used here!)

screenshot

Help.WikiTutSlideShow

Slide 59: Renderlist

Bullet lists with graphical icons instead of bullets.

screenshot

Help.WikiTutRenderList

Slide 60: Headlines

Build news portals based on RSS news feeds

%HEADLINES{"http://feeds.astrology.com/dailycatscope" 
  header="---+!! [[$link][$title]]$n $description" 
  format="$t* [[$link][$title]]"
  limit="10"
}%

%HEADLINES{"http://feeds.astrology.com/dailycatscope" header="---+!! $title$n $description" format="$t* $title" limit="10"}%

Slide 61: Local City Time

What time is it in Bangalore? Sunnyvale?

| *Sunnyvale* | *Bangalore* |
| %LOCALCITYTIME{"America/Los_Angeles"}% | %LOCALCITYTIME{"Asia/Calcutta"}% |

Sunnyvale Bangalore
%LOCALCITYTIME{"America/Los_Angeles"}%
%LOCALCITYTIME{"Asia/Calcutta"}%

Slide 62: Power Extensions

  • SEARCH - Run an inline search, showing the results embedded in a topic.
    Used in Wiki dynamic indexes and applications

  • INCLUDE - Include content from another topic or URL

  • COMMENT (Comment Plugin) - post comments to a page without an edit/preview/save cycle. Allows simple to complex forms.

  • CALC (SpreadSheet Plugin) - arithmetic operations, date operations, string operations. Much more than the name implies.

Options

  • topic or content

  • regular expressions (including ; for AND)

  • case sensitive on/off

  • exclude topics from results (list of names)

  • sort order

  • ...

hand See System.VarSEARCH

Slide 64: SEARCH (examples)

An Index Page

%SEARCH{"Finance" web="CFOWeb" scope="topic" 
    format="   * [[$topic]]" }%

Results (sample)

Search: Finance

  • FinanceBuildout
  • FinanceBackupPlan
  • FinanceMasterBuild
  • FinanceCapacity
    ...

Slide 65: SEARCH (examples)

An Index Page

%SEARCH{ ".*(HowTo|Tips).*" 
         scope="topic" excludetopic="DocsHowTo," 
         regex="on" casesensitive="on" nosearch="on" }%

screenshot

Slide 66: SEARCH (examples)

A Dynamic Search (Query) For Project Tracking

screenshot

Code:

%~~ SEARCH{ search="
*~~ META:FIELD.*?ProjectClassification.*?%CALC{$GET(ProjectClassification)}%.*;
*~~ META:FIELD.*?PropertyName.*?%CALC{$GET(PropertyName)}%;
*~~ META:FIELD.*?ProjectName.*?%URLPARAM{"qPrj"}%.*;
*~~ META:FIELD.*?ProductGroup.*?%URLPARAM{"qOrg"}%;
*~~ META:FIELD.*?OpsInvolvement.*?%URLPARAM{"qInv"}%;
*~~ META:FIELD.*?OpsProjectSize.*?%URLPARAM{"qSz"}%;
*~~ META:FIELD.*?OpsAssignedTo.*?%URLPARAM{"qAsd"}%;
*~~ META:FIELD.*?OpsLaunchDate.*?%URLPARAM{"qLDt"}%.*
*~~ " topic="ProjectDetail20.*" nosearch="on" nototal="off" type="regex" noheader="on" 
~~~ format="| 
~~~  [[$topic][<img src=\"%ICONURL{viewtopic}%\" 
~~~ border=\"0\"  alt=\"View entry\" />]]
~~~ [[%SCRIPTURL%/edit%SCRIPTSUFFIX%/%WEB%/$topic?t=%GMTIME{"$hour$min$sec"}%&action=form][<img src=\"%ICONURL{edittopic}%\" 
~~~ border=\"0\" alt=\"Edit entry\" />]] | 
~~~ $formfield(ProjectName) | $formfield(ProductGroup) | $formfield(PropertyName)  | $formfield(OpsInvolvement) | 
~~~ $formfield(OpsProjectSize)  | $formfield(OpsAssignedTo) | $formfield(OpsLaunchDate) | 
~~~ $formfield(ProjectClassification) | $formfield(ExecSummary) |
~~~ " }%

hand See: Macros, System.FormattedSearch

Slide 67: INCLUDE

  • Include a Wiki Topic: %INCLUDE{"TopicOne"}%

  • Include part of a Topic: %INCLUDE{"TopicOne"}%
    • Wrap the part to include between %STARTINCLUDE%, %STOPINCLUDE%

  • Include a section of a Topic by name: %INCLUDE{"TopicTwo" section="section1"}%
    • Wrap the section to include between %STARTSECTION{"section1"}%, %ENDSECTION%

  • Include a URL: %INCLUDE{"http://url/path"}%

Note: When including "a section", if that section does not exist, the entire topic will be included.

hand See Help.WikiTutInclude

Slide 68: INCLUDE By Pattern

Include a section of a page (by pattern)
%INCLUDE{"http://url/path" 
  pattern="^.*<\!-- BEGIN_PART_1 -->(.*?)<\!-- END_PART_1 -->.*"}%

Slide 69: Comment

Post comments to a page without an edit/preview/save cycle.

From the very simple

screenshot

To the complex

screenshot

Help.WikiTutComment

Slide 70: Spread Sheet (CALC)

Arithmetic operations, date operations, string operations... SpreadSheetPlugin does much more than the name implies (and table rows/columns aren't required.).

| *Value A* | *Value B* | *Divide A / B* | *Multiply A x B* |
| 10 | 5 | %CALC{"$EVAL( $T(R$ROW():C1) / $T(R$ROW():C2) )"}% | %CALC{"$EVAL( $T(R$ROW():C1) * $T(R$ROW():C2) )"}% |
| 18 | 3 | %CALC{"$EVAL( $T(R$ROW():C1) / $T(R$ROW():C2) )"}% | %CALC{"$EVAL( $T(R$ROW():C1) * $T(R$ROW():C2) )"}% |


 %CALC{"$FORMATTIME($TIMEADD($TIME(), -1, day), $hour:$minute $day $mon $year)"}%

15:26 25 Jun 2017


%CALC{"$IF($FIND(Template, %TOPIC%),$NOP(%)INCLUDE{%WEB%.BoilerplateTemplateStop}$NOP(%))"}%

screenshot

hand See: Help.WikiTutSpreadsheet

Slide 71: Spread Sheet

There are 82 built-in functions defined by SpreadSheetPlugin. Here are just a few:

ABS( num )
AVERAGE( list )
COUNTITEMS( list )
EVAL( formula )
EXACT( text1, text2 )
EXISTS( topic )
FIND( string, text, start )
IF( condition, true value, false value )
INT( formula )
LENGTH( text )
LISTJOIN( separator, list )
LISTMAP( formula, list )
LISTSORT( list )
LOWER( text )
...
MAX( list )
MEDIAN( list )
PI( )
PROPERSPACE( text )
REPEAT( text, num )
REPLACE( text, start, num, new )
ROUND( formula, digits )
SEARCH( string, text, start )
SQRT( num )
SUBSTITUTE( text, old, new, instance, option )
SUM( list )
TODAY( )
TRIM( text )
UPPER( text )
...

Slide 72: Appendix: User-defined Variables

Below are some examples of variables you may find useful:

   HILITE
   HILITE_YELLOW
   HILITE_PINK
   HILITE_GREEN
   HILITE_BLUE
   HILITE_PURPLE
   ENDHI
   STRIKE
   UNDER
   ENDSPAN
   DEPRECATE
   ENDDEP
   INDENT
   ENDENT
 

hand See also: Help.WikiTutCSS for more examples of useful variables.

Slide 73: User-Defined Variables - HILITE

   * Set HILITE = <span style="background-color: #FFFF66;">
   * Set HILITE_YELLOW = <span style="background-color: #FFFF66;">
   * Set HILITE_GREEN = <span style="background-color: #6F6;">
   * Set HILITE_BLUE = <span style="background-color: #00FFFF;">
   * Set HILITE_PINK = <span style="background-color: #FFCCFF;">
   * Set HILITE_PURPLE = <span style="background-color: #EEDDFF;">
   * Set ENDHI = </span>

  • example: highlighted text

Slide 74: User-Defined Variables - STRIKE, UNDER

   * Set STRIKE = <span style="text-decoration: line-through;">
   <!-- or use <strike>...</strike> -->
   * Set UNDER = <span style="text-decoration: underline;">
   * Set ENDSPAN = </span>

  • example: underlined text
  • example: canceled text

Slide 75: User-Defined Variables - DEPRECATE

   * Set DEPRECATE = <div style="background-image: url('%PUBURL%/Help/WikiTutCSS/deprecated.gif');"> %GRAY%
   * Set ENDDEP = %ENDCOLOR% </div>

  • example:


This text has been deprecated


hand See HowToDeprecatePages for a discussion of deprecating pages.

Slide 76: User-Defined Variables - INDENT

   * Set INDENT = <span style="margin-left: 40px;">
   * Set ENDENT = </span>

  • example
this text is indented

Slide 77: Appendix: GluePlugin

GLUE allows variables and their arguments to be formatted on multiple lines, making them easier for a human to read.

GLUE recombines lines that begin with recognized prefix characters.

Line prefix Action
%~~  
avoid interpreting a variable before the pieces have been glued together
~~~  
recombine lines with one whitespace between them
*~~  
recombine lines by removing all whitespace between them

  • The ~~~   and *~~   sequences are recognized only at the beginning of a line.
  • The %~~   sequence can appear anywhere.

hand See: Wiki Tut Glue.

Slide 78: Appendix: Web and Topic Customizations

Your group controls your web and the topics within it. You can customize many aspects of your web without affecting any other webs in the site.

You can set Best Practices for naming new topics, control the template used for every new topic, and set standards for content.

You can modify the sidebar of your web as easily as you modified your personal sidebar.

You can also control who has access to view or edit topics.

Slide 79: Topic Edit Template

Every web can define the default "template" you see when you start a new page. You might see something like this:

<noautolink>

  <!--  New Page basic info jump-started for your convenience   -->
  <!--  All HTML comments may be removed from the final draft!  -->


  <!--                   PAGE HEADER                            -->
  <!--  The default header is generated from the page name.     -->
  <!--  Feel free to change (but do not remove) the header      -->  

---+!! %CALC{"$PROPERSPACE(%TOPIC%)"}%

hand See: WebTopicEditTemplate for an example.

Slide 80: What's Next? Advanced Wiki

A *structured wiki" can be used to build small applications.

Examples:
  • Project tracking system
  • Combined Month and week calendars with an "add event" form
  • Blogging
  • Team directory

hand See Advanced Wiki Training, or Help.WikiTutApp. Or, ask for a demo.

Slide 81: References

Slide 82: References - Plugin Documentation

Docs and info for many of the plugins currently installed:

Slide 83: Getting Help

Talk to your co-workers.

It's always OK to ask for help and share ideas.

-- VickiBrown -- 26 Jan 2009
Topic revision: r3 - 17 Apr 2012, VickiBrown
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding CFCL Wiki? Send feedback