]>
git.wh0rd.org - tt-rss.git/blob - prefs.php
2 if (file_exists("install") && !file_exists("config.php")) {
3 header("Location: install/");
6 set_include_path(dirname(__FILE__
) ."/include" . PATH_SEPARATOR
.
9 if (!file_exists("config.php")) {
10 print "<b>Fatal Error</b>: You forgot to copy
11 <b>config.php-dist</b> to <b>config.php</b> and edit it.\n";
15 require_once "autoload.php";
16 require_once "sessions.php";
17 require_once "functions.php";
18 require_once "sanity_check.php";
19 require_once "version.php";
20 require_once "config.php";
21 require_once "db-prefs.php";
23 if (!init_plugins()) return;
27 header('Content-Type: text/html; charset=utf-8');
29 <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
30 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
33 <title
>Tiny Tiny RSS
: <?php
echo __("Preferences") ?
></title
>
34 <meta name
="viewport" content
="initial-scale=1,width=device-width" />
36 <script type
="text/javascript">
37 var __ttrss_version
= "<?php echo VERSION ?>"
40 <?php
echo stylesheet_tag("lib/dijit/themes/claro/claro.css"); ?
>
41 <?php
echo stylesheet_tag("css/layout.css"); ?
>
43 <?php
if ($_SESSION["uid"]) {
44 $theme = get_pref( "USER_CSS_THEME", $_SESSION["uid"], false);
45 if ($theme && theme_valid("$theme")) {
46 echo stylesheet_tag(get_theme_path($theme));
48 echo stylesheet_tag("themes/default.php");
53 <?php
print_user_stylesheet() ?
>
55 <link rel
="shortcut icon" type
="image/png" href
="images/favicon.png"/>
56 <link rel
="icon" type
="image/png" sizes
="72x72" href
="images/favicon-72px.png" />
61 cacheBust
: new Date(),
63 { name
: "lib", location
: "../" },
64 { name
: "fox", location
: "../../js" },
70 foreach (array("lib/prototype.js",
71 "lib/scriptaculous/scriptaculous.js?load=effects,controls",
73 "lib/dojo/tt-rss-layer.js",
74 "errors.php?mode=js") as $jsfile) {
76 echo javascript_tag($jsfile);
80 <script type
="text/javascript">
83 require_once 'lib/jshrink/Minifier.php';
85 foreach (PluginHost
::getInstance()->get_plugins() as $n => $p) {
86 if (method_exists($p, "get_prefs_js")) {
88 echo JShrink\Minifier
::minify($p->get_prefs_js());
90 console.warn('failed to initialize plugin JS: $n');
96 print get_minified_js(array("functions", "deprecated", "prefs"));
98 init_js_translations();
102 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8"/>
104 <script type
="text/javascript">
105 Event
.observe(window
, 'load', function() {
112 <body id
="ttrssPrefs" class="claro">
114 <div id
="notify" class="notify"></div
>
115 <div id
="cmdline" style
="display : none"></div
>
118 <div id
="overlay_inner">
119 <div
class="insensitive"><?php
echo __("Loading, please wait...") ?
></div
>
120 <div dojoType
="dijit.ProgressBar" places
="0" style
="width : 300px" id
="loading_bar"
121 progress
="0" maximum
="100">
123 <noscript
><br
/><?php
print_error('Javascript is disabled. Please enable it.') ?
></noscript
>
127 <div id
="header" dojoType
="dijit.layout.ContentPane" region
="top">
128 <!-- <a href
='#' onclick
="showHelp()"><?php
echo __("Keyboard shortcuts") ?
></a
> |
-->
129 <a href
="#" onclick
="gotoMain()"><?php
echo __('Exit preferences') ?
></a
>
132 <div id
="main" dojoType
="dijit.layout.BorderContainer">
134 <div dojoType
="dijit.layout.TabContainer" region
="center" id
="pref-tabs">
135 <div id
="genConfigTab" dojoType
="dijit.layout.ContentPane"
136 href
="backend.php?op=pref-prefs"
137 title
="<?php echo __('Preferences') ?>"></div
>
138 <div id
="feedConfigTab" dojoType
="dijit.layout.ContentPane"
139 href
="backend.php?op=pref-feeds"
140 title
="<?php echo __('Feeds') ?>"></div
>
141 <div id
="filterConfigTab" dojoType
="dijit.layout.ContentPane"
142 href
="backend.php?op=pref-filters"
143 title
="<?php echo __('Filters') ?>"></div
>
144 <div id
="labelConfigTab" dojoType
="dijit.layout.ContentPane"
145 href
="backend.php?op=pref-labels"
146 title
="<?php echo __('Labels') ?>"></div
>
147 <?php
if ($_SESSION["access_level"] >= 10) { ?
>
148 <div id
="userConfigTab" dojoType
="dijit.layout.ContentPane"
149 href
="backend.php?op=pref-users"
150 title
="<?php echo __('Users') ?>"></div
>
151 <div id
="systemConfigTab" dojoType
="dijit.layout.ContentPane"
152 href
="backend.php?op=pref-system"
153 title
="<?php echo __('System') ?>"></div
>
156 PluginHost
::getInstance()->run_hooks(PluginHost
::HOOK_PREFS_TABS
,
157 "hook_prefs_tabs", false);
161 <div id
="footer" dojoType
="dijit.layout.ContentPane" region
="bottom">
162 <a
class="insensitive" target
="_blank" href
="http://tt-rss.org/">
164 <?php
if (!defined('HIDE_VERSION')) { ?
>
165 v
<?php
echo VERSION ?
>
167 ©
; 2005-<?php
echo date('Y') ?
>
168 <a
class="insensitive" target
="_blank"
169 href
="http://fakecake.org/">Andrew Dolgov
</a
>
170 </div
> <!-- footer
-->