Konu: Eklenti alanında görsel değişiklik  (Okunma sayısı 1281 defa)

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

24 Şubat 2013, 21:14
  • *
    • İleti: 2023
    • Karma: 41
    • Spina Bifida
    • Profili Görüntüle

Açıklama:
Eklenti alanına farklı bir görünüm kazandırır.
Anlatım 2.0 core temaya göredir.
Diğer temalar için kodlama değişiklik arzedebilir.

Demo:
Şuradan (Zaman içerisinde silinebilir.)

Ekran Görüntüsü:

Kurulum:
Ektekileri images klasörüne atınız.

Display.template.php
Kod: [Seç]
// Assuming there are attachments...
if (!empty($message['attachment']))
{
// Now for the attachments, signature, ip logged, etc...
echo '
<div id="msg_', $message['id'], '_footer" class="attachments smalltext">';

$last_approved_state = 1;
foreach ($message['attachment'] as $attachment)
{
// Show a special box for unapproved attachments...
if ($attachment['is_approved'] != $last_approved_state)
{
$last_approved_state = 0;
echo '
<fieldset>
<legend>', $txt['attach_awaiting_approve'];

if ($context['can_approve'])
echo '&nbsp;[<a href="', $scripturl, '?action=attachapprove;sa=all;mid=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve_all'], '</a>]';

echo '</legend>';
}

if ($attachment['is_image'])
{
if ($attachment['thumbnail']['has_thumb'])
echo '
<a href="', $attachment['href'], ';image" id="link_', $attachment['id'], '" onclick="', $attachment['thumbnail']['javascript'], '"><img src="', $attachment['thumbnail']['href'], '" alt="" id="thumb_', $attachment['id'], '" border="0" /></a><br />';
else
echo '
<img src="' . $attachment['href'] . ';image" alt="" width="' . $attachment['width'] . '" height="' . $attachment['height'] . '" border="0" /><br />';
}
echo '
<a href="' . $attachment['href'] . '"><img src="' . $settings['images_url'] . '/icons/clip.gif" align="middle" alt="*" border="0" />&nbsp;' . $attachment['name'] . '</a> ';

if (!$attachment['is_approved'] && $context['can_approve'])
echo '
[<a href="', $scripturl, '?action=attachapprove;sa=approve;aid=', $attachment['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve'], '</a>]&nbsp;|&nbsp;[<a href="', $scripturl, '?action=attachapprove;sa=reject;aid=', $attachment['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['delete'], '</a>] ';
echo '
(', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['real_width'] . 'x' . $attachment['real_height'] . ' - ' . $txt['attach_viewed'] : ' - ' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '.)<br />';
}

// If we had unapproved attachments clean up.
if ($last_approved_state == 0)
echo '
</fieldset>';

echo '
</div>';


Değiştir:
Kod: [Seç]
// Assuming there are attachments...
if (!empty($message['attachment']))
{
// Now for the attachments, signature, ip logged, etc...
echo '
<div id="msg_', $message['id'], '_footer" class="attachments smalltext">
<div id="forumposts" class="tborder2">
<h3 class="catbg">
<img src="', $settings['images_url'], '/ek.png"  alt="" /><span>', $txt['ekler'], '
</h3>
';

$last_approved_state = 1;
foreach ($message['attachment'] as $attachment)
{
// Show a special box for unapproved attachments...
if ($attachment['is_approved'] != $last_approved_state)
{
$last_approved_state = 0;
echo '
<fieldset>
<legend>', $txt['attach_awaiting_approve'];

if ($context['can_approve'])
echo '&nbsp;[<a href="', $scripturl, '?action=attachapprove;sa=all;mid=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve_all'], '</a>]';

echo '</legend>';
}

if ($attachment['is_image'])
{
if ($attachment['thumbnail']['has_thumb'])
echo '
<a href="', $attachment['href'], ';image" id="link_', $attachment['id'], '" onclick="', $attachment['thumbnail']['javascript'], '"><img src="', $attachment['thumbnail']['href'], '" alt="" id="thumb_', $attachment['id'], '" border="0" /></a><br />';
else
echo '
<img src="' . $attachment['href'] . ';image" alt="" width="' . $attachment['width'] . '" height="' . $attachment['height'] . '" border="0" /><br />';
}
echo '
<a href="' . $attachment['href'] . '"><img src="' . $settings['images_url'] . '/ek2.gif" align="middle" alt="*" border="0" />&nbsp;' . $attachment['name'] . '</a> ';

if (!$attachment['is_approved'] && $context['can_approve'])
echo '
[<a href="', $scripturl, '?action=attachapprove;sa=approve;aid=', $attachment['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve'], '</a>]&nbsp;|&nbsp;[<a href="', $scripturl, '?action=attachapprove;sa=reject;aid=', $attachment['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['delete'], '</a>] ';
echo '
(', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['real_width'] . 'x' . $attachment['real_height'] . ' - ' . $txt['attach_viewed'] : ' - ' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '.)<br />';
}

// If we had unapproved attachments clean up.
if ($last_approved_state == 0)
echo '
</fieldset>';

echo '
</div></div>';


index.css
En alta ekle:
Kod: [Seç]
.tborder2
{
padding: 1px;
border: 1px solid #696969;
background: #FFD9FF;
vertical-align: middle;
}
.tborder2 a
{

font-weight: bold;
vertical-align: middle;
}
.tborder2 img
{
vertical-align: middle;
}


index.turkish.php
Bul:
Kod: [Seç]
?>

Üstüne ekle:
Kod: [Seç]
$txt['ekler'] = '<b>Bu iletiye ait ekler</b>';

« Son Düzenleme: 11 Mayıs 2014, 18:37 Gönderen: bolubeyi »

09 Temmuz 2013, 11:53
Yanıtla #1
  • *
    • İleti: 45
    • Karma: 0
    • Torrent Oyun İndir
    • Profili Görüntüle


09 Temmuz 2013, 12:26
Yanıtla #2
  • *
    • İleti: 2023
    • Karma: 41
    • Spina Bifida
    • Profili Görüntüle

Bu modifikasyonu core tema için engelsizdostlar.com sitesi için hazırlamıştım. Sizin temanıza uyum sağlamaz.
Hilmi Beyin sitesinde de paylaşmıştım. Oradan indirebilirsiniz.
http://destek.smfmod.com/eklenti-alaninda-gorsel-degisiklik-t17871.0.html