How to setup Core Design Chili Code plugin? Print E-mail
(9 votes)

 Pre-Requirements

  1. Install and enable Core Design Scriptegrator plugin.
  2. Visit Scriptegrator plugin configuration and set the "Load jQuery to" option to "Site".

 

Setup

  1. Install the plugin.
  2. Visit plugin configuration and don't forget to publish him.


Allowed language strings: javascript, php, mysql, html, java, cplusplus, csharp, delphi, lotusscript.
Allowed sources: content, file.

 

Default notation

{chilicode language source} YOUR CODE {/chilicode}

 

Explication

  • "language" - language you want to use (javascript, html, php, mysql...) - see the notice above.
    Default is "php".
  • "source" - source where your code is located (article - file).
    Default is "content".
  • "code" - your code.

Examples

  1. Source - Article
    a) PHP
    {chilicode php content} echo "there is my code"; {/chilicode}
    
    b) HTML
    {chilicode javascript content}
    var a = 5;
    var b = 10;
    alert(a + b);
    {/chilicode}
    
    c) C++
    {chilicode cplusplus content} int main () { return 0; } {/chilicode}

  1. Source - File
    Note: Don't forget to set up your directory, where your scripts are stored (option "Script directory").
    {chilicode php file} file.php {/chilicode}
    
    {chilicode mysql file} file.sql {/chilicode}
    
    {chilicode js file} file.js {/chilicode}