views:

24

answers:

0

Hi I'm trying to use the CakePHP comments plugin found here http://cakedc.com/downloads/view/cakephp_comments_plugin but the instructions are really hard to follow. I've managed to add comments but it's displaying the commentWidget that's not working.

I'm getting confused at this part i think

To work properly, the component needs a specific variable to be set in every action using it. Its name should be either Inflector::variable(Controller::$modelClass) or Comments::$viewVariable should be set to other name of this view variable. That variable should contain single model record. for example you need to have next line in you view

So far I've created the comments table, added it to the pluging and components arrays and added the following code to the controller:

public function beforeFilter() {        
    parent::beforeFilter();     
    $this->passedArgs['comment_view_type'] = 'flat';
}

I added the route

Router::connectNamed(array('comment', 'comment_view', 'comment_action));

And also the Comments.CommentWidget as a helper in my controller.

I'm just wondering if anyone has used this plugin before and can help me out?

thanks,

Jonesy