去掉akismet的a标签避免误点

一般这个akismet的东东都是加在submit 按钮前面的,像我的博客,akismet状态正好显示在提交留言的按钮上面,有网友反映很容易误点,我自己也深有体会。于是修改之。也许有人会说,直接去掉它的相关信息显示不就得了,嗯 ,也行。我这里还是保留它的akismet字样吧,只把它的a标签修改为span标签即可:
顺便把这个东东从提交按钮那向右移动了N px , 这样避免喧兵夺主了。 :grin:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Counter for non-widget users
function akismet_counter() {
?>
<style type="text/css">
#akismetwrap {width:130px;margin-right:200px;float:right;margin-top:-5px;}
#akismetwrap #aka,#aka:link,#aka:hover,#aka:visited,#aka:active{color:#fff;text-decoration:none}
#aka:hover{border:none;text-decoration:none}
#aka:hover #akismet1{display:none}
#aka:hover #akismet2,#akismet1{display:block}
#akismet2{display:none;padding-top:2px}
#akismeta{font-size:16px;font-weight:bold;line-height:18px;text-decoration:none}
#akismetcount{display:block;font:15px Verdana,Arial,Sans-Serif;font-weight:bold;text-decoration:none}
#akismetwrap #akismetstats{background:url(<?php echo get_option('siteurl'); ?>/wp-content/plugins/akismet/akismet.gif) no-repeat top left;border:none;color:#fff;font:11px 'Trebuchet MS','Myriad Pro',sans-serif;height:40px;line-height:100%;overflow:hidden;padding:8px 0 0;text-align:center;width:120px}
</style>
<?php
$count = number_format_i18n(get_option('akismet_spam_count'));
?>
<div id="akismetwrap"><div id="akismetstats"><span id="aka"><div id="akismet1"><span id="akismetcount"><?php echo $count; ?></span> <span id="akismetsc"><?php _e('spam comments') ?></span></div> <div id="akismet2"><span id="akismetbb"><?php _e('blocked by') ?></span><br /><span id="akismeta">Akismet</span></div></span></div></div>
<?php
}

?>

喜欢这篇文章吗?

请订阅本站 RSS feed填写您的邮件地址,订阅我们的精彩内容:

相关日志

回复 (7)

  1. Ludou  / 回复

    我目前已经停用了所以垃圾评论过滤插件了。
    对于我这种小博客,没多大用处!

  2. Hobo  / 回复

    呵呵改成什么倒无所谓了,只要不是a标签就行

  3. ifenwen  / 回复

    呵呵 还是有误点的可能哦

  4. 叶子  / 回复

    有个问题,把代码中的left改成right,结果统计标签还是靠左,请问什么原因,如何修改
    详情见我的博客页脚右边的显示情况

    • 荒野无灯  / 回复

      加一个CSS:

      1
      #akismetwrap {float:right;}

  5. 叶子  / 回复

    加载表情的效果好炫啊!

发表评论 修改评论取消编辑

允许使用的标签 - 您可以在评论中使用如下的 HTML 标签以及属性。

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 :wink:  :-|  :-x  :twisted:  :)  8-O  :(  :roll:  :-P  :oops:  :-o  :mrgreen:  :lol:  :idea:  :-D  :evil:  :cry:  8)  :arrow:  :-?  :?:  :!:

引用通告 (0)

› 尚无引用通告。

开灯