bu avartar bölümü hangi dosya nin icinne

phpBB 2.0.x sürümleri için MODlar hakkında ihtiyacınız olan desteği buradan sorarak alabilirsiniz.
Kilitli
lion
Kayıtlı Kullanıcı
Mesajlar: 147
Kayıt: 22.08.2006, 05:59
İletişim:

bu avartar bölümü hangi dosya nin icinne

Mesaj gönderen lion »

selam arkadaslar

login olunca su avartar kismini gösteriyor ya bu hangi dosyanin icinde

bende sadece buna benzeri portal bölümnde gösteriyor

ama bu hangi dosyanin icinde bunu an sayfaya kopyalamak istioyrdum




[ resmi görüntülemek için tıklayın ]
sbcandir
Kayıtlı Kullanıcı
Mesajlar: 20
Kayıt: 09.01.2007, 19:26
İletişim:

Mesaj gönderen sbcandir »

Tam olarak ne demek istediğinizi anlamadım ama anladığım kadarıyla yardımcı olmaya çalışacağım... Eğer login olduktan sonra kişinin avatarı görüntüleniyorsa bunu "login.php" dosyasında gerekli dizini bularak halledebilirsin...
mguzel
Kayıtlı Kullanıcı
Mesajlar: 61
Kayıt: 11.01.2007, 16:28
Konum: Konya
İletişim:

Mesaj gönderen mguzel »

Yanlış anlamadıysam kullanıcı avatarını indexte göstermek istiyorsun. Bunun için portaldaki avatar gösteren kodları kopyalamayı düşünüyorsan, portal.php den gerekli sql verilerini çeken kodları index.php yede ekleyeceksin sonra array kullanarak bastıracaksın,, amaaaaa bunlara hiç gerek yok :D Onun yerine çok basit olan avatar on index modunu kur. Öbür türlü hata yapabilirsin. Buda zaten aynı şeyi yapıyor, çok kısa:

Kod: Tümünü seç

##############################################################
## MOD Title: Avatar on index
## MOD Author: RedFoxy < redfoxy@redfoxy.it > (Massimo Ciccio') http://www.redfoxy.it/
## MOD Description: Insert user avatar (with link to search about last message recived),
##                  user name (with link to user's profile) and last message recived on
##                  index page near who is online table box.
##                  Very usefully!
##
## MOD Version: 1.2.0
##
## EasyMod: Tested with 0.1.13
##
## Installation Level: Easy
## Installation Time: 1 Minutes
## Files To Edit:
##         index.php
##         templates/subSilver/index_body.tpl 
##
## Included Files:
##
############################################################## 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the 
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code 
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/ 
##############################################################
## Author Notes:
## That's my first release of that MOD, just to remember what I've do...
## I have tested this MOD whit phpBB 2.0.4/2.0.6/2.0.10 with MySQL Database 3.23.56/4.0.16
##
## Future versions can be found at http://www.redfoxy.it
## I've set up a support forum for my mods at http://www.forum.redfoxy.com (it's an
## italian forum but you can post in english without problems.
##
## This MOD is released under the GPL License.
## Intellectual Property is retained by the MOD Author(s) listed above
## Copyright:      (C) 2004 Avatar on index 1.2.0 - RedFoxy
##
##############################################################
## MOD History:
##
##   2004-11-08 - Version 1.2.0
##   - Add link to search about last message recived
##   - Changed support to user's message and profile
##   - Draw tpl again
##   - EasyMod 0.1.13 compliant
##
##   2004-11-05 - Version 1.0.1
##   - Typo corrected
##   - Add link to edit profile
##   - Draw new tpl
##
##   2004-11-03 - Version 1.0.0
##   - First release
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 
#
#-----[ OPEN ]----------------------------------------------------------
#
index.php
#
#-----[ FIND ]----------------------------------------------------------
#
<?php
#
#-----[ AFTER, ADD ]----------------------------------------------------
#
//-- mod : Avatar on index -------------------------------------------------------------------------
#
#-----[ FIND ]----------------------------------------------------------
#
	$template->set_filenames(array(
		'body' => 'index_body.tpl')
	);
#
#-----[ BEFORE, ADD ]---------------------------------------------------
#
//-- mod : Avatar on index -------------------------------------------------------------------------
//-- add
	if( $userdata['session_logged_in'] )
	{
		$sql = "SELECT u.user_avatar, u.user_avatar_type, u.user_id, u.user_allowavatar, u.username
			FROM " . USERS_TABLE . " u
			WHERE u.user_id = " . $userdata['user_id'] ;
		if ( !($result = $db->sql_query($sql)) )
		{
			message_die(GENERAL_ERROR, 'Could not query user information', '', __LINE__, __FILE__, $sql);
		}
			$avatarrow = $db->sql_fetchrow($result);

		if ( $avatarrow['user_avatar_type'] && $userdata['user_id'] != ANONYMOUS && $avatarrow['user_allowavatar'] )
		{
			switch( $avatarrow['user_avatar_type'] )
			{
				case USER_AVATAR_UPLOAD:
					$user_avatar = ( $board_config['allow_avatar_upload'] ) ? $board_config['avatar_path'] . '/' . $avatarrow['user_avatar'] : '';
					break;
				case USER_AVATAR_REMOTE:
					$user_avatar = ( $board_config['allow_avatar_remote'] ) ? $avatarrow['user_avatar'] : '';
					break;
				case USER_AVATAR_GALLERY:
					$user_avatar = ( $board_config['allow_avatar_local'] ) ? $board_config['avatar_gallery_path'] . '/' . $avatarrow['user_avatar'] : '';
					break;
			}
			$user_avatar = '<a href="' . append_sid('search.'.$phpEx.'?search_id=egosearch') .
					'"><img src="' . $user_avatar . '" alt="' . $avatarrow['username'] . '" border="0" /></a><br>';
		}
		$user_name = '<a href="' . append_sid('profile.'.$phpEx.'?mode=editprofile') .
				'"><b>' . $avatarrow['username'] . '</b></a>';

		$sql = "SELECT COUNT(post_id) as tot
			FROM " . POSTS_TABLE . "
			WHERE post_time >= " . $userdata['user_lastvisit'] . "
			AND poster_id != " . $userdata['user_id'];

		$result = $db->sql_query($sql);

		if( $result )
		{
			$row = $db->sql_fetchrow($result);
			$user_newposts = '<a href="' . append_sid('search.'.$phpEx.'?search_id=newposts') .
						'" class="gensmall">' . $lang['Search_new'] . ' (' . $row['tot'] .')</a>';
		}
	}
	else
	{
		$user_avatar = '';
	}
//-- end : Avatar on index -------------------------------------------------------------------------

#
#-----[ FIND ]----------------------------------------------------------
#
                'FORUM_LOCKED_IMG' => $images['forum_locked'],
#
#-----[ AFTER, ADD ]----------------------------------------------------
#

//-- mod : Avatar on index -------------------------------------------------------------------------
//-- add
		'USER_AVATAR' => $user_avatar,
		'USER_NAME' => $user_name,
		'USER_NEWPOSTS' => $user_newposts,
//-- end : Avatar on index -------------------------------------------------------------------------
#
#-----[ OPEN ]----------------------------------------------------------
#
templates/subSilver/index_body.tpl 
#
#-----[ FIND ]----------------------------------------------------------
#
#
<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
#
#-----[ BEFORE, ADD ]---------------------------------------------------
#
<!-- mod : Avatar on index -->
#
#-----[ FIND ]----------------------------------------------------------
#
	<td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
#
#-----[ REPLACE WITH ]--------------------------------------------------
#
	<td class="row1" align="center" valign="middle" rowspan="2">{USER_AVATAR}
	<span class="genmed">{USER_NAME}</b></span><br>
	<span class="gensmall">{USER_NEWPOSTS}</span></td>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
kolay gelsin..
Ben bilgiye bilgi demem, paylaşmadıkça... :)
lion
Kayıtlı Kullanıcı
Mesajlar: 147
Kayıt: 22.08.2006, 05:59
İletişim:

Mesaj gönderen lion »

sagolasin mguzel

yardimin icin tesekkür ederim,

bende bunu buldum ve kurdum ama niyeyse

üyenin adini göstermiyor, neden acaba

Kod: Tümünü seç


###############################################
##   Hack Title:   Welcome Panel
##   Hack Version:   1.0.0
##   Author:      Marxx (Email: mtkauppinen [at] gmail.com)
##   Description:   This hack adds a welcome panel at the top of the index page with some information about board example: 
##		    the amount of the new messages, new topics, user avatar.
##		    
##   Compatibility:   2.0.17
##
##   Installation Level: Easy
##   Installation Time: 5 Minutes
##   Files To Edit: 4
##	includes/page_header.php
##	index.php,	
##      language/lang_english/lang_main.php,
##	templates/fisubsilversh/index_body.tpl
##
##   History:
##   	2005-10-25 - Version 1.0.0
##         - First version
##
##   Author Notes:
##      Special thanks for UseLess for helpfull tips and
## 	Anthony Coy for codes!
##
##   Support: http://www.phpbbstyles.com/viewtopic.php?p=54618#54618
##   Other: Template changes included: Aphrodite, Athena, MorpeusX
##
###############################################
##   This hack is released under the GPL License.
##   This hack can be freely used, but not distributed, without permission.
##   Intellectual Property is retained by the hack author(s) listed above.
###############################################

# 
#-----[ OPEN ]------------------------------------------ 
# 
/includes/page_header.php

# 
#-----[ FIND ]------------------------------------------ 
# 

define('HEADER_INC', TRUE);

# 
#-----[ AFTER, ADD ]------------------------------------
#

// 
// Welcome panel - START
// Code by hmvdesign.com // High Velocity Media // Anthony Coy  
//  
 
$header_username = $userdata['username'];  
$avatar_img2 = '';  
if ( $userdata['session_logged_out'] )  
{  
   $avatar_img2 = '<img src="images/guest.gif" alt="" border="0" />';  
}  
if ( $userdata['user_avatar_type'] && $userdata['user_allowavatar'] )  
{  
   switch( $userdata['user_avatar_type'] )  
   {  
      case USER_AVATAR_UPLOAD:  
         $avatar_img2 = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';  
         break;  
      case USER_AVATAR_REMOTE:  
         $avatar_img2 = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';  
         break;  
      case USER_AVATAR_GALLERY:  
         $avatar_img2 = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';  
         break;  
   }  
}  
// 
// Welcome Panel - END  
//


# 
#-----[ FIND ]------------------------------------------ 
# 

'PRIVATE_MESSAGE_NEW_FLAG' => $s_privmsg_new,

# 
#-----[ AFTER, ADD ]------------------------------------
#

'AVATAR_IMG' => $avatar_img2,  
'HEADER_USERNAME' => $header_username,
'WELCOME_ONLINE' => sprintf($lang['Welcome_online_members'], $total_online_users, $logged_visible_online, $guests_online),


# 
#-----[ OPEN ]------------------------------------------ 
# 

/index.php

# 
#-----[ FIND ]------------------------------------------ 
# 

//
// End session management
//

# 
#-----[ AFTER, ADD ]------------------------------------
#
// Welcome Panel - START
if ( $userdata['session_logged_in'] )
{
	if ( $userdata['user_level'] == ADMIN )
	{
		$welcome_user_level = sprintf(strtolower($lang['Admin_online_color']), '<span style="color:#' . $theme['fontcolor3'] . '"><b>', '</b></span>'); 
		$welcome_username =  '<span style="color:#' . $theme['fontcolor3'] . '"><b>' . $userdata['username'] . '</b></span>';
	}
	else if ( $userdata['user_level'] == MOD )
	{
		$welcome_user_level = sprintf(strtolower($lang['Mod_online_color']), '<span style="color:#' . $theme['fontcolor2'] . '"><b>', '</b></span>'); 
		$welcome_username =  '<span style="color:#' . $theme['fontcolor2'] . '"><b>' . $userdata['username'] . '</b></span>';
	}
	else
	{
		$welcome_user_level = '<b>' . $lang['Welcome_normal_user'] . '</b>'; 
		$welcome_username =  '<b>' . $userdata['username'] . '</b>';
	}

	// Get number of user's posts
	if ( $userdata['user_posts'] == 0 )
	{
		$welcome_user_posts = $lang['Welcome_user_no_posts'];
	}
	else
	{
		$welcome_user_posts = ( $userdata['user_posts'] == 1 ) ? $lang['Welcome_user_one_post'] : $lang['Welcome_user_posts'];
		$welcome_user_posts = sprintf($welcome_user_posts, '<a href="' . append_sid('search.'.$phpEx.'?search_id=egosearch') . '">', $userdata['user_posts'], '</a>');
	}

	$welcome_username = sprintf($lang['Welcome_user'], $welcome_username);
	$welcome_user_info = sprintf($lang['Welcome_user_info'], $welcome_user_level, $board_config['sitename'], $welcome_user_regdate) . $welcome_user_posts;
	
	// Get number of new posts
	$sql = "SELECT COUNT(post_id) as total 
		FROM " . POSTS_TABLE . " 
		WHERE post_time >= " . $userdata['user_lastvisit'] . " 
		AND poster_id != " . $userdata['user_id']; 

	$result = $db->sql_query($sql); 
	if( $result ) 
	{ 
		$row = $db->sql_fetchrow($result); 

		if ( $row['total'] == 0 )
		{
			$welcome_new_posts = $lang['Welcome_no_new_posts'];
		}
		else
		{
			$welcome_new_posts = ( $row['total'] == 1 ) ? $lang['Welcome_one_new_post'] : $lang['Welcome_new_posts'];
			$welcome_new_posts = sprintf($welcome_new_posts, '<a href="' . append_sid('search.'.$phpEx.'?search_id=newposts') . '">', $row['total'], '</a>');
		}
	}
	$db->sql_freeresult($result);

	// Get number of new topics
	$sql = "SELECT COUNT(topic_id) as total 
		FROM " . TOPICS_TABLE . " 
		WHERE topic_time >= " . $userdata['user_lastvisit']; 

	$result = $db->sql_query($sql); 
	if( $result ) 
	{ 
		$row = $db->sql_fetchrow($result); 

		if ( $row['total'] == 0 )
		{
			$welcome_new_topics = $lang['Welcome_no_new_topics'];
		}
		else
		{
			$welcome_new_topics = ( $row['total'] == 1 ) ? $lang['Welcome_one_new_topic'] : $lang['Welcome_new_topics'];
			$welcome_new_topics = sprintf($welcome_new_topics, '<a href="' . append_sid('search.'.$phpEx.'?search_id=newtopics') . '">', $row['total'], '</a>');
		}
	}
	$db->sql_freeresult($result);

	// Group previous data
	$welcome_news = $lang['Welcome_since_last_visit'] . $welcome_new_posts . ' | ' . $welcome_new_topics;
}
else
{
	$welcome_username = sprintf($lang['Welcome_user'], '<b>' . $lang['Guest'] . '</b>');
	$welcome_news = '';
	$welcome_user_info = $lang['Welcome_guest_info'] . ' ' . sprintf($lang['Welcome_register'], '<a href="' . append_sid('profile.'.$phpEx.'?mode=register') . '">', '</a>', $board_config['sitename']);
}


// Welcome Panel - END
# 
#-----[ FIND ]------------------------------------------ 
# 
'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),

# 
#-----[ BEFORE, ADD ]------------------------------------
#
    // Welcome Panel - START
    'WELCOME_USER' => $welcome_username,
    'WELCOME_NEWS' => $welcome_news,
    'WELCOME_USER_INFO' => $welcome_user_info,
    'WELCOME' => sprintf($lang['Welcome']),
    'WELCOME_MEMBERS' => sprintf($lang['Welcome_members'], $total_users, '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>'),
    // Welcome Panel - END


# 
#-----[ OPEN ]------------------------------------------ 
# 
/language/lang_english/lang_main.php

# 
#-----[ FIND ]------------------------------------------ 
# 
?>

# 
#-----[ BEFORE, ADD ]------------------------------------
#
// Welcome Panel - START
$lang['Welcome'] = 'Welcome!';

$lang['Welcome_user'] = 'Hi %s!'; 

$lang['Welcome_since_last_visit'] = 'There are: ';

$lang['Welcome_new_posts'] = '%s<b>%d</b>%s new messages';
$lang['Welcome_one_new_post'] = '%s<b>%d</b>%s new message';
$lang['Welcome_no_new_posts'] = '<b>No</b> new messages';

$lang['Welcome_new_topics'] = '%s<b>%d</b>%s new topics';
$lang['Welcome_one_new_topic'] = '%s<b>%d</b>%s new topic';
$lang['Welcome_no_new_topics'] = '<b>No</b> new topics';
$lang['Welcome_online_members'] = '%d users online (%d members and %d guests)';

$lang['Welcome_members'] = 'We have <b>%d</b> registered members and newest is <b>%s%s%s</b>';
// Welcome Panel - END

# 
#-----[ OPEN ]------------------------------------------ 
# 
# NOTE: Aphrodite template changes are in /template changes/ca_aphrodite.txt
# NOTE: Athena template changes are in /template changes/Athena.txt
# NOTE: MorpheusX template changes are in /template changes/MorpeusX.txt

/templates/fisubsilversh/index_body.tpl

# 
#-----[ FIND ]------------------------------------------ 
# 
<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
  <tr> 
	<td align="left" valign="bottom"><span class="gensmall">
	<!-- BEGIN switch_user_logged_in -->
	{LAST_VISIT_DATE}<br />

# 
#-----[ BEFORE ADD ]------------------------------------------ 
# 
<!-- Welcome Panel STARTS -->
<table width="100%" cellpadding="3" cellspacing="1" class="forumline">  
<tr>
	<th colspan="3" class="thCornerL" height="25" nowrap="nowrap" align="left">Welcome!</th>
</tr>    
  <!-- BEGIN switch_user_logged_in -->
  <tr>
   
  <td class="row1" align="left" valign="top" width="45%"><span class="gensmall">{WELCOME_USER}<br />{CURRENT_TIME} | {S_TIMEZONE}<br />
  {LAST_VISIT_DATE}<br />
  {WELCOME_NEWS}<br />
  <a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a> | <a href="{U_MARK_READ}">{L_MARK_FORUMS_READ}</a>
  
  </span></td>
   
  <td class="row1" align="center" valign="top" width="10%">{AVATAR_IMG}
  </td>
   
  <td class="row1" align="right" valign="top" width="45%"><span class="gensmall">{TOTAL_POSTS}<br />{WELCOME_MEMBERS}<br />
  {WELCOME_ONLINE}<br /><br />
  <a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a> | <a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a><br />

  </span></td>
  </tr>
  
  <!-- END switch_user_logged_in -->  
  
  
  <!-- BEGIN switch_user_logged_out -->
  <form method="post" action="{S_LOGIN_ACTION}">
  <tr> 
      <td class="row1" align="center" valign="middle" height="28"><span class="gensmall">{L_USERNAME}: 
	<input class="post" type="text" name="username" size="10" />
	&nbsp;&nbsp;&nbsp;{L_PASSWORD}: 
	<input class="post" type="password" name="password" size="10" maxlength="32" />
	&nbsp;&nbsp; &nbsp;&nbsp;{L_AUTO_LOGIN} 
	<input class="text" type="checkbox" name="autologin" />
	&nbsp;&nbsp;&nbsp; 
	<input type="submit" class="mainoption" name="login" value="{L_LOGIN}" /></span> </td>
  </tr>
  </form>
  <!-- END switch_user_logged_out -->
  
  
</table>
<!-- Welcome panel ENDS -->

# 
#-----[ FIND ]------------------------------------------ 
# 
<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
  <tr> 
	<td align="left" valign="bottom"><span class="gensmall">
	<!-- BEGIN switch_user_logged_in -->
	{LAST_VISIT_DATE}<br />
	<!-- END switch_user_logged_in -->
	{CURRENT_TIME}<br /></span><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
	<td align="right" valign="bottom" class="gensmall">
		<!-- BEGIN switch_user_logged_in -->
		<a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a><br /><a href="{U_SEARCH_SELF}" class="gensmall">{L_SEARCH_SELF}</a><br />
		<!-- END switch_user_logged_in -->
		<a href="{U_SEARCH_UNANSWERED}" class="gensmall">{L_SEARCH_UNANSWERED}</a></td>
  </tr>
</table>

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 
<br />

#
#-----[ SAVE & CLOSE ALL FILES ]--------------------------
#
#End 



Kilitli

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

Kimler çevrimiçi

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