]> git.wh0rd.org Git - tt-rss.git/commitdiff
Feature #446 - Allow customizing page title
authorRichard Beales <rich@richbeales.net>
Sat, 16 Mar 2013 14:27:55 +0000 (14:27 +0000)
committerRichard Beales <rich@richbeales.net>
Sat, 16 Mar 2013 14:27:55 +0000 (14:27 +0000)
config.php-dist
index.php
js/tt-rss.js
mobile/index.php
prefs.php
register.php

index eaaaa3d6984dbe6debdb000edfe1d4082566db23..a742cf9afb3299ac7c05543c5ff01b98d4bbdd10 100644 (file)
        // 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).
index 6584d8d2e22139171c2ef49094353967b2142e7b..53d31fc521f081165cda570027d838ccffcfc3cb 100644 (file)
--- a/index.php
+++ b/index.php
@@ -55,7 +55,7 @@
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html>
 <head>
-       <title>Tiny Tiny RSS</title>
+    <title><?php echo PAGE_TITLE ?></title>
        <link rel="stylesheet" type="text/css" href="lib/dijit/themes/claro/claro.css"/>
        <link rel="stylesheet" type="text/css" href="tt-rss.css?<?php echo $dt_add ?>"/>
        <link rel="stylesheet" type="text/css" href="cdm.css?<?php echo $dt_add ?>"/>
index badfe8707440a1d423017f1bb1d230cede90ed38..5d6e1d81ec5399dccb4f289af4ad0dea035d36a9 100644 (file)
@@ -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 + ")";
index edbf586e05af01133b9ee3d42e87cd69965d2014..aad2d28845e0724c4481d5e54cbb369594142693 100644 (file)
@@ -19,7 +19,7 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<title>Tiny Tiny RSS</title>
+<title><?php echo PAGE_TITLE ?></title>
 <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
 <link rel="apple-touch-icon" href="../lib/iui/iui-logo-touch-icon.png" />
 <meta name="apple-touch-fullscreen" content="YES" />
index 6c10918434178f9dc0e7bc56332830e70f12334c..b4ab3689d37fcd98911b5aa96cfe132e0b079f96 100644 (file)
--- a/prefs.php
+++ b/prefs.php
@@ -25,7 +25,7 @@
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html>
 <head>
-       <title>Tiny Tiny RSS : <?php echo __("Preferences") ?></title>
+       <title><?php echo PAGE_TITLE ?> : <?php echo __("Preferences") ?></title>
        <link rel="stylesheet" type="text/css" href="lib/dijit/themes/claro/claro.css"/>
        <link rel="stylesheet" type="text/css" href="tt-rss.css?<?php echo $dt_add ?>"/>
 
index b0c9bd95fa86fdd69dd6ed5a527d4f66a1dad105..d61bcfa29aa0c5ff77877c5271bc2ed99d443504 100644 (file)
@@ -27,7 +27,7 @@
                print '<?xml version="1.0" encoding="utf-8"?>';
                print "<feed xmlns=\"http://www.w3.org/2005/Atom\">
                        <id>".htmlspecialchars(SELF_URL_PATH . "/register.php")."</id>
-                       <title>Tiny Tiny RSS registration slots</title>
+                       <title><?php echo PAGE_TITLE ?> registration slots</title>
                        <link rel=\"self\" href=\"".htmlspecialchars(SELF_URL_PATH . "/register.php?format=feed")."\"/>
                        <link rel=\"alternate\" href=\"".htmlspecialchars(SELF_URL_PATH)."\"/>";