Keyword

[SOLVED] Disable leave comments and super use on every page

  • Robert
  • Robert's Avatar Topic Author
  • Offline
  • New Member
More
11 years 1 week ago - 11 years 1 week ago #118669 by Robert
I already disabled comments in K2 parameters> global settings for comments> disabled, but still have "leave a comment" and "super user" on every article. I also made all items and categories inherit the disable comments.

What are my options?



Attachment not found

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

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 1 week ago #118670 by Yiota
Does this appear when the super user is logged in and browsing the items?

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

More
10 years 11 months ago #118671 by Eric Korb
I'm having the same problem. I disabled it in properties globally, in all categories and items. I even tried disabling the module all together and it still shows up.

See attached screen shot.
Attachments:

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 11 months ago #118672 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Disable leave comments and super use on every page
Make sure it is not hardcoded in your template.
Also make sure you have selected the anchor link to be hidden from your category settings (Item view options in category listings ) and K2 params for user views etc..

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
10 years 11 months ago #118673 by Eric Korb
Yes. I've confirmed that both these items are set to HIDE.

However, I believe I found the issue, but don't know how to fix it. This item.php file found in my templates/my_template/html/com_k2/templates/my_template/ folder doesn't seem to be listening to the switch:

Here is code:

<div class="itemToolbar clearfix">
<div class="ItemCommentsLink">
<?php if(!empty($this->item->event->K2CommentsCounter)): ?>
<!-- K2 Plugins: K2CommentsCounter -->
<?php echo $this->item->event->K2CommentsCounter; ?>
<?php else: ?>
<?php if($this->item->numOfComments > 0): ?>
<a class="itemCommentsLink k2Anchor" href="<?php echo $this->item->link; ?>#itemCommentsAnchor">
<span><?php echo $this->item->numOfComments; ?></span> <?php echo ($this->item->numOfComments>1) ? JText::_('K2_COMMENTS') : JText::_('K2_COMMENT'); ?>
</a>
<?php else: ?>
<a class="itemCommentsLink k2Anchor" href="<?php echo $this->item->link; ?>#itemCommentsAnchor">
<?php echo JText::_('K2_BE_THE_FIRST_TO_COMMENT'); ?>
</a>
<?php endif; ?>
<?php endif; ?>
</div>

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 11 months ago #118674 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Disable leave comments and super use on every page
I think the screenshot you posted was one of the category view. You need to edit your category_item.php file as well.
<?php if($this->item->params->get('catItemCommentsAnchor') && ( ($this->item->params->get('comments') == '2' && !$this->user->guest) || ($this->item->params->get('comments') == '1')) ): ?>
//your code here
<?php endif; ?>

is the correct switch for category_item.php and
<?php if($this->item->params->get('itemCommentsAnchor') && $this->item->params->get('itemComments') && ( ($this->item->params->get('comments') == '2' && !$this->user->guest) || ($this->item->params->get('comments') == '1')) ): ?>
//code here
<?php endif; ?>

is for the item toolbar. Without this check it is possible that the links will render.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
10 years 11 months ago #118675 by Eric Korb
:cheer: Thanks. You let me to the solution. The code you showed is what I found in the default.php for the module. So, I moved the template folder out the way to prove that the default code would work and it did. Then, I put the folder back in place and now it all seems to be working. Not sure why, perhaps the database was off since I downloaded this template as a JumpStart (including Joomla 3.X).

I sent your code to the developer of the template.

Thanks again for leading me to the solution!

Erok

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 11 months ago #118676 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Disable leave comments and super use on every page
You 're welcome Eric.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum