Add subtitle in OPDS feed. suggested by Tyler J. Wagner.

This commit is contained in:
Sébastien Lucas 2012-12-22 18:23:17 +01:00
parent 1522c3c14d
commit e7ac49244c
3 changed files with 12 additions and 0 deletions

View File

@ -83,6 +83,12 @@ class OPDSRenderer
self::getXmlStream ()->startElement ("title");
self::getXmlStream ()->text ($page->title);
self::getXmlStream ()->endElement ();
if ($page->subtitle != "")
{
self::getXmlStream ()->startElement ("subtitle");
self::getXmlStream ()->text ($page->subtitle);
self::getXmlStream ()->endElement ();
}
self::getXmlStream ()->startElement ("id");
if ($page->idPage)
{

View File

@ -188,6 +188,7 @@ class EntryBook extends Entry
class Page
{
public $title;
public $subtitle = "";
public $idPage;
public $idGet;
public $query;
@ -243,6 +244,7 @@ class Page
{
global $config;
$this->title = $config['cops_title_default'];
$this->subtitle = $config['cops_subtitle_default'];
array_push ($this->entryArray, Author::getCount());
array_push ($this->entryArray, Serie::getCount());
array_push ($this->entryArray, Tag::getCount());

View File

@ -41,6 +41,10 @@
*/
$config['cops_title_default'] = "Sebastien's COPS";
/*
* Catalog's subtitle
*/
$config['cops_subtitle_default'] = "";
/*
* Wich header to use when downloading books outside the web directory