Forum Support

Shape 5
March 19, 2024, 04:12:47 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Shape 5 Forum
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: How to use the mp3 player in a module - JOOMLA 1.5.X  (Read 1272 times)
mikek
Administrator
*****
Offline Offline

Posts: 28743



WWW
« on: October 15, 2009, 02:42:11 PM »

THIS HACK IS ONLY FOR JOOMLA 1.5.X

By default Joomla does not allow plugins to be called within a module. Luckily, a hack has been written by Rostislav Palivoda to overcome this. Keep in mind this a core hack to Joomla's index.php file so any time you update Joomla you must also perform this hack again.

1. Edit Joomla's index.php file, this is the index.php in your root folder, not the template's index.php.
2. Search for $mainframe->triggerEvent('onAfterRender');  (it's generally around line 82 but it can vary)
3. Right after that line enter the following:

/* * // 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);

4. Setup the plugin like you would normally in content as described in the plugin's backend page.
« Last Edit: January 03, 2011, 10:32:19 AM by mikek » Logged

Mike Knott
------------
Shape 5 Team

- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Looking for the largest variety in template designs? Look no more. Never buy 1 theme again. Signups start at just $89 for access to all of our themes.
Send Us An Email
Please send us your questions and we will email you back as soon as we can. Product support questions should be posted in our support forums under the Help menu. Our staff will assist you from there.