mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 06:38:00 +02:00
Updated e107 Coding Standard (markdown)
@@ -316,8 +316,13 @@ Avoid short language strings for words such as 'and', 'to' and so on. There aren
|
||||
|
||||
## Template Files
|
||||
|
||||
See the **gallery** plugin as a good reference.
|
||||
Avoid code, especially functions, in template files
|
||||
Use the **gallery** plugin as your reference.
|
||||
Avoid code, especially functions, inside template files.
|
||||
eg.
|
||||
|
||||
$template = e107::getTemplate('gallery');
|
||||
|
||||
|
||||
|
||||
## Html
|
||||
e107 v2+ uses the HTML5 standard. Be sure to validate the HTML output of your code.
|
||||
@@ -326,9 +331,17 @@ Many of us use the Firefox addon: http://users.skynet.be/mgueury/mozilla/
|
||||
|
||||
## Shortcodes
|
||||
|
||||
1. Note and use the class-based structure introduced in v2.0 - with this it should be possible to totally avoid globals.See the **gallery** plugin for an example.
|
||||
Note and use the class-based structure introduced in v2.0 - with this it should be possible to totally avoid globals. See the **gallery** or **faqs** plugins for an example.
|
||||
|
||||
2. Parameter standards (see eHelper::scParams() and eHelper::scDualParams() )
|
||||
**Newer Plugins:**
|
||||
|
||||
$sc = e107::getScBatch('gallery',TRUE); // loads e107_plugins/gallery/shortcodes/batch/gallery_shortcodes.php
|
||||
|
||||
**Version 1.x plugin upgraded/adapted:**
|
||||
|
||||
$sc = e107::getScBatch('faqs',TRUE); // loads e107_plugins/faqs/faqs_shortcodes.php
|
||||
|
||||
Parameter standards (see eHelper::scParams() and eHelper::scDualParams() )
|
||||
|
||||
## Recommended Code Editors
|
||||
We recommend [Aptana Studio](http://www.aptana.com/products/studio3) as an editor. We may release e107-specific code-assistance in future.
|
||||
|
Reference in New Issue
Block a user