Project

General

Profile

PluginStructure » History » Version 5

Gleb Surinov, April 30, 2014 02:55

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 4 Gleb Surinov
When writing description (summary) for plugin in install.xml file, do not place dot (period) in the end of sentence:
6
<pre>
7
<summary>An option for users to create their own picture galleries</summary>
8
</pre>
9
10 3 Vasily Bezruchkin
h2. Plugin Icon
11
12 5 Gleb Surinov
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 (PNG is required icon format). Recommended dimensions: 350px width, 350px height.
13 3 Vasily Bezruchkin
We highly recommend to add an icon file to your own plugins.
14
15
h2. MySQL Dump Import
16 2 Vasily Bezruchkin
17
There is a way to import mysql dump files during a plugin or package installation.
18
19
<pre>
20
<install>
21
	<import type="sql">USA.sql</import>
22
</install>
23
</pre>
24
25
26
The appropriate SQL dump file should be placed into includes/dumps/ folder.
27
28
Implement the confirmation when importing dumps.
29
There should be an ability to specify each import as optional.
30
Example:
31
<pre>
32
	<import type="sql" optional="1" description="Canadian ZIP codes">my-dump.sql</import>
33
or
34
	<import type="sql" interact="confirmation/forced" description="Canadian ZIP codes">my-dump.sql</import>
35
36
</pre>
37
In this case the script has to ask the user "Would you like to install Canadian ZIP codes?" when installing a package.