Skip to content

对付垃圾站,就得来点“阴”的

2009 十一月 7
tags:
by 荒野无灯

对于某些无视版权信息,“转载” 文章不标明出处的,只有给它来点狠的了。
我的做法如下,
修改当前主题下的functions.php ,在最后加上如下代码:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
///////////////////////////////////////////////////////////////
if (strpos($_SERVER['REQUEST_URI'], 'post.php') || strpos($_SERVER['REQUEST_URI'], 'post-new.php') || strpos($_SERVER['REQUEST_URI'], 'page-new.php') || strpos($_SERVER['REQUEST_URI'], 'page.php'))
{

        add_action('admin_footer', 'hlAddQuicktag');

        function hlAddQuicktag(){
                    echo <<<EOT
                <script type="text/javascript">
                    <!--
                        var myToolbar = document.getElementById("ed_toolbar");
                        if(myToolbar){
                            var hlNr = edButtons.length;
                       
                            edButtons[edButtons.length] = new edButton('ed_highslide','','','','');
                            var hlBut = myToolbar.lastChild;
                            while (hlBut.nodeType != 1){
                                hlBut = hlBut.previousSibling;
                            }
                            hlBut = hlBut.cloneNode(true);
                            myToolbar.appendChild(hlBut);
                            hlBut.value = 'copyright_info';
                            hlBut.onclick = edInserthl;
                            hlBut.title = "Insert a hidden copyright info";
                            hlBut.id = "ed_copyright_info";
                        }

                        function edInserthl() {
                            if(!edCheckOpenTags(hlNr)){
                            var theTag = '<span style="display:none;"> 本文转自<a target="_blank"  href="http://www.ihacklog.com"><strong>Hacklog</strong>【荒野无灯weblog】</a>(C) 2009 荒野无灯 <strong>声明:</strong> 本站遵循 <span style="color: #ff0000;"><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/" target="_blank"> 署名-非商业性使用-相同方式共享 2.5</a> </span>共享协议. 转载请注明转自<span style="color: #333300;"><a target="_blank" href="http://www.ihacklog.com"><strong>Hacklog</strong>【荒野无灯weblog】</a></span></span>';
                                edButtons[hlNr].tagStart  = theTag;
                                edInsertTag(edCanvas, hlNr);
                            } else {
                                edInsertTag(edCanvas, hlNr);
                            }
                        }

                    //-->
                </script>
EOT
;
            }
        }
//////////////////////////////////////////////////////////////////////////

现在,在编辑器里已经出出了一个名为copyright_info的按钮了, 本文转自Hacklog【荒野无灯weblog】(C) 2009 荒野无灯 声明: 本站遵循 署名-非商业性使用-相同方式共享 2.5 共享协议. 转载请注明转自Hacklog【荒野无灯weblog】在写博文时,在文章中间点一下,就插入了隐藏的版权信息。
哈哈,如果垃圾站直接copy文章,它连版权信息也一起copy过去了,照样在给我打广告啊。

喜欢这篇文章吗?

请订阅本站 RSS feed填写您的邮件地址,订阅我们的精彩内容:,欢迎点击这里捐赠以支持荒野无灯转播到腾讯微博 转播到腾讯微博

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

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

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

11 Responses Post a comment
  1. 七月 1, 2011

    :twisted: 我就是被那些垃圾站整惨了,这方法我喜欢!

  2. 七月 20, 2010

    好办法!学习了··· :mrgreen:

  3. 十一月 19, 2009

    最好的方法就是每隔一个字加上一个字,然后删除删死他

  4. 十一月 8, 2009

    为什么我在hacklog这里测试不行呢?

    • 十一月 8, 2009

      @mypcfix, 我已经测试过了,是有用的。你查看一下html代码就知道了。
      当然,如果你用的是opera浏览器的话,它是不会复制html代码的,还有,如果 你在后台用的是代码编辑器而不是可视化的编辑 器的话也没用。

  5. 十一月 7, 2009

    碰到黑心的人 什么都没用

  6. 十一月 7, 2009

    要是碰到一个无聊的他一行行删。呵呵。。。

  7. 十一月 7, 2009

    这招够狠够阴够绝!我喜欢,哈哈

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