Shape 5

Joomla Club Extensions => MP3 Player - Club => : mikek January 03, 2011, 10:35:14 AM



: Mp3 player in a module, frontpage and all content - JOOMLA, 1.7
: mikek January 03, 2011, 10:35:14 AM
THIS HACK IS ONLY FOR JOOMLA 1.6, 1.7

NO HACK IS NEEDED FOR 2.5, 3.0 OR HIGHER

Due to certain restrictions Joomla does not parse plugins on the frontpage, blog layouts or module positions. The hack below will allow this plugin to be called from these areas. Please note this hacking the core Joomla index.php but it is very minor. Please keep a record of this hack in case you perform any upgrades to Joomla at a later time.

1. Edit Joomla's index.php file, this is the index.php in your root folder, not the template's index.php.
2. Add following code in index.php file after line# 50 

// Allow plugins to be loaded into modules. (Shape5)
JPluginHelper::importPlugin('content');
$tmp = new stdClass;
$tmp->text = JResponse::getBody();
$tmp_params = new JParameter(null);
$dispatcher   = JDispatcher::getInstance();
$dispatcher->trigger('onContentBeforeDisplay', array(null, &$tmp,&$tmp_params ), true );
$dispatcher->trigger('onPrepareContent', array(null, &$tmp,&$tmp_params ), true );
JResponse::setBody($tmp->text);


3. Setup the plugin like you would normally in content as described in the plugin's backend page.