From 3c66b582e67284ef9509c1ca90d13c319e923faa Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 17 Nov 2007 13:32:48 +0100 Subject: [PATCH] show enclosures in CDM (refs #165) --- functions.php | 32 ++++++++++++++++++++++++++++++++ tt-rss.css | 10 +++++----- 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/functions.php b/functions.php index 6f45a7fe..acfc88db 100644 --- a/functions.php +++ b/functions.php @@ -4815,6 +4815,38 @@ // print "
"; 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 "
"; + + 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 = "" . + $filename . " (" . $e_line["content_type"] . ")" . ""; + + array_push($entries, $entry); + } + + print join(", ", $entries); + + print "
"; + } + print "
"; // print "
"; diff --git a/tt-rss.css b/tt-rss.css index cd33911d..f5801909 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -57,12 +57,7 @@ div.postReply div.postIcon { } div.postReply div.postEnclosures { - border-width : 1px 0px 0px 0px; - border-style : dotted; - border-color : #c0c0c0; - font-size : 8pt; margin-top : 1em; - padding-top : 0.2em; color : gray; } @@ -999,6 +994,11 @@ div.cdmContent { } +div.cdmEnclosures { + margin-top : 1em; + color : gray; +} + a.warning { color : #f04040; } -- 2.39.5