PHP Class Jianshu_Plugin, jianshu

Author: 绛木子
Inheritance: implements Typecho_Plugin_Interface
Show file Open project: jiangmuzi/jianshu

Public Methods

Method Description
activate ( ) : void 激活插件方法,如果激活失败,直接抛出异常
beforeRender ( $contents ) 图片地址替换为七牛CDN
config ( Typecho_Widget_Helper_Form $form ) : void 获取插件配置面板
deactivate ( ) : void 禁用插件方法,如果禁用失败,直接抛出异常
filterUser ( $value, $users ) 获取用户信息
personalConfig ( Typecho_Widget_Helper_Form $form ) : void 个人用户的配置面板
randColor ( ) : string 生成随机颜色值
selectHandle ( $archive ) cleanAttribute('fields')清除查询字段,select *
tagCloud ( $params = null, $format = '<a href="{permalink}" style="{fontsize};{color};" title="{count}篇文章">{name}</a>' ) : void 标签云
viewCounter ( $archive ) : void 增加浏览量

Method Details

activate() public static method

激活插件方法,如果激活失败,直接抛出异常
public static activate ( ) : void
return void

beforeRender() public static method

图片地址替换为七牛CDN
public static beforeRender ( $contents )

config() public static method

获取插件配置面板
public static config ( Typecho_Widget_Helper_Form $form ) : void
$form Typecho_Widget_Helper_Form 配置面板
return void

deactivate() public static method

禁用插件方法,如果禁用失败,直接抛出异常
public static deactivate ( ) : void
return void

filterUser() public static method

获取用户信息
public static filterUser ( $value, $users )

personalConfig() public static method

个人用户的配置面板
public static personalConfig ( Typecho_Widget_Helper_Form $form ) : void
$form Typecho_Widget_Helper_Form
return void

randColor() public static method

生成随机颜色值
public static randColor ( ) : string
return string

selectHandle() public static method

cleanAttribute('fields')清除查询字段,select *
public static selectHandle ( $archive )

tagCloud() public static method

标签云
public static tagCloud ( $params = null, $format = '<a href="{permalink}" style="{fontsize};{color};" title="{count}篇文章">{name}</a>' ) : void
return void

viewCounter() public static method

增加浏览量
public static viewCounter ( $archive ) : void
return void