Code Monkey home page Code Monkey logo

comments-module's People

Contributors

marcanuy avatar segoddnja avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

comments-module's Issues

custimizable of comments table

in Comments/CommentModule.php
add new public value $tableName='tbl_comments';
in Comments/models/Comment.php
public function tableName()
{
return Yii::app()->getModule('user')->tableName;
}

this solution will make customizable name of table

дамп таблички

Добрый день! Спасибо за Ваш модуль. Не могли бы Вы выложить дамп таблички, необходимой для работы Вашего расширения ? Или я плохо искал ?

Using Widget in views

I keep on getting the following error "This item can't be commentable" what should I do to fix this

[error] [php] include(ECommentsBaseWidget.php)

Please help!

[error] [php] include(ECommentsBaseWidget.php) [function.include]: failed to open stream: No such file or directory (F:\WEB\domains\yii\www\framework\YiiBase.php:427)
Stack trace:
#0 unknown(0): spl_autoload_call()
#1 F:\WEB\domains\yii\www\protected\modules\comments\models\Comment.php(338): class_exists()
#2 F:\WEB\domains\yii\www\framework\base\CComponent.php(111): Comment->getOwnerModel()
#3 F:\WEB\domains\yii\www\framework\db\ar\CActiveRecord.php(145): Comment->__get()
#4 F:\WEB\domains\yii\www\protected\modules\comments\controllers\CommentController.php(140): Comment->__get()
#5 F:\WEB\domains\yii\www\framework\web\actions\CInlineAction.php(49): CommentController->actionPostComment()
#6 F:\WEB\domains\yii\www\framework\web\CController.php(308): CInlineAction->runWithParams()
#7 F:\WEB\domains\yii\www\framework\web\filters\CFilterChain.php(133): CommentController->runAction()
#8 F:\WEB\domains\yii\www\framework\web\CController.php(1130): CFilterChain->run()
#9 F:\WEB\domains\yii\www\framework\web\filters\CInlineFilter.php(58): CommentController->filterAjaxOnly()
#10 F:\WEB\domains\yii\www\framework\web\filters\CFilterChain.php(130): CInlineFilter->filter()
#11 F:\WEB\domains\yii\www\framework\web\filters\CFilter.php(40): CFilterChain->run()
#12 F:\WEB\domains\yii\www\framework\web\CController.php(1145): CAccessControlFilter->filter()
#13 F:\WEB\domains\yii\www\framework\web\filters\CInlineFilter.php(58): CommentController->filterAccessControl()
#14 F:\WEB\domains\yii\www\framework\web\filters\CFilterChain.php(130): CInlineFilter->filter()
#15 F:\WEB\domains\yii\www\framework\web\CController.php(291): CFilterChain->run()
#16 F:\WEB\domains\yii\www\framework\web\CController.php(265): CommentController->runActionWithFilters()
#17 F:\WEB\domains\yii\www\framework\web\CWebApplication.php(282): CommentController->run()
#18 F:\WEB\domains\yii\www\framework\web\CWebApplication.php(141): CWebApplication->runController()
#19 F:\WEB\domains\yii\www\framework\base\CApplication.php(180): CWebApplication->processRequest()
#20 F:\WEB\domains\yii\www\index.php(13): CWebApplication->run()

REQUEST_URI=/comments/comment/postComment
in F:\WEB\domains\yii\www\protected\modules\comments\models\Comment.php (338)
in F:\WEB\domains\yii\www\protected\modules\comments\controllers\CommentController.php (140)
in F:\WEB\domains\yii\www\index.php (13)

Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM

выкидывает ошибку 1

Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM 
in path\www\protected\modules\comments\models\Comment.php on line 340

имхо для исправления строку
https://github.com/segoddnja/Comments-module/blob/master/models/Comment.php#L340
нужно заменить на

$this->_ownerModel =  CActiveRecord::model($ownerModel)->findByPk($key);

спс за отличное расширение

При нажатии Enter получаем ошибку

  1. Клик по "Добавить комментарий"
  2. Вводим текст и капчу
  3. Жмем не кнопку "Добавить комментарий", а жмем Enter
  4. Получаем редирект на http://myparty/comments/comment/postComment и ошибку:

2012/02/16 17:46:33 [error] [exception.CHttpException.400] exception 'CHttpException' with message 'Некорректный запрос.' in /Users/max/Sites/myparty/www/yii/web/CController.php:1133
Stack trace:
#0 /Users/max/Sites/myparty/www/yii/web/filters/CInlineFilter.php(59): CController->filterAjaxOnly(Object(CFilterChain))
#1 /Users/max/Sites/myparty/www/yii/web/filters/CFilterChain.php(131): CInlineFilter->filter(Object(CFilterChain))
#2 /Users/max/Sites/myparty/www/yii/web/filters/CFilter.php(41): CFilterChain->run()
#3 /Users/max/Sites/myparty/www/yii/web/CController.php(1146): CFilter->filter(Object(CFilterChain))
#4 /Users/max/Sites/myparty/www/yii/web/filters/CInlineFilter.php(59): CController->filterAccessControl(Object(CFilterChain))
#5 /Users/max/Sites/myparty/www/yii/web/filters/CFilterChain.php(131): CInlineFilter->filter(Object(CFilterChain))
#6 /Users/max/Sites/myparty/www/yii/web/CController.php(292): CFilterChain->run()
#7 /Users/max/Sites/myparty/www/yii/web/CController.php(266): CController->runActionWithFilters(Object(CInlineAction), Array)
#8 /Users/max/Sites/myparty/www/yii/web/CWebApplication.php(276): CController->run('postComment')
#9 /Users/max/Sites/myparty/www/yii/web/CWebApplication.php(135): CWebApplication->runController('comments/commen...')
#10 /Users/max/Sites/myparty/www/yii/base/CApplication.php(162): CWebApplication->processRequest()
#11 /Users/max/Sites/myparty/www/index.php(10): CApplication->run()
#12 {main}

REQUEST_URI=/comments/comment/postComment
HTTP_REFERER=http://myparty/user/profile/1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.