|
@@ -27,8 +27,6 @@
|
27
|
27
|
<title><?=htmlspecialchars(replaceAccents($conf->title));?></title>
|
28
|
28
|
<link><?=$conf->urlGelato;?></link>
|
29
|
29
|
<description><?=htmlspecialchars(replaceAccents($conf->description));?></description>
|
30
|
|
- <language>EN</language>
|
31
|
|
- <docs>http:
|
32
|
30
|
<generator>gelato CMS</generator>
|
33
|
31
|
<image>
|
34
|
32
|
<url><?=$conf->urlGelato;?>/images/information.png</url>
|
|
@@ -37,19 +35,50 @@
|
37
|
35
|
</image>
|
38
|
36
|
<?
|
39
|
37
|
while($register = mysql_fetch_array($rs)) {
|
40
|
|
- $tit = ($register["title"]=="") ? htmlspecialchars($register["url"]) : htmlspecialchars($register["title"]);
|
41
|
|
- $desc = htmlspecialchars($register["description"]);
|
|
38
|
+ switch ($register["type"]) {
|
|
39
|
+ case "1":
|
|
40
|
+ $tit = ($register["title"]=="") ? htmlspecialchars(strip_tags($register["description"])) : htmlspecialchars($register["title"]);
|
|
41
|
+ $desc = htmlspecialchars($register["description"]);
|
|
42
|
+ break;
|
|
43
|
+ case "2":
|
|
44
|
+ $tit = ($register["description"]=="") ? "Photo" : htmlspecialchars(strip_tags($register["description"]));
|
|
45
|
+ $desc = "<img src=\"".$register["url"]."\"/>";
|
|
46
|
+ break;
|
|
47
|
+ case "3":
|
|
48
|
+ $tit = "\"".htmlspecialchars(strip_tags($register["description"]))."\"";
|
|
49
|
+ $tmpStr = ($register["title"]!="") ? "<br /><br /> - <em>".htmlspecialchars($register["title"])."</em>" : "";
|
|
50
|
+ $desc = "\"".htmlspecialchars($register["description"])."\"".$tmpStr;
|
|
51
|
+ break;
|
|
52
|
+ case "4":
|
|
53
|
+ $tit = ($register["title"]=="") ? htmlspecialchars($register["url"]) : htmlspecialchars($register["title"]);
|
|
54
|
+ $tmpStr = ($register["description"]!="") ? "<br /><br /> - <em>".htmlspecialchars($register["description"])."</em>" : "";
|
|
55
|
+ $desc = "<a href=\"".htmlspecialchars($register["url"])."\">".$tit."</a>".$tmpStr;
|
|
56
|
+ break;
|
|
57
|
+ case "5":
|
|
58
|
+ $lines = explode("\n", $register["description"]);
|
|
59
|
+ $line = htmlspecialchars($lines[0]);
|
|
60
|
+ $tit = ($register["title"]=="") ? $line : htmlspecialchars($register["title"]);
|
|
61
|
+ $desc = $tumble->formatConversation(htmlspecialchars($register["description"]));
|
|
62
|
+ break;
|
|
63
|
+ case "6":
|
|
64
|
+ $tit = ($register["description"]=="") ? "Video" : htmlspecialchars(strip_tags($register["description"]));
|
|
65
|
+ $desc = $tumble->getVideoPlayer(htmlspecialchars($register["url"]));
|
|
66
|
+ break;
|
|
67
|
+ case "7":
|
|
68
|
+ $tit = ($register["description"]=="") ? "MP3" : htmlspecialchars(strip_tags($register["description"]));
|
|
69
|
+ $desc = $tumble->getMp3Player(htmlspecialchars($register["url"]));
|
|
70
|
+ break;
|
|
71
|
+ }
|
42
|
72
|
$url = htmlspecialchars($conf->urlGelato."/index.php/post/".$register["id_post"]."/");
|
43
|
73
|
$formatedDate = gmdate("D, d M Y H:i:s \G\M\T", strtotime($register["date"]));
|
44
|
74
|
?>
|
45
|
75
|
|
46
|
76
|
<item>
|
47
|
|
- <title><?=$tit;?></title>
|
|
77
|
+ <title><?=replaceAccentsWithAmp($tit);?></title>
|
|
78
|
+ <description><![CDATA[<?=replaceAccentsWithAmp($desc);?>]]></description>
|
48
|
79
|
<link><?=$url;?></link>
|
49
|
|
- <description><?=$desc;?></description>
|
50
|
|
- <pubDate><?=$formatedDate;?></pubDate>
|
51
|
|
- <category>system:unfiled</category>
|
52
|
|
- <guid isPermaLink="true"><?=$conf->urlGelato."/index.php/post/".$register["id_post"]."/";?></guid>
|
|
80
|
+ <guid isPermaLink="true"><?=$conf->urlGelato."/index.php/post/".$register["id_post"]."/";?></guid>
|
|
81
|
+ <pubDate><?=$formatedDate;?></pubDate>
|
53
|
82
|
</item>
|
54
|
83
|
|
55
|
84
|
<?
|
|
@@ -73,4 +102,19 @@
|
73
|
102
|
$texto = str_replace("ú","u", $texto);
|
74
|
103
|
return $texto;
|
75
|
104
|
}
|
|
105
|
+
|
|
106
|
+ function replaceAccentsWithAmp($texto="") {
|
|
107
|
+ $texto = str_replace("&Aacute;","A", $texto);
|
|
108
|
+ $texto = str_replace("&Eacute;","E", $texto);
|
|
109
|
+ $texto = str_replace("&Iacute;","I", $texto);
|
|
110
|
+ $texto = str_replace("&Oacute;","O", $texto);
|
|
111
|
+ $texto = str_replace("&Uacute;","U", $texto);
|
|
112
|
+ $texto = str_replace("&aacute;","a", $texto);
|
|
113
|
+ $texto = str_replace("&eacute;","e", $texto);
|
|
114
|
+ $texto = str_replace("&iacute;","i", $texto);
|
|
115
|
+ $texto = str_replace("&oacute;","o", $texto);
|
|
116
|
+ $texto = str_replace("&uacute;","u", $texto);
|
|
117
|
+ $texto = str_replace("&#39;"," ", $texto);
|
|
118
|
+ return $texto;
|
|
119
|
+ }
|
76
|
120
|
?>
|