标题 | Typecho利用BufannaoCms插件打造成CMS网站 |
内容 | BufannaoCms插件是由不烦恼开发的一款typecho插件,通过BufannaoCms插件可以轻易地把typecho打造成独具特 色的CMS网站。插件实现了文章幻灯片、推荐文章列表、文章相册、随机文章、热评文章、评论留言分离、评论足迹、内容引用、文章分页、随机标签、文章自定 义排序和文章缩略图功能。 作者给出的BufannaoCms插件调用代码: 文章幻灯效果: BufannaoCms_Plugin::slideShow()->to($slider) 推荐文章列表: BufannaoCms_Plugin::topShow()->to($top) 文章相册效果: BufannaoCms_Plugin::albumShow()->to($album) 随机文章列表: BufannaoCms_Plugin::randomShow()->to($randomShow) 热评文章列表: BufannaoCms_Plugin::hotShow()->to($hot) 评论留言分离: BufannaoCms_Plugin::onlyComment()->to($comments) BufannaoCms_Plugin::onlyMessage()->to($messages) 评论足迹功能: BufannaoCms_Plugin::CommentTracks()->to($tracks) 内容引用功能: BufannaoCms_Plugin::quoteShow('slug', 'tag') 文章分页功能:文章内容中插入< !--nextpage--> 随机标签功能: BufannaoCms_Plugin::randomTag()->to($tags) 文章自定义排序: $widget->widget($widget, '', 'orderBy=col') 调用文章中的第一个图片:返回图片 $widget->firstImageUrl; 显示图片 $widget->firstImageUrl() 调用代码使用方法: 插件作者给出的调用代码并不是直接帖上去使用的,提供的仅是个相关函数,还需要博主动手进行添加。下面是一个显示随机文章的例子,使用循环语句 while loop输出,有兴趣的朋友可以举一反三调用其它的,研究过z-blog或者wordpress模板的朋友应该很容易理解: <?php BufannaoCms_Plugin::randomShow()->to($randomShow); ?> <ul> <?php while($randomShow->next()): ?> <li><a href="<?php $randomShow->permalink(); ?>"><?php $randomShow->title(); ?></a></li> <?php endwhile; ?> </ul> 插件使用方法: 下载插件,上传插件文件夹到usr/plugins/目录下,登陆博客后台,在插件列表中激活该插件 点击插件的“设置”进入插件参数设置界面,可以对文章的显示数量进行修改 |
随便看 |
|
在线学习网考试资料包含高考、自考、专升本考试、人事考试、公务员考试、大学生村官考试、特岗教师招聘考试、事业单位招聘考试、企业人才招聘、银行招聘、教师招聘、农村信用社招聘、各类资格证书考试等各类考试资料。