My favorites | Sign in
Logo
                
Search
for
Updated Aug 01, 2009 by arunoda....@gmail.com
JoomlaReqComm  
Estabilished Joomla Requesting Communication

Estabilished Joomla Requesting Communication

This page guide you to how to established the Joomla Requesting Communication with the use of ExApp API. We assume that you are already read the parent pages of this in-order to get the background understand. If not please refer this.

Let's do it

In order to do this You've to extend two class and implement methods.Those classes are

and they are resides in the lib.php.

Directory Structure

For this application we assume following directory structure is present.

and the php file names and class names are also noted in the following sections..

Also note that all these directory structures and name are for this demonstration purpose only. You can change them as you wish.

extending JCUserSync class

As I said before this class will be used Joomla to User-sync and the management of ExApp. Now in your module(my_mod) create a php file and create a class and extend it with the JCUserSync.

class Name: JCMyAppUserSync
php file : /modules/my_mod/auth.php

extending JCMisc class

This class contains some methods which Joomla used to get information for Activity module and to send some information(connecting) to ExApp. As above we need to extend JCMisc class and implement methods there.

class Name : JCMyAppMisc
php file : /modules/my_mod/misc.php

configuring it

Now you are done. and ready to configure it. All you've to this is edit the settings.php in the ExApp API folder (in our case /modules/my_mod/jconnect_api/)

the setting are done as follows

/**
 * Basic details...
   Normally these details are retrived from the database. appName and joomla_url is sent by the ExApp using JCMisc::sendInfo() method.
   Then You've to store those fields and retrieved here..
   secret key should put into the database manually. and it should not hard-coded.
   coz secret key should be changed frequently.
 */
JCFactory::register('secKey','secret key here');
JCFactory::register('appName','appName here');
JCFactory::register('joomla_url','joomla url here');

/**
 * assign subclass of JCUserSync
 */
include_once("./auth.php"); // this is where your implementation class stays.
JCFactory::register('userSync',new JCMyAppSyncUser());

/**
 * assign subclass of JCMisc
 */
include_once("./auth.php"); // this is where your implementation class stays.
JCFactory::register('misc',new JCMyAppMisc());

Ok now you are successfully enabled the Joomla! Requesting Communication.


Sign in to add a comment
Hosted by Google Code