yiiext / comment-module Goto Github PK
View Code? Open in Web Editor NEWModule that adds comments to your application. You can add comments on any AR Model you like.
Home Page: http://yiiext.github.com/extensions/comment-module/index.html
Module that adds comments to your application. You can add comments on any AR Model you like.
Home Page: http://yiiext.github.com/extensions/comment-module/index.html
Well to add admin page for management of comments from one place?
overide getVersion()
of CModule
check if/how https://github.com/yiiext/commentable-behavior could be merged into this extension
file: yiiext/comment-module/blob/master/README.md
CREATE TABLE IF NOT EXISTS posts_comments_nm
(
postId
int(11) UNSIGNED NOT NULL,
commentId
int(11) UNSIGNED NOT NULL,
PRIMARY KEY (taskId
,commentId
),
KEY fk_tasks_comments_comments
(commentId
),
KEY fk_tasks_comments_tasks
(taskId
)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
in line PRIMARY KEY (taskId
,commentId
),
taskId
should be replaced by postId
WHY
IssueController cannot find the requested view "comment.views.comment.commentList".
put it in a file that will be published with asset manager
Have you had any milestone for this feature? Adding nested comment seems to be a great feature to be opt-in.
make it possible to mention people like this: @cebe
change to
public function tableName()
{
return '{{comments}}';
}
Or to take out in module options
Hi!
I've installed your app comment-module for yii-framework. This is only the beginning of my learning web development, and I can not understand why I do not work comment-option-delete? If you're not hard, help in what could be the reason.
I really hope for your answer!
Its my config:
'comment'=>array(
'class'=>'ext.comment-module.CommentModule',
'commentableModels'=>array(
// define commentable Models here (key is an alias that must be lower case, value is the model class name)
'event'=>'Event'
),
// set this to the class name of the model that represents your users
'userModelClass'=>'User',
// set this to the username attribute of User model class
'userNameAttribute'=>'username',
// set this to the email attribute of User model class
'userEmailAttribute'=>'email',
// you can set controller filters that will be added to the comment controller {@see CController::filters()}
// 'controllerFilters'=>array(),
// you can set accessRules that will be added to the comment controller {@see CController::accessRules()}
// 'controllerAccessRules'=>array(),
// you can extend comment class and use your extended one, set path alias here
// 'commentModelClass'=>'comment.models.Comment',
),
This is my dump database:
Это мой dump database:
CREATE TABLE IF NOT EXISTS comments
(
id
int(11) NOT NULL AUTO_INCREMENT,
message
text COLLATE utf8_unicode_ci,
userId
int(11) NOT NULL,
createDate
datetime DEFAULT NULL,
PRIMARY KEY (id
),
KEY fk_comments_userId
(userId
),
CONSTRAINT FK_user_users FOREIGN KEY (userId) REFERENCES tbl_users
(id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE IF NOT EXISTS `comment_event` (
`eventId` int(11) NOT NULL,
`commentId` int(11) NOT NULL,
PRIMARY KEY (`eventId`,`commentId`),
CONSTRAINT `FK_coments_event_comment` FOREIGN KEY (`commentId`) REFERENCES `comments` (`id`),
CONSTRAINT FK_comments_event
FOREIGN KEY (eventId
) REFERENCES event
(id
) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
Sincerely, Dmitry Gorbachev.
from Ukraine
asc/desc
consider using widgets instead of renderPartial to include comments form and list.
Thank you very much your COMMENT-the MODULES. Problems encountered in use. There have been errors: Event IssueController.onAfterConstruct, "is not defined.
Do I want to how to resolve this error?
There are currently problems with updating Comments.
It is not easy to find out to which Model a comment belongs.
Therefore onUpdateComment and onDeleteComment Events currently has no related record
Something like "This comment by XXX has been deleted by YYY on DATE."
12:00:00 AM
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.