Project

General

Profile

PluginStructure » History » Version 3

Vasily Bezruchkin, November 14, 2012 01:40

1 1 Vasily Bezruchkin
h1. Plugin Structure
2
3
Plugin should have index.php for both admin panel and frontend.
4 2 Vasily Bezruchkin
5 3 Vasily Bezruchkin
h2. Plugin Icon
6
7
Since 2.2.4 plugins have an icon that is displayed in "Subrion Addons":http://www.subrion.com/product/plugins.html Besides this icon is displayed on the right side of a plugin details popup in Admin Panel. Icon should be place in PLUGIN_NAME/docs/img/ folder and it should have 'icon.png' name. Recommended dimensions: 130px width, 130px height.
8
We highly recommend to add an icon file to your own plugins.
9
10
h2. MySQL Dump Import
11 2 Vasily Bezruchkin
12
There is a way to import mysql dump files during a plugin or package installation.
13
14
<pre>
15
<install>
16
	<import type="sql">USA.sql</import>
17
</install>
18
</pre>
19
20
21
The appropriate SQL dump file should be placed into includes/dumps/ folder.
22
23
Implement the confirmation when importing dumps.
24
There should be an ability to specify each import as optional.
25
Example:
26
<pre>
27
	<import type="sql" optional="1" description="Canadian ZIP codes">my-dump.sql</import>
28
or
29
	<import type="sql" interact="confirmation/forced" description="Canadian ZIP codes">my-dump.sql</import>
30
31
</pre>
32
In this case the script has to ask the user "Would you like to install Canadian ZIP codes?" when installing a package.