Skip to content

去掉akismet的a标签避免误点

2010 五月 30
tags: , ,
by 荒野无灯

一般这个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填写您的邮件地址,订阅我们的精彩内容:,欢迎点击这里捐赠以支持荒野无灯转播到腾讯微博 转播到腾讯微博

作者:荒野无灯
出处:Hacklog【Hacklog】

声明: 本站遵循 署名-非商业性使用-相同方式共享 3.0 共享协议. 转载请注明转自Hacklog【荒野无灯weblog】

本文链接: http://ihacklog.com/?p=3859

7 Responses Post a comment
  1. 六月 1, 2010

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

  2. 五月 30, 2010

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

  3. 五月 30, 2010

    呵呵 还是有误点的可能哦

  4. 五月 30, 2010

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

  5. 五月 30, 2010

    加载表情的效果好炫啊!

Leave a Reply

Allowed Tags - You may use these HTML tags and attributes in your comment.

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

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

Note: You may use basic HTML in your comments. Your email address will not be published.

Subscribe to this comment feed via RSS