2 if (file_exists("install") && !file_exists("config.php")) {
3 header("Location: install/");
6 if (!file_exists("config.php")) {
7 print "<b>Fatal Error</b>: You forgot to copy
8 <b>config.php-dist</b> to <b>config.php</b> and edit it.\n";
12 // we need a separate check here because functions.php might get parsed
13 // incorrectly before 5.3 because of :: syntax.
14 if (version_compare(PHP_VERSION
, '5.3.0', '<')) {
15 print "<b>Fatal Error</b>: PHP version 5.3.0 or newer required.\n";
19 set_include_path(dirname(__FILE__
) ."/include" . PATH_SEPARATOR
.
22 require_once "autoload.php";
23 require_once "sessions.php";
24 require_once "functions.php";
25 require_once "sanity_check.php";
26 require_once "version.php";
27 require_once "config.php";
28 require_once "db-prefs.php";
29 require_once "lib/Mobile_Detect.php";
31 $mobile = new Mobile_Detect();
33 if (!init_plugins()) return;
35 if (!$_REQUEST['mobile']) {
36 if ($mobile->isTablet() && PluginHost
::getInstance()->get_plugin("digest")) {
37 header('Location: backend.php?op=digest');
39 } else if ($mobile->isMobile() && PluginHost
::getInstance()->get_plugin("mobile")) {
40 header('Location: backend.php?op=mobile');
42 } else if ($mobile->isMobile() && PluginHost
::getInstance()->get_plugin("digest")) {
43 header('Location: backend.php?op=digest');
50 header('Content-Type: text/html; charset=utf-8');
53 <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
54 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
57 <title
>Tiny Tiny RSS
</title
>
59 <script type
="text/javascript">
60 var __ttrss_version
= "<?php echo VERSION ?>"
63 <?php
echo stylesheet_tag("lib/dijit/themes/claro/claro.css"); ?
>
64 <?php
echo stylesheet_tag("css/layout.css"); ?
>
66 <?php
if ($_SESSION["uid"]) {
67 $theme = get_pref( "USER_CSS_THEME", $_SESSION["uid"], false);
68 if ($theme && theme_valid("$theme")) {
69 echo stylesheet_tag(get_theme_path($theme));
71 echo stylesheet_tag("themes/default.css");
76 <?php
print_user_stylesheet() ?
>
78 <style type
="text/css">
80 foreach (PluginHost
::getInstance()->get_plugins() as $n => $p) {
81 if (method_exists($p, "get_css")) {
88 <link rel
="shortcut icon" type
="image/png" href
="images/favicon.png"/>
89 <link rel
="icon" type
="image/png" sizes
="72x72" href
="images/favicon-72px.png" />
95 { name
: "fox", location
: "../../js" },
101 foreach (array("lib/prototype.js",
102 "lib/scriptaculous/scriptaculous.js?load=effects,controls",
104 "lib/dojo/tt-rss-layer.js",
105 "errors.php?mode=js") as $jsfile) {
107 echo javascript_tag($jsfile);
111 <script type
="text/javascript">
114 require_once 'lib/jshrink/Minifier.php';
116 print get_minified_js(array("tt-rss",
117 "functions", "feedlist", "viewfeed", "PluginHost"));
119 foreach (PluginHost
::getInstance()->get_plugins() as $n => $p) {
120 if (method_exists($p, "get_js")) {
121 echo JShrink\Minifier
::minify($p->get_js());
125 init_js_translations();
129 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8"/>
130 <meta name
="referrer" content
="no-referrer"/>
132 <script type
="text/javascript">
133 Event
.observe(window
, 'load', function() {
139 <body id
="ttrssMain" class="claro">
141 <div id
="overlay" style
="display : block">
142 <div id
="overlay_inner">
143 <div
class="insensitive"><?php
echo __("Loading, please wait...") ?
></div
>
144 <div dojoType
="dijit.ProgressBar" places
="0" style
="width : 300px" id
="loading_bar"
145 progress
="0" maximum
="100">
147 <noscript
><br
/><?php
print_error('Javascript is disabled. Please enable it.') ?
></noscript
>
151 <div id
="notify" class="notify"></div
>
152 <div id
="cmdline" style
="display : none"></div
>
154 <div id
="main" dojoType
="dijit.layout.BorderContainer">
156 <div id
="feeds-holder" dojoType
="dijit.layout.ContentPane" region
="leading" style
="width : 20%" splitter
="true">
157 <div id
="feedlistLoading">
158 <img src
='images/indicator_tiny.gif'/>
159 <?php
echo __("Loading, please wait..."); ?
></div
>
160 <div id
="feedTree"></div
>
163 <div dojoType
="dijit.layout.BorderContainer" region
="center" id
="header-wrap" gutters
="false">
164 <div dojoType
="dijit.layout.BorderContainer" region
="center" id
="content-wrap">
166 <div id
="toolbar" dojoType
="dijit.layout.ContentPane" region
="top">
167 <div id
="main-toolbar" dojoType
="dijit.Toolbar">
169 <form id
="headlines-toolbar" action
="" onsubmit
='return false'>
173 <form id
="main_toolbar_form" action
="" onsubmit
='return false'>
175 <button dojoType
="dijit.form.Button" id
="collapse_feeds_btn"
176 onclick
="collapse_feedlist()"
177 title
="<?php echo __('Collapse feedlist') ?>" style
="display : none">
180 <select name
="view_mode" title
="<?php echo __('Show articles') ?>"
181 onchange
="viewModeChanged()"
182 dojoType
="dijit.form.Select">
183 <option selected
="selected" value
="adaptive"><?php
echo __('Adaptive') ?
></option
>
184 <option value
="all_articles"><?php
echo __('All Articles') ?
></option
>
185 <option value
="marked"><?php
echo __('Starred') ?
></option
>
186 <option value
="published"><?php
echo __('Published') ?
></option
>
187 <option value
="unread"><?php
echo __('Unread') ?
></option
>
188 <option value
="has_note"><?php
echo __('With Note') ?
></option
>
189 <!-- <option value
="noscores"><?php
echo __('Ignore Scoring') ?
></option
> -->
192 <select title
="<?php echo __('Sort articles') ?>"
193 onchange
="viewModeChanged()"
194 dojoType
="dijit.form.Select" name
="order_by">
195 <option selected
="selected" value
="default"><?php
echo __('Default') ?
></option
>
196 <option value
="feed_dates"><?php
echo __('Newest first') ?
></option
>
197 <option value
="date_reverse"><?php
echo __('Oldest first') ?
></option
>
198 <option value
="title"><?php
echo __('Title') ?
></option
>
201 <div dojoType
="dijit.form.ComboButton" onclick
="catchupCurrentFeed()">
202 <span
><?php
echo __('Mark as read') ?
></span
>
203 <div dojoType
="dijit.DropDownMenu">
204 <div dojoType
="dijit.MenuItem" onclick
="catchupCurrentFeed('1day')">
205 <?php
echo __('Older than one day') ?
>
207 <div dojoType
="dijit.MenuItem" onclick
="catchupCurrentFeed('1week')">
208 <?php
echo __('Older than one week') ?
>
210 <div dojoType
="dijit.MenuItem" onclick
="catchupCurrentFeed('2week')">
211 <?php
echo __('Older than two weeks') ?
>
218 <div
class="actionChooser">
221 foreach (PluginHost
::getInstance()->get_hooks(PluginHost
::HOOK_TOOLBAR_BUTTON
) as $p) {
222 echo $p->hook_toolbar_button();
226 <button id
="net-alert" dojoType
="dijit.form.Button" style
="display : none" disabled
="true"
227 title
="<?php echo __("Communication problem with server
.") ?>">
229 src
="images/error.png" />
232 <div dojoType
="dijit.form.DropDownButton">
233 <span
><?php
echo __('Actions...') ?
></span
>
234 <div dojoType
="dijit.Menu" style
="display: none">
235 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcPrefs')"><?php
echo __('Preferences...') ?
></div
>
236 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcSearch')"><?php
echo __('Search...') ?
></div
>
237 <div dojoType
="dijit.MenuItem" disabled
="1"><?php
echo __('Feed actions:') ?
></div
>
238 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcAddFeed')"><?php
echo __('Subscribe to feed...') ?
></div
>
239 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcEditFeed')"><?php
echo __('Edit this feed...') ?
></div
>
240 <!-- <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcRescoreFeed')"><?php
echo __('Rescore feed') ?
></div
> -->
241 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcRemoveFeed')"><?php
echo __('Unsubscribe') ?
></div
>
242 <div dojoType
="dijit.MenuItem" disabled
="1"><?php
echo __('All feeds:') ?
></div
>
243 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcCatchupAll')"><?php
echo __('Mark as read') ?
></div
>
244 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcShowOnlyUnread')"><?php
echo __('(Un)hide read feeds') ?
></div
>
245 <div dojoType
="dijit.MenuItem" disabled
="1"><?php
echo __('Other actions:') ?
></div
>
246 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcToggleWidescreen')"><?php
echo __('Toggle widescreen mode') ?
></div
>
247 <!-- <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcAddLabel')"><?php
echo __('Create label...') ?
></div
>
248 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcAddFilter')"><?php
echo __('Create filter...') ?
></div
> -->
249 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcHKhelp')"><?php
echo __('Keyboard shortcuts help') ?
></div
>
252 foreach (PluginHost
::getInstance()->get_hooks(PluginHost
::HOOK_ACTION_ITEM
) as $p) {
253 echo $p->hook_action_item();
257 <?php
if (!$_SESSION["hide_logout"]) { ?
>
258 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcLogout')"><?php
echo __('Logout') ?
></div
>
263 <button id
="updatesIcon" dojoType
="dijit.form.Button" style
="display : none">
264 <img src
="images/new_version.png" title
="<?php echo __('Updates are available from Git.') ?>"/>
267 </div
> <!-- toolbar
-->
268 </div
> <!-- toolbar pane
-->
270 <div id
="headlines-wrap-inner" dojoType
="dijit.layout.BorderContainer" region
="center">
272 <div id
="floatingTitle" style
="visibility : hidden"></div
>
274 <div id
="headlines-frame" dojoType
="dijit.layout.ContentPane"
275 onscroll
="headlines_scroll_handler(this)" region
="center">
276 <div id
="headlinesInnerContainer">
277 <div
class="whiteBox"><?php
echo __('Loading, please wait...') ?
></div
>
281 <div id
="content-insert" dojoType
="dijit.layout.ContentPane" region
="bottom"
282 style
="height : 50%" splitter
="true"></div
>