summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2011-03-01 22:19:19 +0000
committerthomascube <thomas@roundcube.net>2011-03-01 22:19:19 +0000
commite49064282339bf08f0dfcce4224a20ec055f32ac (patch)
treeab600049f21f9674be8aefc2907bf7ac1e861e36
parent15e94412633b41c177e621d427cd6d5496a11702 (diff)
Add skin_logo config option to installer; show drop-down list for skin selection
-rw-r--r--installer/config.php15
-rw-r--r--installer/rcube_install.php14
2 files changed, 28 insertions, 1 deletions
diff --git a/installer/config.php b/installer/config.php
index 5250782f9..02a37153d 100644
--- a/installer/config.php
+++ b/installer/config.php
@@ -500,13 +500,26 @@ echo $input_locale->show($RCI->getprop('language'));
<dd>
<?php
-$input_skin = new html_inputfield(array('name' => '_skin', 'size' => 30, 'id' => "cfgskin"));
+$input_skin = new html_select(array('name' => '_skin', 'id' => "cfgskin"));
+$input_skin->add($RCI->list_skins());
echo $input_skin->show($RCI->getprop('skin'));
?>
<div>Name of interface skin (folder in /skins)</div>
</dd>
+<dt class="propname">skin_logo</dt>
+<dd>
+<?php
+
+$input_skin = new html_inputfield(array('name' => '_skin_logo', 'size' => 50, 'id' => "cfgskinlogo"));
+echo $input_skin->show($RCI->getprop('skin_logo'));
+
+?>
+<div>Custom image to display instead of the Roundcube logo.</div>
+<p class="hint">Enter a URL relative to the document root of this Roundcube installation.</p>
+</dd>
+
<dt class="propname">pagesize <span class="userconf">*</span></dt>
<dd>
<?php
diff --git a/installer/rcube_install.php b/installer/rcube_install.php
index 3f2d1a48e..8ff6492d2 100644
--- a/installer/rcube_install.php
+++ b/installer/rcube_install.php
@@ -511,6 +511,20 @@ class rcube_install
return $select;
}
+ /**
+ * Return a list with available subfolders of the skin directory
+ */
+ function list_skins()
+ {
+ $skins = array();
+ $skindir = INSTALL_PATH . 'skins/';
+ foreach (glob($skindir . '*') as $path) {
+ if (is_dir($path) && is_readable($path)) {
+ $skins[] = substr($path, strlen($skindir));
+ }
+ }
+ return $skins;
+ }
/**
* Display OK status