Revision [2396]

This is an old revision of UsingActions made by BrianKoontz on 2015-06-30 19:27:49.


Using actions in Wikka pages

[skip to action list]

About actions

Actions are small (or not so small) pieces of code that generate automatic content within a page. An action may provide simple content, or it may provide an interactive "service" with a form for user input.

Post-formatter actions

since 1.3.6
There are two types of actions: Those that act on the wiki page prior to the markup being processed ("traditional" actions, designated by {{...}}), and the new post-formatter actions (designated by Unknown action; the action name must not contain special characters.). The main difference between the two is that the new post-formatter action can access the contents of the wiki page it's invoked in after the markup has been processed into HTML. For instance, the new
Table of Contents

post-formatter action will generate a table of contents for all headings on a wiki page, and uses the id generated for each heading by the Wikka formatter. Since this can't happen prior to the page being rendered by the formatter,
Table of Contents

must be implemented as a post-formatter action.

Some actions are considered "core" and are essential to the functioning of Wikka as a WikiEngine. Others are better classified as "plugins", providing extra, less essential functionality. Of course, WikkaWiki comes bundled with all "core" actions and a nice collection of "plugins". Many Wikka users also make additional plugins available through the main site.

Using actions

To include an action in a page, simply edit the page and add the name of the action between double braces, e.g. {{myaction}}. Action names are case-insensitive.

Many actions can be customized by providing extra parameters; a parameter must always have its value enclosed in double quotes, e.g. {{myaction par1="foo"}}. Unknown parameters are simply ignored; in some cases one or more parameters may be required. Multiple parameters are separated by spaces: {{myaction par1="foo" par2="bar"}}.

Content example:
Use {{wikkaversion}} to display the version of Wikka running this wiki:

Service example:
Use {{googleform}} to display a Google search form. You may add an optional q parameter to specify a default search query, as in {{googleform q="Wikka"}}:

List of available actions

Actions distributed with WikkaWiki (in alphabetical order)
{{adminpages}}displays a module to manage wiki pages
{{adminusers}}displays a module to manage users
{{backlinks}}displays a list of pages linking to the current page
{{calendar}}displays a calendar for a specified or current month
{{category}}displays a list of pages belonging to a category
{{checkversion}}displays message if newer Wikka version exists
{{clonelink}}displays a link to clone the current page
since 1.2
{{color}}renders colored text
{{colour}}alias for {{color}}
{{contact}}displays an obfuscated mailto link to contact the wiki administrator
{{countcomments}}counts the comments by the current user
{{countowned}}counts the pages owned by the current user
{{countpages}}counts the number of pages in the wiki
{{countusers}}count the number of registered users in the wiki
{{dbinfo}}displays information on the database storing data from the wiki
{{deletelink}}displays a link to delete the current page
since 1.2
{{editlink}}displays a link to modify the current page
since 1.2
{{emailpassword}}displays a form to retrieve a password
{{feedback}}displays a form to send feedback to the admin of the wiki
{{files}}displays a form to upload/download/delete files
{{flash}}embeds a flash-animation
{{geshiversion}}displays the version of GesHi | bundled with Wikka
GoogleformActionInfo {{googleform}}displays a Google search form.
{{highscores}}displays a list of registered users, ordered by the percentage of pages they own
{{historylink}}displays a link the revision history of the current page
since 1.2
{{homepagelink}}displays a link to the wiki homepage
since 1.2
{{image}}inserts an image
{{include}}includes another wiki page
{{interwikilist}}displays a list of InterWiki shortcuts
{{lastedit}}displays information on the last revision
{{lastusers}}displays a list of recently registered users
{{license}}diplays open source licenses in full text or graphics
since 1.3.1
{{meta}}generates HTML meta tag
since 1.3.7
{{mindmap}}embeds a mindmap in a wiki page
{{mychanges}}lists pages edited by the current user
{{mypages}}lists pages owned by the current user
{{mysqlversion}}displays the mysql version running on the server
{{newpage}}displays a form to create new pages
{{nocomments}}disables comments for the current page
{{orphanedpages}}displays a list of pages not linked by any other page in the wiki
{{ownedpages}}displays a list of pages by owner
{{ownerlink}}displays a link to the page owner's profile
since 1.2
{{pageindex}}displays an alphabetical list of pages in the wiki
{{phpversion}}displays the PHP version running on the server
{{recentchanges}}lists recently modified pages
{{recentcomments}}lists recent comments
{{recentlycommented}}lists recently commented pages
{{redirect}}redirects page to another page
since 1.3
{{referrerslink}}displays a link to a page displaying external referrers for the current page
since 1.3
{{rev}}displays the latest revision number for the current page
{{revertlink}}displays a link to allow admins to revert the latest revision of a page
since 1.2
{{revisionlink}}displays the date and time of the latest revision and a link to the list of recent revisions of the current page
since 1.2
{{rss}}embeds a feed in the page
{{searchbox}}displays a search box (menulet)
since 1.2
{{system}}displays information about the system
{{textsearch}}displays a search form
{{textsearchexpanded}}displays a form for expanded text search
Table of Contents

generates a table of contents for selected/all headings on the wiki page
since 1.3.6
{{usersettings}}displays a login/logout form and user settings
{{wantedpages}}lists nonexisting pages linked by other pages
{{wikkachanges}}displays Wikka release notes for the current version
{{wikkaconfig}}displays the current configuration settings
{{wikkaname}}displays the name of the wiki
{{wikkapatchlevel}}displays the patch level of Wikka running the wiki
since 1.2
{{wikkaversion}}displays the version of Wikka running the wiki
{{whoami}}displays the current username (if signed in) or the hostname for anonymous visitors
since 1.2

Actions not in the actions-directory
{{iframe}}allows embedding a page in another page

{{footer}}replaced by the footer template file
{{header}}replaced by the header template file
{{table}}obsoleted by the TableMarkup |
since 1.2

There are 2 comments on this page. [Show comments]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki