Project

General

Profile

PluginStructure » History » Revision 2

Revision 1 (Vasily Bezruchkin, August 01, 2012 06:21) → Revision 2/6 (Vasily Bezruchkin, September 19, 2012 23:47)

h1. Plugin Structure

Plugin should have index.php for both admin panel and frontend.

There is a way to import mysql dump files during a plugin or package installation.

<pre>
<install>
<import type="sql">USA.sql</import>
</install>
</pre>

The appropriate SQL dump file should be placed into includes/dumps/ folder.

Implement the confirmation when importing dumps.
There should be an ability to specify each import as optional.
Example:
<pre>
<import type="sql" optional="1" description="Canadian ZIP codes">my-dump.sql</import>
or
<import type="sql" interact="confirmation/forced" description="Canadian ZIP codes">my-dump.sql</import>

</pre>
In this case the script has to ask the user "Would you like to install Canadian ZIP codes?" when installing a package.