Viima / jquery-comments

The Javascript library of choice for implementing commenting in your web app
http://viima.github.io/jquery-comments/
MIT License
293 stars 118 forks source link

Automatically created comment, without approval #110

Open danman1234 opened 7 years ago

danman1234 commented 7 years ago

If i write a comment or reply, i see that the comment is automatically created.

I want to approve the comment first before i want to show this. Eventhough the text etc is not shown, only thumbs and the comment-wrapper class is created on the fly after i press the send button. By default the send button is deleted, but i have removed the line responsible for this, but now i dont know how to stop the comment-wrapper to be created

How can i stop this?

nxhoang commented 7 years ago

I think you should create new property like "IsApprove". If IsApprove = true --> allow displaying.

danman1234 commented 7 years ago

I have put IsApprove:false, and IsApprove:true without any diffference: `$('#comments-container').comments({

                profilePictureURL: 'http://www.test.com',
                currentUserId: <?=$_SESSION['sesId']?>,
                roundProfilePictures: true,
                textareaRows: 1,
                blog_id: parseInt(<?=$blog_id?>),
                enableAttachments: false,
                enableHashtags: true,
                profileURL:'http://www.test.com/<?=$reg1Url?>/<?=$seo_title?>', 
                enablePinging: true,
                IsApprove:false,
                getUsers: function(success, error) {
                    setTimeout(function() {
                        success(usersArray);
                    }, 500);
                },

no difference whatsoever`. Where is the whole displaying part of the comment, after i clicked on the send button?

UPDATE

I isee in jquery-comments on

// reverse mapping:

>             commentJSON = this.applyExternalMappings(commentJSON);
> 
>             var success = function(commentJSON) { ;
>                // self.createComment(commentJSON);
>                // commentingField.find('.close').trigger('click');
>             };
> 

This i commented now it will not show after i press the send button