Gönderen Konu: Her Tema Türünde Konu İçinde Ekstra YENİ KONU Butonu  (Okunma sayısı 1754 defa)

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

Çevrimdışı nurcuyuz

  • İleti: 70
  • Puan: 3
Her Tema Türünde Konu İçinde Ekstra YENİ KONU Butonu
« : Mart 29, 2007, 21:13:52 ÖS »
Arkadaşlar eğer sizde benim gibi arada bir yeni tema yüklüyorsanız bu konu size yardımcı olacaktır.

Yüklediğim temalar kodlama itibariyle php dosyaları birbirinden bazen farklılık göstermekte.
Bir temaya olan kod diğer temada hata verebilmektedir. Bu konulardan biride YENİ KONU butonudur.


İlk önce Display.template.php Dosyasının yedeğini alarak not defteriyle açın


Açtıktan sonra ilk önce aşağıdaki kodu buluyoruz.


Kod: [Seç]
'reply' => array('test' => 'can_reply', 'text' => 146, 'image' => 'reply.gif', 'lang' => true, 'url' => $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';num_replies=' . $context['num_replies']),
Eğer bu kod varsa hemen altına aşağıdaki kodu ekliyoruz.

Kod: [Seç]
'new_topic' => array((allowedTo('post_new')) ? 1 : 'test' => 'nothinglol', 'text' => 'smf258', 'image' => 'new_topic.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0'),


Eğer Üstteki Kod Yoksa bu sefer aşağıda yazacağım uygulamayı yapacağız

Display.template.php de aşağıdaki kodu buluyoruz.


Kod: [Seç]
if ($context['can_reply'])
$buttonArray[] = '<a href="' . $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';num_replies=' . $context['num_replies'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/reply.gif" alt="' . $txt[146] . '" border="0" />' : $txt[146]) . '</a>';


Bulduktan sonra hemen altına aşağıdaki kodu ekliyoruz.


Kod: [Seç]
if ($context['can_post_new'])
$buttonArray[] = '<a href="' . $scripturl . '?action=post;board=' . $context['current_board'] . '.0">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new_topic.gif" alt="' . $txt[33] . '" border="0" />' : $txt[33]) . '</a>';


Ve Konu İçerisinde YENİ KONU Butonu hazır. :)



Eğer bunları yaptıysanız ve halen bir sonu alamıyorsanız demokraside çareler tükenmez :)

Display.template.php Eğer Aşağıdaki kod varsa onun altına

Kod: [Seç]
'reply' => array('test' => 'can_reply', 'text' => 146, 'image' => 'reply.gif', 'lang' => true, 'url' => $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';num_replies=' . $context['num_replies']),
Display.template.php Eğer bu kod varsa bunun altına


Kod: [Seç]
if ($context['can_reply'])
$buttonArray[] = '<a href="' . $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';num_replies=' . $context['num_replies'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/reply.gif" alt="' . $txt[146] . '" border="0" />' : $txt[146]) . '</a>';


Aşağıdaki Kodu Ekliyoruz


Kod: [Seç]
echo'

<a href="http://www.seninsiten.com/forum/index.php?action=post;board=' . $context['current_board'] . '.0">' . ($settings['use_image_buttons'] ? '<img src="http://www.seninsiten.com/forum/Themes/oceanzero_by_turklord/images/turkish/new_topic.gif" alt="' . $txt[33] . '" border="0" />' : $txt[33]) . '</a>';



(Alıntı değildir  :) )
Konuyu Paylaş:
  delicious  facebook  twitter  google

 

Benzer Konular

  Konu / Başlatan Yanıt Son İleti
2 Yanıt
1299 Gösterim
Son İleti Aralık 25, 2006, 13:19:16 ÖS
Gönderen: retry
3 Yanıt
2153 Gösterim
Son İleti Aralık 30, 2006, 15:17:29 ÖS
Gönderen: burajan
2 Yanıt
1354 Gösterim
Son İleti Ocak 11, 2007, 01:22:36 ÖÖ
Gönderen: sello
8 Yanıt
1464 Gösterim
Son İleti Ocak 21, 2007, 11:46:29 ÖÖ
Gönderen: AdmiN
3 Yanıt
1894 Gösterim
Son İleti Şubat 23, 2007, 20:06:09 ÖS
Gönderen: burajan