rewrite links to open in new window in sanitize_rss(); css tweaks

master
Andrew Dolgov 15 years ago
parent f2105630c6
commit 7514749de7

@ -3629,9 +3629,11 @@
}
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;
@ -4612,12 +4614,6 @@
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"]) {
@ -4635,10 +4631,10 @@
} 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>";
}
}
@ -4669,7 +4665,7 @@
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>";
@ -4750,11 +4746,6 @@
$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']);
@ -5278,11 +5269,6 @@
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)\"

@ -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;

Loading…
Cancel
Save