Online Üyeler Kısmına Toplam Online Sayısını Yazdırma (Kod)

Started by Badboy, September 16, 2008, 05:46:56 AM

Previous topic - Next topic

Badboy

Evet arkadaşlar smf'de standart olarak online üyeler kısmında toplam yazmaz. Küçük bir kodlama ile bunu halledebiliriz. Daha açıklayıcı olması açısından aşağıdaki resime bakabilirsiniz.



Not: Yapılam işlem default tema ve modifikasyon kurulmamış halde uygulanmıştır.

boardindex.template.php dosyamızı açıyoruz.

Code (ŞUNU BULUYORUZ) Select
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

Code (ŞÖYLE DEĞİŞTİRİYORUZ) Select
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', $txt[94], ': <b>', $toplam = $context['num_guests'] + $context['num_users_online'], '</b> (', $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

Code (ŞUNU BULUYORUZ) Select
echo $context['show_who'] ? '</a>' : '', '

Code (ŞÖYLE DEĞİŞTİRİYORUZ) Select
echo $context['show_who'] ? ')</a>' : ')', '




Googlebot & Spiders modifikasyonunu kurmuş olanlar ise (Default tema için)

boardindex.template.php dosyamızı açıyoruz.

Code (ŞUNU BULUYORUZ) Select
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', (empty($context['spiders']) ? '' : $context['num_spiders'] . ' ' . ($context['num_spiders'] == 1 ? $txt['ob_googlebot_spider'] : $txt['ob_googlebot_spiders']) . ', '), $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

Code (ŞÖYLE DEĞİŞTİRİYORUZ) Select
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', $txt[94], ': <b>', $toplam = (empty($context['spiders']) ? 0 : $context['num_spiders']) + $context['num_guests'] + $context['num_users_online'], '</b> (', (empty($context['spiders']) ? '' : $context['num_spiders'] . ' ' . ($context['num_spiders'] == 1 ? $txt['ob_googlebot_spider'] : $txt['ob_googlebot_spiders']) . ', '), $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

Code (ŞUNU BULUYORUZ) Select
echo $context['show_who'] ? '</a>' : '', '

Code (ŞÖYLE DEĞİŞTİRİYORUZ) Select
echo $context['show_who'] ? ')</a>' : ')', '

Kolay gelsin.
Nothing is true, everything is permitted.

Gurbet_42


breaker1999

Googlebot & Spiders modifikasyonu kurmuş olanlar için olan kodları uyguladım fakat, şöyle bir hata aldım.

Out of memory (Needed 201326552 bytes)
Dosya: /home/xxxxxxxx/public_html/forum/Sources/Subs.php
Satır: 2573


Alakasız bir hata gibi, yaptığım değişikliği geri aldım fakat hala bu hatayı alıyorum. Ne yapmalıyım?

Edit: Tamam problem şimdi gitti, bekleyince gidiyor galiba, ve bu arada kodlar çalıştı. Güzel paylaşım teşekkürler.


Restorasyon

arkadaşlar bende zaten bugün online olanlar modu kurulu ama üyeler ve gizli var benim yapmak istediğim böyle birşey altta jpeg ekliyorum sizinkisi ise ziyaretçileri sayıyor yani ziyaretçi ziyaretçi ziyaretçi diye kaç tane girmiş onu sayıyor benim anlatmak istediğim öyle deil

bu örnek yapmak istediğim


"Bayrakları bayrak yapan üstündeki kandır 
Toprak,eğer uğrunda ölen varsa vatandır."

Restorasyon - Gece Görüş Dürbünü - Mimari Forum

bilasdem

Quote from: Badboy on September 16, 2008, 05:46:56 AM
Evet arkadaşlar smf'de standart olarak online üyeler kısmında toplam yazmaz. Küçük bir kodlama ile bunu halledebiliriz. Daha açıklayıcı olması açısından aşağıdaki resime bakabilirsiniz.



Not: Yapılam işlem default tema ve modifikasyon kurulmamış halde uygulanmıştır.

boardindex.template.php dosyamızı açıyoruz.

Code (ŞUNU BULUYORUZ) Select
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

Code (ŞÖYLE DEĞİŞTİRİYORUZ) Select
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', $txt[94], ': <b>', $toplam = $context['num_guests'] + $context['num_users_online'], '</b> (', $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

Code (ŞUNU BULUYORUZ) Select
echo $context['show_who'] ? '</a>' : '', '

Code (ŞÖYLE DEĞİŞTİRİYORUZ) Select
echo $context['show_who'] ? ')</a>' : ')', '




Googlebot & Spiders modifikasyonunu kurmuş olanlar ise (Default tema için)

boardindex.template.php dosyamızı açıyoruz.

Code (ŞUNU BULUYORUZ) Select
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', (empty($context['spiders']) ? '' : $context['num_spiders'] . ' ' . ($context['num_spiders'] == 1 ? $txt['ob_googlebot_spider'] : $txt['ob_googlebot_spiders']) . ', '), $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

Code (ŞÖYLE DEĞİŞTİRİYORUZ) Select
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', $txt[94], ': <b>', $toplam = (empty($context['spiders']) ? 0 : $context['num_spiders']) + $context['num_guests'] + $context['num_users_online'], '</b> (', (empty($context['spiders']) ? '' : $context['num_spiders'] . ' ' . ($context['num_spiders'] == 1 ? $txt['ob_googlebot_spider'] : $txt['ob_googlebot_spiders']) . ', '), $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

Code (ŞUNU BULUYORUZ) Select
echo $context['show_who'] ? '</a>' : '', '

Code (ŞÖYLE DEĞİŞTİRİYORUZ) Select
echo $context['show_who'] ? ')</a>' : ')', '

Kolay gelsin.


arkadaşlar bunu ben sitemde uyguladım ama yazı yazmıyor sadece 3 kişi diyor ne yapmam gerekiyor
şu an localde çalışaçağım

Advertisement: