如何让侧边栏(sidebar)更精彩呢?

插件开发及发布

版主: woniou

回复
liboy
帖子: 17
注册时间: 2009年 11月 18日 20:33

如何让侧边栏(sidebar)更精彩呢?

帖子 liboy »

在tpyecho的主题文档中,只提供调用“最新文章”和“最新评论”的函数。

最新文章列表

代码: 全选

<ul>
    <?php $this->widget('Widget_Contents_Post_Recent')
               ->parse('<li><a href="{permalink}">{title}</a></li>'); ?>
</ul>


最新回复列表

代码: 全选

<ul>
    <?php $this->widget('Widget_Comments_Recent')->to($comments); ?>
    <?php while($comments->next()): ?>
        <li><?php $comments->author(false); ?>: <a href="<?php $comments->permalink(); ?>"><?php $comments->excerpt(10, '[...]'); ?></a></li>
    <?php endwhile; ?>
</ul>


这样显得很单调,有没有其他的显示方案呢?或者有插件支持吗?
头像
joyqi
帖子: 422
注册时间: 2007年 7月 24日 19:43
联系:

Re: 如何让侧边栏(sidebar)更精彩呢?

帖子 joyqi »

不知道你有没有什么建议
liboy
帖子: 17
注册时间: 2009年 11月 18日 20:33

Re: 如何让侧边栏(sidebar)更精彩呢?

帖子 liboy »

不知道你有没有什么建议

例如:随机文章,评论最多的文章,点击最多的文章,还有评论之星,月排行版等等。

这可是你问我的,我就全说了,70老大,如果不能整合到程序里,那开发的插件,一个顶几十个。
头像
aijun
帖子: 117
注册时间: 2009年 7月 10日 03:04
联系:

Re: 如何让侧边栏(sidebar)更精彩呢?

帖子 aijun »

随机文章,有位网友开发过此插件。你搜索一下插件板块。
liboy
帖子: 17
注册时间: 2009年 11月 18日 20:33

Re: 如何让侧边栏(sidebar)更精彩呢?

帖子 liboy »

搜索到文章排行榜的函数
文章排行榜插件
下载附件
把文件复制到varWidgetContentsPost下
函数

代码: 全选

<?php $this->widget('Widget_Contents_Post_Order')
                ->parse('<li><a href="{permalink}">{title}</a></li>'); ?>

本地测试通过。
回复