diff --git a/classes/gelato.class.php b/classes/gelato.class.php
index 730593d..b71d79a 100644
--- a/classes/gelato.class.php
+++ b/classes/gelato.class.php
@@ -95,10 +95,10 @@ class gelato extends Conexion_Mysql {
function getVideoPlayer($url) {
if (isYoutubeVideo($url)) {
$id_video = getYoutubeVideoUrl($url);
- return "\t\t\t
\n";
+ return "\t\t\t\n";
} elseif (isVimeoVideo($url)) {
$id_video = getVimeoVideoUrl($url);
- return "\t\t\t\n";
+ return "\t\t\t\n";
} else {
return "This URL is not a supported video (YouTube or Vimeo)";
}
@@ -107,7 +107,7 @@ class gelato extends Conexion_Mysql {
function getMp3Player($url) {
if (isMP3($url)) {
$playerUrl = $this->conf->urlGelato."/admin/scripts/player.swf?soundFile=".$url;
- return "\t\t\t\n";
+ return "\t\t\t\n";
} else {
return "This URL is not a supported video (YouTube or Vimeo)";
}
diff --git a/rss.php b/rss.php
index 8dd0cff..a9d0eba 100644
--- a/rss.php
+++ b/rss.php
@@ -27,8 +27,6 @@
=htmlspecialchars(replaceAccents($conf->title));?>
=$conf->urlGelato;?>
=htmlspecialchars(replaceAccents($conf->description));?>
- EN
- http://blogs.law.harvard.edu/tech/rss
gelato CMS
=$conf->urlGelato;?>/images/information.png
@@ -37,19 +35,50 @@
while($register = mysql_fetch_array($rs)) {
- $tit = ($register["title"]=="") ? htmlspecialchars($register["url"]) : htmlspecialchars($register["title"]);
- $desc = htmlspecialchars($register["description"]);
+ switch ($register["type"]) {
+ case "1":
+ $tit = ($register["title"]=="") ? htmlspecialchars(strip_tags($register["description"])) : htmlspecialchars($register["title"]);
+ $desc = htmlspecialchars($register["description"]);
+ break;
+ case "2":
+ $tit = ($register["description"]=="") ? "Photo" : htmlspecialchars(strip_tags($register["description"]));
+ $desc = "
";
+ break;
+ case "3":
+ $tit = "\"".htmlspecialchars(strip_tags($register["description"]))."\"";
+ $tmpStr = ($register["title"]!="") ? "
- ".htmlspecialchars($register["title"])."" : "";
+ $desc = "\"".htmlspecialchars($register["description"])."\"".$tmpStr;
+ break;
+ case "4":
+ $tit = ($register["title"]=="") ? htmlspecialchars($register["url"]) : htmlspecialchars($register["title"]);
+ $tmpStr = ($register["description"]!="") ? "
- ".htmlspecialchars($register["description"])."" : "";
+ $desc = "".$tit."".$tmpStr;
+ break;
+ case "5":
+ $lines = explode("\n", $register["description"]);
+ $line = htmlspecialchars($lines[0]);
+ $tit = ($register["title"]=="") ? $line : htmlspecialchars($register["title"]);
+ $desc = $tumble->formatConversation(htmlspecialchars($register["description"]));
+ break;
+ case "6":
+ $tit = ($register["description"]=="") ? "Video" : htmlspecialchars(strip_tags($register["description"]));
+ $desc = $tumble->getVideoPlayer(htmlspecialchars($register["url"]));
+ break;
+ case "7":
+ $tit = ($register["description"]=="") ? "MP3" : htmlspecialchars(strip_tags($register["description"]));
+ $desc = $tumble->getMp3Player(htmlspecialchars($register["url"]));
+ break;
+ }
$url = htmlspecialchars($conf->urlGelato."/index.php/post/".$register["id_post"]."/");
$formatedDate = gmdate("D, d M Y H:i:s \G\M\T", strtotime($register["date"]));
?>
-
- =$tit;?>
+ =replaceAccentsWithAmp($tit);?>
+ ]]>
=$url;?>
- =$desc;?>
- =$formatedDate;?>
- system:unfiled
- =$conf->urlGelato."/index.php/post/".$register["id_post"]."/";?>
+ =$conf->urlGelato."/index.php/post/".$register["id_post"]."/";?>
+ =$formatedDate;?>
@@ -73,4 +102,19 @@
$texto = str_replace("ú","u", $texto);
return $texto;
}
+
+ function replaceAccentsWithAmp($texto="") {
+ $texto = str_replace("Á","A", $texto);
+ $texto = str_replace("É","E", $texto);
+ $texto = str_replace("Í","I", $texto);
+ $texto = str_replace("Ó","O", $texto);
+ $texto = str_replace("Ú","U", $texto);
+ $texto = str_replace("á","a", $texto);
+ $texto = str_replace("é","e", $texto);
+ $texto = str_replace("í","i", $texto);
+ $texto = str_replace("ó","o", $texto);
+ $texto = str_replace("ú","u", $texto);
+ $texto = str_replace("'"," ", $texto);
+ return $texto;
+ }
?>
\ No newline at end of file