]> git.wh0rd.org - tt-rss.git/commitdiff
rewrite links to open in new window in sanitize_rss(); css tweaks
authorAndrew Dolgov <fox@bah.org.ru>
Wed, 13 Jan 2010 07:11:13 +0000 (10:11 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Wed, 13 Jan 2010 07:11:13 +0000 (10:11 +0300)
functions.php
tt-rss.css

index a5583e729a4b5163e65940e0fe68cac3e34cc759..54385a4a79881c4d809d625dfbd9ac069ff43c26 100644 (file)
                }
 
                if (get_pref($link, "STRIP_IMAGES", $owner)) {
-                       
                        $res = preg_replace('/<img[^>]+>/is', '', $res);
+               }
 
+               if (get_pref($link, 'OPEN_LINKS_IN_NEW_WINDOW')) {
+                       $res = preg_replace("/href=/i", "target=\"_blank\" href=", $res);
                }
 
                return $res;
 
                if ($result) {
 
-                       $link_target = "";
-
-                       if (get_pref($link, 'OPEN_LINKS_IN_NEW_WINDOW')) {
-                               $link_target = "target=\"_blank\"";
-                       }
-
                        $line = db_fetch_assoc($result);
 
                        if ($line["icon_url"]) {
                                } else {
                                        $comments_url = $line["link"];
                                }
-                               $entry_comments = "<a $link_target href=\"$comments_url\">$num_comments comments</a>";
+                               $entry_comments = "<a target='_blank' href=\"$comments_url\">$num_comments comments</a>";
                        } else {
                                if ($line["comments"] && $line["link"] != $line["comments"]) {
-                                       $entry_comments = "<a $link_target href=\"".$line["comments"]."\">comments</a>";
+                                       $entry_comments = "<a target='_blank' href=\"".$line["comments"]."\">comments</a>";
                                }                               
                        }
 
                        print "<div class=\"postDate$rtl_class\">$parsed_updated</div>";
 
                        if ($line["link"]) {
-                               print "<div clear='both'><a $link_target href=\"" . $line["link"] . "\">" . 
+                               print "<div clear='both'><a target='_blank' href=\"" . $line["link"] . "\">" . 
                                        $line["title"] . "</a><span class='author'>$entry_author</span></div>";
                        } else {
                                print "<div clear='both'>" . $line["title"] . "$entry_author</div>";
 
                        $article_content = sanitize_rss($link, $line["content"]);
 
-                       if (get_pref($link, 'OPEN_LINKS_IN_NEW_WINDOW')) {
-                               $article_content = preg_replace("/href=/i", "target=\"_blank\" href=", 
-                                       $article_content);
-                       }
-
                        print "<div id=\"POSTNOTE-$id\">";
                                if ($line['note']) {
                                        print format_article_note($id, $line['note']);
 
                                        print "</span></div>";
 
-                                       if (get_pref($link, 'OPEN_LINKS_IN_NEW_WINDOW')) {
-                                               $line["content_preview"] = preg_replace("/href=/i", 
-                                                       "target=\"_blank\" href=", $line["content_preview"]);
-                                       }
-
                                        if ($show_excerpt) {
                                                print "<div class=\"cdmExcerpt\" id=\"CEXC-$id\"
                                                        onclick=\"cdmExpandArticle($id)\"
index 8a37e34552d18c8f88e60c63fa8612032a804c9b..13de0e04521756808e2235c5f24bb864b835354a 100644 (file)
@@ -921,30 +921,29 @@ span.cdmAllTagsCtr:hover div {
 }
 
 div.cdmArticle {
-       border-color : #a0a0a0;
-       border-width : 0px 0px 1px 0px;
+       border-color : #c0c0c0;
+       border-width : 1px;
        border-style : solid;
-       background-color : #f9faff;
-       margin : 0px;
-       color : #505050;
+       background : white;
+       margin : 5px 5px 0px 5px;
        color : black;
 }
 
 div.cdmArticleUnread {
-       border-color : #a0a0a0;
-       border-width : 0px 0px 1px 0px;
+       border-color : #88b0f0;
+       border-width : 1px;
        border-style : solid;
        background-color : white;
-       margin : 0px;
+       margin : 5px 5px 0px 5px;
        color : black;
 }
 
 div.cdmArticleSelected, div.cdmArticleUnreadSelected {
-       margin : 0px;
        background-color : #fff7d5;
        border-color : #e7d796;
-       border-width : 0px 0px 1px 0px;
-       border-style : solid;
+       border-width : 1px;
+       border-style : solid;   
+       margin : 5px 5px 0px 5px;
 }
 
 div.cdmArticleUnread div.cdmHeader a.title, 
@@ -955,21 +954,34 @@ div.cdmArticleUnreadSelected div.cdmHeader a.title {
 div.cdmHeader {
        padding : 5px 5px 10px 5px;
        color : gray;
+}
 
+div.cdmArticleUnread div.cdmHeader {
+       background : url("images/footer.png") top left;
+       background-repeat : repeat-x;
 }
 
 div.cdmArticleUnread div.cdmHeader span.titleWrap a {
        color : black;
 }
 
+div.cdmArticleSelected div.cdmFooter, div.cdmArticleUnreadSelected div.cdmFooter {
+       background : #e7d796;
+}
+
+div.cdmFooter input {
+       vertical-align : middle;
+}
+
 div.cdmFooter {
        font-size : 14px;
        color : black;
        padding : 5px;
        color : gray;
-       border-width : 1px 0px 0px 0px;
-       border-color : #c0c0c0;
-       border-style : dotted;
+       background : #f9f9f9;
+/*     border-width : 1px 0px 0px 0px;
+       border-style : solid;
+       border-color : #88b0f0; */
 }
 
 div.cdmFooter span.s0 {
@@ -994,11 +1006,7 @@ div.cdmFooter img.markedPic, div.cdmFooter img.tagsPic {
        width : 16px;
        height : 16px;
        vertical-align : middle;
-}
-
-img.markedPic {
-       cursor : pointer;
-}
+} 
 
 div.cdmHeader div.articleUpdated {
        float : right;
@@ -1050,6 +1058,10 @@ div.cdmEnclosures {
        color : gray;
 }
 
+img.markedPic {
+       cursor : pointer;
+}
+
 a.warning {
        color : #f04040;
 }
@@ -1386,6 +1398,10 @@ div.whiteBox {
        font-size : 14px;
 }
 
+#toolbar input {
+       vertical-align : middle;
+}
+
 div.headlines_normal {
        position : absolute;
        border-width : 1px 0px 0px 0px;