mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 14:46:56 +02:00
Fixes #4172 - Incorrect RSS URLs on news and incorrect SEF URL example.
This commit is contained in:
@@ -10,38 +10,41 @@
|
||||
| Released under the terms and conditions of the
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/rss_menu/e_meta.php,v $
|
||||
| $Revision$
|
||||
| $Date$
|
||||
| $Author$
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
global $PLUGINS_DIRECTORY;
|
||||
|
||||
$tp = e107::getParser();
|
||||
$sql = e107::getDb();
|
||||
|
||||
if(USER_AREA && $sql->select("rss", "*", "rss_class='0' AND rss_limit>0 ORDER BY rss_name"))
|
||||
{
|
||||
|
||||
$tp = e107::getParser();
|
||||
$sql = e107::getDb();
|
||||
|
||||
while($row = $sql->fetch())
|
||||
{
|
||||
if(strpos($row['rss_url'], "*") === false) // Wildcard topic_id's should not be listed
|
||||
{
|
||||
// $url = SITEURL.$PLUGINS_DIRECTORY."rss_menu/rss.php?".$tp->toHTML($row['rss_url'], TRUE, 'constants, no_hook, emotes_off').".2";
|
||||
// $url .= ($row['rss_topicid']) ? ".".$row['rss_topicid'] : "";
|
||||
|
||||
$url2 = rtrim(SITEURL,'/') . e107::url('rss_menu','rss', $row);
|
||||
$url4 = rtrim(SITEURL,'/') . e107::url('rss_menu','atom', $row);
|
||||
|
||||
$name = $tp->toHTML($row['rss_name'], TRUE, 'no_hook, emotes_off');
|
||||
$title = htmlspecialchars(SITENAME, ENT_QUOTES, 'utf-8')." ".htmlspecialchars($name, ENT_QUOTES, 'utf-8');
|
||||
|
||||
echo "<link rel='alternate' type='application/rss+xml' title='".htmlspecialchars(SITENAME, ENT_QUOTES, 'utf-8')." ".htmlspecialchars($name, ENT_QUOTES, 'utf-8')."' href='".$url2."' />\n";
|
||||
echo "<link rel='alternate' type='application/atom+xml' title='".htmlspecialchars(SITENAME, ENT_QUOTES, 'utf-8')." ".htmlspecialchars($name, ENT_QUOTES, 'utf-8')."' href='".$url4."' />\n";
|
||||
e107::link([
|
||||
'rel' => 'alternate',
|
||||
'type' => 'application/rss+xml',
|
||||
'title' => $title,
|
||||
'href' => e107::url('rss_menu','rss', $row, array('mode'=>'full'))
|
||||
]);
|
||||
|
||||
e107::link([
|
||||
'rel' => 'alternate',
|
||||
'type' => 'application/atom+xml',
|
||||
'title' => $title,
|
||||
'href' => e107::url('rss_menu','atom', $row, array('mode'=>'full'))
|
||||
]);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
unset($name, $title);
|
||||
}
|
||||
?>
|
||||
|
||||
|
Reference in New Issue
Block a user