echo Filesystem::extension($attachment->get('filename')); ?> " href="<?php echo Route::url($attachment->link()); ?> " title="<?php echo $attachment->get('description'); ?> "> <p class="attachment-description"><?php echo $attachment->get('description'); ?> </p> <p class="attachment-meta"> <span class="attachment-size"><?php echo Hubzero\Utility\Number::formatBytes($attachment->size()); ?> </span> <span class="attachment-action"><?php echo Lang::txt('Click to download'); ?> </span> </p> </a> <?php } } ?> </div><!-- / .comment-body --> <?php }
foreach ($this->comment->attachments()->whereEquals('state', Components\Forum\Models\Attachment::STATE_PUBLISHED)->rows() as $attachment) { if (!trim($attachment->get('description'))) { $attachment->set('description', $attachment->get('filename')); } $link = $this->comment->link() . '/' . $attachment->get('post_id') . '/' . $attachment->get('filename'); if ($attachment->isImage()) { if ($attachment->width() > 400) { $html = '<p><a href="' . Route::url($link) . '"><img src="' . Route::url($link) . '" alt="' . $this->escape($attachment->get('description')) . '" width="400" /></a></p>'; } else { $html = '<p><img src="' . Route::url($link) . '" alt="' . $this->escape($attachment->get('description')) . '" /></p>'; } } else { $html = '<a class="attachment ' . Filesystem::extension($attachment->get('filename')) . '" href="' . Route::url($link) . '" title="' . $this->escape($attachment->get('description')) . '">'; $html .= '<p class="attachment-description">' . $attachment->get('description') . '</p>'; $html .= '<p class="attachment-meta">'; $html .= '<span class="attachment-size">' . Hubzero\Utility\Number::formatBytes($attachment->size()) . '</span>'; $html .= '<span class="attachment-action">' . Lang::txt('Click to download') . '</span>'; $html .= '</p>'; $html .= '</a>'; } echo $html; } ?> </div><!-- / .comment-attachments --> <p class="comment-options"> <?php if ($this->config->get('access-manage-thread') || $this->config->get('access-delete-thread') || $this->config->get('access-edit-thread') || $this->config->get('access-delete-post') || $this->config->get('access-edit-post')) { ?> <?php if ($this->comment->get('parent') && ($this->config->get('access-delete-post') || $this->comment->get('created_by') == User::get('id'))) { ?>