Zblog PHP weibolee(微博)主题缩略图调用小修改
温馨提示:文章已超过1752天没有更新,若内容或图片失效,请留言反馈!
摘要:
原主题默认调用文章缩略图不是特别人性化,此次修改增加了后台开启“自定义缩略图”后,如上传自定义缩略图则只在首页显示单张缩略图功能。Post-multi.php中搜索“<div...
原主题默认调用文章缩略图不是特别人性化,此次修改增加了后台开启“自定义缩略图”后,如上传自定义缩略图则只在首页显示单张缩略图功能。
Post-multi.php中搜索“<div class="post-list">”,替换即可。
[ReplyVisible]
<div class="post-list"> <p><a href="{$article.Url}" title="{$article.Title}"{if $zbp->Config('weibolee')->blankoff=='1'} target="_blank"{/if}>{php}$description = preg_replace('/[\r\n]+/', '', trim(SubStrUTF8(TransferHTML($article->Intro,'[nohtml]'),108)).'...');{/php}{$description}</a></p> <!-- 开启自定义缩略图且缩略图地址不为空则只显示自定义缩略图 --> {if $zbp->Config('weibolee')->zdypic=='1' && strlen ( $article->Metas->tesetu ) !=''} <ul> <li><a href="{$article.Url}" title="{$article.Title}"><img src="{if $zbp->Config('weibolee')->zdypic=='1' && strlen ( $article->Metas->tesetu ) > 6}{$article->Metas->tesetu}{else}{weibolee_firstimg($article)}{/if}" alt="{$article.Title}" class="loading"></a></li> </ul>{/if} <!-- 缩略图为空则显示文章中最多3张图片用于缩略图 --> {if $pictotal>=1 && strlen ( $article->Metas->tesetu ) ==''} <ul> {if $pictotal>=3} <li class="pic1"><a href="{$article.Url}" title="{$article.Title}"><img src="{if $zbp->Config('weibolee')->zdypic=='1' && strlen ( $article->Metas->tesetu ) > 6}{$article->Metas->tesetu}{else}{weibolee_firstimg($article)}{/if}" alt="{$article.Title}" class="loading"></a></li> <li class="pic2"><a href="{$article.Url}" title="{$article.Title}"><img src="{$picsrcb}" alt="{$article.Title}" class="loading"></a></li> <li class="pic3"><a href="{$article.Url}" title="{$article.Title}"><img src="{$picsrcc}" alt="{$article.Title}" class="loading"></a></li> {elseif $pictotal>=2} <li class="pic01"><a href="{$article.Url}" title="{$article.Title}"><img src="{if $zbp->Config('weibolee')->zdypic=='1' && strlen ( $article->Metas->tesetu ) > 6}{$article->Metas->tesetu}{else}{weibolee_firstimg($article)}{/if}" alt="{$article.Title}" class="loading"></a></li> <li class="pic02"><a href="{$article.Url}" title="{$article.Title}"><img src="{$picsrcf}" alt="{$article.Title}" class="loading"></a></li> {else} <li><a href="{if $zbp->Config('weibolee')->zdypic=='1' && strlen ( $article->Metas->tesetu ) > 6}{$article->Metas->tesetu}{else}{weibolee_firstimg($article)}{/if}" title="{$article.Title}"><img src="{if $zbp->Config('weibolee')->zdypic=='1' && strlen ( $article->Metas->tesetu ) > 6}{$article->Metas->tesetu}{else}{weibolee_firstimg($article)}{/if}" alt="{$article.Title}" class="loading"></a></li>{/if} </ul>{/if} </div>
[/ReplyVisible]
还没有评论,来说两句吧...