Cita:<script type="text/javascript" src="jscripts/fitonpage.js?ver=230"></script>
<script type="text/javascript">
<!--
var fitonpage_on = "{$mybb->settings['g33k_fitonpage_enabled']}";
var fitonpage_resize = "700";
var fitonpage_fluid = "80";
var fitonpage_topbar_resized = "{$lang->fitonpage_topbar_resized}";
var fitonpage_topbar_full = "{$lang->fitonpage_topbar_full}";
var fitonpage_topbar_text_class = "{$mybb->settings['g33k_fitonpage_topbar_text_class']}";
var fitonpage_topbar_bground = "{$mybb->settings['g33k_fitonpage_topbar_bground']}";
var fitonpage_topbar_icon = "{$mybb->settings['g33k_fitonpage_topbar_icon']}";
var fitonpage_location = "portal";
-->
</script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/fitonpage.js?ver=230"></script>
Cita:No se como puede funcionar si estas logueado, se supone que no deberia.Lo mismo pense.. pero asi pasa...
<?php
/***************************************************************
* ProPortal
* Copyright © 2010 ProMyBB, All Rights Reserved
*
* Website: http://www.promybb.com/
* License: http://creativecommons.org/licenses/by-nc-sa/3.0/
***************************************************************/
$tpaltbg = alt_trow();
$query = $db->query("SELECT uid, username, postnum, avatar, avatardimensions, usergroup, displaygroup FROM ".TABLE_PREFIX."users ORDER by postnum DESC LIMIT 0, 10");
while($user = $db->fetch_array($query))
{
$username = format_name($user['username'], $user['usergroup'], $user['displaygroup']);
$profilelink = get_profile_link($user['uid']);
if($user['postnum'] <= "1"){ $postnum = my_number_format($user['postnum'])." ".$lang->have_post; }else{ $postnum = my_number_format($user['postnum'])." ".$lang->have_posts; }
if($user['avatar']){ $user['avatar'] = htmlspecialchars_uni($user['avatar']); }else{ $user['avatar'] = $mybb->settings['bburl']."/portal/images/user.png"; $user['avatardimensions'] = "40|40"; }
$avatar_dimensions = explode("|", $user['avatardimensions']);
if($avatar_dimensions[0] && $avatar_dimensions[1])
{
list($max_width, $max_height) = explode("x", my_strtolower("40x40"));
if($avatar_dimensions[0] > $max_width || $avatar_dimensions[1] > $max_height)
{
require_once MYBB_ROOT."inc/functions_image.php";
$scaled_dimensions = scale_image($avatar_dimensions[0], $avatar_dimensions[1], $max_width, $max_height);
$block_avatar_width_height = "width=\"{$scaled_dimensions['width']}\" height=\"{$scaled_dimensions['height']}\"";
}
else
{
$block_avatar_width_height = "width=\"{$avatar_dimensions[0]}\" height=\"{$avatar_dimensions[1]}\"";
}
}
$topposters .= "<tr><td class=\"{$tpaltbg}\" width=\"50\" align=\"center\"><img src=\"".$user['avatar']."\" alt=\"\" {$block_avatar_width_height} border=\"0\" /></td><td class=\"{$tpaltbg}\"><a href=\"{$mybb->settings['bburl']}/{$profilelink}\">{$username}</a><br />{$postnum}</td></tr>";
$tpaltbg = alt_trow();
}
echo "<table border=\"0\" cellspacing=\"".$theme['borderwidth']."\" cellpadding=\"".$theme['tablespace']."\" class=\"tborder\">
<tr>
<td class=\"thead\" colspan=\"2\"><div class=\"expcolimage\"><img src=\"{$theme['imgdir']}/{$expcolimage}\" id=\"block_{$result_blocks['id']}_img\" class=\"expander\" alt=\"{$expaltext}\" title=\"{$expaltext}\" /></div>
<strong>{$lang->top_posters}</strong></td>
</tr>
<tbody style=\"{$expdisplay}\" id=\"block_{$result_blocks['id']}_e\">
{$topposters}
</tbody>
</table>";
?>
<?php
/***************************************************************
* ProPortal
* Copyright © 2010 ProMyBB, All Rights Reserved
*
* Website: http://www.promybb.com/
* License: http://creativecommons.org/licenses/by-nc-sa/3.0/
***************************************************************/
$tpaltbg = alt_trow();
$query = $db->query("SELECT uid, username, postnum, avatar, avatardimensions, usergroup, displaygroup FROM " . TABLE_PREFIX . "users ORDER by postnum DESC LIMIT 0, 10");
while($user = $db->fetch_array($query))
{
$username = format_name($user['username'], $user['usergroup'], $user['displaygroup']);
$profilelink = get_profile_link($user['uid']);
if ($user['postnum'] <= "1")
{
$postnum = my_number_format($user['postnum']) . " " . $lang->have_post;
}
else
{
$postnum = my_number_format($user['postnum']) . " " . $lang->have_posts;
}
if ($user['avatar'])
{
$user['avatar'] = htmlspecialchars_uni($user['avatar']);
}
else
{
$user['avatar'] = $mybb->settings['bburl'] . "/portal/images/user.png";
$user['avatardimensions'] = "40|40";
}
$avatar_dimensions = explode("|", $user['avatardimensions']);
if ($avatar_dimensions[0] && $avatar_dimensions[1])
{
list($max_width, $max_height) = explode("x", my_strtolower("40x40"));
if ($avatar_dimensions[0] > $max_width || $avatar_dimensions[1] > $max_height)
{
require_once MYBB_ROOT . "inc/functions_image.php";
$scaled_dimensions = scale_image($avatar_dimensions[0], $avatar_dimensions[1], $max_width,
$max_height);
$block_avatar_width_height = "width=\"{$scaled_dimensions['width']}\" height=\"{$scaled_dimensions['height']}\"";
}
else
{
$block_avatar_width_height = "width=\"{$avatar_dimensions[0]}\" height=\"{$avatar_dimensions[1]}\"";
}
}
if($user['avatartype'] != 'remote')
{
$user['avatar'] = $mybb->settings['bburl'] . $user['avatar'];
}
$topposters .= "<tr><td class=\"{$tpaltbg}\" width=\"50\" align=\"center\"><img src=\"" .
$user['avatar'] . "\" alt=\"\" {$block_avatar_width_height} border=\"0\" /></td><td class=\"{$tpaltbg}\"><a href=\"{$mybb->settings['bburl']}/{$profilelink}\">{$username}</a><br />{$postnum}</td></tr>";
$tpaltbg = alt_trow();
}
echo "<table border=\"0\" cellspacing=\"" . $theme['borderwidth'] . "\" cellpadding=\"" .
$theme['tablespace'] . "\" class=\"tborder\">
<tr>
<td class=\"thead\" colspan=\"2\"><div class=\"expcolimage\"><img src=\"{$theme['imgdir']}/{$expcolimage}\" id=\"block_{$result_blocks['id']}_img\" class=\"expander\" alt=\"{$expaltext}\" title=\"{$expaltext}\" /></div>
<strong>{$lang->top_posters}</strong></td>
</tr>
<tbody style=\"{$expdisplay}\" id=\"block_{$result_blocks['id']}_e\">
{$topposters}
</tbody>
</table>";
?>
global $mybb;
if($user['avatartype'] != 'remote')
Cita: $topposters .= "<tr><td class=\"{$tpaltbg}\" width=\"50\" align=\"center\"><img src=\"".$user['avatar']."\" alt=\"\" {$block_avatar_width_height} border=\"0\" /></td><td class=\"{$tpaltbg}\"><a href=\"{$mybb->settings['bburl']}/{$profilelink}\">{$username}</a><br />{$postnum}</td></tr>";
www.infomaster21.com/uploads/avatars/avatar_52.png?dateline=1294715265
<?php
/***************************************************************
* ProPortal
* Copyright © 2010 ProMyBB, All Rights Reserved
*
* Website: http://www.promybb.com/
* License: http://creativecommons.org/licenses/by-nc-sa/3.0/
***************************************************************/
$lualtbg = alt_trow();
$query = $db->query("SELECT uid, username, regdate, avatar, avatardimensions, avatartype, usergroup, displaygroup FROM ".TABLE_PREFIX."users ORDER by regdate DESC LIMIT 0, 10");
while($user = $db->fetch_array($query))
{
$username = format_name($user['username'], $user['usergroup'], $user['displaygroup']);
$profilelink = get_profile_link($user['uid']);
$regdate = my_date($mybb->settings['dateformat'], $user['regdate']);
$regtime = my_date($mybb->settings['timeformat'], $user['regdate']);
if($user['avatar']){
$user['avatar'] = htmlspecialchars_uni($user['avatar']);
if($user['avatartype'] != 'remote')
{
$user['avatar'] = $mybb->settings['bburl'] . '/' . $user['avatar'];
}
}
else
{
$user['avatar'] = $mybb->settings['bburl']."/portal/images/user.png"; $user['avatardimensions'] = "40|40";
}
$avatar_dimensions = explode("|", $user['avatardimensions']);
if($avatar_dimensions[0] && $avatar_dimensions[1])
{
list($max_width, $max_height) = explode("x", my_strtolower("24x24"));
if($avatar_dimensions[0] > $max_width || $avatar_dimensions[1] > $max_height)
{
require_once MYBB_ROOT."inc/functions_image.php";
$scaled_dimensions = scale_image($avatar_dimensions[0], $avatar_dimensions[1], $max_width, $max_height);
$block_avatar_width_height = "width=\"{$scaled_dimensions['width']}\" height=\"{$scaled_dimensions['height']}\"";
}
else
{
$block_avatar_width_height = "width=\"{$avatar_dimensions[0]}\" height=\"{$avatar_dimensions[1]}\"";
}
}
$latestusers .= "<tr><td class=\"{$lualtbg}\" width=\"30\" align=\"center\"><img src=\"".$user['avatar']."\" alt=\"\" {$block_avatar_width_height} border=\"0\" /></td><td class=\"{$lualtbg}\" style=\"font-size:11px;\"><a href=\"{$mybb->settings['bburl']}/{$profilelink}\">{$username}</a><br />{$regdate} {$regtime}</td></tr>";
$lualtbg = alt_trow();
}
echo "<table border=\"0\" cellspacing=\"".$theme['borderwidth']."\" cellpadding=\"".$theme['tablespace']."\" class=\"tborder\">
<tr>
<td class=\"thead\" colspan=\"2\"><div class=\"expcolimage\"><img src=\"{$theme['imgdir']}/{$expcolimage}\" id=\"block_{$result_blocks['id']}_img\" class=\"expander\" alt=\"{$expaltext}\" title=\"{$expaltext}\" /></div><strong>{$lang->latest_users}</strong></td>
</tr>
<tbody style=\"{$expdisplay}\" id=\"block_{$result_blocks['id']}_e\">
{$latestusers}
</tbody>
</table>";
?>
<?php
/***************************************************************
* ProPortal
* Copyright © 2010 ProMyBB, All Rights Reserved
*
* Website: http://www.promybb.com/
* License: http://creativecommons.org/licenses/by-nc-sa/3.0/
***************************************************************/
$tpaltbg = alt_trow();
$query = $db->query("SELECT uid, username, postnum, avatar, avatardimensions, avatartype, usergroup, displaygroup FROM ".TABLE_PREFIX."users ORDER by postnum DESC LIMIT 0, 10");
while($user = $db->fetch_array($query))
{
$username = format_name($user['username'], $user['usergroup'], $user['displaygroup']);
$profilelink = get_profile_link($user['uid']);
if($user['postnum'] <= "1"){ $postnum = my_number_format($user['postnum'])." ".$lang->have_post; }else{ $postnum = my_number_format($user['postnum'])." ".$lang->have_posts; }
if($user['avatar']){
$user['avatar'] = htmlspecialchars_uni($user['avatar']);
if($user['avatartype'] != 'remote')
{
$user['avatar'] = $mybb->settings['bburl'] . '/' . $user['avatar'];
}
}
else
{
$user['avatar'] = $mybb->settings['bburl']."/portal/images/user.png"; $user['avatardimensions'] = "40|40";
}
$avatar_dimensions = explode("|", $user['avatardimensions']);
if($avatar_dimensions[0] && $avatar_dimensions[1])
{
list($max_width, $max_height) = explode("x", my_strtolower("40x40"));
if($avatar_dimensions[0] > $max_width || $avatar_dimensions[1] > $max_height)
{
require_once MYBB_ROOT."inc/functions_image.php";
$scaled_dimensions = scale_image($avatar_dimensions[0], $avatar_dimensions[1], $max_width, $max_height);
$block_avatar_width_height = "width=\"{$scaled_dimensions['width']}\" height=\"{$scaled_dimensions['height']}\"";
}
else
{
$block_avatar_width_height = "width=\"{$avatar_dimensions[0]}\" height=\"{$avatar_dimensions[1]}\"";
}
}
$topposters .= "<tr><td class=\"{$tpaltbg}\" width=\"50\" align=\"center\"><img src=\"".$user['avatar']."\" alt=\"\" {$block_avatar_width_height} border=\"0\" /></td><td class=\"{$tpaltbg}\"><a href=\"{$mybb->settings['bburl']}/{$profilelink}\">{$username}</a><br />{$postnum}</td></tr>";
$tpaltbg = alt_trow();
}
echo "<table border=\"0\" cellspacing=\"".$theme['borderwidth']."\" cellpadding=\"".$theme['tablespace']."\" class=\"tborder\">
<tr>
<td class=\"thead\" colspan=\"2\"><div class=\"expcolimage\"><img src=\"{$theme['imgdir']}/{$expcolimage}\" id=\"block_{$result_blocks['id']}_img\" class=\"expander\" alt=\"{$expaltext}\" title=\"{$expaltext}\" /></div>
<strong>{$lang->top_posters}</strong></td>
</tr>
<tbody style=\"{$expdisplay}\" id=\"block_{$result_blocks['id']}_e\">
{$topposters}
</tbody>
</table>";
?>
if($user['avatar']){ $user['avatar'] = htmlspecialchars_uni($user['avatar']); }else{ $user['avatar'] = $mybb->settings['bburl']."/portal/images/user.png"; $user['avatardimensions'] = "40|40"; }
if($user['avatar']){
$user['avatar'] = htmlspecialchars_uni($user['avatar']);
if($user['avatartype'] != 'remote')
{
$user['avatar'] = $mybb->settings['bburl'] . '/' . $user['avatar'];
}
}
else
{
$user['avatar'] = $mybb->settings['bburl']."/portal/images/user.png"; $user['avatardimensions'] = "40|40";
}
(3 Apr, 2011, 9:54 am)Gmaster escribió: Siiiiiiii, justo acabo de hacer eso y funcionoooo !!!, lo que hice fue poner un IF cuando el avatar existe, para que a este le ponga la variable correspondiente...
Excelente!
Gracias, cerrado!.