Except few things all integrations with Touch are done through plug-in.
Here I explain main knowledge of creating plug-in and its events will be explained separately in different articles.
You create plugin you have to understand basic of creating plugins for Joomla. You can find all needed information here.
And now I point particularity of plugins for Touch.
Plugin Type Community
Plugin type is community. It means that plugin will be installed to new group that does not exists in Joomla. Joomla will create new folder /plugins/community and store all CIP in that folder. To define that be sure you pointed it in installation XML as group attribute.
<install version="1.5.2" type="plugin" group="community" method="upgrade">
All the rest of installation XML as usual.
Plugin name
You read that name of plugin is combined like this:
plg + Proper case name of the plugin directory + Proper case name of the plugin file without the extension.
In our case
Plg + Community + Pluginname = plgCommunityTest
Here is the plugin code listing without any event managed
<?php defined('_JEXEC') or die('Restricted access'); jimport('joomla.plugin.plugin'); class plgCommunityTest extends JPLugin { function plgCommunityTest(&$subject, $config) { parent::__construct($subject, $config); } } ?>
Plugin Icon
Every plugin have to have icon to be shown in user profile configuration where user may order, turn on or off and change access for profile blocks. Touuch will automaticallu look for pluginname_icon.png image. Be sure you included it with plugin.
Plugin Core Parameters
Every plugin have to have core parameters if you use onProfileExtra even and draw profile block. These parameters should be placed in plugin installation XML in advanced group.
Simply copy text below and insert into your plugin XML manifest.
<params group="advanced"> <param name="popup_width" size="4" type="text" default="500" label="Popup Width" /> <param name="popup_height" size="4" type="text" default="130" label="Popup Height" /> <param type="radio" name="allow_publish" label="Allow Publishment" default="1"> <option value="0">No</option> <option value="1">Yes</option> </param> <param type="list" name="default_status" label="Default status" default="1"> <option value="0">Unpublished</option> <option value="1">Published</option> </param> <param type="radio" name="allow_accesschange" label="Allow Access Change" default="1"> <option value="0">No</option> <option value="1">Yes</option> </param> <param type="list" name="default_access" label="Default access" default="0"> <option value="0">Everyone</option> <option value="1">Registered</option> <option value="2">Friends Only</option> <option value="3">Owner Only</option> </param> </params>
Those parameters are applicable for every profile block. These parameters are neded to manage profile block, set to it access and properties.
- popup_width - width of popup window with block parameters for profile owner
- popup_height - height of popup window with block parameters for profile owner
- allow_publish - allow profile owner to publish/unpublish this block
- default_status - Publish status by default
- allow_accesschange - allow profilw owner access change for this block
- default_access - default access
These parameters may be very handy and you need to set default="" atribut for every parameter correctly. For example you have components that includes payments and this is private information. You create profile block with ability for user to see summary of payments in profile. But you want to be sure this information accessible only to owner of profile. Then you set default_access=3 (Owner Only) and allow_accesschange=0 (No). This case you will be sure that profile block will be shown only for Owners< and owner will not be able to change access (anless admin change advanced settings).
Plugin Events
User events
- onProfileMenu – add elements to menu that is displayed in profile
- onUserSlideMenu – add element to user dropdown menu anywhere
- onProfileCoreData – add pairs of properties and values of the user displayed in profile.
- onProfileExtra – Add blocks (applications) to profile
- onRenderAvatar – If your component is a registration component that allow Avatar upload you may tell Touch where avatar picture is and it will appiar all over Touch integrated components.
Custom user list
- onCustomUserList – create your own user lists
Standard user list
- onRenderFilters – add search filters to standard user list
- onSqlJoin – add left join to SQL query of standard user list to affect result if your filter selected
- onSqlWhere - add where conditions to SQL query of standard user list to affect result if your filter selected
- onListExtra – add pairs of user properties to be displayed in user list. For example Country: USA property added to list by Mighty Registration Component.


+1 (209) 800 1209