分享一些有关于zblog的教程,这里有zblog初级教程、zblog中级教程和zblog进阶版教程,如果对你有所帮助,深感荣幸
这个问题是之前有一个客户向我们咨询的,还是说一下本人对于版权保护、防止复制这些措施的观点:
基本只能防止小白,真的要复制你的东西,js禁止右键这种措施一个f12就什么都出来了......
但还是有很多人觉得有这个东西起码有个心里安慰呢....那么本文就来说下怎么做zblog右键版权保护或者说是zblog防止复制文章内容。
1、用插件,zblogphp有一个现成的“版权保护小工具”插件,下载地址:https://app.zblogcn.com/?id=737。直接安装启用即可。
2、用js屏蔽右键(此代码来源于“新鲜人博客”)
<script language="javascript">
function click(e) {
if (document.all) {
if (event.button==1||event.button==2||event.button==3) {
oncontextmenu='return false';
}
}
if (document.layers) {
if (e.which == 3) {
oncontextmenu='return false';
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
document.oncontextmenu = new Function("return false;")
var travel=true
var hotkey=17 /* hotkey即为热键的键值,是ASII码,这里99代表c键 */
if (document.layers)
document.captureEvents(Event.KEYDOWN)
function gogo(e)
{
if (document.layers) {
if (e.which==hotkey&&travel){
alert("对不起,Ctrl禁止!为保护作者权益,本站文章不允许复制。\n\n如有特殊需要,请与本站联系...!"); }
}
else if (document.all){
if (event.keyCode==hotkey&&travel){ alert("对不起,Ctrl禁止!为保护作者权益,本站文章不允许复制。\n\n如有特殊需要,请与本站联系"); }
}
}
document.onkeydown=gogo
</script>将以上js代码复制,粘贴到你的主题的footer.php文件里面的</body>之前即可。(怎么找到footer.php参考:https://2010.txcstx.cn/post/706.html。)
售价:免费 82412 ℃ 4 评论
售价:免费 82412 ℃ 4 评论
售价:免费 82412 ℃ 4 评论
这么好的文章居然暂无评论!来一个吧...
欢迎 你 发表评论