plugin: Hide include_content_item in RSS Feed |
| Written by kksou | ||
| Tuesday, 20 May 2008 | ||
|
This plugin hides {include_content_item} tags in your RSS feed. If you have installed the {include_content_item} plugin, and you're also using the standard RSS feed generator that comes installed with Joomla 1.0 and 1.5, you will find that those {include_content_item} tags will appear in the RSS feed too! This is usually undesirable. This plugin will automatically hide all these {include_content_item} tags so that the RSS feed is FREE of these {include_content_item} tags. Latest Version v1.0.2 (for Joomla 1.0) and v1.5.2 (for Joomla 1.5)
DownloadJoomla 1.0.x: hide_include_content_item_for_rss_feed_v1.02.zip
Joomla 1.5.x: hide_include_content_item_for_rss_feed_v1.52.zip How to install (Joomla 1.0.x)
Note: If you've already installed the plugin "Hide DirectPHP for RSS Feed", "Hide include_content_item in RSS Feed" or "Hide jumi for RSS Feed" you can skip this step. The same trigger will trigger all these plugins. $database->setQuery( $query, 0, $info[ 'count' ] ); $rows = $database->loadObjectList(); global $_MAMBOTS; $_MAMBOTS->loadBotGroup( 'content' ); foreach ( $rows as $row ) { // title for particular item $item_title = htmlspecialchars( $row->title ); $item_title = html_entity_decode( $item_title ); // url link to article // & used instead of & as this is converted by feed creator $_Itemid = ''; $itemid = $mainframe->getItemid( $row->id ); if ($itemid) { $_Itemid = '&Itemid='. $itemid; } $item_link = 'index.php?option=com_content&task=view&id='. $row->id . $_Itemid; $item_link = sefRelToAbs( $item_link ); $results = $_MAMBOTS->trigger( 'onBeforeDisplayTitle', array( &$row, array(), 16) ); // removes all formating from the intro text for the description text $item_description = $row->introtext; $item_description = mosHTML::cleanText( $item_description ); $item_description = html_entity_decode( $item_description ); How to install (Joomla 1.5.x)
Note: If you've already installed the plugin "Hide DirectPHP for RSS Feed", "Hide include_content_item in RSS Feed" or "Hide jumi for RSS Feed" you can skip this step. The same trigger will trigger all these plugins.
if ($data->skipDays!="") {
$feed.= " <skipDays>".htmlspecialchars($data->skipDays,
ENT_COMPAT, 'UTF-8')."</skipDays>\n";
}
$dispatcher =& JDispatcher::getInstance();
JPluginHelper::importPlugin('content');
for ($i=0; $i<count($data->items); $i++)
{
$results=$dispatcher->trigger('onBeforeDisplayTitle',
array(&$data->items[$i], array(), 16));
$feed.= " <item>\n";
$feed.= " <title>".
htmlspecialchars(strip_tags($data->items[$i]->title),
ENT_COMPAT, 'UTF-8')."</title>\n";
$feed.= " <link>".$url.$data->items[$i]->link."</link>\n";
$feed.= " <description><![CDATA[".
$this->_relToAbs($data->items[$i]->description)."]]></description>\n";
if ($data->items[$i]->author!="") {
$feed.= " <author>".htmlspecialchars(
$data->items[$i]->author, ENT_COMPAT, 'UTF-8')."</author>\n";
}
|
||
| < Prev | Next > |
|---|





Comments
making your own herbal tea levitra bestellen atlanta cancer care
pharmacy technician jobs in wichita ks levitra 10mg schmelztablette n anal sexual pictures
RSS feed for comments to this post