Just wanted to share a Joomla (1.7) tip on how we were able to integrate custom content from an external web application with custom PHP code via the Jumi component and plugin (http://bit.ly/wWIQmz).
Joomla by default does not allow custom PHP code to be added to articles (content pages) functionality which is provided by the Jumi component. However in our case we also wanted to display the most recent report on the home page, plus the last 10 from the archives when the user asks to view more.
- Create custom PHP files to load the current report and one for the archives. These were placed in the Jumi component files folder. TIP Always include the PHP line
defined('_JEXEC') OR defined('_VALID_MOS') OR die( "Direct Access Is Not Allowed" );
at the top of the file to ensure that it cannot be loaded directly via HTTP. - Create Joolma article with a Jumi plugin to load content from the external url. We used two calls to the url, the first one to load the latest report and executive summary and the second to load the archives.
- Use the excellent Gavick News Show Pro GK4 (http://tools.gavick.com/newshowpro.html) to load the article into a module position. However since we can limit the text brought back, we limited the text only to the first plugin call to load the latest report only. This will include a more link to display the current report and archives.
NOTES:
- When loading external urls we used the Curl Library (inbuilt in most PHP installations) since file_get_contents() is usually blocked from accessing external urls
- We could not use an external library as it seem like Jumi does not handle include paths very well, so we could not maintain configurations in an external file.
- When deploying into production, we had to set caching on otherwise the page loading took too long
Hope this helps you