Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1:/tmp/cvs-serv30514
Modified Files:
serendipity_lang_de.inc.php serendipity_lang_en.inc.php
serendipity_admin_entries.inc.php
serendipity_admin_image_selector.php
serendipity_admin_installer.inc.php serendipity_config.inc.php
compat.php
Log Message:
* Added ability to close (and re-open) comments for certain entries [needs DB update!]
* Labels for radio buttons/checkboxes
* Minor XHTML compliance
[continued]
Index: serendipity_lang_de.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_lang_de.inc.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- serendipity_lang_de.inc.php 20 Sep 2003 12:19:06 -0000 1.33
+++ serendipity_lang_de.inc.php 13 Oct 2003 12:15:44 -0000 1.34
@@ -174,6 +174,10 @@
@define('TRACKBACK_SPECIFIC', 'Trackback für spezifische URI dieses Eintrags');
@define('DIRECT_LINK', 'Direkter Link zu diesem Eintrag');
@define('COMMENT_ADDED', 'Dein Kommentar wurde hinzugefügt. Klick %shier um zu den Kommentaren zurückzukehren%s und %shier um das Fenster zu schließen%s.');
+@define('COMMENTS_DISABLE', 'Kommentare für diesen Eintrag nicht mehr zulassen');
+@define('COMMENTS_ENABLE', 'Kommentare für diesen Eintrag zulassen');
+@define('COMMENTS_CLOSED', 'Die Kommentarfunktion wurde vom Besitzer dieses Blogs in diesem Eintrag deaktiviert.');
+@define('COMMENT_NOT_ADDED', 'Dein Kommentar wurde nicht hinzugefügt, da der Eintrag geschlossen wurde. Klick %shier um zu den Kommentaren zurückzukehren%s und %shier um das Fenster zu schließen%s.');
@define('EMPTY_COMMENT', 'Dein Kommentar enthielt nichts, bitte %sgeh zurück%s und versuch\'s nochmal');
@define('ENTRIES_FOR', 'Einträge am %s');
@define('TOPICS_FOR', 'Themen am %s');
Index: serendipity_lang_en.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_lang_en.inc.php,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- serendipity_lang_en.inc.php 30 Sep 2003 00:36:42 -0000 1.42
+++ serendipity_lang_en.inc.php 13 Oct 2003 12:15:44 -0000 1.43
@@ -174,6 +174,10 @@
@define('TRACKBACK_SPECIFIC', 'Trackback specific URI for this entry');
@define('DIRECT_LINK', 'Direct link to this entry');
@define('COMMENT_ADDED', 'Your comment was successfully added. Click %shere to return%s to the comments, and %shere to close%s this window.');
+@define('COMMENT_NOT_ADDED', 'Your comment could not be added, because the comments are closed for this entry. Click %shere to return%s to the comments, and %shere to close%s this window.');
+@define('COMMENTS_DISABLE', 'Do not allow comments for this entry');
+@define('COMMENTS_ENABLE', 'Allow comments for this entry');
+@define('COMMENTS_CLOSED', 'Comments have been closed by the blog-owner for this entry.');
@define('EMPTY_COMMENT', 'Your comment did not contain anything, please %sgo back%s and try again');
@define('ENTRIES_FOR', 'Entries for %s');
@define('TOPICS_FOR', 'Topics for %s');
Index: serendipity_admin_entries.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_admin_entries.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- serendipity_admin_entries.inc.php 18 Sep 2003 12:58:00 -0000 1.12
+++ serendipity_admin_entries.inc.php 13 Oct 2003 12:15:44 -0000 1.13
@@ -120,15 +120,19 @@
switch($serendipity['GET']['adminAction']) {
case 'save':
$entry = array(
- 'id' => $serendipity['POST']['id'],
- 'title' => $serendipity['POST']['title'],
- 'timestamp' => $serendipity['POST']['timestamp'],
- 'body' => $serendipity['POST']['body'],
- 'extended' => $serendipity['POST']['extended'],
- 'categoryid' => $serendipity['POST']['categoryid'],
- 'isdraft' => $serendipity['POST']['isdraft']
- );
+ 'id' => $serendipity['POST']['id'],
+ 'title' => $serendipity['POST']['title'],
+ 'timestamp' => $serendipity['POST']['timestamp'],
+ 'body' => $serendipity['POST']['body'],
+ 'extended' => $serendipity['POST']['extended'],
+ 'categoryid' => $serendipity['POST']['categoryid'],
+ 'isdraft' => $serendipity['POST']['isdraft'],
+ 'allow_comments' => $serendipity['POST']['allow_comments']
+ );
+ if ($entry['allow_comments'] != 'true' && $entry['allow_comments'] !== true) {
+ $entry['allow_comments'] = 'false';
+ }
// Check if the user changed the timestamp.
if (isset($serendipity['allowDateManipulation']) && $serendipity['allowDateManipulation'] && isset($serendipity['POST']['new_timestamp']) && $serendipity['POST']['new_timestamp'] != date(DATE_FORMAT_2, $serendipity['POST']['chk_timestamp'])) {
Index: serendipity_admin_image_selector.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_admin_image_selector.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- serendipity_admin_image_selector.php 1 Oct 2003 11:38:22 -0000 1.12
+++ serendipity_admin_image_selector.php 13 Oct 2003 12:15:44 -0000 1.13
@@ -30,7 +30,7 @@
if ($start > 0) {
$left = '<input type="button" value="<<<" onClick="location.href=\'?serendipity[start]=' . max(0, $start - $inc) . '&serendipity[end]=' . $start . '\';">' . "\n";
}
-
+
if (count($serendipity["imageList"]) > $end) {
$right = '<input type="button" value=">>>" onClick="location.href=\'?serendipity[start]=' . $end . '&serendipity[end]=' . ($end + $inc) . '\';">' . "\n";
}
@@ -42,12 +42,12 @@
<td align="left" colspan="<?php echo floor($linebreak/2); ?>">
<?php echo $left; ?>
</td>
-
+
<td align="right" colspan="<?php echo ceil($linebreak/2); ?>">
<?php echo $right; ?>
</td>
</tr>
-
+
<tr>
<?php
for ($x=0; $x<count($files); $x++) {
@@ -77,7 +77,7 @@
<td align="left" colspan="<?php echo floor($linebreak/2); ?>">
<?php echo $left; ?>
</td>
-
+
<td align="right" colspan="<?php echo ceil($linebreak/2); ?>">
<?php echo $right; ?>
</td>
@@ -116,8 +116,8 @@
<b><?php echo IMAGE_SIZE; ?>:</b>
<br />
- <input type="radio" name="serendipity[linkThumbnail]" value="no" checked="checked" /><?php echo I_WANT_THUMB; ?><br />
- <input type="radio" name="serendipity[linkThumbnail]" value="yes" /><?php echo I_WANT_BIG_IMAGE; ?><br />
+ <input id="radio_link_no" type="radio" name="serendipity[linkThumbnail]" value="no" checked="checked" /><label for="radio_link_no"><?php echo I_WANT_THUMB; ?></label><br />
+ <input id="radio_link_yes" type="radio" name="serendipity[linkThumbnail]" value="yes" /><label for="radio_link_yes"><?php echo I_WANT_BIG_IMAGE; ?></label><br />
<br />
<b><?php echo IMAGE_ALIGNMENT; ?>:</b>
@@ -129,8 +129,8 @@
<b><?php echo IMAGE_AS_A_LINK; ?>:</b>
<br />
- <input type="radio" name="serendipity[isLink]" checked="checked" /> <?php echo I_WANT_NO_LINK; ?><br />
- <input type="radio" name="serendipity[isLink]" /> <?php echo I_WANT_IT_TO_LINK; ?>
+ <input id="radio_islink_yes" type="radio" name="serendipity[isLink]" checked="checked" /><label for="radio_islink_yes"> <?php echo I_WANT_NO_LINK; ?><br />
+ <input id="radio_islink_no" type="radio" name="serendipity[isLink]" /><label for="radio_islink_no"> <?php echo I_WANT_IT_TO_LINK; ?></label>
<input type="text" name="serendipity[url]" size="30" value="<?php echo $serendipity['serendipityHTTPPath'] . $serendipity['uploadPath'] . $serendipity['GET']['image']; ?>" onfocus="value='';" /><br />
<br />
@@ -146,14 +146,14 @@
if (!is_numeric($serendipity['GET']['start'])) {
$serendipity['GET']['start'] = 0;
}
-
+
if (!is_numeric($serendipity['GET']['end'])) {
$serendipity['GET']['end'] = $serendipity['GET']['start']+ floor(750/($serendipity['thumbSize']+20))*floor(580/($serendipity['thumbSize']+20));
}
?>
<b><?php echo SELECT_IMAGE; ?></b>
<br />
-
+
<?php echo CLICK_IMAGE_TO_INSERT; ?>
<br />
Index: serendipity_admin_installer.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_admin_installer.inc.php,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- serendipity_admin_installer.inc.php 5 Oct 2003 14:44:42 -0000 1.44
+++ serendipity_admin_installer.inc.php 13 Oct 2003 12:15:44 -0000 1.45
@@ -18,7 +18,7 @@
$port = $_SERVER['SERVER_PORT'];
return sprintf('http%s://%s%s%s',
-
+
$ssl ? 's' : '',
$_SERVER['HTTP_HOST'],
(($ssl && $port != 443) || (!$ssl && $port != 80)) ? (':' . $port) : '',
@@ -102,10 +102,10 @@
function serendipity_guessInput($type, $name, $value='', $default='') {
switch ($type) {
case 'bool' :
- echo '<input type="radio" name="' . $name . '" value="true" ';
- echo (($default == true) ? 'checked="checked"' : ''). ' /> ' . YES . ' ';
- echo '<input type="radio" name="' . $name . '" value="false" ';
- echo (($default == true) ? '' : 'checked="checked"'). ' /> ' . NO;
+ echo '<input id="radio_cfg_' . $name . '_yes" type="radio" name="' . $name . '" value="true" ';
+ echo (($default == true) ? 'checked="checked"' : ''). ' /><label for="radio_cfg_' . $name . '_yes"> ' . YES . '</label> ';
+ echo '<input id="radio_cfg_' . $name . '_yes" type="radio" name="' . $name . '" value="false" ';
+ echo (($default == true) ? '' : 'checked="checked"'). ' /><label for="radio_cfg_' . $name . '_yes"> ' . NO . '</label>';
break;
case 'protected' :
@@ -279,7 +279,7 @@
$serendipity['dbType'] = $_POST['dbType'];
// Probe database
- // (do it after the dir stuff, as we need to be able to create the sqlite database)
+ // (do it after the dir stuff, as we need to be able to create the sqlite database)
if ( @include_once($_POST['serendipityPath'] . '/serendipity_db.inc.php') ) {
serendipity_db_probe($_POST, $errs);
}
@@ -497,9 +497,9 @@
if ( !eregi('apache', $_SERVER['SERVER_SOFTWARE']) ) {
echo '<br /><font color="#FF000">WARNING!<br />You are about to attempt to install Serendipity on a non-apache webserver.<br />Serendipity requires the Apache Werbserver to function correctly!</font>';
}
-
+
define('VERSION_REQUIRED', '4.2.1');
-
+
/* Do check for required PHP version */
if ( version_compare(PHP_VERSION, VERSION_REQUIRED) == -1 ) {
echo '<br /><font color="#FF0000">WARNING!<br />You are using PHP version '. PHP_VERSION .'! Serendipity requires version '. VERSION_REQUIRED .'</font>';
Index: serendipity_config.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_config.inc.php,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- serendipity_config.inc.php 10 Oct 2003 15:02:53 -0000 1.36
+++ serendipity_config.inc.php 13 Oct 2003 12:15:44 -0000 1.37
@@ -13,8 +13,14 @@
$serendipity['production'] = 1;
$serendipity['rewrite'] = true;
-/*
- * Load main language file
+// Can the user change the date of publishing for an entry?
+$serendipity['allowDateManipulation'] = true;
+
+// Is the possibility to comment and entry enabled by default?
+$serendipity['allowCommentsDefault'] = true;
+
+/*
+ * Load main language file
*/
include('serendipity_lang.inc.php');
@@ -58,8 +64,8 @@
/* fixme: temp. workaround */
$serendipity['CONFIG'][$row['name']] = $row['value'];
- /*
- * Convert 'true' and 'false' into booleans
+ /*
+ * Convert 'true' and 'false' into booleans
*/
if ( isset($translation[$row['value']]) ) {
$row['value'] = $translation[$row['value']];
@@ -67,8 +73,8 @@
$serendipity[$row['name']] = $row['value'];
}
-/*
- * Load main language file again, because now we have the preferred language
+/*
+ * Load main language file again, because now we have the preferred language
*/
include($serendipity['serendipityPath'] .'serendipity_lang.inc.php');
Index: compat.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/compat.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- compat.php 10 Oct 2003 15:02:53 -0000 1.7
+++ compat.php 13 Oct 2003 12:15:44 -0000 1.8
@@ -58,6 +58,7 @@
if (@count($_REQUEST)) {
array_walk($_REQUEST, 'serendipity_strip_quotes');
}
+
if (@count($_GET)) {
array_walk($_GET, 'serendipity_strip_quotes');
}
@@ -88,7 +89,6 @@
$serendipity['templatePath'] = 'templates/';
$serendipity['serendipityPath'] = './';
$serendipity['indexFile'] = 'index.php';
-$serendipity['allowDateManipulation'] = true;
/* vim: set sts=4 ts=4 expandtab : */
?>
|