Now, updating for Tiki 9! Get Smart...
Now accepting new user registrations! Become a contributor.
| More
Join Print Print multiple pages Convert to PDF

Using the HTML Plugin


The HTML Plugin is one of the easiest ways add anything to a wiki page. It is extremely powerful.



Creating the HTML Plugin

For example, in order to embed this YouTube video(external link) in a wiki page:

YouTube generates the following code:
YouTube script
<object width="580" height="360">
  <param name="movie" value="http://www.youtube.com/v/KBewVCducWw&hl=en_US&fs=1&color1=0x3a3a3a&color2=0x999999&border=1"></param>
  <param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param>
  <embed src="http://www.youtube.com/v/KBewVCducWw&hl=en_US&fs=1&color1=0x3a3a3a&color2=0x999999&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="580" height="360"></embed>
</object>


If you attempt to simply copy and paste this code into a wiki page, Tiki will sanitize the script elements. Instead, use the HTML plugin:
HTML Plugin
{HTML()}
<object width="580" height="360">
  <param name="movie" value="http://www.youtube.com/v/KBewVCducWw&hl=en_US&fs=1&color1=0x3a3a3a&color2=0x999999&border=1"></param>
  <param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param>
  <embed src="http://www.youtube.com/v/KBewVCducWw&hl=en_US&fs=1&color1=0x3a3a3a&color2=0x999999&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="580" height="360"></embed>
</object>
{HTML}

NoteNote:
For complete details on the HTML plugin, see the Tiki Documentation Tiki(external link). Tiki also includes a number of feature-specific plugin that can be used an an alternative to the HTML plugin. See Tiki Documentation Tiki(external link) for details.

WarningWarning:
The HTML plugin will allow you (or anyone with permission) to add any HTML coding to the page; this includes potentially malicious code. Be sure to allow only trusted editors to use this plugin.


Plugin Parameters

The HTML plugin contains one optional parameter: Wiki syntax. Use this parameter to instruct Tiki to parse any wiki syntax. For example:
HTML Plugin without wiki syntax parsing
{HTML()}
This link uses an __onclick__ event to produce a popup window:
 <a href="#" onClick="alert( 'This message is __bold__.' )">
  Click Here
 </a>
{HTML}

will produce:

This link uses an __onclick__ event to produce a popup window: Click Here


Notice that the text "onclick" and "bold" are not bold. By default, Tiki will not parse wiki syntax in the HTML plugin.

Use the Wiki syntax parameter to tell Tiki to parse the syntax. For example:
HTML Plugin with wiki syntax parsing
{HTML(wiki=1)}
This link uses an __onclick__ event to produce a popup window:
 <a href="#" onClick="alert( 'This message is __bold__.' )">
  Click Here
 </a>
{HTML}


will produce:

This link uses an onclick event to produce a popup window: Click Here



Enabling the HTML Plugin

Plugins must be enabled before they can be used in wiki page. If you attempt to use a disabled plugin, Tiki displays the following message:
Plugin disabled. Plugin cannot be executed

Approving the HTML Plugin

Some plugins require approval before they become "live," especially those, such as the HTML plugin, that allow users to embed specific coding. Only users with the necessary permission can approve pending plugins.
TipTip:
To avoid requiring approval, Tiki provides specialized plugins for specific purposes. See Tiki documentation(external link) for a list of available plugins.


To approve the pending HTML plugin:
  1. Click View Details. Tiki displays the details of the HTML plugin.
    Plugin details
    Details of the HTML plugin.
  2. Select one of the following options:
    • Click Preview to execute the plugin once. Tiki reloads the page, executing the plugin. But for subsequent page visits, the plugin will not execute.
    • Click Approve make the plugin "live." Tiki reloads the page, fully executing the plugin code.
    • Click Reject to disapprove the plugin and deny its execution. Tiki displays the following message:
      Plugin denied
      You should edit the page and remove the denied plugin code.



Displaying all Pending Plugins

Use the Plugin Approval page to display all plugins that are pending approval. For each pending plugin, Tiki will display
  • The plugin and its unique, security ID
  • The location of the page (for plugins include on wiki pages)
  • The user who added the plugin or last visited the page
Plugin approval
Approving the pending plugins.

You can approve or deny specific plugins.


Contributors to this page: Rick Sapir .
Page last modified on Friday, January 14, 2011 05:25:26pm EST by Rick Sapir.
The content on this page is licensed under the terms of the Copyright Information.

Buy the Books

Tiki Essentials & Tiki for Smarties -- Buy the Books.
Available from Amazon, LuLu, and more as paperback or ebook...

What do you think?

What do you think of this project?



Anti-Bot verification code image Try another code



View Results
(Votes: 20)

"...very good explanations ... an essential supplement to the [Tiki] docs."

Is Essentials helpful?

Essential Readers



Advertising



Powered by Tiki Wiki CMS Groupware
Creative Commons Copyright. Some rights reserved.
Tiki Essentials (this site) is © 2011-2012 by Rick Sapir, published by KeyContent.org, and is licensed
under a Creative Commons Attribution-Share Alike 3.0 United States License. Some rights reserved. Privacy Policy.
Permissions beyond the scope of this license may be available at http://twessentials.tikiforsmarties.com/Copyright Information.
Questions, comments, or concerns about this site or the guide? Let me know.
New to Tiki? Try Tiki for Dummies Smarties: A beginner's guide to using Tiki Wiki CMS Groupware.


Feedback Form
Feedback Analytics