Fullscreen
[Show/Hide Left Column]
[Show/Hide Right Column]

Introduction and index to Wiki plugins
3d browser Print

Wiki Plugins

The Wiki syntax is powerful enough for normal Wikis, but sometimes you need features not present in the Wiki. To ease the process of extending the Wiki syntax Tiki allows you to define a "plugin" to extend the Wiki syntax. Minimum PHP programming skills are needed to build a plugin.

Wiki plugins extend the function of wiki syntax with more specialized commands. Usually expressed in {curly brackets} plugins compact a chunk of PHP or HTML code into something that can be understood by non-programmers.

You can view a list of plugins (maybe not the whole list) by clicking wiki help --> show plugins near the bottom of any wiki edit page, or on the wiki help icon on the right side of the page when you're in edit mode. Also, here is a mod you can do to convert the fckeditors templates button into a dialog that can insert wiki syntax. Check it out here: WysiwygPluginButton

See also:

Table of contents



Currently Distributed Plugins

This is a list of all the bundled plugins with a documentation page on this site- not all distributed plugins have their own page. However, some information is available about all plugins at PluginManager. The list of bundled plugins varies with each Tiki version - please see All Plugins for which are available in 2.0 and 3.0. You can install any plugins that are not bundled - please read about it on this page at Installing a new plugin.



Note: Be sure the plugin you want to use is enabled by (since 3.0) going to Admin Home > Editing and Plugins > Plugins (tab) and checking the "Enable" box fir that plugin and clicking "Change Preferences."


Plugins documented on this site


Frequently used Plugins still documented on tikiwiki.org:
See the entire PluginsList - from tikiwiki.org.


Installing a new plugin

Some plugins are not installed by default in your tiki installation. They can be installed at a later stage as a Mod. See how to install them:

http://doc.tikiwiki.org/Mods+User

What they look like:

Plugins often have "begin" and "end" tags and are identified in a wiki page using the following syntax:

{PLUGINNAME(parameter1=>value,parameter2=>value)} content affected by plugin {PLUGINNAME}

  • {NOSPACESAREALLOWEDINPLUGINS(anywhere)}
  • plugins are often case sensitive
  • parameters you don't specify will be set to their defaults.
  • parameters are separated by commas, values within a parameter are separated vertical bars |
  • you can use either => or = in parameters.

Example:

Creating A Plugin

We may want to create a plugin to allow text formatting in any font and size:

{FONT(size=>20,face=>arial)} some text {FONT}

If a plugin doesn't require parameters you can use

{EXAMPLE()} content {EXAMPLE}

When tiki finds a plugin the engine will look at the plugin name and look for the file

lib/wiki-plugins/wikiplugin_name.php

For example

lib/wiki-plugins/wikiplugin_font.php

That file should be a PHP file defining the function

function wikiplugin_font($data,$params) {}

The function receives the plugin content in $data and the parameters in the $params associative array. The function manipulates the content and must return a string with the HTML that will replace the plugin content when rendering the wiki page (it can be just text if no HTML markup is needed).

This is an example: the example plugin:

function wikiplugin_example($data,$params) {

extract($params, EXTR_SKIP);

if(!isset($face)) {
return ("<b>missing face parameter for plugin</b><br/>");
}
if(!isset($size)) {
return ("<b>missing size parameter for plugin</b><br/>");
}
$ret = "<span style='font-face: $face; font-size: $size'>$data</span>";
return $ret;
}

The return of your plugin will be wiki parsed. If you do not want it to be parsed again, you must enclose the value like this
return '  ~np~'.$ret.'~/np~  ';


Plugins are a powerful tool. These are some ideas for plugins:
  • Display some language code highlighting its syntax
  • Display snippets of code
  • Display poetry
  • Display text using a special style
  • Display charts, gauges.
  • Show information from other sites.
  • Use plugins to display and maintain bibliography information (using Pybliographer (external link) for instance)
  • Etc., etc., etc

Special Plugins

These aren't real plugins but, like plugins, use a slightly different curly braces syntax. Unlike plugins, you don't "close" them. e.g., use { maketoc} instead of { maketoc()} { maketoc}. These can also appear in template (.tpl) files.

Banner Displays a banner. { banner zone=}. Set up banners via admin menu. Note that if you assign multiple banners to the same zone, will pick a different banner in that zone each time (more or less) the page is refreshed.
content Displays dynamic content
draw Displays a drawing which is an image that can be modified via a Java applet. { draw name=}. name must be unique for the entire site. Requires "drawing" feature to be turned on via the admin menu. If the drawing doesn't exist, the page will display a button that will create the drawing.
img Displays an image { img src= height= width=}. Mimics the HTML img tag.
maketoc Displays an indented table of contents using !, !!, !!! headers. { maketoc}.
RSS Displays an RSS feed. { rss id= max=}. Set up RSS feeds via admin menu (RSS Modules).
TOC Displays a table of contents for the structure that the page belongs to.


Alias


Contributors to this page: marclaporte4375 points  , omstefanov367 points  , lindon1521 points  , chibaguy781 points  , robferguson10 points  , rpg14 points  , ricks993572 points  , Xavi23124 points  , fivos87 pontos  , atilabelloquim5 points  , sylvie2680 points  , gmartin32 points  , mlpvolt1643 points  and rodrigo_sampaio .
Page last modified on Tuesday 08 September, 2009 16:08:13 UTC by marclaporte4375 points .

To register

To have an account at this site, please register at Tikiwiki.org (external link), and then use that user name and password to log in here.

Find by Page Name

Exact match

Keywords

The following is a list of keywords that should serve as hubs for navigation within the Tiki documentation and should correspond to development keywords (bug reports and feature requests):

Accessibility (WAI – 508)
Action log 2.x
Alert 3.x
Articles & Submissions
Backlinks
Banners
Blog
Bookmark
Browser Compatibility
Cache
Calendar
Category
Chat
Clean URLs
Comments
Communication Center
Compression (gzip)
Contacts Address book
Contact us
Content template
Contribution 2.x
Cookie
Copyright
Custom Home (and Groups Home Page)
Date and Time
Debugger Console
Directory (of hyperlinks)
Documentation link from Tiki to doc.tikiwiki.org (Help System)
DogFood
Dynamic Content
Dynamic Variable
External Authentication
FAQ
Featured links
File Gallery
Forum
Friendship Network (Community)
Gmap Google maps
Groups
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interaction
Inter-User Messages
InterTiki
Karma
Live Support
Login
Look and Feel
Lost edit protection
Mail-in
Map with Mapserver
Menu
Meta Tags
Mobile Tiki and Voice Tiki
Mods
Module
MultiTiki
MyTiki
Newsletter
Notepad
Payment
Performance Speed / Load
Permissions
Platform independence (Linux-Apache, Windows/IIS, Mac, BSD)
Polls
Profile Manager
Quicktags
Quiz
Rating
Feeds
Score
Search engine optimization
Search
Security
Semantic links 3.x
Shadowbox
Shoutbox
Slideshow
Smarty Template
Smiley
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Stats
Surveys
System log
Tags 2.x
Task
Tell a Friend + Social Bookmarking 2.x
TikiTests 2.x
Theme
Trackers
TRIM
User Administration including registration and banning
User Files
User Menu
Watch
WebHelp
Webmail
Webservices
Wiki 3D
Wiki History, page rename, etc
Wiki Page Staging and Approval 2.x
Wiki Plugins extends basic syntax
Wiki Syntax
Wiki structure (book and table of content)
WYSIWYCA
WYSIWYG 2.x
XMLRPC



Show php error messages