Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19932
Modified Files:
NEWS serendipity_functions.inc.php serendipity_genpage.inc.php
Log Message:
XHTML fixes: Now my blog validates as XHTML 1.1 Strict (at least the
overview and detailed entry pane). :-)
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.300
retrieving revision 1.301
diff -u -d -r1.300 -r1.301
--- serendipity_functions.inc.php 21 Jun 2004 15:17:09 -0000 1.300
+++ serendipity_functions.inc.php 22 Jun 2004 10:07:32 -0000 1.301
@@ -82,7 +82,7 @@
<?php
if ( isset($serendipity['POST']['action']) && !serendipity_userLoggedIn() ) {
?>
- <div align="center" style="color: #FF0000; font-weight: bold;"><?php echo WRONG_USERNAME_OR_PASSWORD; ?></div>
+ <div class="serendipity_center" style="color: #FF0000; font-weight: bold;"><?php echo WRONG_USERNAME_OR_PASSWORD; ?></div>
<?php
}
?>
@@ -223,8 +223,8 @@
}
?>
<div class="serendipityCommentForm">
- <a name="serendipity_CommentForm"></a>
- <form <?php echo ($serendipity['XHTML11'] ? 'id' : 'name'); ?>="serendipity_comment" action="<?php echo $url; ?>" method="post" onsubmit="if (document.getElementById('serendipity_remember') && document.getElementById('serendipity_remember').checked) rememberMe(this, '<?php echo $_SERVER['HTTP_HOST']; ?>')">
+ <a <?php echo ($serendipity['XHTML11'] ? 'id' : 'name'); ?>="serendipity_CommentForm"></a>
+ <form <?php echo ($serendipity['XHTML11'] ? 'id' : 'name'); ?>="serendipity_comment" action="<?php echo $url; ?>" method="post">
<div><input type="hidden" name="serendipity[entry_id]" value="<?php echo $id; ?>" /></div>
<table border="0" width="100%" cellpadding="3">
<tr>
@@ -1122,7 +1122,7 @@
}
}
?>
- <span class="<?php echo $extended_css; ?>"><?php echo $entry['body']; ?></span>
+ <div class="<?php echo $extended_css; ?>"><?php echo $entry['body']; ?></div>
<?php echo $html_extended; ?>
<div class='serendipity_entryFooter'>
@@ -1186,13 +1186,12 @@
<?php
if (isset($serendipity['GET']['id'])) {
?>
- <span class="serendipity_comments">
- <link rel="pingback" href="<?php echo $serendipity['baseURL']; ?>comment.php?type=pingback&entry_id=<?php echo $entry['id']; ?>" />
+ <div class="serendipity_comments">
<br />
<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 />';
+ echo '<div class="serendipity_center" style="color: #FF0000; font-weight: bold;">'. sprintf(UNSUBSCRIBE_OK, urldecode($res[1])) .'</div><br />';
}
echo serendipity_printComments(serendipity_fetchComments($entry['id']), (isset($entry['allow_comments']) ? $entry['allow_comments'] : true));
@@ -1236,11 +1235,11 @@
} else {
?>
<br />
- <div style="color: #FF0000" align="center"><?php echo COMMENTS_CLOSED; ?></div>
+ <div class="serendipity_center" style="color: #FF0000"><?php echo COMMENTS_CLOSED; ?></div>
<?php
}
?>
- </span>
+ </div>
<?php
}
?>
@@ -1379,7 +1378,7 @@
$comments = serendipity_fetchComments($id);
}
- $retval = $parent ? '' : '<select id="serendipity[replyTo]" name="serendipity[replyTo]"><option value="0">[ ' . TOP_LEVEL . ' ]</option>';
+ $retval = $parent ? '' : '<select id="serendipity_replyTo" name="serendipity_replyTo"><option value="0">[ ' . TOP_LEVEL . ' ]</option>';
$i = 0;
foreach ($comments as $comment) {
if ($comment['parent_id'] == $parent) {
@@ -1401,7 +1400,7 @@
<?php
if (!count($comments) && !$parentid) {
?>
- <div align="center"><?php echo NO_COMMENTS; ?></div>
+ <div class="serendipity_center"><?php echo NO_COMMENTS; ?></div>
<?php
}
@@ -1453,7 +1452,7 @@
}
/* Allow people to easily reply to this comment */
- echo ' <a href="#serendipity_CommentForm" onclick="document.getElementById(\'serendipity[replyTo]\').value=\'' . $comment['id'] . '\';">' . REPLY . '</a>';
+ echo ' <a href="#serendipity_CommentForm" onclick="document.getElementById(\'serendipity_replyTo\').value=\'' . $comment['id'] . '\';">' . REPLY . '</a>';
?>
</div>
@@ -1720,7 +1719,7 @@
static $p = array(
'/\&([\s\<])/', // ampersand followed by whitespace or tag
'/\&$/', // ampersand at end of body
- '/<(b|h)r([^\/>]*)>/i', // unclosed br tag - attributes included
+ '/<(br|hr|img)([^\/>]*)>/i', // unclosed br tag - attributes included
);
static $r = array(
Index: serendipity_genpage.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_genpage.inc.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- serendipity_genpage.inc.php 2 May 2004 20:49:59 -0000 1.28
+++ serendipity_genpage.inc.php 22 Jun 2004 10:07:32 -0000 1.29
@@ -21,13 +21,12 @@
<link rel="stylesheet" type="text/css" href="<?php echo $serendipity['serendipityHTTPPath']; ?>serendipity.css.php" />
<link rel="alternate" type="application/rss+xml" title="RSS" href="<?php echo $serendipity['baseURL'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : ''); ?>feeds/index.rss2" />
<link rel="alternate" type="application/x.atom+xml" title="Atom" href="<?php echo $serendipity['baseURL'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : ''); ?>feeds/atom.xml" />
-<?php
- if (strtolower($serendipity['extCSS'])!='none') {
-?>
+<?php if (strtolower($serendipity['extCSS'])!='none') { ?>
<style type="text/css">@import "<?php echo $serendipity['extCSS']; ?>";</style>
-<?php
- }
-?>
+<?php }
+ if (isset($serendipity['GET']['id']) && is_numeric($serendipity['GET']['id'])) { ?>
+ <link rel="pingback" href="<?php echo $serendipity['baseURL']; ?>comment.php?type=pingback&entry_id=<?php echo $serendipity['GET']['id']; ?>" />
+<?php } ?>
</head>
<body>
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -d -r1.156 -r1.157
--- NEWS 21 Jun 2004 15:15:38 -0000 1.156
+++ NEWS 22 Jun 2004 10:07:31 -0000 1.157
@@ -3,6 +3,18 @@
Version 0.7 ()
------------------------------------------------------------------------
+ * Remaining XHTML 1.1 issues fixed:
+ - Use <div> instead of <span> for entry's contents.
+ - Removed obsolete javascript-function for comments
+ - Removed 'align' attribute from <div> tags, replaced with new
+ CSS class 'serendipity_align'
+ - Show the pingback-link element in the HEAD area. Embedded blogs
+ need to do that on their own.
+ - New plugin 'serendipity_event_xhtmlcleanup' to correct most
+ common XHTML errors (unclosed single tags, missing 'alt'
+ attribute, unescaped ampersands)
+ (garvinhicking)
+
* SQLite support now works. (garvinhicking)
* Fixed Bug #963248 - Calendar cannot calculate LastRow CSS class if
|