Addons

This section will help developers get started with understanding all the different things an addon can do. It is still very much a work in progress, so if you have questions not answered here, send them to support@geodesicsolutions.com and we will be happy to explain things further.

The bulk of the documentation for addons is still in the form of an example addon that can be downloaded from the “public downloads” section in the client area. This section of the user manual is meant to compliment the example addon, not replace it.

Parts of Addons

There are a few main parts to an addon, which are listed below:

  • info.php - Holds information about the addon. This is what tells the addon system anything it needs to know, like the addon name, version, and author. It also tells the addon system about some of the capabilities of the addon, for instance it says what core events the addon uses or what tags the addon has.
  • Core Events - sometimes called “software hooks”, this is one of the main ways an addon will interact with the main software without having to change any of the base code like might normally be required. Core events can do many different things, see the linked page for more info.
  • Tags - replace a special tag in a template with whatever the addon wants to.
  • Pages - Added in 4.0.0 - Allows the addon to have it own page(s), where it can replace the “mainbody” content with whatever it wants to. The page has a template assigned to it just like a normal “page”.
  • setup.php - The addon can do what it needs to when the addon is being installed, enabled, disabled, or un-installed. For instance it can create a needed database table when the addon is being installed, and delete that table when the addon is un-installed.
  • Admin - Can display pages in the admin, and can display and update addon settings.
    • Addon Settings - Added in 4.0.0 - Addons can have their own settings, using the geoAddon::getRegistry() method. See the documentation on geoRegistry class for more info.
    • Text - Addons can have their own text which will be handled by the “set text” page in the admin for that addon. The text is language specific, and when you retrieve the text in your code using geoAddon::getText() it will already be for the currently selected language.
  • app_top.php - Allows your addon to do something at the top of the page load. Only use this if it's the best option1), as it will be run on every page load.
  • Cron tasks - Your addon can create its own cron task if it wants. See the cron/ directory and contents in the example addon.
  • Remote API Call - Added in 4.0.0 - An addon can add its own remote API call. See the api/ directory and contents in the example addon.
  • Order Item - Added in 4.0.0 - You can create your own order item with an addon. See the order_items/ directory and contents in the example addon, also there is a developer tutorial using a skeleton order item to do what it needs.
  • Payment Gateway - Added in 4.0.0 - You can create your own payment gateway with an addon. See the payment_gateways/ directory in the example addon.
  • Seller to Buyer Gateway - Added in 4.0.0 - You can create your own “seller to buyer” payment gateway with an addon. See the payment_gateways/seller_buyer/ directory in the example addon.

Addon Folder Guidelines

The addon's folder name is part of what defines the addon, and is used for the name var in the info.php file. To ensure the best compatibility, and reduce chances of future compatibility changes, we recommend using the following guidelines. Some of these are suggestions, and some are required in order for certain things to work in the software.

  • Do not use period (.) in the folder name as it will cause problems in the software2).
  • Highly recommend using alpha-numeric and underscore (_) characters only. This will ensure best compatibility and reduce/remove any chances of problems in the software itself.
  • Check to make sure the name is not already being used by one of the available official addons released by Geodesic Solutions. We also recommend checking the addons posted by 3rd party developers on our site http://geoaddons.com.
  • Choose a unique name, perhaps consider adding something unique to you to the beginning of each addon folder you create3). Doing this will greatly reduce the chances of compatibility problems from 2 different addons using the same folder name.

We have a website http://geoaddons.com, owned and operated by Geodesic Solutions, LLC. specifically for showcasing 3rd party addons (Addons created by you!). If you have created your own addon and would like to sell or give it away, register a developer account on http://geoaddons.com and post a listing about your addon on the site. The http://geoaddons.com website is powered by GeoClassAuctions Enterprise, and uses a lot of the built in features like ability for users to review addons.

You can create your own developer storefront as well once you get a few addons posted on the site that you want to be able to showcase from a single location on the site.

1) in other words, don't use it as a “lazy” way to accomplish something that can be done much better another way
2) For one, the addon text exporter uses a . between addon name and auth tag, so export/import text would not work for your addon.
3) For instance what you use for auth_tag in the info.php file.
developers/addons/start.txt · Last modified: 2012/01/10 18:10 by jonyo
CC Attribution-Noncommercial-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0