无名轻博客修改笔记

一、下载模板样式

<div style="clear: both; border-left: 0pt solid rgb(214, 192, 148); width: 100%;"><div style="background-color: rgb(230, 238, 247); border-bottom: 1px dashed rgb(64, 138, 183) ! important; color: rgb(63, 103, 165); font-weight: bold; padding: 5px;"><i class="fas fa-download"></i> 下载文件 </div><div style="border-color: -moz-use-text-color rgb(230, 238, 247) rgb(230, 238, 247); border-style: none solid solid; border-width: 0pt 1px 1px; color: #E6EEF7; padding: 10px;"><a target="_blank" href="assets/file/2020/02/lin1.doc" style="">林继-自我总结.doc</a></div></div>

二、视频播放

直接播放

play.html?v=beijing/video/DSCF7489.mp4

调用ckplayer播放视频

<script type="text/javascript" src="assets/js/ckplayer/ckplayer.js"></script>
<div class="video" style="width: 100%;height: 529px;"></div>
<script type="text/javascript">
var videoObject = {
container: '.video',//“#”代表容器的ID,“.”或“”代表容器的class
variable: 'player',//该属性必需设置,值等于下面的new chplayer()的对象
poster:'',//封面图片
video:'//linji.cn/assets/file/2020/02/20130816_111444.flv'//视频地址
};
var player=new ckplayer(videoObject);
</script>

ckplayer去掉/修改右上角logo(位置)

在查阅该文之前需要了解的内容如下:

[配置文件]ckplayer.js文件功能说明

[配置文件]ckplayer.xml文件功能说明

配置功能介绍

ckplayer.js中搜索:logo(ckplayer.xml中搜索<logo>)

去掉的方法是修改成logo:'null'(ckplayer.xml中修改成<logo>null</logo>)

调用内置播放器

<iframe width="100%" height="529px" src="assets/file/2020/02/20130816_111444.mp4" frameborder="0" 'allowfullscreen'=""></iframe>

三、相册功能

<div id="gallery-1" class="gallery">
<dl class="gallery-item">
<dt class="gallery-icon landscape">
<a href="assets/file/2020/02/image_241.webp" data-fancybox="gallery"><img src="assets/file/2020/02/image_241.webp" style="max-width:100%;">
</a></dt></dl>

<br style="clear: both">

</div>
<style type="text/css">
#gallery-1 {
margin: auto;
}
#gallery-1 .gallery-item {
float: left;
margin-top: 10px;
text-align: center;
width: 20%;
}
#gallery-1 img {
border: 2px solid #cfcfcf;
}
#gallery-1 .gallery-caption {
margin-left: 0;
}
</style>

四、URLOS面板设置

无名轻博客伪静态

rewrite ^/post-([0-9]+).html /index.php?act=pl&id=$1 last; 
rewrite ^/comment-([0-9]+).html /index.php?act=plist&p=$1 last;
rewrite ^/index-([0-9]+).html /index.php?p=$1 last;
rewrite ^/list-([0-9]+)\.html$ /index.php?tid=$1 last;
rewrite ^/list-([0-9]+)-([0-9]+)\.html$ /index.php?tid=$1&p=$2 last;
rewrite ^/index.html /index.php last;
rewrite ^/comment.html /index.php?act=plist last;

server块扩展内容

if (-d $request_filename){ 
           rewrite ^/(.*)([^/])$ https://$host/$1$2/ permanent; 
     }
server_name www.linji.cn;
return 301 https://linji.cn$request_uri;

Wordpress设置

server块扩展内容

server_name www.wdlu.cn;
return 301 $scheme://wdlu.cn$request_uri;

if ($http_user_agent ~ "YandexBot|AhrefsBot|Dotbot|bingbot|qihoobot|Baiduspider|Googlebot|Googlebot-Mobile|Googlebot-Image|Mediapartners-Google|Adsbot-Google|Feedfetcher-Google|Yahoo! Slurp|Yahoo! Slurp China|YoudaoBot|Sosospider|Sogou spider|Sogou web spider|MSNBot|ia_archiver|Tomato Bot" ) {
     return 403;             
}

if (-d $request_filename){ 
           rewrite ^/(.*)([^/])$ https://$host/$1$2/ permanent; 
     }

伪静态 

try_files $uri $uri/ /index.php?$args;
# Add trailing slash to */wp-admin requests.
rewrite /wp-admin$ $scheme://$host$uri/ permanent;

五、wangEditor2:关闭过滤javascript

https://www.kancloud.cn/wangfupeng/wangeditor2/113983

默认情况下,用户编辑源码之后,编辑器会过滤掉源码中的<script>标签记起内容,防止用户输入一些攻击性的脚本。

你如果不想要这个过滤功能,可以通过 editor.config.jsFilter = false; 来关闭。该操作要在editor.create()之前进行。

<div id="div1">
    <p>请输入内容...</p>
</div>

<!--这里引用jquery和wangEditor.js-->
<script type="text/javascript">
    var editor = new wangEditor('div1');
     // 关闭js过滤

    editor.config.jsFilter = false;
  
    editor.create();
</script>

六、以下代码放在 设置--微博座右铭

人生苦短,珍惜当下! 

<!--倒功能代码-->
<script src="https://zz.bdstatic.com/linksubmit/push.js"></script><script language="javascript" type="text/javascript">/*<![CDATA[*/var interval = 1000; 
function ShowCountDown(year,month,day,divname) 
{ 
var now = new Date(); 
var endDate = new Date(year, month-1, day); 
var leftTime=endDate.getTime()-now.getTime(); 
var leftsecond = parseInt(leftTime/1000); 
//var day1=parseInt(leftsecond/(24*60*60*6)); 
var day1=Math.floor(leftsecond/(60*60*24)); 
var hour=Math.floor((leftsecond-day1*24*60*60)/3600); 
var minute=Math.floor((leftsecond-day1*24*60*60-hour*3600)/60); 
var second=Math.floor(leftsecond-day1*24*60*60-hour*3600-minute*60); 
var cc = document.getElementById(divname); 
cc.innerHTML = "暑假时间:"+year+"年"+month+"月"+day+"日<br>距今:"+day1+"天"+hour+"小时"+minute+"分"+second+"秒"; 
} 
window.setInterval(function(){ShowCountDown(2020,7,5,'divdown2');}, interval);/*]]>*/
</script>
<!--倒功能代码-->
<!--计时功能代码-->
            <script language="javascript">
            function tick() {
                var years,days,hours, minutes, seconds;
                var openday = new Date('1977/10/26 00:00');    //这里填写建站时间 2005/01/03
                var today = new Date(); //获取系统当前时间
                var total = (today.getTime()-openday.getTime())/1000;
                years=Math.floor(total/31536000);
                total=total-years*31536000;
                days=Math.floor(total/86400);
                total=total-days*86400;
                hours=Math.floor(total/3600);
                total=total-hours*3600;
                minutes=Math.floor(total/60);
                total=total-minutes*60;
                seconds=Math.floor(total);
                timeString = ""+years+" 年 "+days+" 天 "+hours+" 时 "+minutes+" 分 "+seconds+" 秒";
                document.getElementById("Clock").innerHTML = timeString;
                window.setTimeout("tick();", 1000);
            }
            window.onload = tick;
            </script>
<!--计时功能代码-->
<!-- 复制文字提示 -->
<link rel="stylesheet" type="text/css" target="_blank" href="assets/js/sweetalert/sweetalert.min.css">
<script src="assets/js/sweetalert/sweetalert.min.js"></script>
<script>document.body.oncopy = function() { swal("复制成功!", "转载请务必保留原文链接,申明来源,谢谢合作!!","success");};</script>
<!-- 复制文字提示 -->
<!--  回顶部  -->
<style type="text/css">
.scroll-to-top {
  display: none;
  width: 30px;
  height: 30px;
  line-height: 0px;
  color: #fff;
  text-align: center;
  background-color: #333;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  bottom: 5%;
  position: fixed;
  right: 0px;
  padding: 7px;
  z-index: 999;
}
.scroll-to-top:hover {
  opacity: .8;
}
</style>

<script type="text/javascript" charset="utf-8">   
jQuery(document).ready(function($){
if ($(window).scrollTop() != "0")
$(".scroll-to-top").fadeIn(1200) //如果距离顶部的距离不为20,显示.scroll-to-top
var scrollDiv = $(".scroll-to-top");
$(window).scroll(function()
{
if ($(window).scrollTop() == "0")
$(scrollDiv).fadeOut(350)//如果距离顶部的距离为20,隐藏scrollDiv
else
$(scrollDiv).fadeIn(1200)//其他情况下,显示scrollDiv
});
$(".scroll-to-top").click(function(){
$("html, body").animate({
scrollTop: 0 //点击按钮,滚动回到顶部
}, 600)
})
});  
</script>

<div class="scroll-to-top" style="display: none;"><i class="fa fa-chevron-up"></i></div>

<!-- 返回顶部 -->
<!-- activity-power-mode 打字效果 -->
<script src='https://www.azimiao.com/wp-content/themes/purelove/js/activity-power-mode.min.js' ></script>

<script>
POWERMODE.colorful = true;
POWERMODE.shake = false;
document.body.addEventListener('input', POWERMODE);
</script>
<!-- 打字效果End -->
<!-- 标题变化 -->
<script>
eval(function(p,a,c,k,e,d){e=function(c){return c.toString(36)};if(!''.replace(/^/,String)){while(c--){d[c.toString(a)]=k[c]||c.toString(a)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('g(0).h(e(){e d(){0.9=0[b]?" :( 别走,嘛去?再待会儿~ ":a}f b,c,a=0.9;"2"!=4 0.8?(b="8",c="k"):"2"!=4 0.5?(b="5",c="j"):"2"!=4 0.6&&(b="6",c="l"),("2"!=4 0.7||"2"!=4 0[b])&&0.7(c,d,!1)});',22,22,'document||undefined||typeof|mozHidden|webkitHidden|addEventListener|hidden|title|||||function|var|jQuery|ready|Hi|mozvisibilitychange|visibilitychange|webkitvisibilitychange'.split('|'),0,{}))
</script>
<!-- 标题变化End -->

七、代码高亮自动换行

wangEditor.min.js
找到
<pre style="max-width:100%;overflow-x:auto;>
修改成
<pre style="max-width:100%;overflow-x:auto;white-space: pre-wrap;white-space: -moz-pre-wrap;white-space: -pre-wrap;white-space: -o-pre-wrap;word-wrap: break-word;line-height: 1.8em;">

技术 2020-02-10 15:43:32 通过 网页 浏览(510) 打印

共有0条评论!

发表评论