Uutiset:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu
Advertisement:

Alıntı Yap (quote) yanına Cevap ver (reply) butonu ekleme

Aloittaja Badboy, maaliskuu 21, 2006, 06:06:15 AP

« edellinen - seuraava »

Badboy

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


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 :)
Nothing is true, everything is permitted.

tarihogretmeni

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 .
"Tomurcuk derdinde olmayan ağaç odundur."

yetkili

Elinize sağlık güzel olmuş.Tıkır tıkır çalışıyor rc2 de de...
www.eskisehirajans.com |www.cs-carttr.com

Badboy

Nothing is true, everything is permitted.

arif1907

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

Badboy

Nothing is true, everything is permitted.

Advertisement: