Project

General

Profile

Actions

PluginStructure » History » Revision 4

« Previous | Revision 4/6 (diff) | Next »
Gleb Surinov, April 22, 2014 23:03


Plugin Structure

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

When writing description (summary) for plugin in install.xml file, do not place dot (period) in the end of sentence:

<summary>An option for users to create their own picture galleries</summary>

Plugin Icon

Since 2.2.4 plugins have an icon that is displayed in Subrion Addons 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.
We highly recommend to add an icon file to your own plugins.

MySQL Dump Import

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

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

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:

    <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>


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

Updated by Gleb Surinov over 6 years ago · 4 revisions