Simple Machines Community Forum

SMF Support => Türkçe Bölümü (Turkish) => Language Specific Support => Arşiv => Aiheen aloitti: Badboy - maaliskuu 21, 2006, 06:06:15 AP

Otsikko: Alıntı Yap (quote) yanına Cevap ver (reply) butonu ekleme
Kirjoitti: Badboy - maaliskuu 21, 2006, 06:06:15 AP
Standartta sadece sayfa başında ve sonunda cevap ver butonu vardır... Çok uzun konularda bazen bu bir dezavantaj olmaktadır... Konuya cevap vermek istediğinizde sayfanın en altına veya en üstüne gitmeniz gerekmektedir... Ancak alıntı yap butonunun yanına cevapla butonu ekleyerek bu sorunu ortadan kaldırabiliriz...

Yapmamız gereken (bu kodlar sadece default tema içindir) display.template.php dosyasında aşağıdaki değişikliği yapmak...

Örmek resim
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg148.imageshack.us%2Fimg148%2F6804%2Fyanitla1ty.th.png&hash=6f0ecd164c6ea0aa81227a7e102b5946ad0b8a4e) (http://img148.imageshack.us/my.php?image=yanitla1ty.png)

SMF 1.1 RC1 için
Şunu bulun:
// Can they reply?  Have they turned on quick reply?
if ($context['can_reply'] && !empty($options['display_quick_reply']))
echo '
<a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';num_replies=', $context['num_replies'], ';sesc=', $context['session_id'], '" onclick="if (!currentSwap) doQuote(', $message['id'], '); else window.location.href = this.href; return false;">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/quote.gif" alt="' . $txt[145] . '" border="0" />' : $txt[145]), '</a>';
// So... quick reply is off, but they *can* reply?
elseif ($context['can_reply'])
echo '
<a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';num_replies=', $context['num_replies'], ';sesc=', $context['session_id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/quote.gif" alt="' . $txt[145] . '" border="0" />' : $txt[145]), '</a>';


Şunla değiştirin:
// Can they reply?  Have they turned on quick reply?
if ($context['can_reply'] && !empty($options['display_quick_reply']))
echo '
<a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '" onclick="if (!currentSwap) doQuote(', $message['id'], '); else window.location.href = this.href; return false;">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/quote.gif" alt="' . $txt[145] . '" border="0" />' : $txt[145]), '</a>', $context['menu_separator'] ,'<a href="' . $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/im_reply.gif" alt="' . $txt[146] . '" border="0" />' : $txt[146]) . '</a>';
// So... quick reply is off, but they *can* reply?
elseif ($context['can_reply'])
echo '
<a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/quote.gif" alt="' . $txt[145] . '" border="0" />' : $txt[145]), '</a>', $context['menu_separator'] ,'<a href="' . $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/im_reply.gif" alt="' . $txt[146] . '" border="0" />' : $txt[146]) . '</a>';




SMF 1.1 RC2 için
Şunu bulun:
// These are some cache image buttons we may want.
$reply_button = create_button('quote.gif', 145, 'smf240', 'align="middle"');


Altına şunu ekleyin:
$reply_button2 = create_button('im_reply.gif', 146, 146, 'align="middle"');

Şunu bulun:
// Can they reply? Have they turned on quick reply?
if ($context['can_reply'] && !empty($options['display_quick_reply']))
echo '
<a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';num_replies=', $context['num_replies'], ';sesc=', $context['session_id'], '" onclick="doQuote(', $message['id'], ', \'', $context['session_id'], '\'); return false;">', $reply_button, '</a>';

// So... quick reply is off, but they *can* reply?
elseif ($context['can_reply'])
echo '
<a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';num_replies=', $context['num_replies'], ';sesc=', $context['session_id'], '">', $reply_button, '</a>';


Şunla değiştirin:
// Can they reply? Have they turned on quick reply?
if ($context['can_reply'] && !empty($options['display_quick_reply']))
echo '
<a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';num_replies=', $context['num_replies'], ';sesc=', $context['session_id'], '" onclick="doQuote(', $message['id'], ', \'', $context['session_id'], '\'); return false;">', $reply_button, '</a>', $context['menu_separator'] ,'<a href="' . $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . '">', $reply_button2, '</a>';

// So... quick reply is off, but they *can* reply?
elseif ($context['can_reply'])
echo '
<a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';num_replies=', $context['num_replies'], ';sesc=', $context['session_id'], '">', $reply_button, '</a>', $context['menu_separator'] ,'<a href="' . $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . '">', $reply_button2, '</a>';


Sorun olmaması lazım ancak RC2 için kendim test etme imkanım olmadı ama sorun olacağınıda sanmıyorum... Cevaplarınızı bekliyorum :)
Otsikko: Re: Alıntı Yap (quote) yanına Cevap ver (reply) butonu ekleme
Kirjoitti: tarihogretmeni - maaliskuu 21, 2006, 08:19:46 AP
LainaaSorun olmaması lazım ancak RC2 için kendim test etme imkanım olmadı ama sorun olacağınıda sanmıyorum... Cevaplarınızı bekliyorum

Teşekkürler kardeş oldu .
Otsikko: Re: Alıntı Yap (quote) yanına Cevap ver (reply) butonu ekleme
Kirjoitti: yetkili - maaliskuu 21, 2006, 08:32:25 AP
Elinize sağlık güzel olmuş.Tıkır tıkır çalışıyor rc2 de de...
Otsikko: Re: Alıntı Yap (quote) yanına Cevap ver (reply) butonu ekleme
Kirjoitti: Badboy - maaliskuu 21, 2006, 08:38:36 AP
Teşekkürler arkadaşlar sorun olmamasına sevindim... :)
Otsikko: Re: Alıntı Yap (quote) yanına Cevap ver (reply) butonu ekleme
Kirjoitti: arif1907 - maaliskuu 21, 2006, 09:01:07 AP
Lainaus käyttäjältä: tarihogretmeni - maaliskuu 21, 2006, 08:19:46 AP
LainaaSorun olmaması lazım ancak RC2 için kendim test etme imkanım olmadı ama sorun olacağınıda sanmıyorum... Cevaplarınızı bekliyorum

Teşekkürler kardeş oldu .
bende RC2 de denedim tıkır tıkır çalışıyo gerçektende he eline şağlık
Otsikko: Re: Alıntı Yap (quote) yanına Cevap ver (reply) butonu ekleme
Kirjoitti: Badboy - maaliskuu 21, 2006, 10:57:48 AP
Teşekkürler...