The first was figuring out how to get the Gdata Library from the Zend Framework working as a Joomla Library plugin (not too difficult but there was a trick involving ini_set and adding the plugin's folder into the include path).
The other was figuring out how I could create a configuration page for the component so that I wouldn't have to hardcode the 3 inputs required to make a connection to the Google Apps API: the apps domain, the domain admin's email, and the domain admin's password.
At first I went with creating a config.xml file in the Joomla backend and was happy at how easy it was to get it working, and even though I didn't really need the capability for the global options to be overwritten in the menu items, I didn't really see it as a huge drawback.
In order to get an instance of the component parameters you would need to write the following line of code:
Code: Select all
$params =& $mainframe->getPageParameters('com_myextension');
Instead what I decided to do was add the parameters to the plugin (since I needed to import the plugin anyway in order to include the Gdata Library) like this:
Code: Select all
$plugin =& JPluginHelper::getPlugin('gdata', 'gdata');
$params = new JParameter($plugin->params);
My only quibble is, was this a good way to solve the problem? And, is creating a separate plugin for configuration a good idea or a bad one?
Just wanted to share and get some feedback on this,
Thanks!