MENU
关闭
请先查看目录结构
https://www.115cms.com/wendang/1.html
导航
<a href="/">首页</a>>
<a href="{:url('index/model/index',array('model'=>$t.m))}">{:fun_model($t.m,'title')}</a>>
<a href="{:url('index/model/cate',array('alias'=>$cate.alias))}"> {:fun_cate_m($t.tid, 'name')}</a>>
<a href=""> 详情</a>
标题
{$t['title']}
自动获取内容的关键字
{:ks(zw($t['content']))}
网站描述前200个字符
{:cut_c(htmlspecialchars_decode($t['content']))}
或者建议用
<meta name="keywords" content="{$t['keywords']}">
<meta name="description" content="{$t['description']}">
评论的数量
{:fun_st('comment',array('open'=>1,'m'=>$t.m,'fid'=>$t['id']))}
{$t['pinglun']}
//上面两个都可以
浏览数量
{$t['view']}
发布的时间/更新时间
{$t.time|times}
{$t.times|times}
内容
{$t.content}
上级栏目
<a href="{:url('index/index/cate_m',array('alias'=>$cate.alias))}">{$cate.name}</a>
会员
{:fun_u($t.uid, 'username')}//用户名
{:url('index/user/uid',array('id'=>$t.uid))}//主页
{:dingyi(fun_u($t.uid, 'description'),'这个人很懒没有留下什么..')}//介绍
{:fun_st('html', array('uid' => $t.uid))}//他的文章数量
{:fun_st('comment', array('uid' => $t.uid))}//他的评论数量
{:fun_u($t.uid, 'point')}//ta的积分
提取内容的所有图片
{volist name=":getImgList($t.content)" id="vo"}
{$vo}//图片的地址
{/volist}
点赞代码 页面设计规范里面加载系统默认的js后只需要复制代码即可 样式自己写 其他一样
<a href="javascript:;" class="dianzan" zan="{$t['zan']+1}" url="{:url('index/api/zan',array('id'=>$t.id,'m'=>$t.m))}">点赞(<span class="dianzans">{$t['zan']}</span>)</a>
收藏代码
<a href="javascript:;" class="shoucang" url="{:url('index/api/shoucang',array('id'=>$t.id,'m'=>$t.m))}">{if fun_st('shoucang',array('m'=>$t.m,'tid'=>$t.id,'uid'=>user('userid')))>0}收藏成功{else/}收藏{/if}</a>
根据关键字获取相关数据
{volist name=":fun_ks($t.m, keywords, sjsz($c['keywords']), array('open'=>1), 10)" id="vo"}
{:url('index/model/html',array('model'=>$vo.m,'id'=>$vo.id))}//url链接通用
{:cut_c($vo.content,100)}//前100个描述
{:pic($vo.content)}//封面
{$vo.time|times}//添加时间
{$vo.times|times}//更新时间
{:fun_st('comment', array('fid'=>$vo.id,'m'=>$vo.m))}
{$vo.zan}//点赞数量
{:fun_u($vo.uid, 'username')}//发布的会员
{:url('index/user/uid',array('id'=>$vo.uid))}//会员主页的链接
{/volist}
同类热门
{volist name=":fun_sd($t.m,array('f.open'=>1),$t['tid'],'view desc','8',1)" id="vo"}
{:url('index/model/html',array('model'=>$vo.m,'id'=>$vo.id))}//url链接通用
{:cut_c($vo.content,100)}//前100个描述
{:pic($vo.content)}//封面
{$vo.time|times}//添加时间
{$vo.times|times}//更新时间
{:fun_st('comment', array('fid'=>$vo.id,'m'=>$vo.m))}
{$vo.zan}//点赞数量
{:fun_u($vo.uid, 'username')}//发布的会员
{:url('index/user/uid',array('id'=>$vo.uid))}//会员主页的链接
{/volist}
同类置顶
{volist name=":fun_sd($t.m,array('f.open'=>1,settop=>1),$t['tid'],'id desc','8',1)" id="vo"}
{:url('index/model/html',array('model'=>$vo.m,'id'=>$vo.id))}//url链接通用
{:cut_c($vo.content,100)}//前100个描述
{:pic($vo.content)}//封面
{$vo.time|times}//添加时间
{$vo.times|times}//更新时间
{:fun_st('comment', array('fid'=>$vo.id,'m'=>$vo.m))}
{$vo.zan}//点赞数量
{:fun_u($vo.uid, 'username')}//发布的会员
{:url('index/user/uid',array('id'=>$vo.uid))}//会员主页的链接
{/volist}
同类最近更新
{volist name=":fun_sd($t.m,array('f.open'=>1),$t['tid'],'times desc','8',1)" id="vo"}
{:url('index/model/html',array('model'=>$vo.m,'id'=>$vo.id))}//url链接通用
{:cut_c($vo.content,100)}//前100个描述
{:pic($vo.content)}//封面
{$vo.time|times}//添加时间
{$vo.times|times}//更新时间
{:fun_st('comment', array('fid'=>$vo.id,'m'=>$vo.m))}
{$vo.zan}//点赞数量
{:fun_u($vo.uid, 'username')}//发布的会员
{:url('index/user/uid',array('id'=>$vo.uid))}//会员主页的链接
{/volist}
上一篇
{volist name=":fun_s($t.m,'tid='.$t.tid.' and id<'.$t.id,'id desc','1',1)" id="vo"}
<a href="{:url('index/model/html',array('model'=>$vo.m,'id'=>$vo.id))}">{$vo.title}</a>
{/volist}
下一篇
{volist name=":fun_s($t.m,'tid='.$t.tid.' and id>'.$t.id,'id asc','1',1)" id="vo"}
<a href="{:url('index/model/html',array('model'=>$vo.m,'id'=>$vo.id))}">{$vo.title}</a>
{/volist}
评论代码
<style type="text/css" media="all">
/*评论*/
.remark-item{padding: 10px;border-bottom: 1px solid #eee;}
.remark-item .head{display: -webkit-flex;display: flex;-webkit-justify-content: space-between;justify-content: space-between;-webkit-align-items: center;align-items: center;}
.remark-item .body{margin-top: .2rem;}
a{-webkit-tap-highlight-color: rgba(0,0,0,0);text-decoration: none;}
.remark-item .head .avatar{width: 35px;height: 35px;border-radius: 50%;margin-right: 5px;float: left;}
.remark-item .head .title{font-size: 14px;color: #000;}
.remark-item .head .desc, .remark-item .head .order{font-size: .24rem;color: #999;}
.remark-item .head .order{margin-right: .3rem;}
.remark-item .head .desc, .remark-item .head .order{font-size: 14px;color: #999;}
.remark-item .head .support, .remark-item .head .supported{font-size: 14px;color: #999;padding-left: 10px;background-repeat: no-repeat;/* background-size: 100px 100px;*/line-height: 50px;}
.remark-item .body{margin-top: .2rem;}
.remark-item .body .locked{padding: 10px;margin-left: 50px;font-size: 14px;background: #FFF url(data:image/gif;base64,R0lGODlhCwAMANUAAAAAAP////vyyPzrpP7gdP/QPP7RRf7YXfzYa…AwjQmBIGgyCRC5YW9QfAp4cgmDgwMJBA8UBGyMbAQOFAgHk5MDHwcOGhsbFp0XFxYSGkEAOw==) no-repeat .1rem 50%;border: 1px dashed #0dc316;}
.remark{width:100%}
.remark-item .body .topinfo .reply{width: 50px;height: 25px;border-radius: .24rem;color: #ff0017;font-size: 12px;text-align: center;float: right;padding: 0;background-color: white;border: 1px dashed #FF9A9A;}
.remark-item .body .topinfo .time{color: #999;}
.remark-item .body .topinfo{display: -webkit-flex;display: flex;padding-top: 5px;-webkit-justify-content: space-between;justify-content: space-between;-webkit-align-items: center;align-items: center;margin-left: 50px;}
.remark-item .head .info{-webkit-flex-grow: 1;flex-grow: 1;line-height: 20px;margin-left: 10px;}
</style>
<div class="remark m-item">
<form class="layui-form layui-form-pane form1" url="{:url('index/api/comment_add')}" t_url="javascript:parent.location.reload();" id="commentform">
<input type="hidden" name="id" value="{$t.id}">
<input type="hidden" name="m" value="{$t.m}">
<input type="hidden" name="tid" value="0">
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="form-group">
<textarea id="textarea" name="content" class="form-control" cols="50" rows="10" placeholder="说出您的看法...."></textarea>
</div>
</div>
<div class="pt-10 ">
<div class="layui-btn layui-btn-normal">
最新评论({:fun_st('comment',array('open'=>1,'fid'=>$t['id'],'m'=>$t.m))})
</div>
<a href="javascript:;" lay-submit lay-filter="cms1" class="layui-btn" style="float: right;"><i class="layui-icon"></i> 评 论 </a>
</div>
</div>
</form>
<div id="js-newlist" class="list">
{volist name=":fun_s('comment',array('tid'=>0,'open'=>1,'fid'=>$t.id,'m'=>$t.m),'id desc',10,0)" id="vo" empty="
<div align='center'>
<img src='/public/img/empty.jpg' height='100' />
<h4 class='pt-20'>
你来打破零评论
</h4>
</div>"}
<div class="remark-item">
<div class="head">
<a href="{:url('index/user/uid',array('id'=>$vo.uid))}">
<img src="{:fun_u($vo.uid, 'userhead')}" class="avatar">
</a>
<div class="info">
<div class="title">{:fun_u($vo.uid, 'username')}</div>
<div class="desc">{:set('jifen',2)}:{:fun_u($vo.uid, 'point')}</div>
</div>
<div class="order">回复({:fun_st('comment',array('open'=>1,'tid'=>$vo.id,'fid'=>$t['id'],'m'=>$t.m))})</div>
</div>
<div class="body">
<div class="locked">{$vo.content|htmlspecialchars_decode}</div>
<div class="topinfo"><span class="time">{$vo.time|times}</span>
<button class="reply huifu" data="{:url('index/api/comment_add',array('id'=>$t.id,'tid'=>$vo.id,'m'=>$t.m))}" href="javascript:;" name="@{:fun_u($vo.uid, 'username')}">回复</button>
</div>
</div>
</div>
{volist name=":fun_s('comment',array('open'=>1,'tid'=>$vo.id,'fid'=>$t['id'],'m'=>$t.m),'id desc',10,false,0)" id="v"}
<div class="remark-item">
<div class="head">
<a href="{:url('index/user/uid',array('id'=>$v.uid))}">
<img src="{:fun_u($v.uid, 'userhead')}" class="avatar">
</a>
<div class="info">
<div class="title">{:fun_u($v.uid, 'username')}</div>
<div class="desc">{:set('jifen',2)}:{:fun_u($v.uid, 'point')}</div>
</div>
<div class="order">回复@{:fun_u($vo.uid, 'username')}</div>
</div>
<div class="body">
<div class="locked">{$v.content|htmlspecialchars_decode}</div>
<div class="topinfo"><span class="time">{$v.time|times}</span>
</div>
</div>
</div>
{/volist}
{/volist}
</div>
</div>
<!--评论-->
获取自定义配置字段信息
<table class="layui-table">
<tbody>
{foreach name=":json_model(fun_model($t.m, 'config'))" item="v" key="k"}
{if socha(json_model_v($v,'dingyi'), 2) == 1}
<tr>
<td>
{:json_model_v($v,'title')}
</td>
<td>
{if json_model_v($v,'zhiduan')=='lianjie'}
<a style="color: #16b9aa;" href="{$t[json_model_v($v,'zhiduan')]}" target="_blank">{$t[json_model_v($v,'zhiduan')]}</a>
{else/}
{$t[json_model_v($v,'zhiduan')]}
{/if}
</td>
</tr>
{/if}
{/foreach}
</tbody>
</table>
115CMS采用面当前最流行的ThinkPHP框架开发,它是一款高效开源的内容管理系统。 本产完全采用模块化开发,插件主题功能,增加了程序的维护性、可扩展性,使二次开发变得简单、容易,系统设计的模板标签。
在线QQ: 50361804 / 1340828870
QQ群: 点击加入
Copyright ©2022 115cms All Rights Reserved. 黔ICP备2021005045号-4贵公网安备 52030302000777号