Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8379
Modified Files:
serendipity_functions.inc.php NEWS
Log Message:
URL comment redirection
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -d -r1.117 -r1.118
--- NEWS 6 May 2004 14:59:56 -0000 1.117
+++ NEWS 11 May 2004 12:08:04 -0000 1.118
@@ -3,6 +3,12 @@
Version 0.7 ()
------------------------------------------------------------------------
+ * Modified plugin 'serendipity_event_trackexits': New config
+ directive to deflect any links from commenting users using a
+ HTTP redirect. This destroys common search engine ranking and
+ will not benefit comment spammers. Notice that it also disables
+ the common linking to non-spammer authors, so use with caution.
+
* New plugin 'serendipity_plugin_remoterss' - Can display a foreign
remote feed. Results are cached for a custom period of time.
Contributed by Udo Gerhards. (garvinhicking)
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.263
retrieving revision 1.264
diff -u -d -r1.263 -r1.264
--- serendipity_functions.inc.php 6 May 2004 10:40:57 -0000 1.263
+++ serendipity_functions.inc.php 11 May 2004 12:08:03 -0000 1.264
@@ -1206,16 +1206,21 @@
$x = 0;
foreach ($comments as $comment) {
$x++;
+
+ $comment['comment'] = $comment['body'];
+ if (!empty($comment['url']) && substr($comment['url'], 0, 7) != 'http://') {
+ $comment['url'] = 'http://' . $comment['url'];
+ }
+
+ serendipity_plugin_api::hook_event('frontend_display', $comment);
+
/* Protect submitted mails against spam, by replacing @ with [at]*/
if (!empty($comment['email'])) {
$comment['email'] = str_replace('@', '[at]', $comment['email']);
}
$name = empty($comment['author']) ? ANONYMOUS : $comment['author'];
- $temp = array('comment' => htmlspecialchars(strip_tags($comment['body'])) );
- serendipity_plugin_api::hook_event('frontend_display', $temp);
- $body = $temp['comment'];
-
+ $body = htmlspecialchars(strip_tags($comment['comment']));
?>
<div class="serendipity_comment">
<a <?php echo ($serendipity['XHTML11'] ? 'id' : 'name'); ?>="c<?php echo $comment['id']; ?>"></a>
|