Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1:/tmp/cvs-serv30357
Modified Files:
NEWS comment.php db.sql serendipity_functions.inc.php
Added Files:
db_update-0.3-0.4.sql
Log Message:
* Added ability to close (and re-open) comments for certain entries [needs DB update!]
* Labels for radio buttons/checkboxes
* Minor XHTML compliance
--- NEW FILE: db_update-0.3-0.4.sql ---
ALTER TABLE serendipity_entries ADD COLUMN allow_comments ENUM('true', 'false') NOT NULL DEFAULT 'true' AFTER isdraft;
/* ENUM('true', 'false') NOT NULL DEFAULT 'true'
should be replaced by BOOLEAN NOT NULL for postgresql */
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- NEWS 10 Oct 2003 15:06:23 -0000 1.33
+++ NEWS 13 Oct 2003 12:15:07 -0000 1.34
@@ -2,6 +2,13 @@
Version 0.4 ()
------------------------------------
+ * Added ability to close (and re-open) comments for certain entries [needs DB update!] (garvinhicking)
+ * Fixes for comments-plugin (for 0 comments, dateformat) (tomsommer)
+ * Fixes for mt-XMLRPC api (gschlossnagle)
+ * Fixed embed-check for more strict type comparison (garvinhicking)
+ * Minor bugfix for HTML-code in the new entry form (garvinhicking)
+ * Relative links inside the RSS-feed will get converted to absolute ones (garvinhicking)
+ * Added labels for checkboxes for better accessibility (garvinhicking)
* Fixed trackbacks sending HTML tags and registering unslashed text in excerpt (tomsommer)
* Fix bug #816499 - Serendipity should search for `convert` binary in /usr/bin (tomsommer)
* Corrected path to entries printed in the comment plugin (tomsommer)
Index: comment.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/comment.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- comment.php 10 Oct 2003 15:02:53 -0000 1.23
+++ comment.php 13 Oct 2003 12:15:08 -0000 1.24
@@ -3,10 +3,14 @@
session_start();
include_once('serendipity_config.inc.php');
-if ( isset($serendipity['GET']['delete'], $serendipity['GET']['entry'],$serendipity['GET']['type']) ) {
+if (isset($serendipity['GET']['delete'], $serendipity['GET']['entry'], $serendipity['GET']['type'])) {
serendipity_deleteComment($serendipity['GET']['delete'], $serendipity['GET']['entry'], $serendipity['GET']['type']);
}
+if (isset($serendipity['GET']['switch'], $serendipity['GET']['entry'])) {
+ serendipity_allowCommentsToggle($serendipity['GET']['entry'], $serendipity['GET']['switch']);
+}
+
/* It's time to finally check if we need to remember the entered information,
the reason we are doing this up here, is because we want to send cookie-headers */
if ( isset($serendipity['POST']['remember']) ) {
@@ -31,7 +35,7 @@
} else if (preg_match('@\/(\d+)$@', $uri, $matches)) {
$id = $matches[1];
}
-
+
if (add_trackback($id, $_REQUEST['title'], $_REQUEST['url'],
$_REQUEST['blog_name'], $_REQUEST['excerpt'])) {
report_trackback_success();
@@ -77,7 +81,7 @@
<dl>
<dt><b><?php echo TRACKBACK_SPECIFIC; ?>:</b><br /></dt>
<dd><a href="<?php echo $tbu; ?>"><?php echo $tbu; ?></a><br /></dd>
-
+
<dt><b><?php echo DIRECT_LINK; ?>:</b><br /></dt>
<dd><a href="<?php echo $entry; ?>"><?php echo $entry; ?></a></dd>
</dl>
@@ -87,12 +91,18 @@
?>
<div class="serendipity_commentsTitle"><?php echo COMMENTS; ?></div>
<?php
- serendipity_printComments(serendipity_fetchComments($id));
+ $query = "SELECT allow_comments FROM {$serendipity['dbPrefix']}entries WHERE id = '$id'";
+ $ca = serendipity_db_query($query, true);
+
+ serendipity_printComments(serendipity_fetchComments($id), (isset($ca['allow_comments']) ? $ca['allow_comments'] : true));
+
+ if ($ca['allow_comments'] === true || $ca['allow_comments'] == 'true' || !is_array($ca)) {
?>
<div class="serendipity_commentsTitle"><?php echo ADD_COMMENT; ?></div>
<?php
- serendipity_displayCommentForm($id);
+ serendipity_displayCommentForm($id);
+ }
}
} else {
$comment['url'] = $serendipity['POST']['url'];
@@ -101,19 +111,29 @@
$comment['email'] = $serendipity['POST']['email'];
$comment['subscribe'] = $serendipity['POST']['subscribe'];
if ( !empty($comment['comment']) ) {
- serendipity_saveComment($serendipity['POST']['entry_id'], $comment, 'NORMAL');
- printf(
- COMMENT_ADDED,
-
- '<a href="' . $_SERVER['HTTP_REFERER'] . '">',
- '</a>',
- '<a href="#" onclick="self.close()">',
- '</a>'
- );
+ if (serendipity_saveComment($serendipity['POST']['entry_id'], $comment, 'NORMAL')) {
+ printf(
+ COMMENT_ADDED,
+
+ '<a href="' . $_SERVER['HTTP_REFERER'] . '">',
+ '</a>',
+ '<a href="#" onclick="self.close()">',
+ '</a>'
+ );
+ } else {
+ printf(
+ COMMENT_NOT_ADDED,
+
+ '<a href="' . $_SERVER['HTTP_REFERER'] . '">',
+ '</a>',
+ '<a href="#" onclick="self.close()">',
+ '</a>'
+ );
+ }
} else {
printf(
EMPTY_COMMENT,
-
+
'<a href="#" onclick="history.go(-1)">',
'</a>'
);
Index: db.sql
===================================================================
RCS file: /cvsroot/php-blog/serendipity/db.sql,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- db.sql 20 Sep 2003 03:43:56 -0000 1.23
+++ db.sql 13 Oct 2003 12:15:08 -0000 1.24
@@ -47,7 +47,8 @@
author varchar(20) default null,
authorid int(11) default null,
categoryid int(11) default null,
- isdraft {BOOLEAN}
+ isdraft {BOOLEAN},
+ allow_comments {BOOLEAN}
);
CREATE {FULLTEXT} INDEX entry on {PREFIX}entries (title,body,extended);
@@ -65,7 +66,7 @@
#
# Table structure for table '{PREFIX}exits'
-#
+#
CREATE TABLE {PREFIX}exits (
entry_id {AUTOINCREMENT},
@@ -81,17 +82,17 @@
#
# Table structure for table '{PREFIX}referrers'
-#
+#
CREATE TABLE {PREFIX}referrers (
entry_id {AUTOINCREMENT},
day date NOT NULL,
count int(11) NOT NULL default '0',
- scheme varchar(5),
- host varchar(128) NOT NULL,
+ scheme varchar(5),
+ host varchar(128) NOT NULL,
port varchar(5),
path varchar(255),
- query varchar(255),
+ query varchar(255),
PRIMARY KEY (host,day,entry_id)
);
@@ -116,11 +117,11 @@
CREATE TABLE {PREFIX}suppress (
ip varchar(15) default NULL,
- scheme varchar(5),
- host varchar(128),
+ scheme varchar(5),
+ host varchar(128),
port varchar(5),
path varchar(255),
- query varchar(255),
+ query varchar(255),
last timestamp NOT NULL
);
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.163
retrieving revision 1.164
diff -u -d -r1.163 -r1.164
--- serendipity_functions.inc.php 10 Oct 2003 15:11:15 -0000 1.163
+++ serendipity_functions.inc.php 13 Oct 2003 12:15:08 -0000 1.164
@@ -164,12 +164,12 @@
<tr>
<td> </td>
<td class="serendipity_commentsLabel">
- <input type="checkbox" name="serendipity[remember]" <?php echo $serendipity['COOKIE']['remember'] ; ?> /> <?php echo REMEMBER_INFO; ?>
+ <input id="checkbox_remember" type="checkbox" name="serendipity[remember]" <?php echo $serendipity['COOKIE']['remember'] ; ?> /><label for="checkbox_remember"> <?php echo REMEMBER_INFO; ?></label>
<?php
if ($serendipity['allowSubscriptions']) {
?>
<br />
- <input type="checkbox" name="serendipity[subscribe]" /> <?php echo SUBSCRIBE_TO_THIS_ENTRY; ?>
+ <input id="checkbox_subscribe" type="checkbox" name="serendipity[subscribe]" /><label for="checkbox_subscribe"> <?php echo SUBSCRIBE_TO_THIS_ENTRY; ?></label>
<?php
}
?>
@@ -709,17 +709,21 @@
<?php
echo ' ' . POSTED_BY . ' ' . htmlentities($entry['username']) . ($entry['category_name'] ? ' ' . IN . ' <a href="' . $serendipity['serendipityHTTPPath'] . 'categories/' . $entry['categoryid'] . '_' . serendipity_makeFilename($entry['category_name']) . '">' . $entry['category_name'] . '</a> ' : ' ') . AT . ' <a href="' . $entryLink . '">' . date('H:i', $entry['timestamp']) . '</a>'. "\n";
- if (!isset($serendipity['GET']['id'])) {
- $label = $entry['comments'] == 1 ? COMMENT : COMMENTS;
- echo ' | <a href="' . $serendipity['serendipityHTTPPath'] . 'comment.php?serendipity[entry_id]=' . $entry['id'] . '&serendipity[type]=comments"';
- echo ' onClick="window.open(this.href, \'comments\', \'width=480,height=480,scrollbars=yes\'); return false;">';
- echo $label . ' (' . $entry['comments'] . ')</a>';
+ if ($entry['allow_comments'] === true || $entry['allow_comments'] == 'true' || !isset($entry['allow_comments']) || $entry['comments'] > 0) {
+ if (!isset($serendipity['GET']['id'])) {
+ $label = $entry['comments'] == 1 ? COMMENT : COMMENTS;
+ echo ' | <a href="' . $serendipity['serendipityHTTPPath'] . 'comment.php?serendipity[entry_id]=' . $entry['id'] . '&serendipity[type]=comments"';
+ echo ' onClick="window.open(this.href, \'comments\', \'width=480,height=480,scrollbars=yes\'); return false;">';
+ echo $label . '(' . $entry['comments'] . ')</a>';
+ }
}
- $label = $entry['trackbacks'] == 1 ? TRACKBACK : TRACKBACKS;
- echo ' | <a href="' . $serendipity['serendipityHTTPPath'] . 'comment.php?serendipity[entry_id]=' . $entry['id'] . '&serendipity[type]=trackbacks"';
- echo ' onClick="window.open(this.href, \'comments\', \'width=480,height=480,scrollbars=yes\'); return false;">';
- echo $label . ' (' . $entry['trackbacks'] . ')</a>';
+ if ($entry['allow_comments'] === true || $entry['allow_comments'] == 'true' || !isset($entry['allow_comments']) || $entry['trackbacks'] > 0) {
+ $label = $entry['trackbacks'] == 1 ? TRACKBACK : TRACKBACKS;
+ echo ' | <a href="' . $serendipity['serendipityHTTPPath'] . 'comment.php?serendipity[entry_id]=' . $entry['id'] . '&serendipity[type]=trackbacks"';
+ echo ' onClick="window.open(this.href, \'comments\', \'width=480,height=480,scrollbars=yes\'); return false;">';
+ echo $label . ' (' . $entry['trackbacks'] . ')</a>';
+ }
?>
</div>
@@ -743,17 +747,24 @@
<div class="serendipity_commentsTitle"><?php echo COMMENTS; ?></div>
<?php
- if (preg_match('@/unsubscribe/(.*)/([0-9]+)@', $_SERVER['REQUEST_URI'], $res)) {
- echo '<div align="center" style="color: #FF0000; font-weight: bold;">'. sprintf(UNSUBSCRIBE_OK, urldecode($res[1])) .'</div><br />';
- }
+ if (preg_match('@/unsubscribe/(.*)/([0-9]+)@', $_SERVER['REQUEST_URI'], $res)) {
+ echo '<div align="center" style="color: #FF0000; font-weight: bold;">'. sprintf(UNSUBSCRIBE_OK, urldecode($res[1])) .'</div><br />';
+ }
- echo serendipity_printComments(serendipity_fetchComments($entry['id']));
+ echo serendipity_printComments(serendipity_fetchComments($entry['id']), (isset($entry['allow_comments']) ? $entry['allow_comments'] : true));
+ if ($entry['allow_comments'] === true || $entry['allow_comments'] == 'true' || !isset($entry['allow_comments'])) {
?>
<br />
<div class="serendipity_commentsTitle"><?php echo ADD_COMMENT; ?></div>
<?php echo serendipity_displayCommentForm($entry['id']); ?>
<?php
+ } else {
+?>
+ <br />
+ <div class="serendipity_comment_source"><?php echo COMMENTS_CLOSED; ?></div>
+<?php
+ }
}
?>
</div>
@@ -799,6 +810,18 @@
}
}
+function serendipity_allowCommentsToggle($entry_id, $switch = 'disable') {
+ global $serendipity;
+
+ if ($_SESSION['serendipityAuthedUser'] === true ) {
+ $query = "UPDATE {$serendipity['dbPrefix']}entries SET allow_comments = '" . ($switch == 'disable' ? 'false' : 'true') . "' WHERE id = $entry_id";
+ serendipity_db_query($query);
+ header('Location: '. $_SERVER['HTTP_REFERER']);
+ } else {
+ die('What are you up to? You need to be an admin to close comments');
+ }
+}
+
function serendipity_fetchComments($id, $limit = null, $order = '')
{
global $serendipity;
@@ -858,7 +881,7 @@
return $comments;
}
-function serendipity_printComments($comments)
+function serendipity_printComments($comments, $allow_comments = true)
{
global $serendipity;
?>
@@ -903,7 +926,7 @@
/* Show when the entry was made */
echo ' ' . ON . ' ' . date('M d, H:i', $comment['timestamp']);
- if ( $_SESSION['serendipityAuthedUser'] === true ) {
+ if ($_SESSION['serendipityAuthedUser'] === true) {
echo ' (<a href="' . $serendipity['baseURL'] . 'comment.php?serendipity[delete]=' . $comment['id'] . '&serendipity[entry]=' . $comment['entry_id'] . '&serendipity[type]=comments">' . DELETE . '</a>)';
}
?>
@@ -912,7 +935,16 @@
</div>
<br />
<?php
+ }
+
+ if ($_SESSION['serendipityAuthedUser'] === true) {
+ if ($allow_comments === true || $allow_comments == 'true') {
+ echo '<div class="serendipity_comment_source">(<a href="' . $serendipity['baseURL'] . 'comment.php?serendipity[switch]=disable&serendipity[entry]=' . $comment['entry_id'] . '">' . COMMENTS_DISABLE . '</a>)</div>';
+ } else {
+ echo '<div class="serendipity_comment_source">(<a href="' . $serendipity['baseURL'] . 'comment.php?serendipity[switch]=enable&serendipity[entry]=' . $comment['entry_id'] . '">' . COMMENTS_ENABLE . '</a>)</div>';
}
+ echo '<br />';
+ }
}
function serendipity_printTrackbacks($comments)
@@ -963,44 +995,52 @@
function serendipity_saveComment($id, $commentInfo, $type = 'NORMAL') {
global $serendipity;
- $title = serendipity_db_escape_string($commentInfo['title']);
- $comments = $commentInfo['comment'];
- $commentsFixed = serendipity_db_escape_string($commentInfo['comment']);
- $name = serendipity_db_escape_string($commentInfo['name']);
- $url = serendipity_db_escape_string($commentInfo['url']);
- $email = serendipity_db_escape_string($commentInfo['email']);
+ $query = "SELECT allow_comments FROM {$serendipity['dbPrefix']}entries WHERE id = '$id'";
+ $ca = serendipity_db_query($query, true);
- if (isset($commentInfo['subscribe'])) {
- $subscribe = 'true';
- } else {
- $subscribe = 'false';
- }
+ if ($ca['allow_comments'] === true || $ca['allow_comments'] == 'true' || !is_array($ca)) {
+ $title = serendipity_db_escape_string($commentInfo['title']);
+ $comments = $commentInfo['comment'];
+ $commentsFixed = serendipity_db_escape_string($commentInfo['comment']);
+ $name = serendipity_db_escape_string($commentInfo['name']);
+ $url = serendipity_db_escape_string($commentInfo['url']);
+ $email = serendipity_db_escape_string($commentInfo['email']);
- $t = time();
- $query = "INSERT INTO {$serendipity['dbPrefix']}comments (entry_id, author, email, url, body, type, timestamp, title, subscribed)";
- $query .= " VALUES ('$id', '$name', '$email', '$url', '$commentsFixed', '$type', '$t', '$title', '$subscribe')";
+ if (isset($commentInfo['subscribe'])) {
+ $subscribe = 'true';
+ } else {
+ $subscribe = 'false';
+ }
- serendipity_db_query($query);
+ $t = time();
+ $query = "INSERT INTO {$serendipity['dbPrefix']}comments (entry_id, author, email, url, body, type, timestamp, title, subscribed)";
+ $query .= " VALUES ('$id', '$name', '$email', '$url', '$commentsFixed', '$type', '$t', '$title', '$subscribe')";
- $field = ($type == 'NORMAL' ? 'comments' : 'trackbacks');
- $query = "UPDATE {$serendipity['dbPrefix']}entries SET $field=$field+1 WHERE id='$id'";
- serendipity_db_query($query);
+ serendipity_db_query($query);
- $query = "SELECT email, title, mail_comments
- FROM {$serendipity['dbPrefix']}entries e, {$serendipity['dbPrefix']}authors a
- WHERE e.id = '$id'
- AND e.authorid = a.authorid";
- $row = serendipity_db_query($query, true);
+ $field = ($type == 'NORMAL' ? 'comments' : 'trackbacks');
+ $query = "UPDATE {$serendipity['dbPrefix']}entries SET $field=$field+1 WHERE id='$id'";
+ serendipity_db_query($query);
- if ($row['mail_comments']) {
- serendipity_sendComment($row['email'], $name, $email, $url, $id, $row['title'], $comments, $type);
- }
+ $query = "SELECT email, title, mail_comments
+ FROM {$serendipity['dbPrefix']}entries e, {$serendipity['dbPrefix']}authors a
+ WHERE e.id = '$id'
+ AND e.authorid = a.authorid";
+ $row = serendipity_db_query($query, true);
- if ($serendipity['allowSubscriptions']) {
- serendipity_mailSubscribers($id, $name, $email, $row['title'], $row['email']);
- }
+ if ($row['mail_comments']) {
+ serendipity_sendComment($row['email'], $name, $email, $url, $id, $row['title'], $comments, $type);
+ }
- serendipity_purgeEntry($id, $t);
+ if ($serendipity['allowSubscriptions']) {
+ serendipity_mailSubscribers($id, $name, $email, $row['title'], $row['email']);
+ }
+
+ serendipity_purgeEntry($id, $t);
+ return true;
+ } else {
+ return false;
+ }
}
function serendipity_mailSubscribers($entry_id, $poster, $posterMail, $title, $fromEmail = 'no...@ex...') {
@@ -1125,11 +1165,10 @@
} else {
$ext = '';
}
-
+
// Do some relative -> absolute URI replacing magic. Replaces all HREF/SRC (<a>, <img>, ...) references to only the serendipitypath with the full baseURL URI
- // garvin: As this could introduce some problems, this is commented out right now.
- // TODO: ACTIVATE FOR 0.4 RELEASE!
- // $entry['body'] = preg_replace('@(href|src)=("|\')(' . preg_quote($serendipity['serendipityHTTPPath']) . ')(.*)("|\')( |>)@imsU', '\1=\2' . $serendipity['baseURL'] . '\4\2\6', $entry['body']);
+ // garvin: Could impose some problems. Closely watch this one.
+ $entry['body'] = preg_replace('@(href|src)=("|\')(' . preg_quote($serendipity['serendipityHTTPPath']) . ')(.*)("|\')( |>)@imsU', '\1=\2' . $serendipity['baseURL'] . '\4\2\6', $entry['body']);
?>
<item>
<title><?php echo utf8_encode(htmlspecialchars($entry['title'])); ?></title>
@@ -1482,7 +1521,7 @@
. '&title=' . rawurlencode($title)
. '&blog_name=' . rawurlencode($author)
. '&excerpt=' . rawurlencode(strip_tags($text));
-
+
$response = serendipity_trackback_is_success(_serendipity_send($matches[2], $data));
return $response;
}
@@ -1693,7 +1732,7 @@
$res = serendipity_db_insert('entries', $entry);
- if ($res)
+ if ($res)
$entry['id'] = serendipity_db_insert_id();
else {
//Some error message here
@@ -1924,9 +1963,17 @@
$draftP = '';
if (isset($entry['isdraft']) && $entry['isdraft'] == 'true') {
- $draftD = ' SELECTED';
+ $draftD = ' selected="selected"';
} else {
- $draftP = ' SELECTED';
+ $draftP = ' selected="selected"';
+ }
+
+ if (isset($entry['allow_comments']) && ($entry['allow_comments'] == 'true' || $entry['allow_comments'] === true)) {
+ $allow_comments = ' checked="checked"';
+ } elseif ($entry['allow_comments'] != 'false' && $entry['allow_comments'] !== 'false' && ($serendipity['allowCommentsDefault'] == 'true' || $serendipity['allowCommentsDefault'] === true)) {
+ $allow_comments = ' checked="checked"';
+ } else {
+ $allow_comments = '';
}
$n = "\n";
@@ -1965,7 +2012,7 @@
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td><input type="text" name="serendipity[title]" value="<?php echo isset($entry['title']) ? htmlentities($entry['title']) : ''; ?>" size="72" /></td>
- <td align="right align="right""><select name="serendipity[isdraft]">
+ <td align="right"><select name="serendipity[isdraft]">
<option value="false" <?php echo $draftP; ?>><?php echo PUBLISH; ?></option>
<option value="true" <?php echo $draftD; ?>><?php echo DRAFT; ?></option>
</select>
@@ -1990,7 +2037,7 @@
} else {
?>
<td align="right" colspan="3">
-<?php
+<?php
}
?>
<b><?php echo CATEGORY; ?></b> <?php echo $cat_list ; ?></td>
@@ -2011,7 +2058,7 @@
<input type="button" name="insJ" value="img" accesskey="j" onClick="wrapInsImage(document.forms['serendipityEntry']['serendipity[body]'])" />
<input type="button" name="insImage" value="<?php echo IMAGE ; ?>" style="" onClick="window.open('serendipity_admin_image_selector.php', 'ImageSel', 'width=800, height=600, toolbar=no');" />
<input type="button" name="insU" value="URL" accesskey="l" style="color: blue; text-decoration: underline;" onClick="wrapSelectionWithLink(document.forms['serendipityEntry']['serendipity[body]'])" />
-<?php
+<?php
/* Do the "old" non-WYSIWYG editor */
} elseif (!$serendipity['wysiwyg']) { ?>
<input type="button" value=" B " onClick="serendipity_insBasic(document.forms['serendipityEntry']['serendipity[body]'], 'b')">
@@ -2020,7 +2067,7 @@
<input type="button" value="<img>" onClick="serendipity_insImage(document.forms['serendipityEntry']['serendipity[body]'])">
<input type="button" value="<?php echo IMAGE; ?>" onClick="window.open('serendipity_admin_image_selector.php', 'ImageSel', 'width=800,height=600,toolbar=no');">
<input type="button" value="Link" onClick="serendipity_insLink(document.forms['serendipityEntry']['serendipity[body]'])">
-<?php }
+<?php }
} else {
?>
<td colspan="3"><b><?php echo ENTRY_BODY; ?></b>
@@ -2036,9 +2083,19 @@
</tr>
<tr>
- <td colspan="3" align="right">
- <input type="button" value="- <?php echo PREVIEW; ?> -" style="font-weight: bold;" onClick="document.forms['serendipityEntry'].elements['serendipity[preview]'].value='true'; document.forms['serendipityEntry'].submit();"/>
- <input type="submit" value="- <?php echo SAVE; ?> -" style="font-weight: bold;" />
+ <td colspan="3">
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <tr>
+ <td align="left">
+ <input id="checkbox_allow_comments" type="checkbox" name="serendipity[allow_comments]" value="true" <?php echo $allow_comments; ?> /><label for="checkbox_allow_comments"><?php echo COMMENTS_ENABLE; ?></label>
+ </td>
+
+ <td align="right">
+ <input type="button" value="- <?php echo PREVIEW; ?> -" style="font-weight: bold;" onClick="document.forms['serendipityEntry'].elements['serendipity[preview]'].value='true'; document.forms['serendipityEntry'].submit();" />
+ <input type="submit" value="- <?php echo SAVE; ?> -" style="font-weight: bold;" />
+ </td>
+ </tr>
+ </table>
</td>
</tr>
|