]> git.wh0rd.org Git - tt-rss.git/commitdiff
new options: SHORT_DATE_FORMAT, LONG_DATE_FORMAT
authorAndrew Dolgov <fox@bah.spb.su>
Sun, 27 Nov 2005 19:57:59 +0000 (20:57 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sun, 27 Nov 2005 19:57:59 +0000 (20:57 +0100)
backend.php
schema/ttrss_schema_pgsql.sql
tt-rss.css

index 63b38e3abfaabda9d9c4a497f6fb3e9561db932c..f7c26df4136e164ed71616a303cd6a6e7c651c3b 100644 (file)
                $addheader = $_GET["addheader"];
 
                $result = db_query($link, "SELECT title,link,content,feed_id,comments,int_id,
+                       SUBSTRING(updated,1,16) as updated,
                        (SELECT icon_url FROM ttrss_feeds WHERE id = feed_id) as icon_url
                        FROM ttrss_entries,ttrss_user_entries
                        WHERE   id = '$id' AND ref_id = id");
 
                        print "<div class=\"postHeader\"><table width=\"100%\">";
 
-                       print "<tr><td colspan='2'>" . $line["title"] . "</td></tr>";
+                       print "<tr><td>" . $line["title"] . "</td>";
+
+                       $parsed_updated = date(get_pref($link, 'LONG_DATE_FORMAT'), 
+                               strtotime($line["updated"]));
+               
+                       print "<td class=\"postDate\">$parsed_updated</td>";
+                                               
+                       print "</tr>";
 
                        $tmp_result = db_query($link, "SELECT DISTINCT tag_name FROM
                                ttrss_tags WHERE post_int_id = " . $line["int_id"] . "
                                print "</td>";
                        }
 
-                       $updated_fmt = date("M d, G:i", strtotime($line["updated"]));
+                       $updated_fmt = date(get_pref($link, 'SHORT_DATE_FORMAT'), 
+                               strtotime($line["updated"]));
                        print "<td class=\"hlUpdated\"><nobr>$updated_fmt</nobr></td>";
 
                        print "</tr>";
index dbd43b5e7d104cffe4bd0b06fb602db46dc2a064..9204b6573132ac3d178b6061442c4a5668e96760 100644 (file)
@@ -182,6 +182,9 @@ insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) valu
 
 insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('SHOW_CONTENT_PREVIEW', 1, 'true', 'Show content preview in headlines list',2);
 
+insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('SHORT_DATE_FORMAT', 2, 'M d, G:i', 'Short date format',3);
+insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('LONG_DATE_FORMAT', 2, 'D, M d Y - G:i', 'Long date format',3);
+
 create table ttrss_user_prefs (
        owner_uid integer not null references ttrss_users(id) ON DELETE CASCADE,
        pref_name varchar(250) not null references ttrss_prefs(pref_name) ON DELETE CASCADE,
index 59ff1aea3b3fc9032e962627ca1234eeee32dbea..67970aff5fcbed006658b2044c04be2f85a21b44 100644 (file)
@@ -759,3 +759,9 @@ tr.evenUnreadSelected td.headlineContent {
        height : 1em;
        background-color : #e0e0ff;
 } */
+
+div.postHeader td.postDate {
+       font-size : x-small;
+       text-align : right;
+       color : gray;
+}