Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1:/tmp/cvs-serv3567
Modified Files:
serendipity_admin_installer.inc.php
serendipity_config_local.tpl serendipity_functions.inc.php
serendipity_lang_de.inc.php serendipity_lang_en.inc.php NEWS
Log Message:
o Nested display of installer using DHTML (on a non-capable browser it's
displayed like before)
o New config category 'Appearance' for installer
o New config option blockReferer to block some hosts from being put into the
referers table
Index: serendipity_admin_installer.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_admin_installer.inc.php,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- serendipity_admin_installer.inc.php 5 Aug 2003 14:07:40 -0000 1.24
+++ serendipity_admin_installer.inc.php 9 Aug 2003 00:57:49 -0000 1.25
@@ -19,7 +19,7 @@
return sprintf(
'http%s://%s%s%s/',
-
+
$ssl ? 's' : '',
$_SERVER['HTTP_HOST'],
(($ssl && $port != 443) || (!$ssl && $port != 80)) ? (':' . $port) : '',
@@ -62,7 +62,7 @@
$current = trim(substr($l, 2));
$config[$current] = array();
}
-
+
break;
// A configure option
@@ -108,22 +108,65 @@
function serendipity_printConfigTemplate($t, $from = false) {
global $serendipity;
?>
+<script type="text/javascript" language="JavaScript">
+function showConfig(id) {
+ if (document.getElementById) {
+ el = document.getElementById(id);
+ if (el.style.display == 'none') {
+ document.getElementById('option' + id).src = 'pixel/minus.png';
+ el.style.display = '';
+ } else {
+ document.getElementById('option' + id).src = 'pixel/plus.png';
+ el.style.display = 'none';
+ }
+ }
+}
+
+var state='';
+function showConfigAll(count) {
+ if (document.getElementById) {
+ for (i = 1; i <= count; i++) {
+ document.getElementById('el' + i).style.display = state;
+ document.getElementById('optionel' + i).src = 'pixel/' + (state == '' ? 'minus.png' : 'plus.png');
+ }
+
+ if (state == '') {
+ document.getElementById('optionall').src = 'pixel/minus.png';
+ state = 'none';
+ } else {
+ document.getElementById('optionall').src = 'pixel/plus.png';
+ state = '';
+ }
+ }
+}
+</script>
+
<form action="?" method="POST">
<div>
<input type="hidden" name="serendipity[adminModule]" value="installer" />
<input type="hidden" name="installAction" value="check" />
<br />
+ <div align="right">
+ <a href="#" onclick="showConfigAll(<?php echo count($t); ?>)" title="<?php echo TOGGLE_ALL; ?>"><img src="pixel/plus.png" id="optionall" alt="+/-" border="0" /></a>
+
+ <a href="#" onclick="showConfigAll(<?php echo count($t); ?>)" title="<?php echo TOGGLE_ALL; ?>"><?php echo TOGGLE_ALL; ?></a><br />
+ </div>
<?php
+ $el_count = 0;
foreach ($t as $key => $value) {
+ $el_count++;
?>
<table width="100%" cellspacing="2">
<tr>
- <th align="left" colspan="2"><?php echo $key; ?></th>
+ <th align="left" colspan="2" style="padding-left: 15px;">
+ <a href="#" onclick="showConfig('el<?php echo $el_count; ?>'); return false" title="<?php echo TOGGLE_OPTION; ?>"><img src="pixel/plus.png" id="optionel<?php echo $el_count; ?>" alt="+/-" border="0" /></a>
+
+ <a href="#" onclick="showConfig('el<?php echo $el_count; ?>'); return false" title="<?php echo TOGGLE_OPTION; ?>"><?php echo $key; ?></a></th>
</tr>
-
+
<tr>
<td>
- <table width="100%" cellspacing="2" cellpadding="3">
+ <table width="100%" cellspacing="2" cellpadding="3" style="display: none;" id="el<?php echo $el_count; ?>">
<?php
for ($x=0; $x<count($value); $x++) {
if (@is_array($from)) {
@@ -136,7 +179,7 @@
<br />
<span style="color: #5E7A94; font-size: 8pt;"><?php echo '(' . $value[$x]['type'] . ') ' . $value[$x]['desc']; ?></span>
</th>
-
+
<td align="left" bgcolor="#E0E0E0" valign="top" width="1">
<?php echo serendipity_guessInput($value[$x]['type'], $value[$x]['name'], $from[$value[$x]['name']], $value[$x]['default']); ?>
</th>
@@ -144,7 +187,7 @@
<?php
}
?>
- </table>
+ </table><br /><br />
</td>
</tr>
</table>
@@ -280,12 +323,12 @@
'{PREFIX}',
'{indexFile}'
),
-
+
array(
$_POST['serendipityHTTPPath'],
$_POST['indexFile']
),
-
+
implode('', $a)
);
@@ -347,16 +390,16 @@
/* If we already have serendipity installed, all we need to do is write the configuration again */
if (IN_serendipity !== true) {
$res = serendipity_checkInstallation();
-
+
if (is_array($res)) {
echo DIAGNOSTIC_ERROR . '<br /><br />';
echo '<span style="color: #FF0000">- ' . implode('<br />', $res) . '</span><br /><br />';
serendipity_printConfigTemplate(serendipity_parseTemplate('./serendipity_config_local.tpl'), $_POST);
die();
}
-
+
echo '<br />';
-
+
/* We are good to go, lets install databases etc. */
echo ATTEMPT_SETUP_DATABASE;
$res = serendipity_installDatabase();
@@ -365,7 +408,7 @@
} else {
echo '<span style="color: #FF0000">- ' . $res . '</span><br />';
}
-
+
/* Next are the files, .htaccess */
printf(ATTEMPT_WRITE_FILE, '.htaccess');
$res = serendipity_installFiles();
@@ -375,31 +418,31 @@
} else {
echo DONE . '<br />';
}
-
+
/* We are now installed */
define('IN_serendipity', true);
-
+
/* register default plugins */
$GLOBALS['serendipity']['dbPrefix'] = $_POST['dbPrefix'];
$GLOBALS['serendipity']['dbName'] = $_POST['dbName'];
-
+
include_once 'serendipity_plugin_api.php';
serendipity_plugin_api::register_default_plugins();
-
+
printf(
SERENDIPITY_INSTALLED . '<br />',
-
+
'<p><strong>',
'</strong></p>',
-
+
$_POST['pass'],
$_POST['user'],
-
+
'<br /><br />',
-
+
$_POST['serendipityHTTPPath']
);
-
+
session_destroy();
}
@@ -420,7 +463,7 @@
else {
$from = false;
}
-
+
serendipity_printConfigTemplate(serendipity_parseTemplate('./serendipity_config_local.tpl'), $from);
}
Index: serendipity_config_local.tpl
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_config_local.tpl,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- serendipity_config_local.tpl 21 Jul 2003 02:37:12 -0000 1.13
+++ serendipity_config_local.tpl 9 Aug 2003 00:57:49 -0000 1.14
@@ -22,15 +22,18 @@
$serendipity['pass'] = '{Admin password|pass|protected|john}'; // Password for admin login
$serendipity['email'] = '{Admin email|email|string|jo...@ex...}'; // Email for admin login
$serendipity['want_mail'] = '{Send mails to admin?|want_mail|bool|1}'; // Do you want to receive emails when comments are posted to your entries?
-$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 (CAUTION: only turn this on if you use Microsoft's Internet Explorer!!!)?
-$serendipity['XHTML11'] = '{Force XHTML 1.1 compliance|XHTML11|bool|0}'; // Do you want to force XHTML 1.1 compliance (may cause problems for back-/frontend on older 4th generation browsers)
-$serendipity['embed'] = '{Is serendipity embedded?|embed|bool|0}'; // If you want to embed serendipity within a regular page, set to true to discard any headers and just print the contents. You can make use of the indexFile option to use a wrapper class where you put your normal webpage headers.
$serendipity['blogTitle'] = '{Blog name|blogTitle|string|John Doe's personal blog}'; // The title of your blog
$serendipity['blogDescription'] = '{Blog description|blogDescription|string|Welcome to my blog...}'; // Description of your blog
$serendipity['lang'] = '{Language file|lang|string|en}'; // Language (for 'en' you need serendipity_lang_en.inc.php).
+
+// Appearance and options
+$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 (CAUTION: only turn this on if you use Microsoft's Internet Explorer!!!)?
+$serendipity['XHTML11'] = '{Force XHTML 1.1 compliance|XHTML11|bool|0}'; // Do you want to force XHTML 1.1 compliance (may cause problems for back-/frontend on older 4th generation browsers)
+$serendipity['embed'] = '{Is serendipity embedded?|embed|bool|0}'; // If you want to embed serendipity within a regular page, set to true to discard any headers and just print the contents. You can make use of the indexFile option to use a wrapper class where you put your normal webpage headers.
$serendipity['track_exits'] = '{Track exit URLs|track_exits|bool|1}'; // Do you want to track exit targets?
+$serendipity['blockReferer'] = '{Blocked Referers|blockReferer|string|;}'; // Are there any special hosts you want not to show up in the referers list? Separate the list of hostnames with ';' and note that the host is blocked by substring matches!
// Imageconversion Settings
$serendipity['magick'] = '{Use Imagemagick|magick|bool|0}'; // Do you have image magick installed
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -d -r1.120 -r1.121
--- serendipity_functions.inc.php 8 Aug 2003 23:54:23 -0000 1.120
+++ serendipity_functions.inc.php 9 Aug 2003 00:57:49 -0000 1.121
@@ -1792,11 +1792,23 @@
return;
}
+ if (!is_array($serendipity['_blockReferer'])) {
+ // Only generate an array once per call
+ $serendipity['_blockReferer'] = array();
+ $serendipity['_blockReferer'] = @explode(';', $serendipity['blockReferer']);
+ }
+
$url_parts = parse_url($_SERVER['HTTP_REFERER']);
$host_parts = explode('.', $url_parts['host']);
if (!$url_parts['host'] ||
strstr($url_parts['host'], $_SERVER['SERVER_NAME'])) {
return;
+ }
+
+ foreach($serendipity['_blockReferer'] AS $idx => $hostname) {
+ if (strstr($url_pars['host'], $hostname)) {
+ return;
+ }
}
if (rand(0, 100) < 1) {
Index: serendipity_lang_de.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_lang_de.inc.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- serendipity_lang_de.inc.php 8 Aug 2003 23:22:02 -0000 1.19
+++ serendipity_lang_de.inc.php 9 Aug 2003 00:57:49 -0000 1.20
@@ -243,6 +243,8 @@
define('KEEP_PROPORTIONS', 'Proportionen beibehalten');
define('REALLY_SCALE_IMAGE', 'Bildgröße wirklich verändert? Kein zurück!');
define('RUNNING', 'Sie benutzen serendipity v.');
+define('TOGGLE_ALL', 'Alle Optionen ein-/ausblenden');
+define('TOGGLE_OPTION', 'Option ein-/ausblenden');
define('serendipity_LANG_LOADED', true);
/* vim: set sts=4 ts=4 expandtab : */
Index: serendipity_lang_en.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_lang_en.inc.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- serendipity_lang_en.inc.php 8 Aug 2003 21:01:22 -0000 1.25
+++ serendipity_lang_en.inc.php 9 Aug 2003 00:57:49 -0000 1.26
@@ -243,6 +243,8 @@
define('SCALING_IMAGE', 'Scaling %s to %s x %s px');
define('KEEP_PROPORTIONS', 'Keep proportions');
define('REALLY_SCALE_IMAGE', 'Really scale the image? No way back!');
+define('TOGGLE_ALL', 'Toggle display all options');
+define('TOGGLE_OPTION', 'Toggle option');
define('serendipity_LANG_LOADED', true);
/* vim: set sts=4 ts=4 expandtab : */
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- NEWS 5 Aug 2003 14:07:40 -0000 1.7
+++ NEWS 9 Aug 2003 00:57:49 -0000 1.8
@@ -2,6 +2,10 @@
Version 0.3 ()
------------------------------------
+ * Fixed trackback functionality (tomsommer)
+ * New config section ('Appearance') and new option to block certain hosts from being put into the referer table (garvinhicking)
+ * Categories can now be folded in DHTML-compatible browsers for better overview (garvinhicking)
+ * Conserve linebreaks in RSS comments. (garvinhicking)
* Allow deleting categories (moving articles to another category) (garvinhicking)
* Autodetect language on installation (garvinhicking)
* RSS feeds properly utf8encoded, added <webMaster>,<managingEditor>,<comments>,<category> and <generator> tag (garvinhicking)
|