generic theme support, misc compact stylesheet iframe fixes

This commit is contained in:
Andrew Dolgov 2005-11-26 07:48:37 +01:00
parent 54a60e1a00
commit 503eb3498a
4 changed files with 46 additions and 2 deletions

View File

@ -160,6 +160,12 @@
<title>Tiny Tiny RSS : Feedlist</title>
<link rel=\"stylesheet\" href=\"tt-rss.css\" type=\"text/css\">";
$user_theme = $_SESSION["theme"];
if ($user_theme) {
print "<link rel=\"stylesheet\" type=\"text/css\"
href=\"themes/$user_theme/theme.css\">";
}
if (get_pref($link, 'USE_COMPACT_STYLESHEET')) {
print "<link rel=\"stylesheet\" type=\"text/css\"
href=\"tt-rss_compact.css\"/>";
@ -533,8 +539,23 @@
if ($addheader) {
print "<html><head>
<title>Tiny Tiny RSS : Article $id</title>
<link rel=\"stylesheet\" href=\"tt-rss.css\" type=\"text/css\">
<script type=\"text/javascript\" src=\"functions.js\"></script>
<link rel=\"stylesheet\" href=\"tt-rss.css\" type=\"text/css\">";
$user_theme = $_SESSION["theme"];
if ($user_theme) {
print "<link rel=\"stylesheet\" type=\"text/css\"
href=\"themes/$user_theme/theme.css\">";
}
if (get_pref($link, 'USE_COMPACT_STYLESHEET')) {
print "<link rel=\"stylesheet\" type=\"text/css\"
href=\"tt-rss_compact.css\"/>";
} else {
print "<link title=\"Compact Stylesheet\" rel=\"alternate stylesheet\"
type=\"text/css\" href=\"tt-rss_compact.css\"/>";
}
print "<script type=\"text/javascript\" src=\"functions.js\"></script>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
</head><body>";
}
@ -623,6 +644,12 @@
<title>Tiny Tiny RSS : Feed $feed</title>
<link rel=\"stylesheet\" href=\"tt-rss.css\" type=\"text/css\">";
$user_theme = $_SESSION["theme"];
if ($user_theme) {
print "<link rel=\"stylesheet\" type=\"text/css\"
href=\"themes/$user_theme/theme.css\">";
}
if (get_pref($link, 'USE_COMPACT_STYLESHEET')) {
print "<link rel=\"stylesheet\"
type=\"text/css\" href=\"tt-rss_compact.css\"/>";
@ -631,6 +658,7 @@
print "<link title=\"Compact Stylesheet\" rel=\"alternate stylesheet\"
type=\"text/css\" href=\"tt-rss_compact.css\"/>";
}
print "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
<script type=\"text/javascript\" src=\"functions.js\"></script>
<script type=\"text/javascript\" src=\"viewfeed.js\"></script>
@ -2263,6 +2291,8 @@
theme_id = (SELECT id FROM ttrss_themes WHERE
theme_name = '$theme') WHERE id = " . $_SESSION["uid"]);
$_SESSION["theme"] = $theme;
header("Location: prefs.php");
} else {

View File

@ -617,6 +617,10 @@
db_query($link, "UPDATE ttrss_users SET last_login = NOW() WHERE id = " .
$_SESSION["uid"]);
$user_theme = get_user_theme_path($link);
$_SESSION["theme"] = $user_theme;
initialize_user_prefs($link, $_SESSION["uid"]);
return true;

View File

@ -16,6 +16,11 @@
<title>Tiny Tiny RSS : Preferences</title>
<link rel="stylesheet" href="tt-rss.css" type="text/css">
<? $user_theme = $_SESSION["theme"];
if ($user_theme) { ?>
<link rel="stylesheet" type="text/css" href="themes/<?= $user_theme ?>/theme.css">
<? } ?>
<? $user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?>
<? if ($user_css_url) { ?>
<link type="text/css" href="<?= $user_css_url ?>"/>

View File

@ -18,6 +18,11 @@
<link rel="stylesheet" type="text/css" href="tt-rss.css">
<? $user_theme = $_SESSION["theme"];
if ($user_theme) { ?>
<link rel="stylesheet" type="text/css" href="themes/<?= $user_theme ?>/theme.css">
<? } ?>
<? $user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?>
<? if ($user_css_url) { ?>
<link type="text/css" href="<?= $user_css_url ?>"/>