Código PHP:
<?php
//
// Generate logged in/logged out status
//
$avatar_img = '<img src="objetos/images/default.gif" border="1" width="79" height="79">';
if ( $userdata['user_avatar_type'] && $userdata['user_allowavatar'] )
{
switch( $userdata['user_avatar_type'] )
{
case USER_AVATAR_UPLOAD:
$avatar_img = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $phpbb_root_path . $board_config['avatar_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="" width=\"79\" height=\"79\" />' : '';
break;
case USER_AVATAR_REMOTE:
$avatar_img = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $userdata['user_avatar'] . '" alt="" border="0" width="79" height="79" />' : '';
break;
case USER_AVATAR_GALLERY:
$avatar_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $phpbb_root_path . $board_config['avatar_gallery_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="" width="79" height="79" />' : '';
break;
}
}
$u_login_logout = '../foro/login.'.$phpEx.'?logout=true&sid=' . $userdata['session_id'];
$l_login_logout = $lang['Logout'] . ' [ ' . $userdata['username'] . ' ]';
$U_PROFILE = append_sid('../foro/profile.'.$phpEx.'?mode=editprofile');
$L_PROFILE = $lang['Profile'];
$U_PRIVATEMSGS = append_sid('../foro/privmsg.'.$phpEx.'?folder=inbox');
$L_PRIVATEMSGS = $lang['Private_Messages'];
$U_SEND_PASSWORD = append_sid('../'.$phpbb_root_path.'profile.php?mode=sendpassword');
$L_SEND_PASSWORD = $lang['Forgotten_password'];
$u_memberlist = append_sid('../'.$phpbb_root_path.'memberlist.'.$phpEx);
$l_memberlist = 'Miembros';
if ( $userdata['session_logged_in'] )
{
echo ' <table align="center" border="0" cellpadding="0" cellspacing="0" style="FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: Tahoma; BORDER-COLLAPSE: collapse" width="224" height="93">
<tr>
<td width="3" height="93" class="alt5">
</td>
<td class="alt5" width="80" >
'.$avatar_img.' </td>
<td width="141" class="alt5" >
<b>Bienvenido:</b> <br/> <a href="'.$u_login_logout.'" class="mainmenu">'.$l_login_logout.'</a></span> <br/>
<a href="'.$U_PROFILE.'" class="mainmenu">'.$L_PROFILE.'</a> <br/>
<a href="'.$u_memberlist.'" class="mainmenu">'. $l_memberlist.' </a> <br/>
<a href="'.$U_PRIVATEMSGS.'" class="mainmenu"> '.$L_PRIVATEMSGS.' </a> <br/>
</td>
</tr>
</table>
';
}
else
{
echo' <table border="0" cellpadding="0" cellspacing="0" style="FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: Tahoma; BORDER-COLLAPSE: collapse" width="175" height="86" >
<form method="post" action="'.$u_login_logout.'">
<tr>
<td width="64" >Username: </td><td width="111" height="28">
<input class="txtstyle" type="text" name="username" size="10" /></td>
</tr>
<tr>
<td width="64" >Password: </td><td width="111" height="22">
<input class="txtstyle" type="password" name="password" size="10" /></td>
</tr>
<tr>
<td height="24" colspan="2" >Auto Login
<input class="txtstyle" type="checkbox" CHECKED name="autologin" value="ON" />
<input type="submit" class="butstyle" name="login" value="Entrar" />
<input type="hidden" name="redirect" value="../main.php?page=news"> </td>
</tr>
<tr>
<td height="12" colspan="2" align="center" ><a href="'.$phpbb_root_path.'profile.php?mode=register" class="gensmall">Aun no estas registrado?</a></td>
</tr>
</form>
</table>
';
}
?>
Editas el
Código:
$avatar_img = '<img src="objetos/images/default.gif" border="1" width="79" height="79">';
y si lo vas a usar completo,cambias el:
Código:
value="../main.php?page=news">
por tu pagina principal
Esta tal y como yo lo uso, pero ustedes tienen otro script por lo que pueden solo poner la parte de los avatares en su script.
Saludos!