1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-16 08:45:57 +00:00

show enclosures in CDM (refs #165)

This commit is contained in:
Andrew Dolgov
2007-11-17 13:32:48 +01:00
parent ce53e200b4
commit 3c66b582e6
2 changed files with 37 additions and 5 deletions

View File

@@ -4815,6 +4815,38 @@
// print "<div class=\"cdmInnerContent\" id=\"CICD-$id\" $cdm_cstyle>";
print $line["content_preview"];
$e_result = db_query($link, "SELECT * FROM ttrss_enclosures WHERE
post_id = '$id'");
if (db_num_rows($e_result) > 0) {
print "<div class=\"cdmEnclosures\">";
if (db_num_rows($e_result) == 1) {
print __("Attachment:") . " ";
} else {
print __("Attachments:") . " ";
}
$entries = array();
while ($e_line = db_fetch_assoc($e_result)) {
$url = $e_line["content_url"];
$filename = substr($url, strrpos($url, "/")+1);
$entry = "<a href=\"" . htmlspecialchars($url) . "\">" .
$filename . " (" . $e_line["content_type"] . ")" . "</a>";
array_push($entries, $entry);
}
print join(", ", $entries);
print "</div>";
}
print "<br clear='both'>";
// print "</div>";