
-
Vorwort :- Dieser RSS-Feed präsentiert 4images-Website-News.
- Im MOD-Forum existiert bereits ein MOD für einen RSS-Feed, jedoch zeigt dieser Feed die neusten Bilder auf der Website an.
- Dieser News-RSS-Feed zeigt im News-Reader die aktuellsten News deiner 4images-Website an (nicht die neusten Bilder ... !)

-
Preface :- This RSS-Feed presented 4images-Website-News.
- In the MOD-Forum exist already a MOD for a RSS-Feed, but this feed shows the newest images from your website.
- This News-RSS-Feed shows in a News-Reeder the most current news of your 4images website (not newest images...!).

-
Demo zum MOD :- Gibt es auf meiner Seite zu sehen : hier !
- Im IE 7.0 oder FF 2.0 kann der Feed direkt im Browser angezeigt werden : Teste hier !
- Im NewsBee-Reader sehen die einzelnen News wie folgt aus : ...

-
MOD-Demo :- You can see it on my site : here !
- In IE 7.0 or FF 2.0 the feed can display directly in the browser : test here !
- In NewsBee-Reader the News looks in such a way : ...

/

-
Version :- 05.12.2006 - Version 1.2 - incl. RSS Symbol for Webbrowsers
- 12.12.2005 - Version 1.1 - incl. News-MOD by janfy
- 11.12.2005 - Version 1.0 - English MOD translation
- 09.12.2005 - Version 1.0 - Veröffentlichung

-
Features zum MOD :- Dieser News-Feed zeigt die News-Überschrift, die News-Nachricht, das Datum der Veröffentlichung der Nachricht, dein News-Image sowie allgemeine Infos deiner Website in einem News-Reader.
- Die Präsentation der gesamten News im News-Reader erfolgt formatiert in einer Tabelle.
- Ich habe einen Konfigurations-Teil vorgeschaltet (rss_news.php), so dass hier alle Einstellungen ... incl. der URLs, der Tabellenfarben, der Anzahl der News, der Bilder, und des Sprachteils dort gemacht werden können. Der Code muss daher zu Anpassung nicht geändert werden (Ich denke, dass sollte einigen helfen ...)
- Das Datum der News wird im W3C Date and Time Format dargestellt, was für uns Mitteleuropäer gewöhnungsbedürftig ist. Mit jedem anderen Format jedoch scheitert die Freigabe/Prüfung des RSS-Feeds am FEED Validator !

-
Features of this MOD :- This News-Feed show the news-headline, the news-message, the date of the news, your News-Image and general informations of your website in a News-Reader.
- The presentation of the entire news in the News-Reader is shown as a table.
- I have made a configuration part on the top (rss_news.php), so that there all attitudes ... inclusive URLs, the table colors, the number of the news, the News-Image, and language part can be made. The rest of the code does not have to be changed therefore to adjustment. (I think that should help ...)
- The date of the news is represented in the W3C Date and Time Format . With every other format the release/examination of the RSS-Feed fails by FEED Validator !

-
Voraussetzungen an MODs :Die Grundlage für die Erstellung der News auf deiner 4images-Webseite, die mit diesem RSS-Feed veröffentlicht werden sollen, muss der geniale News-MOD von
Fugaziman sein !

-
Conditions of MODs : The basis for the production of the News on your 4images-website, which are to be published with this RSS-Feed, must be the ingenious News-MOD by Fugaziman !

-
NEU : Die Grundlage für die Erstellung der News auf deiner 4images-Webseite, die mit diesem RSS-Feed veröffentlicht werden sollen, kann auch der News-MOD von janfy sein !

-
NEW :The basis for the production of the News on your 4images-website, which are to be published with this RSS-Feed, also can be the News-MOD by janfy !
*) - are the same ...

-
Neue Dateien :
-
New files :- rss_news.php
- templates/<your_template>/rss_news.html
- templates/<your_template>/rssitem_news.html
Installation :
-
Schritt 1.1 (News-MOD by Fugaziman)
lege im Root-Verzeichnis die neue Datei
rss_news.php mit dem folgenden Inhalt an :

-
Step 1.1 (News-MOD by Fugaziman)
in the root directory make a new file
rss_news.php with following contents :
<?php
/************************************************************
* RSS Feed für 4images - NEWS *
* Version 1.0 - Stand 09.12.2005 *
* Autor : www.detlev-kostka.de *
************************************************************/
//--- START CONFIGUGATION -----------------------------------
define('SCRIPT_URL', 'http://your_website.de'); //no trailing slash
define('LANGUAGE', 'de-de');
define('ROOT_PATH', './');
//-----------------------------------------------------------
$news_image_id = 0000; // Image_id of your News Image (only News-MOD by Fugaziman)
$num_news = 3; // Number of News to show in RSS-Reader
$news_image = SCRIPT_URL."/.../news.jpg"; // URL News Image
$width = 100; // width News Image
$height = 75; // height News Image
$thc ="#cccccc"; // table header color
$tcc ="#e6e6e6"; // table content color
$lang_top ="Neue Nachrichten auf www.deine_website.de"; // language Topline
$lang_head ="Headline"; // language Headline
$lang_news = "Nachricht"; // language News
$lang_date = "Nachricht vom"; // language News Date
$lang_vers = "1.7"; // your 4image Script-Version
//------------------------------------------------------------
$iurl = SCRIPT_URL."/.../logo.gif"; // URL Logo Image
//--- END CONFIGURATION --------------------------------------
include(ROOT_PATH.'global.php');
include(ROOT_PATH.'includes/sessions.php');
$main_template = 'rss_news';
//--- Start: Part for News-MOD by Fugaziman ------------------
$sql = "SELECT comment_headline, comment_text, comment_date, image_id
FROM ".COMMENTS_TABLE."
WHERE image_id = $news_image_id
ORDER BY comment_date DESC
LIMIT $num_news";
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);
$w3c_date_time_format="Y-m-d\TH:i:s+00:00";
while($comment_row = $site_db->fetch_array($result)){
$news_date = format_date($w3c_date_time_format, $comment_row['comment_date']);
$news_head = format_text($comment_row['comment_headline'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']);
$news_text = format_text($comment_row['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']);
//--- End: Part for News-MOD by Fugaziman --------------------
$content = " <table width=\"100%\" border=\"0\" cellpadding=\"4\" cellspacing=\"1\"><tr><td colspan=\"2\" valign=\"top\" bgcolor=".$thc.">";
$content .= " <b><i>".$lang_top."</i></b>";
$content .= " </td></tr><tr><td rowspan=\"3\" width=\"2%\" valign=\"top\" bgcolor=".$tcc.">";
$content .= " <img src=\"".$news_image."\" border=\"1\" width=\"".$width."\" height=\"".$height."\" hspace=\"5\" vspace=\"5\" alt=\"".$lang_top."\" />";
$content .= " </td><td width=\"98%\" valign=\"top\" bgcolor=".$tcc.">";
$content .= " <b><i>".$lang_head." : ".$news_head."</i></b>";
$content .= " </td></tr><tr><td valign=\"top\" bgcolor=".$tcc.">";
$content .= " <b><i>".$lang_news." :</i></b><br>".$news_text."";
$content .= " </td></tr><tr><td valign=\"top\" bgcolor=".$tcc.">";
$content .= " <b><i>".$lang_date." : </i></b>".$news_date."";
$content .= " <tr><td colspan=\"2\" valign=\"top\" align=\"center\" bgcolor=".$tcc.">";
$content .= " <font size=\"2\"><i>RSS-Feed ... ".$config['site_name']." ... Powered by 4images".$lang_vers."</i></font>";
$content .= " </td><td></table>";
$site_template->register_vars(array(
"content" => $content,
"lang_news" => $lang_news,
"title" => $news_head,
"domain" => SCRIPT_URL."/index.php",
"link" => SCRIPT_URL."/index.php",
"date" => $news_date ,
));
$news.=$site_template->parse_template("rssitem_news");
}
$site_template->register_vars(array(
"ctitle" => $config['site_name'],
"clink" => SCRIPT_URL,
"cdescription" => $lang_top,
"language" =>LANGUAGE,
"ititle" => $lang_top,
"iurl" => $iurl,
"ilink" => SCRIPT_URL,
"items" => $news,
));
header("Content-type: text/xml; charset=\"ISO-8859-1\"");
$site_template->print_template('<?xml version="1.0" encoding="ISO-8859-1"?>'.$site_template->parse_template($main_template));
?>

-
Schritt 1.1 (News-MOD by janfy)
Nur für den News MOD von janfy tausche in der
rss_news.php den folgenden Code :

-
Step 1.1 (News-MOD by janfy)
Only for the News MOD by janfy exchang in
rss_news.php the following code :
//--- Start: Part for News-MOD by Fugaziman ------------------
....
//--- End: Part for News-MOD by Fugaziman --------------------

- durch den folgenden Code aus :

- by the following code :
//--- Start: Part for News-MOD by janfy ---------------------
$sql = "SELECT news_id, news_title, news_text, news_date
FROM ".NEWS_TABLE."
ORDER BY news_date DESC
LIMIT $num_news";
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);
$w3c_date_time_format="Y-m-d\TH:i:s+00:00";
while($news_row = $site_db->fetch_array($result)){
$news_date = format_date($w3c_date_time_format, $news_row['news_date']);
$news_head = format_text($news_row['news_title'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']);
$news_text = format_text($news_row['news_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']);
//--- End: Part for News-MOD by janfy -----------------------

-
Schritt 1.2 - EinstellungsmöglichkeitenIm Bereich zwischen Start Configuration / End Configuration musst du alle Anpassungen des RSS-Feeds an deine Website machen.

-
Step 1.2 - SettingsWithin the range between Start Configuration / End Configuration you must make all adjustments of the RSS-Feed to your Website.

-
Schritt 2.lege im Template-Verzeichnis die neue Datei
/templates/<your_template>/rss_news.html mit dem folgenden Inhalt an :

-
Step 2. in template directory make a new file
/templates/<your_template>/rss_news.html with the following contents :
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>{ctitle}</title>
<link>{clink}</link>
<language>{language}</language>
<description> {cdescription} </description>
<image><title>{ititle}</title><url>{iurl}</url><link>{ilink}</link></image>
{items}
</channel>
</rss>

-
Schritt 3.lege im Template-Verzeichnis die neue Datei
/templates/<your_template>/rssitem_news.html mit dem folgenden Inhalt an :

-
Step 3. in template directory make a new file
/templates/<your_template>/rssitem_news.html with the following contents :
<item>
<title>{lang_news} : -> {title}</title>
<dc:date>{date}</dc:date>
<category domain="{domain}">{title}</category>
<description><![CDATA[{content}]]></description>
<link>{link}</link>
</item>

-
Schritt 4.Nun kannst du über einen Link oder natürlich über den allseits bekannten RSS-Button deinen Feed zum Download / Abonnement auf deiner Website anbieten. Die Links würden dann wie folgt aussehen :

-
Step 4. Now you can offer your feed over a link or the all-side well-known RSS-Button for download / subscription on your website. The link should look as follows:
<a href="http://your_website.de/rss_news.php" target="_blank">News-RSS-Feed</a>

- bzw. mit Button :

- and/or with button :
<a href="http://your_website.de/rss_news.php" target="_blank"><img src="http://your_website.de/.../rss_news-button.gif"></a>

-
Schritt 5.Um das RSS Symbol [ ...

... ] in deinem Webbrowser (IE oder FF) automatisch zu aktivieren, öffne die Datei
/templates/<dein_template>/header.html und suche nach :

-
Step 5.To activate automaticaly the RSS symbol [ ...

... ] in your webbrowser (IE or Firefox) open file
/templates/<your_template>/header.html and search for :
{if has_rss}
<link rel="alternate" type="application/rss+xml" title="{rss_title}" href="{rss_url}" />
{endif has_rss}

- oder (in Version < 1.7.3)

- or (in version < 1.7.3)
<link rel="stylesheet" href="{template_url}/style.css" />

- und füge danach ein :

- and insert below :
<link rel="alternate" type="application/rss+xml" title="RSS Feed: ***SITENAME*** (Neue Nachrichten)" href="rss_news.php" />

-
Schritt 6.Nachdem du deinen News-RSS-Feed fertiggestellt hast, kannst du dir die Gültig- und Rechtmäßigkeit deines RSS-Feeds von
feedvalidator.org prüfen und bestätigen lassen.
Und damit keine Zweifel aufkommen, habe ich meinen News-RSS-Feed natürlich prüfen lassen und als Ergebnis folgendes erhalten :

-
Step 6.After you finished your News-RSS-Feed, you can let examine and confirm the valid and legal standard of your RSS-Feed by
feedvalidator.org.
And for no doubts, of course I let examine my News-RSS-Feed and as result I get the following :
Congratulations ! 
This is a valid RSS feed.
mawenzi