- Posts: 398
COMMUNITY FORUM
Attachment Issue with SVN
- troponin
-
Topic Author
- Offline
- Platinum Member
After upgraded to the latest SVN 2.5 K2 roots the Attachment to a 404.
File Exist in the standard Folder.
Please Log in or Create an account to join the conversation.
- troponin
-
Topic Author
- Offline
- Platinum Member
- Posts: 398
Please Log in or Create an account to join the conversation.
- william white
-
- Offline
- Platinum Member
- Posts: 3722
Please Log in or Create an account to join the conversation.
- troponin
-
Topic Author
- Offline
- Platinum Member
- Posts: 398
www.brain-style.de/downloads/item/9-k2-joomla-17-plugin-like...
Please Log in or Create an account to join the conversation.
- william white
-
- Offline
- Platinum Member
- Posts: 3722
Please Log in or Create an account to join the conversation.
- william white
-
- Offline
- Platinum Member
- Posts: 3722
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
Please Log in or Create an account to join the conversation.
- william white
-
- Offline
- Platinum Member
- Posts: 3722
Please Log in or Create an account to join the conversation.
- troponin
-
Topic Author
- Offline
- Platinum Member
- Posts: 398
thx Lefteris for the Information and thx William for take a look at your Installation
Please Log in or Create an account to join the conversation.
- Lee Noble
-
- Offline
- New Member
- Posts: 4
Please Log in or Create an account to join the conversation.
- Lee Noble
-
- Offline
- New Member
- Posts: 4
Work !!!
thx Lefteris for the Information and thx William for take a look at your Installation
Please Log in or Create an account to join the conversation.
- troponin
-
Topic Author
- Offline
- Platinum Member
- Posts: 398
All you have to do is to replace your custom item.php div class="itemAttachmentsBlock" with the standard.
Open components/com_k2/templates/default/item.php and search for <!-- Item attachments -->.
Copy the complete div to your custom item.php and replace the old one:
Here is the new Code:
<div class="itemAttachmentsBlock"> <span><?php echo JText::_('K2_DOWNLOAD_ATTACHMENTS'); ?></span> <ul class="itemAttachments"> <?php foreach ($this->item->attachments as $attachment): ?> <li> <a title="<?php echo htmlentities($attachment->titleAttribute, ENT_QUOTES, 'UTF-8'); ?>" href="<?php echo $attachment->link; ?>"> <?php echo $attachment->title ; ?> </a> <?php if($this->item->params->get('itemAttachmentsCounter')): ?> <span>(<?php echo $attachment->hits; ?> <?php echo (count($attachment->hits)==1) ? JText::_('K2_DOWNLOAD') : JText::_('K2_DOWNLOADS'); ?>)</span> <?php endif; ?> </li> <?php endforeach; ?> </ul> </div>
Please Log in or Create an account to join the conversation.
- Lee Noble
-
- Offline
- New Member
- Posts: 4
Please Log in or Create an account to join the conversation.
- Lee Noble
-
- Offline
- New Member
- Posts: 4
Lefteris Kavadas said:
We have added some logic on the downloads of the attachments to prevent users from guessing ids and download attachments that they cannot see. The side effect of this is that there are some template changes. Please upgrade your templates download links by looking at the default templates that come with K2. A complete list of these changes will be published once version 2.5 goes stable.
Please Log in or Create an account to join the conversation.