ogheo / yii2-comments Goto Github PK
View Code? Open in Web Editor NEWComments module for Yii2.
License: MIT License
Comments module for Yii2.
License: MIT License
What about delete the comments?
hi ! thank you for your module, seems perfect..
maybe for table prefix in comments model
public static function tableName() { return '{{%comments}}'; }
and in
_form.php 'action' => Url::to( '/comments/default/create'
and validation url 'validationUrl' => Url::to(['/comments/default/validate']),
i have add a slash for my configuration.
my problem:
i have a page with multi item and infinite scroll pagination.
i've seen in code the register asset output
jQuery('#w0-comments').comment({"wrapperId":"#w0-comments","formSelector":"#w0-comment-form","showCommentsId":"#w0-show-comments","fullCommentsId":"#w0-comments-full","pjaxContainerId":"#w0-comments-container","formContainerId":"#w0-comments-container-form","submitButtonId":"#w0-submitButton","postButtonName":"Post","replyButtonName":"Reply","ratingUrl":"/it/user/comments/default/rate"}); | jQuery('#w0-comment-form').yiiActiveForm([{"id":"comments-content","name":"content","container":".field-comments-content","input":"#comments-content","validateOnChange":false,"validateOnBlur":false,"validate":function (attribute, value, messages, deferred, $form) {yii.validation.required(value, messages, {"message":"Share your thoughts... non può essere vuoto."});yii.validation.string(value, messages, {"message":"Share your thoughts... deve essere una stringa.","min":4,"tooShort":"Share your thoughts... dovrebbe contenere almeno 4 caratteri.","skipOnEmpty":1});}}], {"validationUrl":"/it/comments/validate"}); | jQuery(document).pjax("#w0-comments-container a", {"push":true,"replace":false,"timeout":1000,"scrollTo":false,"container":"#w0-comments-container"}); | jQuery(document).on("submit", "#w0-comments-container form[data-pjax]", function (event) {jQuery.pjax.submit(event, {"push":true,"replace":false,"timeout":1000,"scrollTo":false,"container":"#w0-comments-container"});});
how can i make your code working with the ias option running?
any suggestions?
thank you very much!
Hi,
I would like to hook afterSave event, how can I do that?
Thank you.
What about the update the comments?
How to set correct routes to comment create, thumbs-up and thumbs-down actions, because default values are related to page, where widget is called?
I am getting this error while applying migration also I have found that the comments table is not got created in DB whereas as the table comments_rating is got created.
I am getting this error I have configured comment widget in this way.
<?= Comments::widget();
?>
Everything worked the widget is showing the comment section to logged in users also user is able to post comment the comments are getting stored in Db as well but after posting the comment this error is showing to the user.
Hi,
It seems to me that the methods getAuthorAvatar(), getAuthorName(), getAuthorUrl() should be located in the the comments model rather than the attached model.
Currently, they look like methods in the attached model however the attached model doesn't know anything about each any comment (unless you decide to call the methods with created_by as parameter).
What do you think, am I smoking the wrong thing?
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.