Forum Support

Shape 5
March 29, 2024, 03:25:08 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: Mp3 player in a module, frontpage and all content - JOOMLA, 1.7  (Read 1697 times)
mikek
Administrator
*****
Offline Offline

Posts: 28743



WWW
« on: 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.
« Last Edit: November 21, 2012, 08:35:54 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.