Loading...
 

GuidelinesDev

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}{/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

Created by: Last Modification: Friday 20 September 2019 15:48:16 GMT-0000 by drsassafras
List Slides