Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

JoomlaTune Support Forum    JComments component    Suggestions, Wishlists & Feature Requests    Topic: Moderator only
Pages: [1]   Go Down
  Print  
Author Topic: Moderator only  (Read 1687 times)
0 Members and 1 Guest are viewing this topic.
daniel
Newbie
*

Karma: 0
Offline Offline

Posts: 3


« on: September 12, 2010, 15:30:01 »

Hi everyone,
There is a function that I would really love to see in JComments: The ability to make the discussion on a certain article only open to moderators (or a special user rank). This could possibly be realized through a function "lock discussion", and then in the user privileges two new check boxes could be added - One for locking a discussion and one for posting in a locked discussion.

Kind regards,
Daniel
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #1 on: September 13, 2010, 02:29:48 »

Hm.. As I understand you want restrict commeting permissions for all users except moderators for certain article? Theoretically it could be implemented via custom JComments plugin - it could check the article's ID and if it listed in plugin's parameters - disable commeting for all users except moderators.
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
daniel
Newbie
*

Karma: 0
Offline Offline

Posts: 3


« Reply #2 on: September 13, 2010, 10:35:29 »

Hm.. As I understand you want restrict commeting permissions for all users except moderators for certain article? Theoretically it could be implemented via custom JComments plugin - it could check the article's ID and if it listed in plugin's parameters - disable commeting for all users except moderators.

Yep, that is what I was thinking. There is no such plugin out there yet as I understand?
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #3 on: September 13, 2010, 14:04:02 »

Seems I found more easier solution...

1. Open file /plugins/content/jcomments.php
2. Find code:

Code: (php)
            $config->set('comments_on', intval($commentsEnabled));
            $config->set('comments_off', intval($commentsDisabled));
            $config->set('comments_locked', intval($commentsLocked));

and add after next code:
Code: (php)
           if ($article->id == 123 || $article->id == 124) {
                $user = & JFactory::getUser();
                if ($user->usertype != 'Super Administrator' && $user->usertype != 'Administrator') {
                    $config->set('comments_off', 1);
                }
            }

This code will disable commeting for articles with ID 123 and 124 for all usergroups except Administrators and Super Administrators. Hope it help you...
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
daniel
Newbie
*

Karma: 0
Offline Offline

Posts: 3


« Reply #4 on: September 13, 2010, 23:37:45 »

Seems I found more easier solution...

1. Open file /plugins/content/jcomments.php
2. Find code:

This code will disable commeting for articles with ID 123 and 124 for all usergroups except Administrators and Super Administrators. Hope it help you...

Thanks a lot, even though it is not the best solution (Manual edit) it still makes things so much easier for me. Thanks a lot!

Daniel
Logged
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    Suggestions, Wishlists & Feature Requests    Topic: Moderator only
 
Jump to: