注册 | 登录 |
地方论坛门户及新闻和人才网址大全

discuz 门户上一篇,下一篇缩略图显示分享

时间:2021-07-21人气:-


到templatedefaultportalview

<!--{if $article['prearticle']}--><em>{lang pre_article}<a href="{$article['prearticle']['url']}">{$article['prearticle']['title']}</a></em><!--{/if}-->                                <!--{if $article['nextarticle']}--><em>{lang next_article}<a href="{$article['nextarticle']['url']}">{$article['nextarticle']['title']}</a></em><!--{/if}-->



替换代码

<div class="a_photo">                                <!--{if $article['prearticle']}--><a href="{$article['prearticle']['url']}">                                <img src="image/xgt/$article['prearticle'][pic]" alt="$article['prearticle'][title]"/><li href="{$article['prearticle']['url']}">{lang pre_article}</li><!--{/if}--</a>        </div>                        <div class="next_photo">                                <!--{if $article['nextarticle']}--><a href="{$article['nextarticle']['url']}">                                <img src="image/xgt/$article['nextarticle']['pic']" alt="$article['nextarticle']['title']"/><li href="{$article['prearticle']['url']}">{lang next_article}</li></a>


我是分别给上一篇下一篇加了个DIV 方便好控制,如果有模板的找对应的文件view

02 css控制也给出
.a_photo { float:left;margin:-129px 0 0 10px;background:#fff;width: 120px;height: 120px;}
.a_photo img { width: 120px;height:90px;}
.a_photo li{ background: #E6E6E6 none repeat scroll 0% 0%;color: #333;text-align: center;width: 120px;height:30px;line-height: 30px;list-style:none; }

.next_photo {float:right;margin:-129px 10px 0 0;background:#fff;width: 120px;height: 120px;}
.next_photo a{float:right;}
.next_photo a img{width: 120px;height: 90px;}
.next_photo li{background: #E6E6E6 none repeat scroll 0% 0%;color: #333;text-align: center;width: 120px;height: 30px;line-height: 30px;list-style:none;}

上篇:discuz x3.2调用tag标签和相关帖子数量代码

下篇:discuz 文章列表页调用远程图片