Yii 1.1: bbii

Forum module

This module will add a fully functional forum to an existing Yii 1.1 application.


  • Clear forum structure and forum functionality.
  • CKEditor for wysiwyg.
  • Private messaging.
  • Moderation.
  • Search functionality.
  • Language support (Dutch, English, German, Russian included).
  • Time zone handling.
  • Post upvoting.
  • Polls.


Yii 1.1.8 or above.
PHP 5.3 or above (a work-around for PHP 5.2 exists).
The application to which BBii is added needs to have a user table.


  • Extract the zip file to the application's protected/modules directory
  • Create database tables according to bbii/data/schema.mysql.sql
  • Import sample data from bbii/data/sampledata.mysql.sql
  • Create the subdirectory ‘avatar’ in your application webroot directory to which the application must be given read/write access rights.
  • Edit your configuration to register the module (the default option values may need to be adjusted):
  • BBii requires a user database table to be present that at least contains an integer user ID field and a varchar user name field. BBii also expects Yii::app()->user->id to return the user ID, not the user name. The model for the user table and the column names for the user ID column and the user name column are part of the module options.
  • Log in to your application with the user that has the user ID equal to the value for the option ‘adminId’ to acquire administration rights in BBii.
  • Navigate to http://[ your base url ]/forum. Click the link ‘Forum settings’ and set up the forum.

NOTE: BBii uses the layout '//layouts/column1' that comes with the default Yii application. When you need to use a different layout this needs to be changed in the script components/BbiiController.php.


The following configuration options can be used:
adminId: the user ID (integer) for the user to receive the admin authorization (default value: false). When the application uses rbac and the role ‘admin’ exists the users that get the role ‘admin’ assigned will also be admin for BBii.
avatarStorage: The directory in which uploaded avatar images are stored relative to the application webroot directory (leading ‘/’ required) (default value: '/avatar').
forumTitle: The name for the forum (default value: 'BBii Forum').
userClass: The model name of the database table that contains the user authentication information for User ID and User name (default value: 'User').
userIdColumn: The column name of the User class field that contains the User ID (default value: 'id').
userNameColumn: The column name of the User class field that contains the User name (default value: 'username').
userMailColumn: The column name of the User class field that contains the User e-mail address (default value: false).
dbName: The name of the db component to use to connect to the forum database tables (default value: false)
topicsPerPage: The number of topics to display on a single page (default value: 20).
postsPerPage: The number of posts to display on a single page (default value: 20).
purifierOptions: The CHtmlPurifier options.
editorToolbar: The toolbar options for the CKEditor.
editorSkin: The CKEditor skinName configuration setting (default value: 'moono').
editorUIColor: The CKEditor uiColor configuration setting (default value: '').
editorContentsCss: The CKEditor contentsCss configuration setting (default value: array()).
juiTheme: The theme for the jQuery UI widgets (default: 'base').
bbiiTheme: The theme for the BBii module itself (default: 'base').

Embedded Extensions

  • editMe (Support for editMe has discontinued. BBii contains its own version of editMe that uses CKEditor 4.4.0)


  • v1.0.9 (March 18, 2015)
    • Added topic subscription.
    • CKEditor plugin support added to editMe extension.
  • v1.0.8 (February 28, 2015):
    • Changed CListView template and pager for topics and posts.
    • Changed paging through topic posts by adding scroll to top.
    • Minor improvements to the base forum.css file.
    • Minor bugfix.
  • v1.0.7 (January 22, 2015):
    • Russian language file added.
    • Minor bugfixes.
  • v1.0.6 (January 15, 2015):
    • Reworked forum/topic read indication.
  • v1.0.5 (August 29, 2014):
    • Module parameter dbName added.
  • v1.0.4 (July 16, 2014):
    • Bugfixes.
  • v1.0.2 (June 28, 2014):
    • Page titles reflecting forum names and topic titles.
    • Indicate topics with own posts.
    • Excluded spiderbots/webcrawlers from forum statistics.
    • Sanitized displays for absense of Javascript.
  • v1.0.1 (June 7, 2014):
    • Collapsing forum groups.
  • v1.0.0 (May 25, 2014):
    • Improved support for theming.
  • v0.94 (May 17, 2014):
    • Removed dependency on module id from the code.
  • v0.93 (May 12, 2014):
    • ColorPicker removed.
    • Upgraded editMe to version 2.1.
    • Added CKEditor 'skin' configuration to editMe 2.1.
    • Upgraded CKEditor to version 4.4.0.
    • Included CKEditor skins 'moonocolor' and 'kama'.
  • v0.9 (Apr. 6, 2014): Moderator mail. Membergroup forums.
  • v0.82 (Mar. 26, 2014): Improvements to pm.
  • v0.81 (Mar. 16, 2014): Security related bugfixes.
  • v0.8 (Nov. 30, 2013): More module options. A grey-themed css file. German translation.
  • v0.7 (Nov. 16, 2013): Polls. Show upvoted by.
  • v0.6 (Nov. 1, 2013): Post upvoting.
  • v0.5 (Aug. 20, 2013): Indicate unread forums and topics.
  • v0.4 (Aug. 18, 2013): Moderator assignment. Member group icons.
  • v0.3 (Aug. 4, 2013): User e-mail form added. Session count for statistics.
  • v0.2 (Aug. 1, 2013): Search functionality added.
  • v0.1 (Jul. 27, 2013): Initial release.


Total 20 comments

#19544 report it
Rajith R at 2015/08/31 03:33am
Good one

Great Extension.

Thank you Ronald van Belzen

#19264 report it
kenjisoul at 2015/05/03 02:22pm
Is support Yii2?

Can use this extension in Yii2? and How to config in Yii2?

#19138 report it
Bui Sy Nguyen at 2015/03/27 12:38pm
Great work

Thank you very much!

#19088 report it
malkabani.com at 2015/03/11 07:53am
add bbii to theme

hi i want to add bbii to my current theme but i can't found rgiht way????

#19034 report it
Ronald van Belzen at 2015/02/28 03:04pm
Re: e-mail notification
#19006 report it
topeyaki at 2015/02/23 10:20pm
email notification

Hi, does this module already support sending of email notification when users post in the forum?

#18925 report it
oligalma at 2015/02/04 06:20pm
I get an error

Trying to get property of non-object


<th><?php echo Yii::t('BbiiModule.bbii','Newest member'); ?></th><td><?php $member = BbiiMember::model()->newest()->find(); echo CHtml::link($member->member_name, array('member/view', 'id'=>$member->id)); ?></td>
#18486 report it
Ronald van Belzen at 2014/11/05 03:50am
RE: newbee

Support questions can be asked in the forum support topic.

#18480 report it
omeraslam at 2014/11/04 07:41pm

sorry guys found it in forum settings , just went thriughthe manual , sorry again :D

#18479 report it
omeraslam at 2014/11/04 07:34pm

whee do i get to create the forums couldnt find any link , do i have to enter it manualy into the database

#17470 report it
topeyaki at 2014/06/17 11:28pm
ckeditor not showing

Hi, thanks for this great extension. encountered a problem though, ive set up and followed all instruction and run my app but the editor is not working. it just shows the textarea and no buttons for text styles.

#17411 report it
iamsyt at 2014/06/07 11:51am
css not compatiable with IE8

i have found the background-size, table-cell in forum.css, have compatialble issues with IE8

#17197 report it
Ronald van Belzen at 2014/05/12 08:57am
Version 0.93

In BBii version 0.93 the included extension editMe v2.0 is replaced by editMe v2.1. When updating to BBii 0.93 it is necessary to clear the /assets directory of the root of the application to which the BBii module is added.

Those who do not like the new default CKEditor 4.x skin moono can configure BBii to use the skin kama that was used by CKeditor 3.x in the previous versions of BBii.

#17103 report it
Ronald van Belzen at 2014/05/03 04:34am
Re: little bug

I would like to restrict the bug reports and support to the forums. Please visit Forum post for your answer.

#17095 report it
MR.omid at 2014/05/02 12:09pm
little bug

i found a little bug on 'message' model. maybe did you mean 'sendfrom' instead of 'sendto'?

public function mailboxFull($attr, $params) {
        $criteria = new CDbCriteria;
        $criteria->condition = 'sendto = '. Yii::app()->user->id;
        if(BbiiMessage::model()->outbox()->count($criteria) >=50) {
            $this->addError('sendto', Yii::t('BbiiModule.bbii', 'Your outbox is full. Please make room before sending new messages.'));

and simple question is, how to add user as moderator?

#16228 report it
Ronald van Belzen at 2014/02/01 03:42am
Re: Awesome work!

Thanks, and yes, I knew about it, but it slipped my mind. I will included this in the next release. Thanks for reminding me.

#16226 report it
webego at 2014/01/31 02:56pm
Awesome work!

Thank you for taking the time to put this together. Very nice indeed!

Have noticed that whilst you can set a forum to not be public, this just hides it from the list of forums. If you know (or guess) the url of the forum or any of the associated posts, you can still see these when logged out.

#15973 report it
Peter NewbYii at 2014/01/06 06:56am
Great extension!

Thank you for your work! It's great extension.

#15507 report it
Ronald van Belzen at 2013/11/16 10:18am
Version 0.7 is available

BBii version 0.7 has added polls to the module.

#15367 report it
Ronald van Belzen at 2013/11/01 02:35pm
Re: Default timezone and language

The info icons in the forum settings would have "given" you the answers:

You cannot set the language of the forum separate from the application to which the module is added. The forum language will be the language set in the config/main.php "language" parameter, for example (dutch):

return array(

As for the default timezone. You cannot set it separate from the setting in your php.ini file, which is part of the PHP installation. But you can override the setting of "date.timezone" parameter either in the source code or by adding this override in a ".user.ini" file, which is supported since PHP 5.3.0.

Leave a comment

Please to leave your comment.

Create extension