Menü

Login

Aktuelle Version

Forum > RSS-Faehigkeit *

DOTLAN Intranet / Portal >> Feature Requests > RSS-Faehigkeit
Antwort erstellen
Autor Thema: RSS-Faehigkeit
X-R4Y
03.11.2004 um 17:48 QuoteProfileSend PM
NEW

Clan: Terrors of Time
Postings: 57

Bloodrayne
Da RSS immer mehr gefragt wird und auch zunehmend von den "guten" Browsern (z.b FireFox) unterstuetzt wird kommt natuerlich die Frage auf ob DotLan in Kuerze auch RSS Faehigkeiten bekommt?
__________________
if ( $ahnung == 'keine' ) { lies ( FAQ ) && suche ( Forum | Archiv | Suche ) }
if ( $antwort == 0 ) { post->frage }

 
Griffon
04.11.2004 um 00:50 QuoteProfileSend PM

NEW

Clan: dotlan.net
Postings: 1252

http://www.dotlan.net/news/backend.php

:-)
 
Griffon
04.11.2004 um 00:51 QuoteProfileSend PM

NEW

Clan: dotlan.net
Postings: 1252

Vielleicht sollte ich die backend.php mal in rss.php umbennen, damit das ersichtlicher ist. Mal schaun. Zur Not einfach mit mod_rewrite umschreiben ;-)
 
X-R4Y
21.01.2005 um 18:27 QuoteProfileSend PM
NEW

Clan: Terrors of Time
Postings: 57

Bloodrayne
Im Default den RSS-Newsfeed bitte die Sortierreihenfolge aendern ;-)

Neueste -> aelteste wie es bei anderen Newsfeeds auch ist =)

__________________
if ( $ahnung == 'keine' ) { lies ( FAQ ) && suche ( Forum | Archiv | Suche ) }
if ( $antwort == 0 ) { post->frage }

 
Griffon
21.01.2005 um 18:31 QuoteProfileSend PM

NEW

Clan: dotlan.net
Postings: 1252

es es doch. Siehe

http://www.dotlan.net/news/backend.php
http://www.heise.de/newsticker/heise.rdf (zum vergleich)
 
kritzi
10.11.2006 um 14:37 QuoteProfileSend PM
NEW

Clan: CCA
Postings: 58

Nachdem der Firefox 2.0 nun ein tool zum abbonieren von RSS-Feeds hat musste ich feststellen, dass die RSS-Feeds von dotlan einen ungültigen syntax haben uns deshalb nicht standardgemäss als solche erkannt werden.
( http://validator.w3.org/feed/ )

Ich habe mir mal die mühe gemacht und das ganze ein wenig übrarbeitet:

/news/rss.php [ new ]

Code:

<?

// ########################################################################
// # get rid of slashes in get/post/cookie data | use addslashes in sql! #
// ########################################################################

function stripslashesarray (&$arr) {
while (list($key,$val)=each($arr)) {
if ((strtoupper($key)!=$key || "".intval($key)=="$key") && $key!="templatesused" && $key!="argc" && $key!="argv") {
if (is_string($val)) $arr[$key] = stripslashes($val);
if (is_array($val)) $arr[$key] = stripslashesarray($val);
}
}
return $arr;
}
if (get_magic_quotes_gpc() and is_array($GLOBALS))
$GLOBALS=stripslashesarray($GLOBALS);

set_magic_quotes_runtime(0);

// ########################################################################
// # load the config file used in dotlan #
// ########################################################################

include_once("../config.php");
if(file_exists("../.htaccess") && file_exists("../html/styles/mod_rewrite.php"))
include_once("../html/styles/mod_rewrite.php");

// ########################################################################
// # load the main classes/files used in dotlan #
// ########################################################################

include_once($global['include_path']."class.html.php");
include_once($global['include_path']."class.news.php");
$HTML = new htmlout;
$NEWS = new news;

if(isset($sct)) {
if($sct) $sections = $NEWS->get_section_by_name($sct);
else $sections = FALSE;
} else $sections = $global['news']['default_section'];

// ########################################################################
// # start output off rss feed #
// ########################################################################

header("Content-Type: application/rss+xml");
echo "<?xml version=\"1.0\"?>\n";
echo "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlnsc=\"http://purl.org/dc/elements/1.1/\" xmlns=\"http://purl.org/rss/1.0/\">\n";
echo " <channel rdf:about=\"http://".$_SERVER['HTTP_HOST'].$global['htmlroot']."\">\n";
echo " <title>".$HTML->xmlentities($global['sitename'].$global['sitename_delimiter']."News")."</title>\n";
echo " <link>http://".$_SERVER['HTTP_HOST'].$global['htmlroot']."news/</link>\n";
echo " <description>".$HTML->xmlentities($global['sitename'].$global['sitename_delimiter']."News RSS Feed")."</description>\n";
echo " <items>\n";
echo " <rdf:Seq>\n";

$res = $DB->query("SELECT *,DATE_FORMAT(dateline,'%Y-%m-%dT%H:%i:%s+01:00') AS rdf_date FROM news_post WHERE active=1 AND dateline<NOW() ".(($sections) ? "AND (".implode(" OR ",$sections['sql']).")" : "")." ORDER BY news_post.dateline DESC LIMIT 10");

$items = "";

while($news = $DB->fetch_array($res)) {
if(trim($news['short']) != "")
$content = $HTML->xmlentities(strip_tags($HTML->encode($news['short'])));
else {
if($news['encode'] == 1) {
$content = $HTML->encode($news['content']);
} else $content = $news['content'];
$content = substr(strip_tags($content),0,190)."...";
$content = preg_replace("/[\n\r]*/","",$content);
$content = $HTML->xmlentities($content);
}
$url = str_replace("/de/",$global['htmlroot'],$_SERVER['HTTP_HOST'].sprintf($NEWS->link['comments'],intval($news['id'])));

echo " <rdf:li rdf:resource=\"http://".$url."\"/>\n";

$items .= " <item rdf:about=\"http://".$url."\">\n";
$items .= " <title>".$HTML->xmlentities($news['headline'])."</title>\n";
$items .= " <link>http://".$url."</link>\n";
$items .= " <description>".$content."</description>\n";
$items .= " <dcate>".$HTML->xmlentities($news['rdf_date'])."</dcate>\n";
$items .= " </item>\n";
}
echo " </rdf:Seq>\n";
echo " </items>\n";
echo " </channel>\n";
echo $items;
echo "</rdf:RDF>";
?>


/html/templates/{your_style}/page/page.tpl [ edit ]

Code:

<link rel="alternate" type="application/rss+xml" title="{$global[sitename]} News" href="/de/news/backend.php">

-->
Code:

<link rel="alternate" type="application/rss+xml" title="{$global[sitename]} News" href="/de/news/rss.php">


Leider habe ich noch nix gefunden wo man die rss-feeds, die bei {$javascript} eingefügt werden entfernen/editieren kann.
Aber ich vermute mal, das befindet sich wie so vieles im verschlüsselten teil.
 
kritzi
10.11.2006 um 14:41 QuoteProfileSend PM
NEW

Clan: CCA
Postings: 58

mich würde es übrigends noch interessieren wie der mysql query aussehen muss, damit ich die letzten threads aus dem forum als rss-feed exportieren kann.
 
1mak
21.09.2007 um 17:47 QuoteProfileSend PM
NEW

Clan: Kein Clan
Postings: 7

ProjectLAN.de
Gibt Dotlan zufällig auch die aktuellen Lanparty-Statistiken (Angemeldet, Bezahlt, Frei) per RSS-Feed aus?
__________________
LANvan - vom Linienbus zum Multimedia-Wohnmobil


 
Griffon
22.09.2007 um 14:37 QuoteProfileSend PM

NEW

Clan: dotlan.net
Postings: 1252

In der kommenden Version gibt es einen neuen RSS Support für News, Forum sowie Turniere.

Wie stellst du dir denn den RSS Feed für LANparty vor? Gib mir ein Beispiel, dann sollte das sich vielleicht auch realieseren lassen.

Ich weiß gerade nicht in wie weit das hilft wenn sich alle paar Minuten der Feed updated weil eine Zahl sich ändert ... ich denke das gibt Chaos im Feed. der ja auch eigentlich nicht dafür ausgelegt ist, sondern eher für News, Blogs, etc gedacht ist.
 
carp
01.10.2007 um 23:04 QuoteProfileSend PM
NEW

Clan: lpm
Postings: 37

evtl. auf der Party für "Anmeldung turnier xxx gestartet"
Wobei es sich hierfür sicherlich auch anbietet eine News zu verfassen.


__________________
<><
http://www.lanparty-minden.de
 
Griffon
02.10.2007 um 20:47 QuoteProfileSend PM

NEW

Clan: dotlan.net
Postings: 1252

Richtig, außerdem gibt es noch das gute alte Megafon, mit dem man gut Leute belästigen kann :-D
 
[ Antwort erstellen ]