Skip to content

Commit

Permalink
Merge branch 'K6.3' of [email protected]:Kunena/Kunena-Forum.git into K6.3
Browse files Browse the repository at this point in the history
  • Loading branch information
xillibit committed Nov 26, 2024
2 parents 8fd1a5d + 9906a77 commit 3a6ecbd
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 28 deletions.
2 changes: 1 addition & 1 deletion src/libraries/kunena/src/User/KunenaUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -2233,7 +2233,7 @@ public function socialButtons()
'telegram' => ['url' => 'https://t.me/##VALUE##', 'title' => Text::_('COM_KUNENA_MYPROFILE_TELEGRAM'), 'nourl' => '0'],
'apple' => ['url' => '##VALUE##', 'title' => Text::_('COM_KUNENA_MYPROFILE_APPLE'), 'nourl' => '1'],
'vimeo' => ['url' => 'https://vimeo.com/user##VALUE##', 'title' => Text::_('COM_KUNENA_MYPROFILE_VIMEO'), 'nourl' => '1'],
'whatsapp' => ['url' => '##VALUE##', 'title' => Text::_('COM_KUNENA_MYPROFILE_WHATSAPP'), 'nourl' => '1'],
'whatsapp' => ['url' => 'https://wa.me/##VALUE##', 'title' => Text::_('COM_KUNENA_MYPROFILE_WHATSAPP'), 'nourl' => '0'],
'youtube' => ['url' => 'https://www.youtube-nocookie.com/##VALUE##', 'title' => Text::_('COM_KUNENA_MYPROFILE_YOUTUBE'), 'nourl' => '0'],
'ok' => ['url' => 'https://ok.ru/##VALUE##', 'title' => Text::_('COM_KUNENA_MYPROFILE_OK'), 'nourl' => '0'],
'pinterest' => ['url' => 'https://pinterest.com/##VALUE##', 'title' => Text::_('COM_KUNENA_MYPROFILE_PINTEREST'), 'nourl' => '0'],
Expand Down
63 changes: 36 additions & 27 deletions src/site/template/aurelia/layouts/topic/edit/history/default.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

/**
* Kunena Component
*
Expand All @@ -10,16 +9,12 @@
* @license https://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link https://www.kunena.org
**/

namespace Kunena\Forum\Site;

\defined('_JEXEC') or die();

use Joomla\CMS\Language\Text;
use Kunena\Forum\Libraries\Factory\KunenaFactory;
use Kunena\Forum\Libraries\Html\KunenaParser;
use Kunena\Forum\Libraries\Icons\KunenaIcons;

?>
<div class="float-end">
<div class="btn btn-outline-primary border btn-small" data-bs-toggle="collapse" data-bs-target="#history">X</div>
Expand All @@ -28,14 +23,11 @@
<?php echo Text::_('COM_KUNENA_POST_TOPIC_HISTORY') ?>:
<?php echo $this->escape($this->topic->subject) ?>
</h3>

<div id="history" class="collapse show">
<p>
<?php echo Text::_('COM_KUNENA_POST_TOPIC_HISTORY_MAX') . ' ' . $this->escape($this->config->historyLimit) . ' ' . Text::_('COM_KUNENA_POST_TOPIC_HISTORY_LAST') ?>
</p>
<?php foreach ($this->history as $this->message) :
?>

<?php foreach ($this->history as $this->message) : ?>
<div class="row">
<div class="col-md-2 center">
<ul class="unstyled center profilebox">
Expand All @@ -46,7 +38,6 @@
<?php
$profile = KunenaFactory::getUser(\intval($this->message->userid));
$useravatar = $profile->getAvatarImage(KunenaFactory::getTemplate()->params->get('avatarType'), 'profile');

if ($useravatar) :
echo $this->message->getAuthor()->getLink($useravatar, null, '', '', null, $this->topic->getcategory()->id);
endif;
Expand All @@ -65,24 +56,42 @@
</div>
<?php
$attachments = $this->message->getAttachments();
$hasVisibleAttachments = false;

// Filter out private attachments
$visibleAttachments = array_filter($attachments, function($attachment) {
return $attachment->protected != 32; // Exclude private attachments
});

if (!empty($visibleAttachments)) :
foreach ($visibleAttachments as $attachment) {
if (!$attachment->inline) {
$hasVisibleAttachments = true;
break;
}
}
endif;

if (!empty($attachments)) :
?>
<div class="card pb-3 pd-3 mb-3">

<div class="card-body kattach">
<ul class="thumbnails">
<?php foreach ($attachments as $attachment) :
?>
<li class="col-md-3 text-center">
<div class="thumbnail">
<?php echo $attachment->getLayout()->render('thumbnail'); ?>
<?php echo $attachment->getLayout()->render('textlink'); ?>
</div>
</li>
<?php endforeach; ?>
</ul>
</div></div>
if ($hasVisibleAttachments) : ?>
<div class="card pb-3 pd-3 mb-3">
<div class="card-header">
<?php echo Text::_('COM_KUNENA_ATTACHMENTS'); ?>
</div>
<div class="card-body kattach">
<ul class="thumbnails">
<?php foreach ($visibleAttachments as $attachment) :
if (!$attachment->inline) : ?>
<li class="col-md-3 text-center">
<div class="thumbnail">
<?php echo $attachment->getLayout()->render('thumbnail'); ?>
<?php echo $attachment->getLayout()->render('textlink'); ?>
</div>
</li>
<?php endif;
endforeach; ?>
</ul>
</div>
</div>
<?php endif; ?>
</div>
</div>
Expand Down

0 comments on commit 3a6ecbd

Please sign in to comment.