Knowledgebase



 Categories





 Dimofinf Mobile


Subscribe now to Dimofinf Mobile and enjoy a wide range of premium services. You will receive our SMS text messages wherever you are for a very low cost! More


 Currency Converter


  • Currency
  • US$ Amount

Plugins system



Dimofinf offers you an easy and advanced plugins system through which you can add your programming very easily to Dimofinf without needing to alter the program source files. We'll now explain the mechanism of our plugins system.

      The general classification of the plugins folders:

The plugins folder is classified into a group of main and sub-folders which must be available:

- include/plugins/pluginfolder

        The main plugins folder

- include/plugins/pluginfolder/xml

        The XML folder which includes its files:

  • Language files (a hyperlink is added for the language dealings explanation)
  • Permissions files (Bitfield) (a hyperlink is added for the permissions system explanation)
  • Hook points files (a hyperlink is added for the hook points explanation)
  • Template zone points files (a hyperlink is added for the template zone points system explanation)
  • Settings file (a hyperlink is added for the settings system explanation)

- include/plugins/pluginfolder/css

        The folder which contains the css files for the style

- include/plugins/pluginfolder/js

        The folder which includes the style java script files

- include/plugins/pluginfolder/img

        The folder which has the style images

- include/plugins/pluginfolder/tpl/*.htm

        The main folder for blocks, and it must end with the extension '.htm'

        For more information about the blocks system Click Here (a hyperlink is added for the blocks system explanation)

- include/plugins/pluginfolder/logo.png

        The plugin logo that would appear instead of its name on the DimCP control panel on the plugins management page in Dimofinf.

- include/plugins/pluginfolder/plugin_data.php

        This file includes:

  • $data matrix that includes the plugins data and the following information:

The plugin name

'name'=> "Plugin Name"

The plugin description

'description'=> "Plugin Description"

Adding the plugin programmer

'author'=> "Dimofinf"

Plugin programmer website URL

'url'=>"URL of Author"

Plugin version

'version'=> "1.0.0"

URL for checking for new updates for the plugin

'version_check'=> "URL For Check Updates of Plugin"

Activate as 'true' if the plugin is a module

'is_module'=> false

Activate to 'true' is a 'logo.png' file is inside the plugin folder as a plugin logo

'logo' => false

 
      Functions to be called in steps:

  • Install the plugin

PHP :
{* php buffer start *} function pluginfolder_install()
{
global 
$dimofinf;
&
nbsp;// code

{* php buffer end *}

  • Delete the plugin

PHP :
{* php buffer start *} function pluginfolder_uninstall()
{
global 
$dimofinf;
// code

{* php buffer end *}

  • Update the plugin

PHP :
{* php buffer start *} function pluginfolder_upgrade()
{
global 
$dimofinf;
// code

{* php buffer end *}

  • Enable the plugin

PHP :
{* php buffer start *} function pluginfolder_activate()
{
global 
$dimofinf;
// code

{* php buffer end *}

  • Disable the plugin

PHP :
{* php buffer start *} function pluginfolder_deactivate()
{
global 
$dimofinf;
// code

{* php buffer end *}

- include/plugins/pluginfolder/pluginfolder_plugin.php

        The file which includes the functions that include the programmer codes in the plugin and that can be called using the Hook, blocks can be also sent to the zone point points using the functions in this file.

(a hyperlink is added for the hook points system explanation)

(a hyperlink is added for the template zone points system explanation)

Example:

PHP :
{* php buffer start *} $plugin_id 'pluginfolder';
function 
pluginfolder_function(&$vars)
{
global 
$dimofinf$tpl$img_dir$dimphrase$dimhome$hook$Globalassigneds;
// code
}
add_hook('hook_point''pluginfolder_function'); 
{* php buffer end *}

Please note:

(Don't forget to replace the 'pluginfolder' with the name of the plugins folder you'll create)

This file must include the variable '$plugin_id' which contains the name of the plugins folder, also, the following variables must be defined as 'global' mainly within the plugins functions.

global $dimofinf, $tpl, $img_dir, $dimphrase, $dimhome, $hook, Globalassigneds;

      Plugins Development Kit:

We offer you a ready plugins folder to directly download and start making your own plugins. We also offer explanation in the code for the available features.

(a hyperlink is added for the 'PluginKit.zip' download URL)


Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article


Online