[MOD] Who is active in which forum / Kim Hangi Forumda ?

[url=http://www.phpbbturkey.com/mods.html:34cnv4ga]phpBB 2.0.x MOD Veritabanımızda[/url:34cnv4ga] yayınlanan ve tarafınızca eklenen tüm yeni phpBB 2.0.x sürümleri için MODların duyuruları buradan yapılmaktadır. MODlar hakkında ihtiyacınız olan desteği lütfen [b:34cnv4ga]2.0.x MOD Destek[/b:34cnv4ga] forumuna başlık açarak sorunuz.
Kullanıcı avatarı
Mirach
Destek Ekibi Lideri
Destek Ekibi Lideri
Mesajlar: 1664
Kayıt: 27.03.2006, 01:06
Konum: İstanbul

[MOD] Who is active in which forum / Kim Hangi Forumda ?

Mesaj gönderen Mirach »

Açıklama : Bu mod yardımıyla index ' te hangi kullanıcının hangi forumda olduğu belirtilir.

Kod: Tümünü seç

################################################################################### 
## 
## Hack Title:   Who is active in which forum - Index
## Hack Version: 1.0.3
## Author:       Acid
## Support:	 http://www.phpbbhacks.com/forums/
##
## Description:  You can see which user is active in which forum.. on index.
##
## Files To Edit:  3
##                 index.php
##                 language/lang_english/lang_main.php
##                 templates/xxx/index_body.tpl
## 
################################################################################### 
## 
## Note: 
## First always make a back-up from the files that you're going to edit. 
##
## I used the code from page_header.php.
##
## See optional part at bottom of this file.
##
################################################################################### 
##
## Revision History:
## 
## v1.0.3 - Junior Admins/Supermoderators will be displayed in their own color now
##	  - forgot to delete some code
## v1.0.2 - fixed a typo
## v1.0.1 - just cleaned the code and added optional part
## v1.0.0 - Release
## 
##########################################################################################
# 
#-----[ ACTION: OPEN ]------------------------------------------ 
# index.php 
# 
#-----[ FIND ]------------------------------------------ 
#
			$template->assign_block_vars('catrow.forumrow',   array( 
				'ROW_COLOR' => '#' . $row_color,

# 
#-----[ REPLACE WITH ]------------------------------------------ 
#
							// start: forum active
							$sql = "SELECT u.username, u.user_id, u.user_allow_viewonline, u.user_level, s.session_logged_in, s.session_ip, s.session_page
							           FROM ".USERS_TABLE." u, ".SESSIONS_TABLE." s 
							           WHERE u.user_id = s.session_user_id 
							                      AND s.session_time >= ".( time() - 300 ) . " AND s.session_page = $forum_id
							           ORDER BY u.username ASC, s.session_ip ASC"; 
							if( !($result = $db->sql_query($sql)) ) 
							{ 
							        message_die(GENERAL_ERROR, 'Could not obtain activities in forums.', '', __LINE__, __FILE__, $sql); 
							} 

							$userlist_ary = array(); 
							$userlist_visible = array(); 

							$logged_visible_active = 0; 
							$logged_hidden_active = 0; 
							$guests_active = 0; 
							$active_userlist = ''; 

							$prev_user_id = 0; 
							$prev_user_ip = ''; 

							while( $row = $db->sql_fetchrow($result) ) 
							{ 
							        if ( $row['session_logged_in'] ) 
							        { 
                							        if ( $row['user_id'] != $prev_user_id ) 
	                						        { 
		                					                $style_color = ''; 
			                				                if ( $row['user_level'] == ADMIN ) 
				                			                { 
					                		                        $row['username'] = '<b>' . $row['username'] . '</b>'; 
						                	                        $style_color = 'style="color:#' . $theme['fontcolor3'] . '"'; 
				                			                } 
                							                else if ( $row['user_level'] == JUNIOR_ADMIN ) 
	                						                { 
		                					                        $row['username'] = '<b>' . $row['username'] . '</b>'; 
			                				                        $style_color = 'style="color:#00B0FF"'; // color can be changed of course
				                			                } 
                							                else if ( $row['user_level'] == LESS_ADMIN ) 
	                						                { 
		                					                        $row['username'] = '<b>' . $row['username'] . '</b>'; 
			                				                        $style_color = 'style="color:#00B0FF"';  // color can be changed of course
				                			                } 
					                		                else if ( $row['user_level'] == MOD ) 
						                	                { 
			                				                        $row['username'] = '<b>' . $row['username'] . '</b>'; 
                							                        $style_color = 'style="color:#' . $theme['fontcolor2'] . '"'; 
	                						                } 

                							                if ( $row['user_allow_viewonline'] ) 
	                						                { 
		                					                        $user_active_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>'; 
			                				                        $logged_visible_active++; 
				                			                } 
                							                else 
	                						                { 
		                					                        $user_active_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><i>' . $row['username'] . '</i></a>'; 
			                				                        $logged_hidden_active++; 
				                			                } 
          
                							                if ( $row['user_allow_viewonline'] || $userdata['user_level'] == ADMIN ) 
	                						                { 
		                					                        $active_userlist .= ( $active_userlist != '' ) ? ', ' . $user_active_link : $user_active_link; 
			                				                } 
                							        } 
                							        $prev_user_id = $row['user_id']; 
							        } 
							        else 
							        { 
							                if ( $row['session_ip'] != $prev_session_ip ) 
							                { 
							                        $guests_active++; 
							                } 
							        } 
							        $prev_session_ip = $row['session_ip']; 
							} 

							$total_active_users = $logged_visible_active + $logged_hidden_active + $guests_active; 

							$l_t_user_s = ( $total_active_users == 0 ) ? $lang['Forum_no_active'] : ( ( $total_active_users == 1 ) ? $lang['Forum_one_active'] : $lang['Forum_more_active'] );
							$l_h_user_s = ( $logged_hidden_active == 0 || $userdata['user_level'] == ADMIN ) ? '' : ( ( $logged_hidden_active == 1 ) ? $lang['Forum_one_hidden_active'] : $lang['Forum_more_hidden_active'] );
							$l_g_user_s = ( $guests_active == 0 ) ? '' : ( ( $guests_active == 1 ) ? $lang['Forum_one_guest_active'] : $lang['Forum_more_guest_active'] );

							$l_active_users = sprintf($l_t_user_s, $total_active_users); 
							$l_active_users_info = sprintf($l_h_user_s, $logged_hidden_active); 
							$l_active_users_info .= sprintf($l_g_user_s, $guests_active); 

							$active_total = $l_active_users; 
							$active_info = $l_active_users_info; 
							$active = $active_userlist; 
							// end: forum active

								$template->assign_block_vars('catrow.forumrow',   array( 
								'ACTIVE' => $active, 
								'ACTIVE_TOTAL' => $active_total, 
								'ACTIVE_INFO' => $active_info, 
								'ROW_COLOR' => '#' . $row_color,



# 
#-----[ ACTION: OPEM ]------------------------------------------ 
# language/lang_english/lang_main.php 
# 
#-----[ FIND ]------------------------------------------ 
#
$lang['Moderators'] = 'Moderators';

# 
#-----[ BELOW ADD ]------------------------------------------ 
#
// if you don´t want to display "0 users" uncomment the following
// and put the slashes before the other "0 users" line
// $lang['Forum_no_active'] = '';
$lang['Forum_no_active'] = '<b>0</b> Users active'; // <-- this one
$lang['Forum_one_active'] = '<b>%d</b> User active: '; 
$lang['Forum_more_active'] = '<b>%d</b> Users active: '; 
$lang['Forum_one_hidden_active'] = '<b>%d</b> Hidden'; 
$lang['Forum_more_hidden_active'] = '<b>%d</b> Hidden'; 
$lang['Forum_one_guest_active'] = '<b>%d</b> Guest'; 
$lang['Forum_more_guests_active'] = '<b>%d</b> Guests';



# 
#-----[ ACTION: OPEN ]------------------------------------------ 
# templates/xxx/index_body.tpl 
# 
#-----[ FIND ]------------------------------------------ 
#
  </span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td>

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# if you can´t find the mentioned line (maybe you´re using a different template) just
# search for a part of it

  </span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span><br /> 
  <span class="gensmall">{catrow.forumrow.ACTIVE_TOTAL} {catrow.forumrow.ACTIVE} {catrow.forumrow.ACTIVE_INFO}</span></td>

################################################################################### 
# 
#-----[ OPTIONAL PART ]--------------------------------------------- 
#
# if you have the "junior admin" or "super mod" hack installed and want to
# change the displayed color
# 
#-----[ FIND (index.php) ]------------------------------------------ 
# 
# replace #00B0FF with your color

        else if ( $row['user_level'] == JUNIOR_ADMIN || $row['user_level'] == LESS_ADMIN ) 
        { 
             $row['username'] = '<b>' . $row['username'] . '</b>'; 
             $style_color = 'style="color:#00B0FF"'; 
        } 



#------------------------------------------------------------------- 
# if you want to enable this activities information only for admins
# 
#-----[ FIND (index.php) ]------------------------------------------ 
# 
				$active_total = $l_active_users; 
				$active_info = $l_active_users_info; 
				$active = $active_userlist; 

# 
#-----[ REPLACE WITH ]---------------------------------------------- 
# 
			if( $userdata['user_level'] == ADMIN )
			{
				$active_total = $l_active_users; 
				$active_info = $l_active_users_info; 
				$active = $active_userlist; 
			}


#------------------------------------------------------------------- 
# if you want to enable the current activities information only 
# for the moderators of the current forums
# 
#-----[ FIND (index.php) ]------------------------------------------ 
# 
				$active_total = $l_active_users; 
				$active_info = $l_active_users_info; 
				$active = $active_userlist; 

# 
#-----[ REPLACE WITH ]---------------------------------------------- 
# 
			$is_auth = array();
			$is_auth = auth(AUTH_ALL, $forum_id, $userdata, $forum_topic_data);
			if( $is_auth['auth_mod'] )
			{
				$active_total = $l_active_users; 
				$active_info = $l_active_users_info; 
				$active = $active_userlist; 
			}

################################################################################### 
################################################################################### 
Profilinde phpBB forumunun adresini girmemiş üyelere ve kurallara aykırı şekilde açılmış başlıklara destek verilmez.
Resim Resim Resim
Nouma
Kayıtlı Kullanıcı
Mesajlar: 115
Kayıt: 30.04.2006, 22:13
İletişim:

Mesaj gönderen Nouma »

bu sitedeki başlıık içinde kaç kişi görüntülüyor modu bumu ?

denedim bu mod sürekli 0 diyor olmasa bile ben içerde kişi olmadığında işey göstermesini istemiyorm ?

bu sitedeki farklı bir mod kullaıyo ? yada bunda değişiklik yapılmış yapıldıysa yardımcı olurmusuunuz site sahipleri
Kullanıcı avatarı
NEFRİT
Uzaklaştırıldı
Mesajlar: 1404
Kayıt: 28.01.2006, 04:15
Konum: DarkKingdom
İletişim:

basit

Mesaj gönderen NEFRİT »

Çok basit eğer sen SIFIR kullanıcı olduğunda yani kimse yoksa 0 yazmasını istemiyor isen türkçe dil dosyası içerisine kodu şu şekilde ekle :

Kod: Tümünü seç

// if you don´t want to display "0 users" uncomment the following 
// and put the slashes before the other "0 users" line 
// $lang['Forum_no_active'] = ''; 
$lang['Forum_no_active'] = ''; // <-- this one 
$lang['Forum_one_active'] = '<b>%d</b> User active: '; 
$lang['Forum_more_active'] = '<b>%d</b> Users active: '; 
$lang['Forum_one_hidden_active'] = '<b>%d</b> Hidden'; 
$lang['Forum_more_hidden_active'] = '<b>%d</b> Hidden'; 
$lang['Forum_one_guest_active'] = '<b>%d</b> Guest'; 
$lang['Forum_more_guests_active'] = '<b>%d</b> Guests'; 
Burada yapılan değşiklikte SIFIR kullancı olduğu zaman hiç bir şey çıkmayacak yani istediğin gibi olmuş oluyo 8)
Özellerden kullanıcılara reklam yaptığım için sayın yöneticim beni uzaklaştırdı.
Nouma
Kayıtlı Kullanıcı
Mesajlar: 115
Kayıt: 30.04.2006, 22:13
İletişim:

Mesaj gönderen Nouma »

güzel yöntem saol hacı
Kullanıcı avatarı
asifish
Kayıtlı Kullanıcı
Mesajlar: 10
Kayıt: 04.05.2006, 13:37
İletişim:

Mesaj gönderen asifish »

Ben beceremedim bunu nedense bu kodun sonundaki kısım ne oluyor onu yapamadım ondan mı acaba ?

Kod: Tümünü seç

################################################################################### 
# 
#-----[ OPTIONAL PART ]--------------------------------------------- 
# 
# if you have the "junior admin" or "super mod" hack installed and want to 
# change the displayed color 
# 
#-----[ FIND (index.php) ]------------------------------------------ 
# 
# replace #00B0FF with your color 

        else if ( $row['user_level'] == JUNIOR_ADMIN || $row['user_level'] == LESS_ADMIN ) 
        { 
             $row['username'] = '<b>' . $row['username'] . '</b>'; 
             $style_color = 'style="color:#00B0FF"'; 
        } 



#------------------------------------------------------------------- 
# if you want to enable this activities information only for admins 
# 
#-----[ FIND (index.php) ]------------------------------------------ 
# 
            $active_total = $l_active_users; 
            $active_info = $l_active_users_info; 
            $active = $active_userlist; 

# 
#-----[ REPLACE WITH ]---------------------------------------------- 
# 
         if( $userdata['user_level'] == ADMIN ) 
         { 
            $active_total = $l_active_users; 
            $active_info = $l_active_users_info; 
            $active = $active_userlist; 
         } 


#------------------------------------------------------------------- 
# if you want to enable the current activities information only 
# for the moderators of the current forums 
# 
#-----[ FIND (index.php) ]------------------------------------------ 
# 
            $active_total = $l_active_users; 
            $active_info = $l_active_users_info; 
            $active = $active_userlist; 

# 
#-----[ REPLACE WITH ]---------------------------------------------- 
# 
         $is_auth = array(); 
         $is_auth = auth(AUTH_ALL, $forum_id, $userdata, $forum_topic_data); 
         if( $is_auth['auth_mod'] ) 
         { 
            $active_total = $l_active_users; 
            $active_info = $l_active_users_info; 
            $active = $active_userlist; 
         } 

################################################################################### 
################################################################################### 
bu kısmı anlayamadım acaba bundan mı kaynaklanıyor ?
.:[ asifish ]:.
Nouma
Kayıtlı Kullanıcı
Mesajlar: 115
Kayıt: 30.04.2006, 22:13
İletişim:

Mesaj gönderen Nouma »

bişey sorucam arkadaşlar bunu bölümler varya ana sayfada

atıyorum

Php yardım

bu aktif olanlar onun yanında yazsın

Php yardım ( 1kişi aktif )

böle ?

bunu nasıl yaparız
Kullanıcı avatarı
Mirach
Destek Ekibi Lideri
Destek Ekibi Lideri
Mesajlar: 1664
Kayıt: 27.03.2006, 01:06
Konum: İstanbul

Mesaj gönderen Mirach »

Profilinde phpBB forumunun adresini girmemiş üyelere ve kurallara aykırı şekilde açılmış başlıklara destek verilmez.
Resim Resim Resim
Nouma
Kayıtlı Kullanıcı
Mesajlar: 115
Kayıt: 30.04.2006, 22:13
İletişim:

Mesaj gönderen Nouma »

ben onu denedim çıkmıyo çalışmadı sebebini bilmiyom iki kez denemiştim bu çalışıyo bunda çıktı .

forum başlıklarının kodu ne ?
Nouma
Kayıtlı Kullanıcı
Mesajlar: 115
Kayıt: 30.04.2006, 22:13
İletişim:

Mesaj gönderen Nouma »

{catrow.forumrow.FORUM_DESC}

BUNUN yanına atıyorum forum açıklaması sonunda gösteriyo bunu forum başlıklarının yanına atmak istiyorum ?

forum aşlıklarının kodu ne?
madalyon
Kayıtlı Kullanıcı
Mesajlar: 41
Kayıt: 12.04.2006, 19:37

Mesaj gönderen madalyon »

emeklerin için teşekkürler lakin mod türkçe anlatsaydınız daha iyidi.
Nouma
Kayıtlı Kullanıcı
Mesajlar: 115
Kayıt: 30.04.2006, 22:13
İletişim:

Mesaj gönderen Nouma »

madalyon yazdı:emeklerin için teşekkürler lakin mod türkçe anlatsaydınız daha iyidi.
şunlara alışsan iyi olur find repylace open mtu açıp yazsan bile karışılığını verir
Kullanıcı avatarı
GodBeach
Uzaklaştırıldı
Mesajlar: 734
Kayıt: 05.05.2006, 23:12
Konum: Güngören, İSTANBUL
İletişim:

Mesaj gönderen GodBeach »

Nouma yazdı:{catrow.forumrow.FORUM_DESC}

BUNUN yanına atıyorum forum açıklaması sonunda gösteriyo bunu forum başlıklarının yanına atmak istiyorum ?

forum aşlıklarının kodu ne?
Burası O modun tartışma konusumu Allah aşkına.Orda sor cevaplıyom ...
Bir php kodu
$GodBeach = "Php Script Yazılır";

print $GodBeach;

Önizleme: Php Script Yazılır
Nouma
Kayıtlı Kullanıcı
Mesajlar: 115
Kayıt: 30.04.2006, 22:13
İletişim:

Mesaj gönderen Nouma »

GodBeach yazdı:
Nouma yazdı:{catrow.forumrow.FORUM_DESC}

BUNUN yanına atıyorum forum açıklaması sonunda gösteriyo bunu forum başlıklarının yanına atmak istiyorum ?

forum aşlıklarının kodu ne?
Burası O modun tartışma konusumu Allah aşkına.Orda sor cevaplıyom ...
yukardaki modla ilgili tartışmaları bu başlıkta yapabiliriz ben burdakini kurdum burda soruyorum yanlış yaapan sensin cevap yazman için hemen geliyom hayret bişey yaa cevap için sebeb arama vermesende çok şey kaybetmetmem alt tarafı forum işte öle olsa nolur olmasa nolur
Kullanıcı avatarı
GodBeach
Uzaklaştırıldı
Mesajlar: 734
Kayıt: 05.05.2006, 23:12
Konum: Güngören, İSTANBUL
İletişim:

Mesaj gönderen GodBeach »

Bu iş böyle olmucak senle msnden uzun uzun konuşacam
Bir php kodu
$GodBeach = "Php Script Yazılır";

print $GodBeach;

Önizleme: Php Script Yazılır
Nouma
Kayıtlı Kullanıcı
Mesajlar: 115
Kayıt: 30.04.2006, 22:13
İletişim:

Mesaj gönderen Nouma »

Bu modla ilgili soruları burda sorar kullanıcı phpbb com sitesine bak orda durum nasıl oke
Kilitli

“2.0.x MOD Duyuruları” sayfasına dön

Kimler çevrimiçi

Bu forumu görüntüleyen kullanıcılar: Hiç bir kayıtlı kullanıcı yok ve 0 misafir