Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add skin_logo config option to installer; show drop-down list for ski…

…n selection
  • Loading branch information...
commit e49064282339bf08f0dfcce4224a20ec055f32ac 1 parent 15e9441
@thomascube thomascube authored
Showing with 28 additions and 1 deletion.
  1. +14 −1 installer/config.php
  2. +14 −0 installer/rcube_install.php
View
15 installer/config.php
@@ -500,13 +500,26 @@
<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
View
14 installer/rcube_install.php
@@ -511,6 +511,20 @@ function versions_select($attrib = array())
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
Please sign in to comment.
Something went wrong with that request. Please try again.