X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=index.php;h=bf78be1f3c1f7c0a8616f2ef10dbb54038d695d2;hb=1ffe3391f902c4baa984982f19e61a0e45de21ff;hp=fd99dcca5b6aa3d5afe0ed924d84717872fc734d;hpb=f1fdfbea433c834ae7f09b4ef23f23d5efa069d4;p=tt-rss.git diff --git a/index.php b/index.php index fd99dcca..bf78be1f 100644 --- a/index.php +++ b/index.php @@ -1,4 +1,8 @@ Fatal Error: You forgot to copy config.php-dist to config.php and edit it.\n"; @@ -15,6 +19,7 @@ set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR . get_include_path()); + require_once "autoload.php"; require_once "sessions.php"; require_once "functions.php"; require_once "sanity_check.php"; @@ -25,26 +30,22 @@ $mobile = new Mobile_Detect(); - $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); - - if (!init_connection($link)) return; - - global $pluginhost; + if (!init_plugins()) return; if (!$_REQUEST['mobile']) { - if ($mobile->isTablet() && $pluginhost->get_plugin("digest")) { + if ($mobile->isTablet() && PluginHost::getInstance()->get_plugin("digest")) { header('Location: backend.php?op=digest'); exit; - } else if ($mobile->isMobile()) { - header('Location: mobile/index.php'); + } else if ($mobile->isMobile() && PluginHost::getInstance()->get_plugin("mobile")) { + header('Location: backend.php?op=mobile'); + exit; + } else if ($mobile->isMobile() && PluginHost::getInstance()->get_plugin("digest")) { + header('Location: backend.php?op=digest'); exit; } } - - login_sequence($link); - - no_cache_incantation(); + login_sequence(); header('Content-Type: text/html; charset=utf-8'); @@ -53,17 +54,25 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - <?php echo PAGE_TITLE ?> + Tiny Tiny RSS - + + + + get_plugins() as $n => $p) { + foreach (PluginHost::getInstance()->get_plugins() as $n => $p) { if (method_exists($p, "get_js")) { echo JShrink\Minifier::minify($p->get_js()); } } - print get_minified_js(array("tt-rss", - "functions", "feedlist", "viewfeed", "FeedTree")); - + init_js_translations(); ?> @@ -125,21 +133,8 @@ - - -
 
+ -
@@ -172,32 +167,45 @@ + + - - - - - +
+ +
+
+ +
+
+ +
+
+ +
+
+
+ get_hooks(PluginHost::HOOK_TOOLBAR_BUTTON) as $p) { + echo $p->hook_toolbar_button(); + } + ?> +
-
+
- get_plugin("digest")) { ?> -
- -
- -
- +
-
-
+
+ + get_hooks(PluginHost::HOOK_ACTION_ITEM) as $p) { + echo $p->hook_action_item(); + } + ?> +
@@ -257,17 +266,13 @@
-
- - -