Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9712
Modified Files:
serendipity_functions.inc.php
Log Message:
This patch is incomplete, but works.
1. TRACKBACK_SPECIFIC is now no longer part of serendipity_commentsTitle,
which is good, because TRACKBACK_SPECIFIC is long, and commentsTitle is
large. Not a good combo.
2. This is the incomplete part: top_as_links is now also used to suppress
the (Link) display for comments. If set to false, the (Link) is no longer
show. So top_as_links should really be renamed comment_spam_nazi or
something like that, and should globally govern all settings to that user
supplied external links are no longer generated when set.
TODO:
- Rename option (I can do that).
- The text for the setting needs to be changed (I can do that for de and en).
- Migration code needed (Don't know how to do that).
- Are there more places where comment_spam_nazi would apply?
- Top Exits, Top Referrers
- (Link) in comments
- Referrer in per article link lists must not be a link
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.362
retrieving revision 1.363
diff -u -d -r1.362 -r1.363
--- serendipity_functions.inc.php 23 Jul 2004 18:56:37 -0000 1.362
+++ serendipity_functions.inc.php 25 Jul 2004 09:26:03 -0000 1.363
@@ -1306,8 +1306,8 @@
<div class="serendipity_comments">
<br />
<a id="trackbacks"></a>
- <div class="serendipity_commentsTitle"><?php echo TRACKBACKS; ?>
- (<a style="font-weight: normal" href="<?php echo $tbu; ?>" onClick="alert('<?php echo htmlentities(TRACKBACK_SPECIFIC_ON_CLICK) ?>'); return false;" title="<?php echo htmlentities(TRACKBACK_SPECIFIC_ON_CLICK) ?>"><?php echo TRACKBACK_SPECIFIC; ?></a>)</div>
+ <div class="serendipity_commentsTitle"><?php echo TRACKBACKS; ?></div>
+ (<a style="font-weight: normal" href="<?php echo $tbu; ?>" onClick="alert('<?php echo htmlentities(TRACKBACK_SPECIFIC_ON_CLICK) ?>'); return false;" title="<?php echo htmlentities(TRACKBACK_SPECIFIC_ON_CLICK) ?>"><?php echo TRACKBACK_SPECIFIC; ?></a>)<br />
<?php
serendipity_printTrackbacks(serendipity_fetchTrackbacks($entry['id']));
?>
@@ -1597,7 +1597,8 @@
}
/* Link to the user's website, if the URL is valid */
- if ((!isset($comment['type']) || $comment['type'] != 'trackback') && !empty($comment['url']) && $comment['url'] != 'http://' && eregi('^https?://', $comment['url'])) {
+ $showlink = serendipity_get_config_var('top_as_links', false, true);
+ if (($showlink === true) && (!isset($comment['type']) || $comment['type'] != 'trackback') && !empty($comment['url']) && $comment['url'] != 'http://' && eregi('^https?://', $comment['url'])) {
echo ' (<a href="' . str_replace('"', '"', $comment['url']) . '" ' . serendipity_xhtml_target('_blank') . ' title="' . htmlspecialchars($comment['url']) . '">Link</a>)';
}
|