pjblog文章复制自动加版权信息

我在两处插入了代码:
在article.asp中50行
  getBlogHead BlogTitle,getCate.cate_Name,getCate.cate_ID
%>
下面插入以下代码:

 程序代码

<!--复制自动上加来源-->
<script type="text/javascript" charset="UTF-8">
document.body.oncopy=function(){
 event.returnValue=false;
 var t=document.selection.createRange().text;
 var s="本文来源于<%=SiteName%> [<%=siteURL%>] \r\n详细地址为:<%=siteURL%>article.asp?id=<%=id%>  ";
 clipboardData.setData('Text','\r\n'+t+'\r\n'+s+'\r\n');
}
</script>


在default.asp中第25行DIV下边插入

 程序代码

<script type="text/javascript" charset="UTF-8">
document.body.oncopy=function(){
 event.returnValue=false;
 var t=document.selection.createRange().text;
 var s="文本来源于『<%=SiteName%>』 〖<%=siteURL%>〗";
 clipboardData.setData('Text','\r\n'+t+'\r\n'+s+'\r\n');
}
</script>


另附月光上的Z-Blog系统和WordPress:

对于Z-Blog系统来说,编辑b_article-single.html这个模板文件,在适当位置加入下面这些代码即可。
<script type="text/javascript">
document.body.oncopy=function(){
 event.returnValue=false;
 var t=document.selection.createRange().text;
 var s="本文来源于<#ZC_BLOG_TITLE#> <#ZC_BLOG_HOST#> , 原文地址:<#article/url#> ";
 clipboardData.setData('Text','\r\n'+t+'\r\n'+s+'\r\n\r\n\r\n');
}
</script>
  对于WordPress系统来说,编辑themes下的模板文件single.php,在适当的位置加入以下代码即可。
<script type="text/javascript">
document.body.oncopy=function(){
 event.returnValue=false;
 var t=document.selection.createRange().text;
 var s="本文来源于<?php bloginfo('name'); ?> <?php echo get_settings('home'); ?> , 原文地址: <?php the_permalink() ?> ";
 clipboardData.setData('Text','\r\n'+t+'\r\n'+s+'\r\n');
}
</script>
本文来源于人生译站 WoBlog [http://www.ycsznet.com/]
详细地址为:http://www.ycsznet.com/article.asp?id=762 

« javascript实现类似本站页面加载渐变效果SPS费用 »

用google书签收藏 用“美味书签”收藏 用yahoo收藏 用新浪vivi收藏 用365key收藏 分享到饭否 收藏到qq网摘 用windows live书签收藏 添加到百度搜藏 收藏到“就喜欢” 用收客收藏 和讯

  • 本月访问之最

    本年访问之最

    发表评论:

    ◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

    feedsky
    抓虾
    google reader
    my yahoo
    鲜果
    哪吒
    有道

    控制面板

    广告也精彩

    最近发表

    完全随机文章

    赞助商链接

    热文排行使用

    图标汇集

    Copyright 2008-2099 Your WebSite. All Rights Reserved.浙ICP备08013176号