[Show/Hide Right Column]

User Modules

1. Users Configuring modules

If enabled from the admin screen you can allow registered users to configure the modules they will see in the side bars of Tiki. The rules are:

  • If no configuration is made the user will see modules as configured from the modules administration screen
  • The user can remove modules, change the position and order of modules but they can t display modules that are not assigned by the admin from the modules admin screen.
  • The user can recover the default configuration with a single click whenever he wants

The following screen is used to let the user manage modules:


The user can move the modules up/down they can move a module to the other column and they can unassign modules (the login box and application menu cannot be unassigned). If the user unassigns a module he will be able to assign the module to any column in any position if he wants.

Use 'Create New User Module' to create custom modules


Once a user module is created, it can be selected and assigned from the Module Name list, just like the standard modules available to the site.
When assigning a module you can set optional parameters to it.

Tip: for multilingualism, you can use the following syntax in your custom module to display a different menu depending of the current language:
{if $language eq 'fr'}
{menu id=44}
{elseif $language eq 'es'}
{menu id=45}
{menu id=43}

The advantage of such code is to allow a default menu (id=43) when a translated version does not exist.

Inside the module, you can also display a menu depending on the user's group using the same syntax with the $group variable (which seems empty for Anonymous)

Tip: You can control the visability of your module by category by setting optional parameters when assigning it in the "Parameters" text area:



2. Edit/Create user module

This section allows the creation of a new user module.


You need to indicate the name (used in the select box to assign the module), the title and the data that will be displayed, the data must be HTML (any since you are admin). The right part of this panel can be used to help you include some objects that can be used in user modules, you can include in an user module:
  • A poll (it will display the form to vote for the indicated poll) {poll id=n}
  • Any poll from the active polls {poll}
  • A random image from any gallery {gallery id=-1 showgalleryname=1}
  • A random image from a single gallery {gallery id=n showgalleryname=0}
  • The current value of a dynamic content block {content id=n}
  • A random value from a dynamic content block {rcontent id=n}
  • An RSS feed {rss id=n}
  • A banner {banner zone=foo}
  • A normal menu {menu id=n}
    • A normal menu with an automatic opening of the sections the current url is in and the sub-section of this url. The other sections will be closed automatically. There is no consideration of the cookies {menu id=n menu_cookie=n}
    • A normal menu with a custom class id {menu id=n css_id=custom_name}
  • A Css/suckerfish menu
    • vertical {menu id=n css=y type=vert}
    • horizontal {menu id=n css=y type=horiz}
  • A menu with layers
    • Normal phplayered menu {phplayers id=n}
    • Vertical type of layers: {phplayers id=n type=vert}
    • Horizontal type of layers: {phplayers id=n type=horiz}
  • A structure "table of contents" {wikistructure id=n}


Note that there is a last checkbox to allow parsing the content of the menu, so that, wiki markup can be recognized and converted to html when showing the module in the browser (HomePage will be a clickable link then, in the previous example).

2.1. Including the current date in user modules

The following syntax can be used to display the current server date on a module:

{showdate mode="d/m/Y h:i"}

Where mode is any valid format for the PHP "date" function (see the date function on the PHP manual).

2.2. Including dynamic content in user modules

You can include dynamic blocks in a user module using a simple syntax:

Today quote: {content id=3}

In the example we are including the current version of the dynamic block 3 . You can create/edit and program dynamic blocks using the Dynamic Content System (DCS). Read about the DCS in the DCS section to learn more.

2.3. Including banners in user modules

If you want you can include a banner in a user module, using the following syntax:

{banner zone=sidebar}

Where zone must be the name of an existing zone in the banners system and there should be at least one banner assigned to the zone (or nothing will be displayed). You can learn more about banners in the banners section.

2.4. Including polls in user modules

You can display the form to vote a poll in a user module using the syntax

{poll id=n}

If you want Tiki to display the form to vote some (random) poll from all the active polls you can use:


You can use the following function to display one random image from an image gallery:

{gallery id=n}

2.6. Including RSS feeds in user modules

You can display the content of an RSS feed from another site in a user module after you created the feed (see using external RSS feeds later on this section), the syntax is:

{rss id=n max=m}

It will display the rss feed with id=n and it will display up to m elements from the feed.

3. Develop your own module

A module is made up of one or two files:
  • A Smarty template file in the templates/modules directory - extension .tpl
  • A php file in the modules directory - extension .php. The php fle is not mandatory

The best way to begin, is to copy the one or 2 files from another module, to change the name of the files, the name of the php functions.
You can find an easy example in modules/mod-directory_stats.php , templates/modules/mod-directory_stats.tpl.


Site Language


These keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):

Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki