From: Richard Beales Date: Sat, 16 Mar 2013 14:27:55 +0000 (+0000) Subject: Feature #446 - Allow customizing page title X-Git-Tag: 1.7.5~29^2~12 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=ffbab555b8622160b552616dacf188f1a38aca9a;p=tt-rss.git Feature #446 - Allow customizing page title --- diff --git a/config.php-dist b/config.php-dist index eaaaa3d6..a742cf9a 100644 --- a/config.php-dist +++ b/config.php-dist @@ -181,6 +181,9 @@ // Users may enable other user plugins from Preferences/Plugins but may not // disable plugins specified in this list. + define('PAGE_TITLE','Tiny Tiny RSS'); + // Change this value to customize the HTML page title + define('CONFIG_VERSION', 26); // Expected config version. Please update this option in config.php // if necessary (after migrating all new options from this file). diff --git a/index.php b/index.php index 6584d8d2..53d31fc5 100644 --- a/index.php +++ b/index.php @@ -55,7 +55,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - Tiny Tiny RSS + <?php echo PAGE_TITLE ?> diff --git a/js/tt-rss.js b/js/tt-rss.js index badfe870..5d6e1d81 100644 --- a/js/tt-rss.js +++ b/js/tt-rss.js @@ -178,7 +178,11 @@ function search() { } function updateTitle() { - var tmp = "Tiny Tiny RSS"; + var tmp = document.title; + if (tmp.indexOf('(')>0) + { + tmp = tmp.substr(0,tmp.lastIndexOf('(')); + } if (global_unread > 0) { tmp = tmp + " (" + global_unread + ")"; diff --git a/mobile/index.php b/mobile/index.php index edbf586e..aad2d288 100644 --- a/mobile/index.php +++ b/mobile/index.php @@ -19,7 +19,7 @@ -Tiny Tiny RSS +<?php echo PAGE_TITLE ?> diff --git a/prefs.php b/prefs.php index 6c109184..b4ab3689 100644 --- a/prefs.php +++ b/prefs.php @@ -25,7 +25,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - Tiny Tiny RSS : <?php echo __("Preferences") ?> + <?php echo PAGE_TITLE ?> : <?php echo __("Preferences") ?> diff --git a/register.php b/register.php index b0c9bd95..d61bcfa2 100644 --- a/register.php +++ b/register.php @@ -27,7 +27,7 @@ print ''; print " ".htmlspecialchars(SELF_URL_PATH . "/register.php")." - Tiny Tiny RSS registration slots + <?php echo PAGE_TITLE ?> registration slots ";