diff --git a/bl-kernel/helpers/pluginsettings.class.php b/bl-kernel/helpers/pluginsettings.class.php
index 17fa5d00..b57496c8 100644
--- a/bl-kernel/helpers/pluginsettings.class.php
+++ b/bl-kernel/helpers/pluginsettings.class.php
@@ -42,4 +42,27 @@ class PluginSettings
return $html;
}
+
+ public static function medias($plugin, $settingName, $title, $description = "")
+ {
+
+ global $L;
+ global $medias;
+
+ $html = '
';
+ $html .= '
';
+ $html .= '
';
+ if ($description != "") {
+ $html .= '
' . $L->get($description) . '
';
+ }
+ $html .= '
';
+
+ return $html;
+ }
}
\ No newline at end of file
diff --git a/bl-themes/defaultTheme/php/head.php b/bl-themes/defaultTheme/php/head.php
index c6d8db7a..022197be 100644
--- a/bl-themes/defaultTheme/php/head.php
+++ b/bl-themes/defaultTheme/php/head.php
@@ -17,5 +17,29 @@
getValue('accentColor').'.css'); ?>
+
+
diff --git a/bl-themes/defaultTheme/plugin.php b/bl-themes/defaultTheme/plugin.php
index dad572fa..40ff11a5 100644
--- a/bl-themes/defaultTheme/plugin.php
+++ b/bl-themes/defaultTheme/plugin.php
@@ -8,7 +8,11 @@ class defaultTheme extends Plugin
$this->dbFields = array(
'showPostInformation' => false,
'dateFormat' => 'relative',
- 'accentColor' => 'default'
+ 'accentColor' => 'default',
+ 'background' => '',
+ 'backgroundTiled' => true,
+ 'banner' => '',
+ 'bannerTiled' => false
);
}
@@ -16,6 +20,11 @@ class defaultTheme extends Plugin
{
$html = '';
+ $html .= PluginSettings::medias($this, 'background', 'Blog background');
+ $html .= PluginSettings::bool($this, 'backgroundTiled', 'Tiled blog background');
+ $html .= PluginSettings::medias($this, 'banner', 'Banner background');
+ $html .= PluginSettings::bool($this, 'bannerTiled', 'Tiled Banner background');
+
$html .= PluginSettings::bool($this, 'showPostInformation', 'Show Post Information');
$html .= PluginSettings::values($this,'dateFormat', 'Date format', ['noshow'=>'No show', 'relative'=>'Relative', 'absolute'=>'Absolute'], 'Change the date format for the main page.');
$html .= PluginSettings::values($this,'accentColor', 'Accent Color', [
@@ -45,4 +54,28 @@ class defaultTheme extends Plugin
{
return $this->getValue('dateFormat');
}
+
+ public function haveBanner() {
+ return ($this->getValue('banner') != '');
+ }
+
+ public function haveBackground() {
+ return ($this->getValue('background') != '');
+ }
+
+ public function bannerURI()
+ {
+ if ($this->getValue('banner') == '') {
+ return '';
+ }
+ return new Media($this->getValue('banner'))->permalink();
+ }
+
+ public function backgroundURI()
+ {
+ if ($this->getValue('background') == '') {
+ return '';
+ }
+ return new Media($this->getValue('background'))->permalink();
+ }
}