Docs: Introduction to Extensions

In addition to the built-in extensions, you can also create your own. You can write PHP functionality plus query and update your SQLITE database.

Your PHP executable files are located in your /php/ directory which can be edited through your admin under Layout > PHP. Resellers can access via FTP, everyone else can access via /vendo/php/ in your browser.

Your PHP files are included at the top and bottom of every page. 

(Note: the built-in extensions are not editable.)

Files can you add extensions to

/php/top.inc
/php/head.inc
/php/foot.inc
/php/bottom.inc

Via ftp: if you see a file named __top.inc and want to use it, rename it to top.inc - likewise if you no longer want to use it rename it back to __top.inc or any other name (or just delete it). Only files that are named exactly as above are included.

Include order

A page is accessed by the web browser, for example the homepage is "index.php"

The page includes:

    /php/top.inc             (or "head.inc")
       - Vendo then processes various functions specific to the index.php file
       - Vendo generates the html, head and opening body tags
       - Vendo loads and parses your template header.html
    /php/head.inc
  
the page (index.php) runs its own content

    /php/foot.inc
       - Vendo loads and parses your template footer.html
       - Vendo then adds the closing body and html tags
    /php/bottom.inc

To get a feel for adding your own extensions start with these Examples

 

Revisions history (8)    ( hide | show )     Extensions > Introduction to Extensions

×