- Posts: 3
COMMUNITY FORUM
k2 attachment restriction
- Soheil Novinfard
-
Topic Author
- Offline
- New Member
Less
More
14 years 11 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.
- vtiger
-
- Offline
- Premium Member
Less
More
- Posts: 83
14 years 11 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
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
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 3
14 years 11 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
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.
- H Kareem
-
- Offline
- New Member
Less
More
- Posts: 1
14 years 10 months 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.
- natecovington
-
- Offline
- Senior Member
Less
More
- Posts: 68
14 years 9 months ago #84393
by natecovington
Replied by natecovington on topic k2 attachment restriction
Please Log in or Create an account to join the conversation.