来自于typecho主题joe的留言板样式,joe主题有很多地方可以学习,由于习惯了emlog的主题使用,又不太直接换typecho动手就借鉴到emlog的主题留言板里。

实现步骤
以下需要通过修改主题文件来实现,操作前有需要的自行备份,不多介绍别的了,直接goto。
所需要的附件都打包在附件下载了
将以下代码,新建文件,上传到自己的主题文件夹/page里,以下只是给出一个例子,具体还需根据所在主题样式的更改page_guestbook.php
<?php
/*
Custom:page_gusetbook
Description:留言板
*/
if(!defined(‘EMLOG_ROOT’)) {exit(‘error!’);}
?>
<div class=“container container-page”>
<?php include View::getView(‘page/page_side’);?>
<div class=“content”>
<header class=“article-header”>
<h1 class=“article-title”><?php echo $log_title; ?></h1>
<style>
.guestbook_detail__leaving{paddingtop:15px;}.guestbook_detail__leavingnone{padding:15px 0;textalign:center;-webkituserselect:none;-mozuserselect:none;-msuserselect:none;userselect:none;color:#fff;}.guestbook_detail__leavinglist{position:relative;height:320px}.guestbook_detail__leavinglist .item{display:none;position:absolute;width:200px;overflow:hidden;boxshadow:0 2px 10px 1px rgba(0,0,0,0.2);-webkituserselect:none;-mozuserselect:none;-msuserselect:none;userselect:none;opacity:0.88;height:210px;}.guestbook_detail__leavinglist .item .user{display:flex;alignitems:center;padding:0 10px;color:#fff;borderbottom:1px dashed rgba(255,255,255,0.85);height:40px;cursor:move}.guestbook_detail__leavinglist .item .user .avatar{width:20px;height:20px;borderradius:50%}.guestbook_detail__leavinglist .item .user .nickname{minwidth:0;flex:1;margin:0 5px;whitespace:nowrap;overflow:hidden;textoverflow:ellipsis}.guestbook_detail__leavinglist .item .user .nickname a{color:#fff}.guestbook_detail__leavinglist .item .user .date{marginleft:auto}.guestbook_detail__leavinglist .item .wrapper{padding:10px}.guestbook_detail__leavinglist .item .wrapper .content{height:140px;overflowy:auto;wordbreak:breakword;lineheight:24px;}.guestbook_detail__leavinglist .item .wrapper .guestbook_content .draw_image{maxwidth:100%}.guestbook_detail__leavinglist .item .wrapper .guestbookcontent .owo_image{maxheight:24px}
</style>
</header>
<script src=“域名/book.js”></script>
<div class=“guestbook_container”>
<div class=“guestbook_main”>
<div class=“guestbook_detail”>
</div>
</div>
<?php guestbook($comments); ?>
<! 评论开始 >
<?php if($allow_remark == ‘y’): ?>
<?php blog_comments_post($logid,$ckname,$ckmail,$ckurl,$verifyCode,$allow_remark); ?>
<div id=“postcomments” class=” <?php echo $Tconfig[“wow“];?>”>
<ol class=“commentlist”>
<?php blog_comments($comments); ?>
</ol>
</div>
<?php endif;?>
<! 评论结束 >
</div>
</div>
<?php include View::getView(‘footer’);?>
guestbook.js,上传到主题所引用的js文件夹里,也可以用上述代码自带的外部js,需要给所在主题的添加代码module.php。
进入emlog后台,来到页面,链接别名:页面模板:按照下图来设置,并且需要开启允许评论guestbookpage/page_guestbook最后可以进入页面看看效果了。

本网站名称:创码者资源网
本站永久网址: http://www.cmzym.top/
本站资源大多存储在云盘,如发现链接失效,请联系我们我们会第一时间更新。
本站为非盈利网站,一切付费内容(包括但不限于会员充值,资源付费),均为用户自愿赞助,且所有资金均用于网站维护
本站资源均收录于互联网,所以不能保证每个细节都符合你的要求,也可能存在未知的BUG与瑕疵,因虚拟资源可复制特性,所以不接受任何理由的退款兑现,请阅 读本站声明和相关条款后再进行支付下载
本站一切资源不代表本站立场,并不代表本站赞同其观点和对其真实性负责。
本网站的文章部分内容可能来源于网络,仅供大家学习与参考,如有侵权,请联系站长 :1326632303@qq.com 进行删除处理。
本本站采用知识共享署名-非商业性使用-相同方式共享4.0国际许可协议进行许可



















暂无评论内容