[Extension] Yii-Forum

THis is the support thread of Yii-forum, an easy to install, mostly self-contained forum module.

Extension page

Currently looking at the demo I see an issue. When you click on the user who has posted ( by admin for instance) it leads to 404 error.

Example url: http://yii-forum.pagodabox.com/forum/forum/view/id/12

click on the user that has posted.

The user url has a problem. Click on user name of a post.

I need a specific table for users? Because my system has a "customer" table, i can integrate with it?

My portal: www.devgames.com.br

Ah, yeah, the user link currently don’t go anywhere, or, more accurately, going to a hard coded url. This will be configurable in the next release.

You can easily edit the file yii-forum/models/forumuser.php, at the bottom, the getUrl method. That should fix all user links throughout the forum.

Sorry about that!

Edit: Oh, make sure you change $this->id to $this->siteid as well!

Edit again: This does not work. Please use version 0.2

Hi,

And about the user table?

You’ll have to create your own. in your case, you can change the getUrl method to something like




    return Yii::app()->createUrl('customer/view', array('id'=>$this->siteid));



Edit: The above will not work. Please use version 0.2

Are we to expect a lot of new versions of this extensions in the near future, or are you pretty much done with it now? I’m asking because in about a month i’m going to set up a forum on my clients website, and at the moment your extension doesn’t live up to the expectations my client has. However, it would be foolish of me to begin creating a new forum, or build a lot upon yours if you are going to update it in a near future :)

By the way, it looks like this extension has potential to become great :)

Glad you like it! I don’t have a lot of time to put into it right now. If you’re willing to contribute, I can put it on github or something (will probably do that anyway), give you write access, and you can have at it. I do however not intend to make it a full blown forum with all sorts of bells and whistles (like MyBB, phpBB, you name all the big ones) that makes it half a CMS. That’s not what a forum is for in my opinion. But there are some features that are definitely still missing, or ripe for improvement. Let me know if you’re interested in going that route.

Property "Forumuser.firstseen" is not defined.How to resolve this?

I’m using yii-forum with the blog demo. Both the blog and yii-forum have a Post model. Other than renaming Post to Forumpost, is there another work around? Also, is this on github?

Very nice. Greatings dude. How to translite your Yii forum extension?

Updated i found how to do it.

Now another question how to specify a mybb theme?

Updated i found how to do it.

Another question is how to edit titles for all pages?

It wasn’t letting users edit their own posts… the following needs to be changed:


views\thread\_post.php


from

<?php if($isAdmin || Yii::app()->user->id == $data->author_id): ?>


to

<?php if($isAdmin || Yii::app()->user->forumuser_id == $data->author_id): ?>


controllers\PostController.php


from

if(!Yii::app()->user->isAdmin && YII::app()->user->id != $post->author_id)


to

if(!Yii::app()->user->isAdmin && Yii::app()->user->forumuser_id != $post->author_id)

Did you figure this out?

/modules/yii-forum/views/thread/_post.php


            if($isAdmin)

            {

                $deleteConfirm = "Are you sure? This post will be permanently deleted!";

                echo '<div class="admin" style="float:right; border:none;">'.

                        CHtml::ajaxLink('Delete post',

                            array('/forum/admin/deletepost', 'id'=>$data->id), // change

                            array('type'=>'POST', 'success'=>'function(){document.location.reload(true);}'),

                            array('confirm'=>$deleteConfirm, 'id'=>'post'.$data->id)

                        ).

                     '</div>';

            }

Change to:


array('/forum/post/delete', 'id'=>$data->id),

@Caliban: Are you still developing this? Or, did you ever put it on Github?

I just discovered this, and saw that the last release was from october.

Love the extension, by the way :)

Hi,

the solution to this problem




ALTER TABLE  `forumuser` ADD  `firstseen` DATETIME NOT NULL ,

ADD  `lastseen` DATETIME NOT NULL



Hi Guys,

nice extension. I’m not a big css guru, but I would like to know if there is a way to make the forum look like the bootstrap extension?

thanks a lot!

I’ve found BootGroupGridView:

  • is it meant to display the forum like a bootstrap widget, I mean like a bootstrap designed grid?

  • BootGroupGridView extends BootGridView, but from my yii bootstrap extension, BootGridView is missing by default. what to do to make it work? I’ve tried to:

  • change in modules\yii-forum\views\forum\view.php this:


$this->widget('forum.extensions.groupgridview.GroupGridView', ...

to this


$this->widget('forum.extensions.groupgridview.BootGroupGridView', ...

but I just get error, that BootGridView.php is missing in extensions/bootstrap/widgets -> I’ve inserted BootGridView.php in extensions/bootstrap/widgets, next: BootDataColumn.php is also missing. next error:

there was a problem also with preheader, but I’ve just copied the appropriate parts from GroupGridView.php and it seems there is no more problems with it. next error:


Property "Bootstrap.popoverSelector" is not defined.

it’s in protected\extensions\bootstrap\widgets\BootGridView.php(68)


$popover = Yii::app()->bootstrap->popoverSelector;

now it’s already beyond my knowledge. is there a simple way to make it look like a bootstrap grid?

thanks a lot!

okay, I guess I’ve found something relevant here, especially this:


(...yii-bootstrap is now resided in a module,) Yii:app()->bootstrap is not exists in this case.

I solved this problem by determine whether yii-bootstrap is resided in a module or not:


$module = ( Yii::app()->controller->module ? Yii::app()->controller->module : Yii::app() );

$popover = $module->bootstrap->popoverSelector;

$tooltip = $module->bootstrap->tooltipSelector;

now! the next error message I get, is


Property "YiiForumModule.bootstrap" is not defined.

so this is why the whole problem happened. this is the core problem. I don’t know yet how to solve it, or what does it mean in fact, but I’m trying to solve it. any help is greatly appreciated.

thanks

Great ext!

Easy to install, and easy to modify.

I have one question tho, the


Yii::app()->controller->module->format_date

how can i customize that? Cant seem to find it, i need to translate it.

Thanks!