2 Star 8 Fork 6

院主/typecho-fans插件库

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

插件说明

通过引入两个抽象类扩展实现八种常用侧边栏文章或评论数据输出。

日志类 TeKit_Contents

随机日志 Random

输出代码示例:

<?php $this->widget('TeKit_Contents')->Random(10)
    ->parse('<li><a href="{permalink}">{title}</a></li>'); ?>
参数名称 是否必须 默认值 说明
number 10 显示数量
最多评论日志 MostCommented

输出代码示例:

<?php $this->widget('TeKit_Contents')->MostCommented(10)
    ->parse('<li><a href="{permalink}">{title}</a></li>'); ?>
参数名称 是否必须 默认值 说明
number 10 显示数量
历史上当天日志 HistoryToday

输出代码示例:

<?php $this->widget('TeKit_Contents')->HistoryToday(10)
    ->parse('<li><a href="{permalink}">{title}</a></li>'); ?>
参数名称 是否必须 默认值 说明
number 10 显示数量
历史上当月日志 HistoryTomonth

输出代码示例:

<?php $this->widget('TeKit_Contents')->HistoryTomonth(10)
    ->parse('<li><a href="{permalink}">{title}</a></li>'); ?>
参数名称 是否必须 默认值 说明
number 10 显示数量

评论类 TeKit_Comments

最多评论的人 MostCommentors

输出代码示例:

<?php $this->widget('TeKit_Comments')->MostCommentors(365,10,true)
    ->parse('<li><a href="{url}">{author} ({cnt})</a></li>'); ?>
参数名称 是否必须 默认值 说明
days NULL 多少天内
number 10 显示数量
ignore true 不包含作者
最多沙发的人 MostSofaCommentors

输出代码示例:

<?php $this->widget('TeKit_Comments')->MostSofaCommentors(365,10,true)
    ->parse('<li><a href="{url}">{author} ({cnt})</a></li>'); ?>
参数名称 是否必须 默认值 说明
days NULL 多少天内
number 10 显示数量
ignore true 不包含作者
评论人评论数量 CommentorNumber

输出代码示例:

<?php echo $this->widget('TeKit_Comments')->CommentorNumber('admin','test@test.com',365); ?>
参数名称 是否必须 默认值 说明
author 昵称
mail Email
days 30 多少天内
评论人评论 CommentorComments

输出代码示例:

<ul class="widget-list">
    <?php $this->widget('TeKit_Comments')->CommentorComments('admin','test@test.com',365)->to($tekit); ?>
    <?php while($tekit->next()): ?>
        <li>
        <a href="<?php $tekit->permalink(); ?>"><?php $tekit->author(); ?></a>:
        <?php $tekit->excerpt(35, '...'); ?>
        </li>
    <?php endwhile; ?>
</ul>
参数名称 是否必须 默认值 说明
author 昵称
mail Email
days 30 多少天内
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/taotecode/typecho_fans_plugin_library.git
git@gitee.com:taotecode/typecho_fans_plugin_library.git
taotecode
typecho_fans_plugin_library
typecho-fans插件库
master

搜索帮助