Loading...
 

GuidelinesDev

If you want to enhance and/or customize Tiki to build your site or your application, or if you want to join the Tiki developers community, this is the page you should read.

Tiki is an application environment designed to be extensible and customizable. If you know PHP and want to extend Tiki this section will explain how to create new features. The look of pages can be customized with Smarty and does not need PHP knowledge.

Basic rules

Let's start with some basic rules or guidelines:

Rule 0 (Zeroth)

Everybody is welcome to the Tiki developers community. If you need help, ask. If you want us to review your work, send it to our mailing list.

Tiki pages are always composed of two files: a php file and a template
  • All the logic and PHP code goes in the PHP file
    • A simple example of this is tiki-error.php. Using $smarty->assign allows you to pass variables to the Smarty template.
  • All the presentation, displaying and layout goes to the template and in the CSS.
    • A simple example of this is templates/tiki-featured_link.tpl. Variables are displayed using {$variable}.
    • Using {$variable|escape} tells Smarty to manage any special HTML characters. escape is set by default to display HTML , but you can display other kind of data, htmlall, quote, hex, hexentities, and also javascript (thanks tom). If a variable passed a '>' character, Smarty would convert it to a '>'. Check http://smarty.php.net/manual/en/language.modifier.escape.php for more information.
  • The templates can then be overridden by styles.
    • If a file is found under templates/styles/your-theme/*.tpl it will override the default template file found under templates.
  • All the strings are written to be easily translated using the tra() function in PHP or the {/tr} blocks in templates.
  • All your HTML code must be XHTML 1.0 transitional compatible. Use the W3C Validator to check your module before releasing it.
  • Create styles for your XHTML code using CSS stylesheets.

All the database-access functionality is abstracted into libraries in the lib directory
  • tikilib is the system library for tiki core modules.
  • New module libraries should be created under lib or lib/modulename
  • ADOdb is used in libraries and only in libraries to access the databases
  • Direct DBMS functions such as MySQL API functions are not used.
  • Please also see: DbAbstractionDev

Everything must work with all the warnings and errors reported

Everything must work with register_globals turned off


Page last modified on Thursday 06 May 2004 21:52:17 GMT-0000

Why Register?

Register at tiki.org and you'll be able to use the account at any *.tiki.org site, thanks to the InterTiki feature. A valid email address is required to receive site notifications and occasional newsletters. You can opt out of these items at any time.