new option: OPEN_LINKS_IN_NEW_WINDOW (closes #47)

This commit is contained in:
Andrew Dolgov 2006-03-06 05:45:54 +01:00
parent e8ef3b9715
commit 68511f86ac
6 changed files with 13 additions and 1 deletions

View File

@ -1040,6 +1040,10 @@
print "<div id=\"allEntryTags\">Tags: $f_tags_str</div>"; print "<div id=\"allEntryTags\">Tags: $f_tags_str</div>";
} }
if (get_pref($link, 'OPEN_LINKS_IN_NEW_WINDOW')) {
$line["content"] = preg_replace("/href=/i", "target=\"_new\" href=", $line["content"]);
}
print $line["content"] . "</div>"; print $line["content"] . "</div>";
print "</div>"; print "</div>";

View File

@ -240,6 +240,8 @@ 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('HIDE_READ_FEEDS', 1, 'false', 'Hide feeds with no unread messages',2); insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('HIDE_READ_FEEDS', 1, 'false', 'Hide feeds with no unread messages',2);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('OPEN_LINKS_IN_NEW_WINDOW', 1, 'true', 'Open article links in new browser window',2);
create table ttrss_user_prefs ( create table ttrss_user_prefs (
owner_uid integer not null, owner_uid integer not null,
pref_name varchar(250), pref_name varchar(250),

View File

@ -218,6 +218,8 @@ 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('HIDE_READ_FEEDS', 1, 'false', 'Hide feeds with no unread messages',2); insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('HIDE_READ_FEEDS', 1, 'false', 'Hide feeds with no unread messages',2);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('OPEN_LINKS_IN_NEW_WINDOW', 1, 'true', 'Open article links in new browser window',2);
create table ttrss_user_prefs ( create table ttrss_user_prefs (
owner_uid integer not null references ttrss_users(id) ON DELETE CASCADE, 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, pref_name varchar(250) not null references ttrss_prefs(pref_name) ON DELETE CASCADE,

View File

@ -14,5 +14,7 @@ create table ttrss_sessions (id varchar(250) not null primary key,
delete from ttrss_prefs where pref_name = 'ENABLE_SPLASH'; delete from ttrss_prefs where pref_name = 'ENABLE_SPLASH';
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('OPEN_LINKS_IN_NEW_WINDOW', 1, 'true', 'Open article links in new browser window',2);
update ttrss_version set schema_version = 6; update ttrss_version set schema_version = 6;

View File

@ -17,6 +17,8 @@ create index ttrss_sessions_expire_index on ttrss_sessions(expire);
delete from ttrss_prefs where pref_name = 'ENABLE_SPLASH'; delete from ttrss_prefs where pref_name = 'ENABLE_SPLASH';
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('OPEN_LINKS_IN_NEW_WINDOW', 1, 'true', 'Open article links in new browser window',2);
update ttrss_version set schema_version = 6; update ttrss_version set schema_version = 6;
commit; commit;