YiiBot is retired. Check [size="7"]MrFisk[/size]
[size="5"]YiiBot in irc.freenode.org #yii[/size]
As most of you people may know there is an irc channel in the irc.freenode.org server related to yii framework. The last months with the contributions and the support of many channel users i have been hosting a YiiBot to help us with documentation and other stuff related to the yii framework.
From this post i would like to introduce this bot and it’s functionality. Everybody interesting of using/supporting/contributing is welcome.
The bot is a Phergie bot ( here i would like to thank Elazar and the rest of the people contribute in this project ), with some extra plugins i wrote. I would like to separate the bot purpose and ablity in 4 parts:
[list=1]
[*]Api: Documentation help
[*]Factoid: Usefull factoids about yii and other thinks
[*]Search: Shortcut to the yiiframework search
[*]Google: Quick google search
[/list]
Below there is a brief description of each functionality among with some examples of use.
[list=2]
[*]Api plugin has to ability to quickly provide you with information about a yii class or a yii method even a property.
Retrieve info about a class:
!api class
Example:
<user>!api chtml
<YiiBot> system.web.helpers CHtml CHtml is a static class that provides a collection of helper methods for creating HTML views. http://www.yiiframework.com/doc/api/CHtml
Retrieve info about a classes method:
!api class::method
Example:
<user>!api chtml::label
<YiiBot>CHtml::label() Generates a label tag. http://www.yiiframework.com/doc/api/CHtml#label-detail
New: Retrieve method signature. Using the -s option you can retrieve the signature of the method.
!api -s class::method
<user>!api -s CHtml::listdata
<YiiBot>public static array listData(array $models, string $valueField, string $textField, string $groupField='') http://www.yiiframework.com/doc/api/CHtml#listData-detail
Retrieve info about a classes property:
!api class::$property
Example:
<user>!api chtml::$afterRequiredLabel
<YiiBot> CHtml::$afterRequiredLabel the HTML code to be appended to the required label. http://www.yiiframework.com/doc/api/CHtml#afterRequiredLabel-detail
Get help about !api:
!api help ( this will return a brief instructions on usage )
[*]Factoids is a plugin to store and retrieve usefull factoids.
Notice: Wildcards are not allowed in any of the following commands
Add a factoid with key: name of the factoid and value: meaning of the factoid.
This command won’t add a factoid if you do not have “is” to separate the key from the value, or there is already a factoid with the same key.
Example:
<user>!add yii is The Fast, Secure and Professional PHP Framework.
To view a factoid use command !faq with the key of the factoid.
Example:
<user>!faq yii
<YiiBot>The Fast, Secure and Professional PHP Framework.
To view author of factoid use !faq with option -a like:
Example:
<user>!faq -a yii
<YiiBot>user
To delete a factoid use command !del with the name of the factoid. This command won’t del a factoid if you are not the author of the factoid.
Example:
<user>!del yii
Ratings command will from default will return the 3 authors with the most factoids.
!rates
If you pass a number n command will return the n authors with the most factoids, where n is an int.
!rates n
Help command will return a help text describing briefly all the above.
!faq help
[*]Search
This command is a shortcut to the yii framework search, so you can quickly search in www.yiiframework.com.
<user>!search extension
<YiiBot>http://www.yiiframework.com/search/?q=extension
This plugin provides you with quick google search not only yii related.
Example:
<user> !g yii
< YiiBot>user: [ Yii Framework: Best for Web 2.0 Development ] - http://www.yiiframework.com/ - More results: http://www.google.com/search?oe=utf8&ie=utf8&source=uds&start=0&hl=en&q=yii
[/list]