Project

General

Profile

PluginStructure » History » Version 6

Gleb Surinov, November 12, 2014 23:36

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 6 Gleb Surinov
Since 2.2.4 plugins have an icon that is displayed in "Subrion Plugins" section here: http://www.subrion.org/plugins/ 
13
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. Icon should be non-transparent, that means that icon should have a background.
14 3 Vasily Bezruchkin
We highly recommend to add an icon file to your own plugins.
15
16
h2. MySQL Dump Import
17 2 Vasily Bezruchkin
18
There is a way to import mysql dump files during a plugin or package installation.
19
20
<pre>
21
<install>
22
	<import type="sql">USA.sql</import>
23
</install>
24
</pre>
25
26
27
The appropriate SQL dump file should be placed into includes/dumps/ folder.
28
29
Implement the confirmation when importing dumps.
30
There should be an ability to specify each import as optional.
31
Example:
32
<pre>
33
	<import type="sql" optional="1" description="Canadian ZIP codes">my-dump.sql</import>
34
or
35
	<import type="sql" interact="confirmation/forced" description="Canadian ZIP codes">my-dump.sql</import>
36
37
</pre>
38
In this case the script has to ask the user "Would you like to install Canadian ZIP codes?" when installing a package.