Forums

Forums


Marketplace (de)

Forum für Marketplace - Kleinanzeigen für Joomla! 1.5. Beiträge in deutscher Sprache.
Last post
Forums  » Marketplace (de)  » RSS Feeds mit html Suffix
Achim

Achim
1070 posts
---
Location:
Fulda
Germany
Moderator
14.09.2010 16:24

RSS Feeds mit html Suffix

Hallo,

wer den .html Suffix bei seinen URLs benutzt wird ein Problem mit RSS Feeds haben.

Hier ist ein schneller Fix. Dieser wird nur benötigt, wenn Ihr den .html Suffix benutzt:


1) Editiert:

./components/com_marketplace/views/index/tmpl/default.php


Findet den Block if ( $useRssFeeds == 1) { bei Zeile 46

Ändert den Block in

if ( $useRssFeeds == 1) {

$_RssTitle = JText::_( 'COFI_RSS_ALL_ENTRIES' );

$config =& JFactory::getConfig();
$_suffix = $config->getValue( 'config.sef_suffix' );

if ( $_suffix == 0) { // no .html suffix
$link = JRoute::_( 'index.php?option=com_marketplace&format=feed');
}
else {
$link = JRoute::_( 'index.php?option=com_marketplace') . '?format=feed';
}
$attribs = array('type' => 'application/rss+xml', 'title' => $_RssTitle);

$document->addHeadLink( $link, 'alternate', 'rel', $attribs);

}




2 ) Editiert:

./components/com_marketplace/views/category/tmpl/default.php


Findet den Block if ( $useRssFeeds == 1) { bei Zeile 56

Ändert den Block in


if ( $useRssFeeds == 1) {

$_RssTitleAll = JText::_( 'COFI_RSS_ALL_ENTRIES' );
$_RssTitleCategory = JText::_( 'COFI_RSS_CATEGORY' ) . " " . $this->categoryName ;

$config =& JFactory::getConfig();
$_suffix = $config->getValue( 'config.sef_suffix' );

if ( $_suffix == 0) { // no .html suffix
$linkAll = JRoute::_( 'index.php?option=com_marketplace&format=feed');
}
else {
$linkAll = JRoute::_( 'index.php?option=com_marketplace') . '?format=feed';
}
$attribsAll = array('type' => 'application/rss+xml', 'title' => $_RssTitleAll);
$document->addHeadLink( $linkAll, 'alternate', 'rel', $attribsAll);

if ( $_suffix == 0) { // no .html suffix
$linkCategory = JRoute::_( 'index.php?option=com_marketplace&view=category&catid=' . $this->categorySlug . '&format=feed' );
}
else {
$linkCategory = JRoute::_( 'index.php?option=com_marketplace&view=category&catid=' . $this->categorySlug ) . '?format=feed';
}
$attribsCategory = array('type' => 'application/rss+xml', 'title' => $_RssTitleCategory);
$document->addHeadLink( $linkCategory, 'alternate', 'rel', $attribsCategory);

}



Gruss

Achim


--
Achim Fischer
Codingfish Limited
www.codingfish.com

 
Forums  » Marketplace (de)  » RSS Feeds mit html Suffix

Codingfish operates

italobikes.com
Community for friends of italian motorcycles

fuldany.de
Das soziale Netzwerk für Fulda (im Aufbau)