By ron on Tuesday, 15 December 2015
Posted in General Issues
Replies 7
Likes 0
Views 1K
Votes 0
Hi guys,

Just got the pro version and I have a few Questions.

1. how to remove this line above the form:"Post comment as a guest" ?

2. Is it possible to add like/dislike?

3. how to add comments count to block view (what are the code lines I need to add).

4. When using AdsBlock I can't open the form if it's hidden (click to open), any thoughts about that?

5. I have a translation, not sure why but the cancel button on the form is not translated although it dose have translation.

6. Orphanitem, not sure I understand what it dose.

Thanks,
Ran
Hello Ron,

1. how to remove this line above the form:"Post comment as a guest" ?
- Go to this file ../components/com_komento/themes/wireframe/comment/form.php and remove this block of codes

2. Is it possible to add like/dislike?
- Yes, it is possible. You have to allow it in the ACL setting: http://screencast.com/t/cS81pTzatf

3. how to add comments count to block view (what are the code lines I need to add).
- You can use this:

$component = 'com_content';
$cid = 2; // ID of the joomla article
$commentsModel = Komento::getModel('comments');
$commentCount = $commentsModel->getCount($component, $cid);


4. When using AdsBlock I can't open the form if it's hidden (click to open), any thoughts about that?
- Can you provide us your backend and FTP access so we can have a better look on your issue here?

5. I have a translation, not sure why but the cancel button on the form is not translated although it dose have translation.
- This is known issues. Please replace the attached file in: ../components/com_komento/themes/wireframe/comment/form/cancelbutton.php and see how it goes.

6. Orphanitem, not sure I understand what it dose.
- May I know which orphaitem you are reffering to?

Hope these help.
·
Tuesday, 15 December 2015 19:20
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for the rapid replay.

I have solved some issue, on others i'll have to come back later.

The most important for me now is adding comments count to articles in blog view.

I am not a developer so it will take a moment.
$cid = 2 should be?
$cid = '($this->item->id, 'com_content');' 


and for displaying it I should add:

 
$commentsBlock = ' ';
if ($commentsCount) {
$commentsBlock = '<span class="comments-counter"><i class="fa fa-comment"></i>'.$commentsCount."</span>";
}

Thanks,
Ran
ron
·
Tuesday, 15 December 2015 19:51
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Ron,

The $cid is the article ID. If it is not working, you can provide us your backend and FTP, also the file path that you want to modify. I will help you with the basic.
·
Wednesday, 16 December 2015 10:07
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Nik,

I understand that, but $cid should be dynamic and not constant. looking for $cid= joomla article ID

Thanks,
Ran
ron
·
Wednesday, 16 December 2015 15:43
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello ron,

If you in the single article page, you can get from the URL like this:

$cid = JRequest::getVar('id');


But if you already have the Komento comment object, you can get the $cid like this:

$cid = $comment->cid;


·
Wednesday, 16 December 2015 15:48
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Nic,

I think because I am using modified blog item view, these two don't work for me.
All I needed was $cid = $this->item->id;

Ran
ron
·
Wednesday, 16 December 2015 16:22
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Ron,

If that is working for you, You can use it.
·
Wednesday, 16 December 2015 16:40
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post