Feature #446 - Allow customizing page title

This commit is contained in:
Richard Beales 2013-03-16 14:27:55 +00:00
parent 804ab1f75b
commit ffbab555b8
6 changed files with 12 additions and 5 deletions

View File

@ -181,6 +181,9 @@
// Users may enable other user plugins from Preferences/Plugins but may not // Users may enable other user plugins from Preferences/Plugins but may not
// disable plugins specified in this list. // 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); define('CONFIG_VERSION', 26);
// Expected config version. Please update this option in config.php // Expected config version. Please update this option in config.php
// if necessary (after migrating all new options from this file). // if necessary (after migrating all new options from this file).

View File

@ -55,7 +55,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html> <html>
<head> <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="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="tt-rss.css?<?php echo $dt_add ?>"/>
<link rel="stylesheet" type="text/css" href="cdm.css?<?php echo $dt_add ?>"/> <link rel="stylesheet" type="text/css" href="cdm.css?<?php echo $dt_add ?>"/>

View File

@ -178,7 +178,11 @@ function search() {
} }
function updateTitle() { 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) { if (global_unread > 0) {
tmp = tmp + " (" + global_unread + ")"; tmp = tmp + " (" + global_unread + ")";

View File

@ -19,7 +19,7 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <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;"/> <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" /> <link rel="apple-touch-icon" href="../lib/iui/iui-logo-touch-icon.png" />
<meta name="apple-touch-fullscreen" content="YES" /> <meta name="apple-touch-fullscreen" content="YES" />

View File

@ -25,7 +25,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html> <html>
<head> <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="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="tt-rss.css?<?php echo $dt_add ?>"/>

View File

@ -27,7 +27,7 @@
print '<?xml version="1.0" encoding="utf-8"?>'; print '<?xml version="1.0" encoding="utf-8"?>';
print "<feed xmlns=\"http://www.w3.org/2005/Atom\"> print "<feed xmlns=\"http://www.w3.org/2005/Atom\">
<id>".htmlspecialchars(SELF_URL_PATH . "/register.php")."</id> <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=\"self\" href=\"".htmlspecialchars(SELF_URL_PATH . "/register.php?format=feed")."\"/>
<link rel=\"alternate\" href=\"".htmlspecialchars(SELF_URL_PATH)."\"/>"; <link rel=\"alternate\" href=\"".htmlspecialchars(SELF_URL_PATH)."\"/>";