Update of /cvsroot/php-blog/serendipity/plugins/serendipity_event_karma
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5906
Modified Files:
serendipity_event_karma.php
Log Message:
hide links. don't want no HTML spiders like googlebot push our votes :)
Index: serendipity_event_karma.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/plugins/serendipity_event_karma/serendipity_event_karma.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- serendipity_event_karma.php 27 May 2004 12:12:58 -0000 1.3
+++ serendipity_event_karma.php 27 May 2004 16:51:08 -0000 1.4
@@ -297,11 +297,9 @@
$now
);
$sql = serendipity_db_query($q);
- /*
if (is_string($sql)) {
- echo $q . '<br />' . $sql . '<br />';
+
}
- */
}
$karma[$this->karmaId] = $this->karmaVoting;
@@ -372,13 +370,7 @@
$msg = '<div class="serendipity_karmaVoting serendipity_karmaError"><a id="karma_vote' . $this->karmaId . '"></a>' . PLUGIN_KARMA_INVALID . '</div>';
}
- case 'voted':
- if (!isset($msg)) {
- $msg = '<div class="serendipity_karmaVoting serendipity_karmaSuccess"><a id="karma_vote' . $this->karmaId . '"></a>' . sprintf(PLUGIN_KARMA_VOTED, $this->karmaVoting) . '</div>';
- }
-
/* OUTPUT MESSAGE */
-
if ($addData['extended']) {
$eventData[0]['extended'] .= $msg;
} else {
@@ -392,6 +384,7 @@
}
break;
+ case 'voted':
default:
$karmatime = $this->get_config('max_karmatime', 7);
$max_karmatime = $karmatime * 24 * 60 * 60;
@@ -400,11 +393,11 @@
$url = $_SERVER['REQUEST_URI'] . (stristr($_SERVER['REQUEST_URI'], '?') ? '&' : '?');
$karma = (isset($serendipity['COOKIE']['karmaVote']) ? unserialize($serendipity['COOKIE']['karmaVote']) : array());
- $link_1 = '<a class="serendipity_karmaVoting_link1" href="' . $url . 'serendipity[karmaVote]=2&serendipity[karmaId]=%1$s#karma_vote%1$s" title="' . sprintf(PLUGIN_KARMA_RATE, PLUGIN_KARMA_VOTEPOINT_1) . '">++</a>';
- $link_2 = '<a class="serendipity_karmaVoting_link2" href="' . $url . 'serendipity[karmaVote]=1&serendipity[karmaId]=%1$s#karma_vote%1$s" title="' . sprintf(PLUGIN_KARMA_RATE, PLUGIN_KARMA_VOTEPOINT_2) . '">+</a>';
- $link_3 = '<a class="serendipity_karmaVoting_link3" href="' . $url . 'serendipity[karmaVote]=0&serendipity[karmaId]=%1$s#karma_vote%1$s" title="' . sprintf(PLUGIN_KARMA_RATE, PLUGIN_KARMA_VOTEPOINT_3) . '">0</a>';
- $link_4 = '<a class="serendipity_karmaVoting_link4" href="' . $url . 'serendipity[karmaVote]=-1&serendipity[karmaId]=%1$s#karma_vote%1$s" title="' . sprintf(PLUGIN_KARMA_RATE, PLUGIN_KARMA_VOTEPOINT_4) . '">-</a>';
- $link_5 = '<a class="serendipity_karmaVoting_link5" href="' . $url . 'serendipity[karmaVote]=-2&serendipity[karmaId]=%1$s#karma_vote%1$s" title="' . sprintf(PLUGIN_KARMA_RATE, PLUGIN_KARMA_VOTEPOINT_5) . '">--</a>';
+ $link_1 = '<a class="serendipity_karmaVoting_link1" href="#" onclick="javascript:location.href=\'' . $url . 'serendipity[karmaVote]=2&serendipity[karmaId]=%1$s#karma_vote%1$s\';" title="' . sprintf(PLUGIN_KARMA_RATE, PLUGIN_KARMA_VOTEPOINT_1) . '">++</a>';
+ $link_2 = '<a class="serendipity_karmaVoting_link2" href="#" onclick="javascript:location.href=\'' . $url . 'serendipity[karmaVote]=1&serendipity[karmaId]=%1$s#karma_vote%1$s\';" title="' . sprintf(PLUGIN_KARMA_RATE, PLUGIN_KARMA_VOTEPOINT_2) . '">+</a>';
+ $link_3 = '<a class="serendipity_karmaVoting_link3" href="#" onclick="javascript:location.href=\'' . $url . 'serendipity[karmaVote]=0&serendipity[karmaId]=%1$s#karma_vote%1$s\';" title="' . sprintf(PLUGIN_KARMA_RATE, PLUGIN_KARMA_VOTEPOINT_3) . '">0</a>';
+ $link_4 = '<a class="serendipity_karmaVoting_link4" href="#" onclick="javascript:location.href=\'' . $url . 'serendipity[karmaVote]=-1&serendipity[karmaId]=%1$s#karma_vote%1$s\';" title="' . sprintf(PLUGIN_KARMA_RATE, PLUGIN_KARMA_VOTEPOINT_4) . '">-</a>';
+ $link_5 = '<a class="serendipity_karmaVoting_link5" href="#" onclick="javascript:location.href=\'' . $url . 'serendipity[karmaVote]=-2&serendipity[karmaId]=%1$s#karma_vote%1$s\';" title="' . sprintf(PLUGIN_KARMA_RATE, PLUGIN_KARMA_VOTEPOINT_5) . '">--</a>';
$karma_voting = '
<br /><div class="serendipity_karmaVoting"><a id="karma_vote%1$s"></a>
|