diff --git a/OPDS_renderer.php b/OPDS_renderer.php
index 547f011..102826e 100644
--- a/OPDS_renderer.php
+++ b/OPDS_renderer.php
@@ -56,7 +56,7 @@ class OPDSRenderer
$xml->writeAttribute ("type", "image/x-icon");
$xml->writeAttribute ("width", "16");
$xml->writeAttribute ("height", "16");
- $xml->text ("favicon.ico");
+ $xml->text ($config['cops_icon']);
$xml->endElement ();
$xml->startElement ("Url");
$xml->writeAttribute ("type", 'application/atom+xml');
@@ -71,7 +71,7 @@ class OPDSRenderer
return $xml->outputMemory(true);
}
- private function startXmlDocument ($title, $idPage) {
+ private function startXmlDocument ($page) {
global $config;
self::getXmlStream ()->startDocument('1.0','UTF-8');
self::getXmlStream ()->startElement ("feed");
@@ -81,12 +81,12 @@ class OPDSRenderer
self::getXmlStream ()->writeAttribute ("xmlns:opensearch", "http://a9.com/-/spec/opensearch/1.1/");
self::getXmlStream ()->writeAttribute ("xmlns:dcterms", "http://purl.org/dc/terms/");
self::getXmlStream ()->startElement ("title");
- self::getXmlStream ()->text ($title);
+ self::getXmlStream ()->text ($page->title);
self::getXmlStream ()->endElement ();
self::getXmlStream ()->startElement ("id");
- if ($idPage)
+ if ($page->idPage)
{
- self::getXmlStream ()->text ($idPage);
+ self::getXmlStream ()->text ($page->idPage);
}
else
{
@@ -97,7 +97,7 @@ class OPDSRenderer
self::getXmlStream ()->text (self::getUpdatedTime ());
self::getXmlStream ()->endElement ();
self::getXmlStream ()->startElement ("icon");
- self::getXmlStream ()->text ("favicon.ico");
+ self::getXmlStream ()->text ($page->favicon);
self::getXmlStream ()->endElement ();
self::getXmlStream ()->startElement ("author");
self::getXmlStream ()->startElement ("name");
@@ -201,7 +201,7 @@ class OPDSRenderer
public function render ($page) {
global $config;
- self::startXmlDocument ($page->title, $page->idPage);
+ self::startXmlDocument ($page);
if ($page->isPaginated ())
{
self::getXmlStream ()->startElement ("opensearch:totalResults");
diff --git a/base.php b/base.php
index 796e1de..e884800 100644
--- a/base.php
+++ b/base.php
@@ -191,6 +191,7 @@ class Page
public $idPage;
public $idGet;
public $query;
+ public $favicon;
public $n;
public $totalNumber = -1;
public $entryArray = array();
@@ -230,9 +231,12 @@ class Page
}
public function __construct($pid, $pquery, $pn) {
+ global $config;
+
$this->idGet = $pid;
$this->query = $pquery;
$this->n = $pn;
+ $this->favicon = $config['cops_icon'];
}
public function InitializeContent ()
diff --git a/config_default.php b/config_default.php
index c9dcf2a..fa816ab 100644
--- a/config_default.php
+++ b/config_default.php
@@ -59,7 +59,13 @@
* Height of thumbnail image for HTML
*/
$config['cops_html_thumbnail_height'] = "70";
-
+
+ /*
+ * Icon for both OPDS and HTML catalog
+ * Note that this has to be a real icon (.ico)
+ */
+ $config['cops_icon'] = "favicon.ico";
+
/*
* Show icon for authors, series, tags and books on OPDS feed
* 1 : enable
diff --git a/index.php b/index.php
index dc8858e..34e0651 100644
--- a/index.php
+++ b/index.php
@@ -54,6 +54,7 @@
+
" media="screen" />