大家好,我也是刚用typecho,php知识少的可怜,在这里我求教下,如何在侧边栏的最新文章列表里显示为文章的缩略图啊?
我已经安装了fimg插件,
<div class="widget">
<h3><?php _e('最新文章'); ?></h3>
<ul>
<?php $this->widget('Widget_Contents_Post_Recent')
->parse('<li><a href="{permalink}">{title}</a></li>'); ?>
</ul>
</div>
这是侧边栏的代码,然后调用文章缩略图的代码是 <img src="<?php Fimg_Plugin::showfimg($this->cid,1);?>">
这样怎么 把图片加上去呢?求救,谢谢
网站是http://www.thezui.com
侧边栏如何加文章缩略图?
版主: seita
-
- 帖子: 62
- 注册时间: 2013年 12月 6日 23:09
Re: 侧边栏如何加文章缩略图?
<div class="widget">
<h3><?php _e('最新文章'); ?></h3>
<ul>
<?php $this->widget('Widget_Contents_Post_Recent')->to($index); ?>
<?php while($this->next()): ?>
<li><a href="<?php $index->permalink() ?>"><?php $index->title() ?></a></li>
<img src="<?php Fimg_Plugin::showfimg($index->cid,1);?>">
<?php endwhile; ?>
</ul>
</div>
<h3><?php _e('最新文章'); ?></h3>
<ul>
<?php $this->widget('Widget_Contents_Post_Recent')->to($index); ?>
<?php while($this->next()): ?>
<li><a href="<?php $index->permalink() ?>"><?php $index->title() ?></a></li>
<img src="<?php Fimg_Plugin::showfimg($index->cid,1);?>">
<?php endwhile; ?>
</ul>
</div>
Re: 侧边栏如何加文章缩略图?
www.gusuz.com 写了:<div class="widget">
<h3><?php _e('最新文章'); ?></h3>
<ul>
<?php $this->widget('Widget_Contents_Post_Recent')->to($index); ?>
<?php while($this->next()): ?>
<li><a href="<?php $index->permalink() ?>"><?php $index->title() ?></a></li>
<img src="<?php Fimg_Plugin::showfimg($index->cid,1);?>">
<?php endwhile; ?>
</ul>
</div>
可以用哎!超感谢!