How to make plugins process Section/Category descriptions (for Joomla 1.0.x)? |
| Written by kksou | ||
| Tuesday, 22 April 2008 | ||
|
In standard Joomla 1.0.x installation, only the content items get processed by the mambots/plugins. This article shows you how to make the mambots/plugins process the Section/Category descriptions too. Note: the steps below works for Joomla 1.0.x only. For Joomla 1.5.x, please refer to How to make plugins process Section/Category descriptions (for Joomla 1.5.x)?. SolutionsYou need to add two triggers to make Section/Category descriptions processed by your existing plugins that currently work with content items. Add Trigger #1
class HTML_content {
/**
* Draws a Content List
* Used by Content Category & Content Section
*/
function showContentList( $title, &$items, &$access, $id=0, $sectionid=NULL,
$gid, &$params, &$pageNav, $other_categories, &$lists, $order,
$categories_exist ) {
$title->text = $title->description;
global $_MAMBOTS;
$_MAMBOTS->loadBotGroup( 'content' );
$results = $_MAMBOTS->trigger( 'onPrepareContent', array( 1, &$title, &$params) );
$title->description = $title->text;
global $Itemid, $mosConfig_live_site;
if ( $sectionid ) {
$id = $sectionid;
}
Add Trigger #2
// Secrion/Category Description & Image
if ( $menu && $menu->componentid && ( $descrip || $descrip_image ) ) {
$link = $mosConfig_live_site .'/images/stories/'.
$description->image;
echo '<tr>';
echo '<td valign="top">';
if ( $descrip_image && $description->image ) {
echo '<img src="'. $link .'" align="'. $description->image_position .
'" hspace="6" alt="" />';
}
if ( $descrip && $description->description ) {
$description->text = $description->description;
global $_MAMBOTS;
$_MAMBOTS->loadBotGroup( 'content' );
$results = $_MAMBOTS->trigger( 'onPrepareContent',
array( 1, &$description, &$params) );
$description->description = $description->text;
echo $description->description;
}
echo '<br/><br/>';
echo '</td>';
echo '</tr>';
}
// Leading story output
if ( $leading ) {
echo '<tr>';
echo '<td valign="top">';
That's it. You can try {mosloadposition}. It should now work even in Section/Category descriptions. You can also try DirectPHP plugin. You will now be able to include PHP commands in both the content items as well as Section/Category descriptions. Note
User reviews There are no user reviews yet. Note: You have to be a registered member to leave a comment. Free registration here. |
||
| < Prev | Next > |
|---|
Joomla 1.0 Articles
- How to create a module with DirectPHP plugin?
- How to include modules in Content item?
- How to include modules in Section/Content Description
- How to include PHP commands in Section/Content Description
- How to make plugins process Section/Category descriptions
- Include Code Listing plugin - More Tips and Techniques
- How to have DirectPHP plugin process RSS feed?
- How to have the plugins processed when genrating PDF documents of content items?
- How to have DirectPHP commands processed in Joomla search?
Joomla 1.5 Articles
- How to create a module with DirectPHP plugin?
- How to include modules in Content item?
- How to include modules in Section/Content Description
- How to include PHP commands in Section/Content Description
- How to make plugins process Section/Category descriptions
- Include Code Listing plugin - More Tips and Techniques
- How to have DirectPHP plugin process RSS feed?
- How to have the plugins processed when genrating PDF documents of content items?
- How to have DirectPHP commands processed in Joomla search?
Joomla Plugins
Joomla Components
Joomla Gadgets
- Google Image Search
- Google News Search
- Wikipedia Search
- Google Book Search
- Google Video Search
- Google Currency Converter - AJAX version
- Yahoo Currency Converter - AJAX version
- Yahoo Stock Quote (AJAX module version)
- Yahoo Stock Quote (AJAX component/ module version)
- googleSearch_cse component
- googleSearch_cse module
- googleMaps plugin







