summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.php.example2
-rw-r--r--includes/config.defaults.php14
-rw-r--r--index.php8
3 files changed, 20 insertions, 4 deletions
diff --git a/config.php.example b/config.php.example
index f03e5e1..1126988 100644
--- a/config.php.example
+++ b/config.php.example
@@ -7,6 +7,7 @@
*/
// People to contact
+// Set both to null to not display any contact information
$config['contact']['name'] = 'Example Support';
$config['contact']['mail'] = 'support@example.com';
@@ -17,6 +18,7 @@ $config['frontpage']['title'] = 'Looking Glass';
// Logo to display (remove it to not display any logo)
$config['frontpage']['image'] = 'logo.png';
// Disclaimer to inform people using the looking glass
+// Set it to null to not display a disclaimer
$config['frontpage']['disclaimer'] = 'This is a disclaimer!';
// Things to remove from the output (PHP compatible regex)
diff --git a/includes/config.defaults.php b/includes/config.defaults.php
index d174967..24182c5 100644
--- a/includes/config.defaults.php
+++ b/includes/config.defaults.php
@@ -15,6 +15,12 @@ $config = array(
'custom_bootstrap_theme' => false,
// CSS to use
'css' => 'css/style.css',
+ // Title
+ 'title' => 'Looking Glass',
+ // Image (null for no image)
+ 'image' => null,
+ // Disclaimer (null for no disclaimer)
+ 'disclaimer' => 'Disclaimer example',
// Display the title
'show_title' => true,
// Show visitor IP address
@@ -23,6 +29,14 @@ $config = array(
'order' => array('routers', 'commands', 'parameters', 'buttons')
),
+ // Contact (both null for no contact)
+ 'contact' => array(
+ // Name of the contact
+ 'name' => 'Example Support',
+ // Email of the contact
+ 'mail' => 'support@example.com'
+ ),
+
// Filters
'filters' => array(),
diff --git a/index.php b/index.php
index f28bfd4..c7dcb90 100644
--- a/index.php
+++ b/index.php
@@ -100,8 +100,8 @@ final class LookingGlass {
if ($this->frontpage['show_title']) {
print('<h1>'.htmlentities($this->frontpage['title']).'</h1><br />');
}
- if (isset($this->frontpage['image'])) {
- print('<img src="'.$this->frontpage['image'].'" alt="logo" />');
+ if ($this->frontpage['image'] != null) {
+ print('<img src="'.$this->frontpage['image'].'" alt="Logo" />');
}
print('</div>');
print('</a>');
@@ -167,12 +167,12 @@ final class LookingGlass {
}
}
- if (isset($this->frontpage['disclaimer'])) {
+ if ($this->frontpage['disclaimer'] != null) {
print($this->frontpage['disclaimer']);
print('<br /><br />');
}
- if (isset($this->contact) && !empty($this->contact)) {
+ if (($this->contact['name'] != null) && ($this->contact['mail'] != null)) {
print('Contact:&nbsp;');
print('<a href="mailto:'.$this->contact['mail'].'">'.
htmlentities($this->contact['name']).'</a>');