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: Lock whole category
Pages: [1]   Go Down
  Print  
Author Topic: Lock whole category  (Read 1598 times)
0 Members and 1 Guest are viewing this topic.
Chris67
Newbie
*

Karma: 0
Offline Offline

Posts: 4


« on: August 24, 2012, 19:32:27 »

Hi,

I would like to lock commenting for a whole category. The reason is that I manged my achived articles in a category called e.g. "Old Articles". They can be read by public inside a category blog (by default joomla archived articles cannot be read by the public so I have to do it that way)

Normaly I must enter each article and append "{jcomments lock}", so the public can read the comments but cannot ad any new (adding comments doesn't make sense for "old" articles). This is too musch work.

My workaround:

Open plugins/conten/jcomments/jcomments.php and replace

if
   ($article->state == $archivesState && $this->params->get('enable_for_archived', 0) == 0)
     {
         $commentsLocked = true;

with

if (
   ($article->state == $archivesState && $this->params->get('enable_for_archived', 0) == 0)
   
   || ($article->catid = 20)   // "Old Articels" ID  is 20
   
   )
 {
         $commentsLocked = true;

My Suggestion is to add a feature in the Admin Tool of jcomments for "Showing comments but not adding any" for given categorys

Thanks,
Chris
« Last Edit: August 26, 2012, 11:44:45 by Chris67 » Logged
ABTOP
Sr. Member
****

Karma: 17
Offline Offline

Posts: 398



WWW
« Reply #1 on: August 25, 2012, 04:55:25 »

Why not simply exclude this category - "Old Articles" -  from the selection of commentable categories?
Logged

No personal messages unless you are a friend or you have money for me.
Chris67
Newbie
*

Karma: 0
Offline Offline

Posts: 4


« Reply #2 on: August 25, 2012, 17:42:55 »

Because then you see no posted comments at all. I need an option "Just read, but not write" aka "locked" for the category.
« Last Edit: August 25, 2012, 17:45:54 by Chris67 » Logged
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    Suggestions, Wishlists & Feature Requests    Topic: Lock whole category
 
Jump to: