标题 / 关键词 / 描述title / keywords / description {Loy:pagetitle}
文章标题{content:title} {content:title}
文章副标题{content:subtitle} {content:subtitle}
文章内容摘要{content:description} {content:description}
文章时间格式 2020-1-1{content:date style=Y-m-d} {content:date style=Y-m-d}
文章点击数(动态){content:visits} {content:visits}
文章点赞数(动态){content:likes} {content:likes}
文章点赞链接{content:likeslink} {content:likeslink}
文章反对数(动态){content:oppose} {content:oppose}
文章反对数(动态){content:opposelink} {content:opposelink}
文章作者{content:author} {content:author}
文章来源{content:source} {content:source}
文章当前链接{Loy:httpurl} {Loy:httpurl}
文章缩略图{content:ico} {content:ico}
文章内容{content:content} {content:content}
文章附件{content:enclosuresize} {content:enclosuresize}
文章附件大小{content:enclosure} {content:enclosure}
文章内容自定义字段{content:ext_***} {content:ext_***}
文章外部链接{content:outlink} {content:outlink}
随机调用栏目文章{Loy:list} {Loy:list scode={sort:tcode} num=6 order=random} [list:title] {/Loy:list}
调用栏目热门文章{Loy:list} {Loy:list scode={sort:tcode} num=6 order=visits} [list:title] {/Loy:list}
文章TAG标签{content:tags} {content:tags}
是否置顶/推荐/头条带CSS样式[list:istop]...[list:isheadline] {Loy:if({content:istop}==1)} 置顶 {/Loy:if} {Loy:if({content:isrecommend}==1)} 推荐 {/Loy:if} {Loy:if({content:isheadline}==1)} 头条 {/Loy:if}
调用当前详情页多图{Loy:pics} {Loy:pics id={content:id} num=6} {/Loy:pics}
调用指定详情页多图{Loy:pics} {Loy:pics id=指定详情页ID num=6} {/Loy:pics}
多图&缩略图 自适应{Loy:pics} {Loy:if({content:ispics}=='1')} {Loy:pics id={content:id} num=6} {/Loy:pics} {else} {/Loy:if}
上一篇 / 下一篇{Loy:prenext} 上一篇:{content:precontent} 下一篇:{content:nextcontent}
上下篇没有了改英文{content:nexttitle notext='no more'} {content:nexttitle notext='no more'}
上一篇缩略图{content:preico} {content:preico}
下一篇缩略图{content:nextico} {content:nextico}
指定内容多选遍历{Loy:checkbox id=* field=*} {Loy:checkbox id=* field=*} [checkbox:text] {/Loy:checkbox}
指定内容多图遍历{Loy:pics id=* num=*} {Loy:pics id=* num=*} {/Loy:pics}
评论{include file=comm/comment.html} {include file=comm/comment.html} 注:需要下载JS/CSS/html模板,放于模板目录下comm文件夹内,下载地址为:https://LOY.ltd/bianqian/comment.tar.gz
内容页分页{content:content} {content:content}//内容框 //分页条 //样式请自行更改
当前栏目判断+高亮Loy:nav {Loy:nav num=100 parent={sort:tcode}} [nav:name] {/Loy:nav}
当前栏目下的二级导航{Loy:nav parent={sort:tcode}} {Loy:nav parent={sort:tcode}} [nav:name] {/Loy:nav}
当前栏目缩略图 {sort:ico} {sort:ico}
当前栏目大图 {sort:pic} {sort:pic}
当前栏目名称{sort:name} {sort:name}
当前栏目副标题 {sort:subname} {sort:subname}
当前栏目副三描述1/2/3 {sort:def1/2/3} {sort:def1}
当前栏目链接{sort:link} {sort:link}
当前栏目的顶级栏目名称{sort:topname} {sort:topname}
当前栏目的顶级栏目链接{sort:toplink} {sort:toplink}
当前位置(栏目页/内容页){Loy:position} {Loy:position indextext=首页 separator=>> }
栏目文档数据列表{Loy:list}{/Loy:list} {Loy:list} [list:title] {/Loy:list}
指定栏目链接及名称Loy:sort {Loy:sort scode=10}[sort:link][sort:name]{/Loy:sort}
指定栏目列表Loy:sort {Loy:sort scode=*} [sort:name] {/Loy:sort}
奇偶数列表{Loy:if('[list:i operate=%2]'==0)} {Loy:if('[list:i operate=%2]'==0)} {else} {/Loy:if}
列表排序order=* 按发布日期:order=date 按置顶:order=istop 按后台填写:order=sorting 随机:order=random 按:置顶,推荐,发布日期:order=istop asc,isrecommend asc,date asc
限制列表数据查询字段lfield="a,b" lfield="title,content"
分页条通用标签{Loy:bar} {page:bar}
通用PB分页条+样式CSS代码{Loy:bar} {Loy:if({page:rows}>0)} 首页 上一页 {page:current} {page:current}/{page:count} 下一页 尾页 {else} 本分类下无任何数据! {/Loy:if}
Loy_分页条样式CSS代码pglist_loy 首页前一页{page:numbar} 后一页末页
Loop语句格式Loop {Loy:loop start=* end=*} 这是第[loop:i]次,索引号为[loop:index] {/Loy:loop}
这是第[loop:i]次,索引号为[loop:index]
筛选调用标签全部标签 {Loy:selectall field=* text=* class=* active=*}
筛选值标签筛选值标签 {Loy:select field=*} [select:value] {/Loy:select}
多条件筛选示例多条件筛选示例 类型:{Loy:selectall field=ext_leixing text=全部 class='btn btn-light' active='btnbtn-info'} | {Loy:select field=ext_leixing} {Loy:if([select:i]>1)}|{/Loy:if} [select:value] {/Loy:select} 颜色:{Loy:selectall field=ext_yanse text=全部 class='btn btn-light' active='btnbtn-info'} | {Loy:select field=ext_yanse} {Loy:if([select:i]>1)}|{/Loy:if} [select:value] {/Loy:select}
类型:{Loy:selectall field=ext_leixing text=全部 class='btn btn-light' active='btnbtn-info'} | {Loy:select field=ext_leixing} {Loy:if([select:i]>1)}|{/Loy:if} [select:value] {/Loy:select}
颜色:{Loy:selectall field=ext_yanse text=全部 class='btn btn-light' active='btnbtn-info'} | {Loy:select field=ext_yanse} {Loy:if([select:i]>1)}|{/Loy:if} [select:value] {/Loy:select}
搜索框<form></form> 关键字: 搜索
定义搜索字段示例<form></form> 内容标题 内容详情 关键字: 搜索
定义更多搜索条件示例<form></form> 关键字: 搜索
多条件综合搜索示例<form></form> 内容: 标题: 作者: 搜索
搜索页-搜索 XXX 的结果 搜索 [search:keywords] 的结果
搜索页列表{Loy:search} {Loy:search} [search:title] {/Loy:search}
搜索JS-关键词不能为空id="search"
留言板Loy:msgaction 联系人: 手机: 内容: 验证码: 提交
留言验证码开关状态{Loy:checkcodestatus} {Loy:checkcodestatus}
layer_JS提交无刷新提交留言layer_JS <#textarea name="content" id="content">#textarea> /*把#号去掉*/ 提交
JS验证手机及邮箱 script function isTel(value) { if (!/^1[3456789]\d{9}$/.test(value)) { return false; } return true; } function isEmail(value) { if (!/[a-zA-Z0-9]+([-_.][A-Za-zd]+)*@([a-zA-Z0-9]+[-.])+[A-Za-zd]{2,5}$/.test(value)) { return false; } return true; }
JS验证广告推销内容 script function isAD(value) { if (!/[\u8d5a][\u94b1]|SEO|[\u4f18][\u5316]|[\u767e][\u5ea6]|[\u641c][\u7d22]/.test(value)) { return true; } return false; } \\中文编码转化https://tool.chinaz.com/tools/Unicode.aspx
引入头部模板{include file=head.html} {include file=head.html}
引入底部模板{include file=foot.html} {include file=foot.html}
文档列表(常用){Loy:list}{/Loy:list} {Loy:list scode=指定栏目ID} [list:title] {/Loy:list}
多个栏目循环调用Loy:nav/list {Loy:nav parent=2} {Loy:list scode=[nav:scode] num=6} {/Loy:list} {/Loy:nav}
文章链接[list:link] [list:link]
文章标题[list:title] [list:title]
文章缩略图[list:ico] [list:ico]
文章内容摘要[list:description] [list:description]
文章时间格式 2020-1-1[list:date] [list:date style=Y-d-m]
文章点击数[list:visits] [list:visits]
置顶order=istop order=istop
推荐order=isheadline order=isheadline
头条order=isrecommend order=isrecommend
是否置顶/推荐/头条带CSS样式[list:istop]...[list:isheadline] {Loy:if([list:istop]==1)} 置顶 {/Loy:if} {Loy:if([list:isrecommend]==1)} 推荐 {/Loy:if} {Loy:if([list:isheadline]==1)} 头条 {/Loy:if}
lopp循环语句使用Loop {Loy:loop start=* end=*} 这是第[loop:i]次,索引号为[loop:index] {/Loy:loop}
获取一个栏目链接名称{Loy:sort}{/Loy:sort} {Loy:sort scode=*}[sort:name]{/Loy:sort}
获取一个专题内容{Loy:content}{/Loy:content} {Loy:content id=1}[content:content drophtml=1 dropblank=1 len=350]{/Loy:content}
友情链接{Loy:link}{/Loy:link} {Loy:link gid=1 num=20} [link:name] {/Loy:link}
轮播图调用{Loy:slide}{/Loy:slide} {Loy:slide gid=1 num=5} {/Loy:slide}
IF语句格式{Loy:if('a'=='b')} {Loy:if('a'=='b')} 内容1 {else} 内容2 {/Loy:if}
IF语句嵌套{Loy:if('a'=='b')} {Loy:if('a'=='b')} {Loy:2if('a'=='c')} 内容1 {2else} 内容2 {/Loy:2if} {else} 内容3 {/Loy:if}
万能SQL标签{Loy:sql sql="语句"} {Loy:sql sql="语句"} [sql:字段名称] {/Loy:sql}
HTML格式化drophtml=1 drophtml=1
去除空白字符,如换行符、制表符等dropblank=1 dropblank=1
内容截取标签lencn=* lencn=*
序号求余[list:i operate=%2] [list:i operate=%2]
JS域名绑定 var a = 'retrtrfdcfvvvv'; var ym = window.location; var ym2 = '域名'; var ym3 = String(ym); function suan(a){ var re = a.substring(0,2); var tr = a.substring(2,4); var tr2 = a.substring(4,6); var fd = a.substring(6,8); var cf = a.substring(8,10); var vv = a.substring(10,12); var vv2 = a.substring(12,14); re = 'h'; tr = 't'; tr2 ='t'; fd = 'p'; cf = ':'; vv = '/'; vv2 = '/'; var p = re+tr+tr2+fd+cf+vv+vv2; return p; } if (ym3.indexOf(ym2) == -1 ) { var b = suan(a) + '域名'; window.location = b; }
IIS7伪静态
Apache伪静态 Options +FollowSymlinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?p=$1 [QSA,PT,L]
Nginx伪静态 location / { if (!-e $request_filename){ rewrite ^/(.*)$ /index.php?p=$1 last; } }
Nginx伪静态--多语言免冲突跳转 if ($host ~* [^en]\.kyd1688\.com) { rewrite ^/en/(.*)/(.*).html$ https://en.kyd1688.com/en/$1/$2.html; rewrite ^/en/(.*)/$ https://en.kyd1688.com/en/$1/; } //注意:en英文版做en二级目录并跳转en二级域名
Nginx伪静态--屏蔽垃圾蜘蛛爬虫 if ($http_user_agent ~* (SemrushBot|python|MJ12bot|AhrefsBot|AhrefsBot|hubspot|opensiteexplorer|leiki|webmeup)) { return 444; }
网站标题名称{Loy:sitetitle} {Loy:sitetitle}
网站域名链接{Loy:sitedomain} {Loy:sitedomain}
模板目录{Loy:sitetplpath} {Loy:sitetplpath}
首页高亮判断<a href="/" class="acive">首页</a> {Loy:if(0=='{sort:scode}')}class="acive"{/Loy:if}
导航高亮样式class="active" {Loy:if('[nav:scode]'=='{sort:tcode}')}class="active"{/Loy:if}
索引自增[nav:i] [nav:i]
索引自增+判断[nav:i] + {Loy:if('[nav:i]'==1)} class="current"{else}class=""{/Loy:if}
判断是否有下级栏目 [nav:soncount] {Loy:if(0<'[nav:soncount]')} 有下级 {else} 无下级 {/Loy:if}
调用顶级栏目+高亮Loy:nav {Loy:nav num=10 parent=0} [nav:name] {/Loy:nav}
调用子级栏目Loy:2nav {Loy:nav num=10 parent=0} [nav:name] {Loy:if(0<'[nav:soncount]')} {Loy:2nav parent=[nav:scode]} [2nav:name] {/Loy:2nav} {/Loy:if} {/Loy:nav}
[2nav:name]
调用三级栏目Loy:3nav {Loy:nav num=10 parent=0} [nav:name] {Loy:if([nav:soncount]>0)} {Loy:2nav num=10 parent=[nav:scode]} [2nav:name] {Loy:3nav num=10 parent=[2nav:scode]} [3nav:name] {/Loy:3nav} {/Loy:2nav} {/Loy:if} {/Loy:nav}
站点备案信息{Loy:siteicp} {Loy:siteicp}
后台统计代码{Loy:sitestatistical} {Loy:sitestatistical}
站点版权{Loy:sitecopyright} {Loy:sitecopyright}
公司名称{Loy:companyname} {Loy:companyname}
公司地址{Loy:companyaddress} {Loy:companyaddress}
联系人{Loy:***} {Loy:companycontact}
联系手机{Loy:***} {Loy:companymobile}
联系电话{Loy:***} {Loy:companyphone}
传真{Loy:***} {Loy:companyfax}
邮 箱{Loy:***} {Loy:companyemail}
联系QQ{Loy:***} {Loy:companyqq}
微信图标{Loy:***} {Loy:companyweixin}
其它信息{Loy:companyother} {Loy:companyother}
二维码生成标签{Loy:qrcode} {Loy:qrcode string=***}
网站地图sitemap.xml/txt /sitemap /sitemap.xml /sitemap.txt
公祭日,使网站全灰颜色的CSS代码style html{ -webkit-filter: grayscale(100%); /* webkit */ -moz-filter: grayscale(100%); /*firefox*/ -ms-filter: grayscale(100%); /*ie9*/ -o-filter: grayscale(100%); /*opera*/ filter: grayscale(100%); filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); filter:gray; /*ie9- */ }
公祭日,使网站全灰颜色的JS代码JS $(function() { var myDate = new Date; var mon = myDate.getMonth() + 1; var date = myDate.getDate(); var days=['4.4','5.12','7.7','9.18','12.13']; //指定日期 for (var day of days) { var d=day.split('.'); if (mon == d[0] && date == d[1]) { var gray='grayscale(100%)'; $("html,body").css({"filter":'gray !important;',"filter":"progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)","filter":gray,"-webkit-filter":gray,'-moz-filter':gray,'-ms-filter':gray,'-o-filter':gray}); break; } } });
禁止右键,复制,选中,禁止F12禁止
CSS 禁止复制-右键-选中禁止 -moz-user-select:none; /* Firefox私有属性 */ -webkit-user-select:none; /* WebKit内核私有属性 */ -ms-user-select:none; /* IE私有属性(IE10及以后) */ -khtml-user-select:none; /* KHTML内核私有属性 */ -o-user-select:none; /* Opera私有属性 */ user-select:none; /* CSS3属性 */
PC显示,移动隐藏--CSSCSS
JS判断域名并301跳转JS
CSS/JS时间戳JS ?v=
CSS/水印JS .image-container { height: 100%; display: flex; align-items: center; text-align: center; width: 100%; position: relative; overflow: hidden; } .image1 { position: relative; z-index: 4; width:100%; } .image2 { position: absolute; top: 0; left: 0; z-index: 2; width:100%; } .image-container img:first-child { z-index: 3; /* 设置图片的堆叠顺序 */ } .image-container img:last-child { position: absolute; /* 设置第二个图片为绝对定位 */ z-index: 2; /* 设置图片的堆叠顺序,比第一个图片高 */ }