Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1:/tmp/cvs-serv4007
Modified Files:
serendipity_admin_installer.inc.php
serendipity_config_local.tpl
Log Message:
New layout in the installer/configuration
New descriptions and default values.
New userfriendly names of each config-item
Index: serendipity_admin_installer.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_admin_installer.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- serendipity_admin_installer.inc.php 29 Apr 2003 19:38:04 -0000 1.10
+++ serendipity_admin_installer.inc.php 16 Jun 2003 00:33:56 -0000 1.11
@@ -64,10 +64,11 @@
// Grep out the name, type and default
preg_match('#\{([^|]+\|[^|]+\|([^}]+)?)\}[^/]+/{2}(.+)#msi', $l, $match);
$c = explode("|", $match[1]);
- $config[$current][] = array("name" => $c[0],
- "type" => $c[1],
- "default" => serendipity_query_default($c[0], $c[2]),
- "distdefault" => $c[2],
+ $config[$current][] = array("longname" => $c[0],
+ "name" => $c[1],
+ "type" => $c[2],
+ "default" => serendipity_query_default($c[1], $c[3]),
+ "distdefault" => $c[3],
"desc" => $match[3]);
break;
}
@@ -76,6 +77,26 @@
return $config;
}
+function serendipity_guessInput($type,$name,$value='',$default='') {
+
+ switch ($type) {
+ case 'bool' :
+ echo "<input type='radio' name='".$name."' value='true' ";
+ echo (($default==true) ? "CHECKED" : "")."> Yes";
+ echo "<input type='radio' name='".$value[$x]["name"]."' value='false' ";
+ echo (($default==true) ? "" : "CHECKED")."> No";
+ break;
+ case 'protected' :
+
+ break;
+
+ default :
+ echo "<input type='text' size='30' name='".$name."' value=\"";
+ echo htmlentities($default)."\">";
+ break;
+ }
+}
+
function serendipity_printConfigTemplate($t, $from = false) {
global $serendipity;
@@ -84,27 +105,23 @@
echo "<input type='hidden' name='installAction' value='check'>";
echo "<br>";
foreach ($t as $key => $value) {
- echo "<table>";
- echo "<tr><td colspan='3'><b>$key:</b></td</tr>";
+ echo "<table width='100%' cellspacing='2'>";
+ echo "<tr><td colspan='2'><font size='2'>$key:</font></td></tr>";
+ echo "<tr><td><table width='100%' cellspacing='2' cellpadding='3'>";
for ($x=0; $x<count($value); $x++) {
if (@is_array($from)) $value[$x]["default"] = $from[$value[$x]["name"]];
echo "<tr>";
- echo "<td valign='top' width='250'>".$value[$x]["name"]." <font size='1'>(". $value[$x]["type"] .")</font></font></td>";
- echo "<td valign='top'><font size='2'>";
- if ($value[$x]["type"] == "bool") {
- echo "<input type='radio' name='".$value[$x]["name"]."' value='true' ";
- echo (($value[$x]["default"]==true) ? "CHECKED" : "")."> Yes<br>";
- echo "<input type='radio' name='".$value[$x]["name"]."' value='false' ";
- echo (($value[$x]["default"]==true) ? "" : "CHECKED")."> No<br>";
- } else {
- echo "<input type='text' size='30' name='".$value[$x]["name"]."' value=\"";
- echo htmlentities($value[$x]["default"])."\">";
- }
- echo "</font></td>";
- echo "<td valign='middle'><font color='#AAAAAA'><i>".$value[$x]["desc"]."</i></font></td>";
+ echo "<td bgcolor='#D8D8D8' valign='top'><font size='2'><strong>".$value[$x]["longname"]."</strong></font><br><font size='1' color='5E7A94'>(". $value[$x]["type"] .") ".$value[$x]["desc"]."</font></td>";
+ echo "<td bgcolor='#E0E0E0' valign='top' width='1'><font size='2'>";
+
+ echo serendipity_guessInput($value[$x]["type"], $value[$x]["name"], $from[$value[$x]["name"]], $value[$x]["default"]);
+
+ echo "</font></td>";
echo "</tr>";
}
+ echo "</table>";
+ echo "</td></tr>";
echo "</table>";
echo "<p>";
}
Index: serendipity_config_local.tpl
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_config_local.tpl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- serendipity_config_local.tpl 29 Apr 2003 19:27:27 -0000 1.4
+++ serendipity_config_local.tpl 16 Jun 2003 00:33:56 -0000 1.5
@@ -1,42 +1,39 @@
<?php
-/*************************************************************************
-* General configure options, adjust to your needs: *
-*************************************************************************/
// Database Settings
-$serendipity["dbType"] = "{dbType|string|mysql}"; // Database type (mysql|postgres)
-$serendipity["dbHost"] = "{dbHost|string|localhost}"; // MySQL host
-$serendipity["dbUser"] = "{dbUser|string|serendipity}"; // Username
-$serendipity["dbPass"] = "{dbPass|string|serendipity}"; // Password
-$serendipity["dbName"] = "{dbName|string|serendipity}"; // Name of your database
-$serendipity["dbPrefix"] = "{dbPrefix|string|serendipity_}"; // Prefix for the table names, i.e. serendipity_
+$serendipity["dbType"] = "{Database type|dbType|string|mysql}"; // Database type (mysql|postgres)
+$serendipity["dbHost"] = "{Database host|dbHost|string|localhost}"; // MySQL host
+$serendipity["dbUser"] = "{Database user|dbUser|string|serendipity}"; // Username
+$serendipity["dbPass"] = "{Database password|dbPass|string|serendipity}"; // Password
+$serendipity["dbName"] = "{Database name|dbName|string|serendipity}"; // Name of your database
+$serendipity["dbPrefix"] = "{Database prefix|dbPrefix|string|serendipity_}"; // Prefix for the table names, i.e. serendipity_
// Paths (note: don't forget trailing slashes for directories!!!!)
-$serendipity["serendipityPath"] = "{serendipityPath|string|/www/apache/htdocs/htdocs/serendipity/}"; // Here you need all the *.inc.php.
-$serendipity["uploadPath"] = "{uploadPath|string|uploads/}"; // All uploads will go here, relative to serendipityPath.
-$serendipity["serendipityHTTPPath"] = "{serendipityHTTPPath|string|/serendipity/}"; // Path to serendipity for your browser, typically '/serendipity'
-$serendipity["uploadHTTPPath"] = "{uploadHTTPPath|string|uploads/}"; // Path to your uploads for the Browser relative to serendipityHTTPPath.
-$serendipity["baseURL"] = "{baseURL|string|http://www.edwardbear.org/serendipity/}"; // Base URL of your serendipity
+$serendipity["serendipityPath"] = "{Full path|serendipityPath|string|/webroot/serendipity/}"; // The full and aboslute path to your serendipity installation.
+$serendipity["uploadPath"] = "{Upload path|uploadPath|string|uploads/}"; // All uploads will go here, relative to the 'Full path' - typically 'uploads/'
+$serendipity["serendipityHTTPPath"] = "{Relative path|serendipityHTTPPath|string|/serendipity/}"; // Path to serendipity for your browser, typically '/serendipity/'
+$serendipity["uploadHTTPPath"] = "{Relative upload path|uploadHTTPPath|string|uploads/}"; // Path to your uploads for browsers - Relative to the 'relative path'.
+$serendipity["baseURL"] = "{URL to blog|baseURL|string|http://www.example.com/serendipity/}"; // Base URL to your serendipity installation
// General settings
-$serendipity["user"] = "{user|string|j}"; // Username for admin login
-$serendipity["pass"] = "{pass|string|j}"; // Password for admin login
-$serendipity["email"] = "{email|string|j}"; // Email for admin login
-$serendipity["want_mail"] = {want_mail|bool|true}; // Do you want to receive emails when comments are posted to your serendipity?
-$serendipity["extCSS"] = "{extCSS|string|none}"; // You can define a stylesheet uri here, aditionally to the settings adjustable in the admin interface (enter 'none' if you don't need this)
-$serendipity["wysiwyg"] = {wysiwyg|bool|0}; // Do you want to use the WYSIWYG editor?
-$serendipity["layout_mode"] = "{layout_mode|string|table}"; // Layout mode
+$serendipity["user"] = "{Admin username|user|string|John Doe}"; // Username for admin login
+$serendipity["pass"] = "{Admin password|pass|protected|john}"; // Password for admin login
+$serendipity["email"] = "{Admin email|email|string|j}"; // Email for admin login
+$serendipity["want_mail"] = "{Send mails to admin?|want_mail|bool|true}"; // Do you want to receive emails when comments are posted to your serendipity?
+$serendipity["extCSS"] = "{External Stylesheet|extCSS|string|none}"; // You can define a stylesheet uri here, aditionally to the settings adjustable in the admin interface (enter 'none' if you don't need this)
+$serendipity["wysiwyg"] = "{Use WYSIWYG editor|wysiwyg|bool|0}"; // Do you want to use the WYSIWYG editor?
+$serendipity["layout_mode"] = "{Template file?|layout_mode|string|table}"; // Layout mode (table is default)
-$serendipity["blogTitle"] = "{blogTitle|string|Foo Bar}"; // Site title
-$serendipity["blogDescription"] = "{blogDescription|string|Welcome to Foobarblog}"; // Description of your blog
-$serendipity["lang"] = "{lang|string|en}"; // Language (for 'en' you need serendipity_lang_en.inc.php).
-$serendipity["rewrite"] = {rewrite|bool|true}; // Is mod_rewrite activated? Can we use 20030201.html?
-$serendipity["track_exits"] = {track_exits|bool|1}; // Do you want to track exit targets?
+$serendipity["blogTitle"] = "{Blog name|blogTitle|string|Foo Bar}"; // The title of your blog
+$serendipity["blogDescription"] = "{Blog description|blogDescription|string|Welcome to Foobarblog}"; // Description of your blog
+$serendipity["lang"] = "{Language file|lang|string|en}"; // Language (for 'en' you need serendipity_lang_en.inc.php).
+$serendipity["rewrite"] = "{Use mod_rewrite|rewrite|bool|true}"; // Is mod_rewrite activated? Can we use 20030201.html?
+$serendipity["track_exits"] = "{Track exit URLs|track_exits|bool|1}"; // Do you want to track exit targets?
// Imageconversion Settings
-$serendipity["magick"] = {magick|bool|true}; // Do you have image magick installed
-$serendipity["convert"] = "{convert|string|/usr/local/bin/convert}"; // Full path & name of your convert binary
-$serendipity["thumbSuffix"] = "{thumbSuffix|string|serendipityThumb}"; // Thumbnails will be named original.Suffix.ext
-$serendipity["thumbSize"] = "{thumbSize|int|110}"; // Maximum dimension of thumbnails
+$serendipity["magick"] = "{Use Imagemagick|magick|bool|true}"; // Do you have image magick installed
+$serendipity["convert"] = "{Path to convert binary|convert|string|/usr/local/bin/convert}"; // Full path & name of your image magick convert binary
+$serendipity["thumbSuffix"] = "{Thumbnail suffix|thumbSuffix|string|serendipityThumb}"; // Thumbnails will be named original.Suffix.ext
+$serendipity["thumbSize"] = "{Thumbnail dimensions|thumbSize|int|110}"; // Dimensions of auto-generated thumbnails
?>
|