Keyword

Add Post Comments to Any Category Permission

  • Omar Ramos
  • Omar Ramos's Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 7 months ago #78491 by Omar Ramos
I thought that having the ability to post comments was available to every category, but when you give a user permissions to only a few categories and then enable the ability to Post Comments they then become limited to only posting comments for the categories they have permissions to add items into.
While some people may want this behavior, in my case it wasn't what was expected and I feel there is the need for an additional permission option of "Add Comments to Any Categories" so that a user can still be limited to only creating items in a few categories, while still having the ability to post comments in any category.

I'll try and look into how this can be added and see if I can do so on my own, but I wanted to mention it here first.

Please Log in or Create an account to join the conversation.

  • Omar Ramos
  • Omar Ramos's Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 7 months ago #78492 by Omar Ramos
Replied by Omar Ramos on topic Add Post Comments to Any Category Permission
I was able to add this functionality fairly easily (and in the proper manner too) so it should be easy to add to the next K2 release.

All that was needed was to modify the userGroup.xml file located here:
administrator/components/com_k2/models/userGroup.xml

I modified the comment parameter to have a new "2" value option for "Comment on All Categories" and renamed the other two to more correctly reflect the proper functionality:
No Categories
Selected Categories
All Categories

Then some slight modification in the K2HelperPermissions file to support the new option:
components/com_k2/helpers/permissions.php on line 118:
if ($permissions->get('comment') == '1') {
// Enable comments only for selected categories
$auth->addACL('com_k2', 'comment', 'users', $user->usertype, 'category', $category);
} else if ($permissions->get('comment') == '2') {
// Enable comments for all categories
$auth->addACL('com_k2', 'comment', 'users', $user->usertype, 'category', 'all');
}

Please Log in or Create an account to join the conversation.

More
14 years 6 months ago #78493 by Robert Broughton
Replied by Robert Broughton on topic Add Post Comments to Any Category Permission
I want to create the ability to close comments on an article.

Probably the easiest way to do this would be to not display the comments form if the article is more than, say, eight days old.

It would be better, however, to have something in administration to close comments, but still display comments that have already been posted.

Any ideas on the best way to implement this?

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #78494 by mojito
Yes I just found this post and wanted the same functionality. How and where can I set this setting.

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #78495 by Doug M
I would like to be able to set up comments only for categories and NOT individual posts.  Does anyone know if  this Is possible?  I'm using Jcomments.

 

I'll check on their site also.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum