Keyword

k2 attachment restriction

  • Soheil Novinfard
  • Soheil Novinfard's Avatar Topic Author
  • Offline
  • New Member
More
14 years 3 months ago #84389 by Soheil Novinfard
k2 attachment restriction was created by Soheil Novinfard
hello;I want to restrict my attachment for users only;what should i do?Thanks,Dr. Novinfard

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

More
14 years 3 months ago #84390 by vtiger
Replied by vtiger on topic k2 attachment restriction
There is not option for that, but you can resctrict attachment area directly in your template files .

in category_item.php search for
if($this->item->params->get('catItemAttachments') && count($this->item->attachments)):
and replace that part with
if($this->item->params->get('catItemAttachments') && count($this->item->attachments) && !$this->user->guest):

in item.php search for
if($this->item->params->get('itemAttachments') && count($this->item->attachments)):
and replace that part with
if($this->item->params->get('itemAttachments') && count($this->item->attachments) && !$this->user->guest):

Regards,
LN

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

  • Soheil Novinfard
  • Soheil Novinfard's Avatar Topic Author
  • Offline
  • New Member
More
14 years 3 months ago #84391 by Soheil Novinfard
Replied by Soheil Novinfard on topic k2 attachment restriction
great! that'S it!

tHANKS

Lukas said:There is not option for that, but you can resctrict attachment area directly in your template files .
in category_item.php search for
if($this->item->params->get('catItemAttachments') && count($this->item->attachments)):
and replace that part with
if($this->item->params->get('catItemAttachments') && count($this->item->attachments) && !$this->user->guest):

in item.php search for
if($this->item->params->get('itemAttachments') && count($this->item->attachments)):
and replace that part with
if($this->item->params->get('itemAttachments') && count($this->item->attachments) && !$this->user->guest):

Regards,
LN

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

More
14 years 1 month ago #84392 by H Kareem
Replied by H Kareem on topic k2 attachment restriction
I did the changes stated aboven under components/com_k2/template and it is not working. All users can still download attachments. Am I overlooking something?

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

More
14 years 1 month ago #84393 by natecovington

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


Powered by Kunena Forum