- Posts: 39
COMMUNITY FORUM
Modify RSS Output?
- 8-Bit Classics
-
Topic Author
- Offline
- Junior Member
Please Log in or Create an account to join the conversation.
- 8-Bit Classics
-
Topic Author
- Offline
- Junior Member
- Posts: 39
Please Log in or Create an account to join the conversation.
- Josh Wigginton
-
- Offline
- New Member
- Posts: 5
Please Log in or Create an account to join the conversation.
- 8-Bit Classics
-
Topic Author
- Offline
- Junior Member
- Posts: 39
Josh Wigginton said:Looking for the same/similar thing. I would like to include the related video in the RSS feed to create a podcast from the RSS.
Please Log in or Create an account to join the conversation.
- Josh Wigginton
-
- Offline
- New Member
- Posts: 5
Corey Koltz said:I found the file that has the RSS portion, but it isn't in a template file so modification of core system files is necessary. I haven't made the modifications myself yet.
Josh Wigginton said:Looking for the same/similar thing. I would like to include the related video in the RSS feed to create a podcast from the RSS.
Please Log in or Create an account to join the conversation.
- 8-Bit Classics
-
Topic Author
- Offline
- Junior Member
- Posts: 39
Please Log in or Create an account to join the conversation.
- Alex Stavrou
-
- Offline
- New Member
- Posts: 9
Any ideas?
Please Log in or Create an account to join the conversation.
- 8-Bit Classics
-
Topic Author
- Offline
- Junior Member
- Posts: 39
Please Log in or Create an account to join the conversation.
- Josh Wigginton
-
- Offline
- New Member
- Posts: 5
function prepareFeedItem(&$item){
JTable::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.DS.'tables');
$params = & JComponentHelper::getParams('com_k2');
$limitstart=0;
//Category
$category = & JTable::getInstance('K2Category', 'Table');
$category->load($item->catid);
$item->category=$category;
//Read more link
$item->link=urldecode(JRoute::_(K2HelperRoute::getItemRoute($item->id.':'.$item->alias,$item->catid.':'.urlencode($item->category->alias))));
//Filtering
if ($params->get('introTextCleanup')){
$filterTags = preg_split( '#[,\s]+#', trim( $params->get( 'introTextCleanupExcludeTags' ) ) );
$filterAttrs = preg_split( '#[,\s]+#', trim( $params->get( 'introTextCleanupTagAttr' ) ) );
$filter = new JFilterInput( $filterTags, $filterAttrs, 0, 1 );
$item->introtext= $filter->clean( $item->introtext );
}
if ($params->get('fullTextCleanup')){
$filterTags = preg_split( '#[,\s]+#', trim( $params->get( 'fullTextCleanupExcludeTags' ) ) );
$filterAttrs = preg_split( '#[,\s]+#', trim( $params->get( 'fullTextCleanupTagAttr' ) ) );
$filter = new JFilterInput( $filterTags, $filterAttrs, 0, 1 );
$item->fulltext= $filter->clean( $item->fulltext );
}
//Description
$item->description = '';
//Item image
if ($params->get('feedItemImage') && JFile::exists(JPATH_SITE.DS.'media'.DS.'k2'.DS.'items'.DS.'cache'.DS.md5("Image".$item->id).'_'.$params->get('feedImgSize').'.jpg')){
$item->description.= 'id).'_'.$params->get('feedImgSize').'.jpg" alt="'.$item->title.'"/>
'; }
//Item Introtext
if($params->get('feedItemIntroText')){
//Introtext word limit
if ($params->get('feedTextWordLimit')){
$item->introtext=K2HelperUtilities::wordLimit($item->introtext,$params->get('feedTextWordLimit'));
}
$item->description.= ''.$item->introtext.'
'; }
//Item Fulltext
if($params->get('feedItemFullText')){
$item->description.= ''.$item->fulltext.'
'; }
//Author
if (!empty($item->created_by_alias)){
$item->author->name = $item->created_by_alias;
}
else {
$author=JFactory::getUser($item->created_by);
$item->author = $author;
$item->author->link = JRoute::_(K2HelperRoute::getUserRoute($item->created_by));
$item->author->profile = K2ModelItem::getUserProfile($item->created_by);
}
return $item;
}
function execPlugins($item, $view, $task){
$params = & JComponentHelper::getParams('com_k2');
$limitstart=JRequest::getInt('limitstart');
I took a few minutes and was able to output the relative path to the video enclosed in my {mp3file} tags, but I need either just the full link or the full video/mp3 for it to properly enclose it for a podcast rss feed.
Please Log in or Create an account to join the conversation.
- Josh Wigginton
-
- Offline
- New Member
- Posts: 5
Please Log in or Create an account to join the conversation.
- stavroch
-
- Offline
- Elite Member
- Posts: 295
Please Log in or Create an account to join the conversation.
- dr_zero
-
- Offline
- New Member
- Posts: 6
Please Log in or Create an account to join the conversation.
- ruigato
-
- Offline
- New Member
- Posts: 18
Output like this:
<item><title></title><link>http://www....</link><description>Description text and image AND (Title/Readmore+Link)</description></item>Maybe i can add it in components/com_k2/models/item.phpfunction prepareFeedItem(&$item){Add this code://Read more link$item->link=urldecode(JRoute::_(K2HelperRoute::getItemRoute($item->id.':'.$item->alias,$item->catid.':'.urlencode($item->category->alias))));Inside the discription//Description$item->description = '';
Can someone help?
Please Log in or Create an account to join the conversation.