No account yet?
Plugins working in Modules

The following is a small core hack for Joomla 1.5 to allow plugins to be loaded into a custom module.

Joomla! 1.5 Plugins usually work within the content area, but not Modules. This is rather annoying when you have a decent Plugin and cannot use it across the whole of your website. But fear not... her is the work-around!

Place the code snippet below into the index.php file. This file can be found in the root of your Joomla! 1.5 site.

/* * // Allow plugins to be loaded into modules. (Rostislav Palivoda) */ JPluginHelper::importPlugin('content'); $tmp_row->text = JResponse::getBody(); $tmp_params = new JParameter(null); $mainframe->triggerEvent('onMap', array( &$tmp_row, &$tmp_params ), true ); $mainframe->triggerEvent('onPrepareContent', array( &$tmp_row, &$tmp_params ), true ); JResponse::setBody($tmp_row->text);

Place the code snippet just after line 82:

// trigger the onAfterRender events JDEBUG ? $_PROFILER->mark('afterRender') : null; $mainframe->triggerEvent('onAfterRender');

Remember to apply this each time you upgrade Joomla 1.5.x

 

Comments  

 
0 #1 Paul 2010-04-23 10:16 Help!

This code snippet works very well except that when I used it, the plugin displays, but the links to the plugin's css files are missing. So the plugin displays, but not as it should.

Any ideas how to fix this?
Quote
 
 
0 #2 TinaW 2010-04-23 11:13 Hi Paul - can you pls re-post in the forums and we can take a look - your path to css might be relative and needs to be amended Quote
 

Joomla! Extensions

Cartage

connectLMS

ERP Solutions

OpenBravo

E-Commerce Solutions

hybris

connectage_payment_methods