|
If you have used the Joomla Blog Component called MamblogA pretty nice blogging component for Joomla, you may have noticed that it does not support Plugins (Mambots).
Allowing Mamblog to render Plugins
Once you have installed Mamblog on your Joomla Site, go to components/com_mamblog/mamblog.html.php and open the file for editing.
Find the line:
<?php echo $blog->text; ?>
(on a clean install its on line 241)
Replace that line with:
<?php
/**
* Start Hack to Allow plugins to render in Mamblog
* Author: Fiji Web Design, http://www.fijiwebdesign.com
*/
// plugins class instance
global $_MAMBOTS;
// get necessary params for plugins
$page = 0;
$params = new mosParameters( $blog->attribs );
//echo nl2br(str_replace(' ', ' ', print_r($blog, 1)));
// process plugins
$_MAMBOTS->loadBotGroup( 'content' );
$results = $_MAMBOTS->trigger( 'onAfterDisplayTitle', array( &$row, &$params, $page ) );
echo trim( implode( "\n", $results ) );
$results = $_MAMBOTS->trigger( 'onPrepareContent', array( $blog, $params, $page ), true );
$results = $_MAMBOTS->trigger( 'onBeforeDisplayContent', array( $blog, $params, 0 ) );
echo trim( implode( "\n", $results ) );
echo $blog->text;
$results = $_MAMBOTS->trigger( 'onAfterDisplayContent', array( $blog, $params, $page ) );
echo trim( implode( "\n", $results ) );
/**
* End Plugin hack
*/
?>
Mamblog should now render plugins.
I've posted this in the Joomla Forum.
|