YiiBot in irc.freenode.org #yii

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



[*]Google

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]

@tydeas_dr

Looks like Matt (@elazar) appreciates your effort dude! Good job :slight_smile:

http://phergie.org/2010/12/03/yii-framework-using-phergie/

@backwardselvis

Thanks for mentioning it …remind my i must correct and send him the plugins this bot runs.

Is there a way to get a list of all the factoids in the !faq?

!faq list but dont know how often it updated

Our YiiBot has been unavailable for a few days now. It seems she may have fallen victim to anti-spam policies. I mention it here in case anyone knows how to bring her back online.

We miss her.

@fsb and rest of the ppl, Sorry about that. I faced some issues and was on vacation at that point of time. YiiBot is back to normal and I have updated the documentation to the 1.1.9 after public demand :).

I am also preparing some new enhancements for the already known commands.

New enhancement on YiiBot functionality:

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

Hello ppl,

Lately, due to lack of time I was not able to maintain properly the YiiBot (add features, guarantee 24/7 on room), so it was about time to retired ( they are bots after all :D ). Thanks to rawtaz and his effort the room is equipped with a new Bot MrFisk Read the wiki for the features it provide.

Thanks everybody for the support

You and YiiBot are the ones to thank tydeas, for having provided good bot service in #yii for over two years. And ciss too, I recall. Thank you!