登录后,购买下载资源更方便!
您需要 登录 才可以下载或查看,没有账号?立即注册
×
一、Emlog添加上下篇功能教程方法一 1、首先找到文章页模版,默认状态的路径 根目录/content/templates/模版文件夹名称/echo_log.php 2、打开该模版,并在需要显示上下篇的位置添加如下代码: - <?php extract($neighborLog);if($prevLog){- @' p; e$ L. {, H5 D
- echo '<div id="prevlog"><a href="'.Url::log($prevLog['gid']).'" title="'.$prevLog['title'].'"></a></div>';}8 \ ?: U$ _6 E# ^, d
- else{1 a ^( e0 {1 W1 F
- echo '<div id="prevlog"><a href="#" title="没有上一篇了"></a></div>';};. t1 ?" v- |" ]( c5 Q4 b `5 G9 ^
- if($nextLog){. I7 I1 f8 p* M; n6 U; F6 j
- echo '<div id="nextlog"><a href="'.Url::log($nextLog['gid']).'" title="'.$nextLog['title'].'"></a></div>';}; F% N, t/ Z: K
- else{
: g' i" o* V! h0 o - echo '<div id="nextlog"><a href="#" title="没有下一篇了"></a></div>';};?>
复制代码( E6 v v1 B2 H
方法二$ X2 m/ W" Y0 o5 X; r
方法二和方法一雷同 1、找到核心文件模版,默认状态的路径 根目录/content/templates/模版文件夹名称/module.php 2、添加方法一的php代码 3、在文章页模版,默认状态的路径 根目录/content/templates/模版文件夹名称/echo_log.php 添加调用函数即可
7 q2 [5 U# |9 R7 Z+ @9 M二、Emlog上下篇功能美化教程在文章页模版,默认状态的路径 根目录/content/templates/模版文件夹名称/echo_log.php 添加如下css样式 - <style>) [4 T. Q+ O4 B! q
- #prevlog{width:40px;height:80px;background:url(http://img.itc.cn/photo/olZ77IqbZHL) no-repeat; position:fixed;left:50%;top:380px;margin-left:-530px;filter:alpha(Opacity=60);-moz-opacity:0.6;opacity:0.6;z-index:9999;}
* w" k, Y6 m8 d1 s, i - #prevlog a,#nextlog a{width:40px;height:80px;display:block;}
* `9 M0 I/ E; y( X" Z - #prevlog:hover,#nextlog:hover{filter:alpha(Opacity=100);-moz-opacity:1;opacity:1;}; D# r R5 f; A# r$ X
- #nextlog{width:40px;height:80px;background:url(http://img.itc.cn/photo/olZ77phsS28) no-repeat; position:fixed;left:50%;top:380px;margin-left:490px;filter:alpha(Opacity=60);-moz-opacity:0.6;opacity:0.6;z-index:9999;}
, W- m& R, m/ A7 W7 m9 V - *html #prevlog, *html #nextlog{position: absolute;top:expression(eval(document.documentElement.scrollTop));}9 v: j# }6 ~: c1 P( Y- s
- </style>
复制代码
6 C; y. e) K4 }9 N4 Q( F9 j8 K9 m
2 F( A( M" D7 j9 j% k- J这里也可以把样式放在css文件里面,然后调用即可,具体的样式可以根据自己的网站主题模版进行微调。附上一张美化后的截图: " ^5 l0 C5 y3 c4 a
" h/ K8 ?/ L, n0 _ |