RSS-Forum Foren-Übersicht
RegistrierenSuchenFAQMitgliederlisteBenutzergruppenLogin
www Problem

 
Neue Antwort erstellen    RSS-Forum Foren-Übersicht » Fragen und Antworten zu RSS, RDF und OPML Vorheriges Thema anzeigen
Nächstes Thema anzeigen
www Problem
Autor Nachricht
pool
Gast





Beitrag www Problem Antworten mit Zitat
Hallo,
ich habe ein Problem mit meinem Feed und würde mich über Hilfe sehr freuen.
Hier erst mal die Feed Adresse:
RSS Feed Pool Forum und Sauna Forum

Auf diesem Feed werden all Links mit www angezeigt.
Wie kann ich den Feed verändern, dass alle Links ohne www angezeigt werden?
Hier der Inhalt der Feed Datei:

l
Code:
<?php

define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'language/en/common.' . $phpEx);

// Start session
$user->session_begin();
$auth->acl($user->data);
$user->setup();


//Get the board url address
$board_url = generate_board_url();

function replace_xml_things($text)
{
global $board_url;
$text = str_replace('&pound', '&amp;#163;', $text);
$text = str_replace('&copy;', '(c)', $text);
$text = str_replace('&amp;', '&', $text);
$text = str_replace('./images/', $board_url . '/images/', $text);
return $text;
}


function make_xml_compatible($text,$bbcode_uid, $bbcode_bitfield,$bbcode_options)
{
global $config, $base_url;
$text = html_entity_decode(generate_text_for_display($text, $bbcode_uid, $bbcode_bitfield, $bbcode_options));
$text = nl2br($text);
$text = replace_xml_things($text);
$text = htmlspecialchars($text);
return $text;
}


// Start RSS output
header('Content-Type: text/xml; charset=utf-8');
$rss_result = '<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title>' . $config['sitename'] . '</title>
<link>' . $board_url . '</link>
<description>' . $config['site_desc'] . '</description>
<language>' . $config['default_lang'] . '</language>
<copyright>' . $config['sitename'] . '</copyright>
<managingEditor>' . $config['board_email'] . ' (' . $config['sitename'] . ')</managingEditor>
<generator>' . $config['sitename'] . '</generator>
<ttl>1</ttl>';
//
// This SQL query selects the latest topics of all forum
$sql = 'SELECT f.forum_id,f.forum_name, f.forum_desc_options, t.topic_title, t.topic_id,t.topic_last_post_id,t.topic_last_poster_name, p.post_time, p.post_text, p.bbcode_uid, p.bbcode_bitfield, u.username, u.user_id
FROM '. FORUMS_TABLE . ' f,' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . ' p,' . USERS_TABLE . ' u
WHERE t.forum_id = f.forum_id
AND t.topic_status != 1
AND p.post_id = t.topic_last_post_id
AND u.user_id = p.poster_id
ORDER BY t.topic_last_post_id DESC';
if(!$result = $db->sql_query_limit($sql,30))
{
trigger_error('Database error, please try later');
}
while($row = $db->sql_fetchrow($result))
{
if($auth->acl_get('f_read', $row['forum_id'])) //getting authentication
{
$topic_link = $board_url . '/' . generate_seourl_topic($row['topic_id'], $row['topic_title'], $row['forum_id'], $row['forum_name']);
$topic_link = str_replace('./', '/', $topic_link);
$description = $user->lang['POST_BY_AUTHOR'] . ' ' . $row['topic_last_poster_name'] . ' (' . $user->lang['POSTED'] . ' ' . $user->format_date($row['post_time']) . ')<br />' . $row['post_text'] . '<br /><br /><a href="' . $topic_link . '">Thema lesen</a><hr />';
$rss_result .= '
<item>
<title>' . replace_xml_things($row['topic_title']) . '</title>
<link>' . $topic_link . '</link>
<description>' . make_xml_compatible($description, $row['bbcode_uid'], $row['bbcode_bitfield'], $row['forum_desc_options']) . '</description>

<pubDate>' . date ('D, d M Y h:i:s', $row['post_time']) . ' GMT</pubDate>
<guid isPermaLink="true">' . $topic_link . '</guid>
</item>';
}
}
$rss_result .= '</channel></rss>';
echo $rss_result;
$db->sql_freeresult($result);
?>

Grüsse

Mi Dez 02, 2009 10:46 am
Beiträge der letzten Zeit anzeigen:    
Neue Antwort erstellen    RSS-Forum Foren-Übersicht » Fragen und Antworten zu RSS, RDF und OPML Alle Zeiten sind GMT
Seite 1 von 1

 
Gehe zu: 
Du kannst keine Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum nicht antworten.
Du kannst deine Beiträge in diesem Forum nicht bearbeiten.
Du kannst deine Beiträge in diesem Forum nicht löschen.
Du kannst an Umfragen in diesem Forum nicht mitmachen.


Powered by phpBB © 2001, 2005 phpBB Group
Design by Vjacheslav Trushkin / Easy Tutorials (Photoshop Tutorials).
Deutsche Übersetzung von phpBB.de