Quote:
Originally Posted by cnutter
Not a bad plugin but I had to uninstall it cause it was hanging up my site load. Not sure what was happing but it was causing it to not load for 3 to 10 seconds. And as soon as I removed the plugin my site now loads fine. Anyway, keep up the good work and if this gets worked out I will install it again.
I attach a pic of my panel.
Excuse my broken English
Btw I am using RC3....
|
If you want i have a very lite version of this hack, i removed all the queries and only add 1 query for template. No aditional load in your forum. No is very pretty but work. Is the same code of Zero but with global forum variables.
Im Spanish, you need translate the template, the second row table in template show a flash banner.
forumhome_welcome_panel
HTML Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat" colspan="3" align="center">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_welcomepanel')"><img id="collapseimg_forumhome_welcomepanel" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_welcome_panel].gif" alt="" border="0" /></a>
Bienvenido de nuevo <a href='member.php?{$session[sessionurl]}u={$bbuserinfo['userid']}'>{$bbuserinfo['username']}</a>
</td>
</tr>
<tbody id="collapseobj_forumhome_welcomepanel" style="$vbcollapse[collapseobj_forumhome_welcomepanel]">
<tr>
<td class="alt1" align="center" width="1%">
<a href="profile.php?{$session[sessionurl]}do=editavatar">{$bbuserinfo['avatar_build']}</a>
</td>
<td width="50%" class="alt2" align="$stylevar[left]" valign="top">
<div class="smallfont">Bienvenido de nuevo {$bbuserinfo['username']}, hay un total de <b>{$totalonline }</b> Usuarios On-line desde tu ?ltima visita $pmbox[lastvisitdate] a las $pmbox[lastvisittime]<br /></div>
<table width='80%' cellspacing='0' cellpadding='2' border='0' align='center'>
<tr>
<td width="50%" align="$stylevar[left]"><div class="smallfont"><a href="http://www.bmwfaq.com/search.php"><b>Buscar</b> Mensajes</a></div></td>
<td width="50%" align="$stylevar[right]"><div class="smallfont"><b>{$bbuserinfo['pmunread']}</b> Mensajes privados sin leer</div></td>
</tr>
</table>
<br><br>
<hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<div align="center" class="smallfont"><a href="search.php?{$session[sessionurl]}do=getnew">Ver nuevos Posts</a> ? <a href="search.php?{$session[sessionurl]}do=getdaily">Ver Posts Ult. 24 Horas</a> ? <a href="profile.php?{$session[sessionurl]}do=editprofile">Editar Perfil</div>
</td>
<td width="50%" class="alt2" align="$stylevar[left]" valign="top">
<A HREF="http://www.bmwfaq.com/club1.php">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="390" HEIGHT="68" id="ng_nav" >
<param name="movie" value="./Join.swf">
<param name="quality" value="high">
</object></A>
<div class="smallfont">
<hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<div align="center" class="smallfont">Miembros: <b>{$numbermembers}</b> ? Discusiones: <b>{$totalthreads}</b> ? Mensajes: <b>{$totalposts}</b></div>
</td>
</tr>
</tbody>
</table>
<br />
Plugin code
PHP Code:
if ($vbulletin->userinfo['userid'] > 0)
{
require_once(DIR . '/includes/functions_user.php');
$vbulletin->userinfo['avatar_build'] = fetch_avatar_url($vbulletin->userinfo['userid']);
if (empty($vbulletin->userinfo['avatar_build']) || !is_array($vbulletin->userinfo['avatar_build']))
{
$vbulletin->userinfo['avatar_build'] = array('noavatar.gif');
}
$vbulletin->userinfo['avatar_build'] = '<img src="' . $vbulletin->userinfo['avatar_build'][0] . '"'.iif($vbulletin->userinfo['avatar_build'][1],$vbulletin->userinfo['avatar_build'][1],'').'border="0" width="80" height="80" alt="Edit Your Avatar" />';
$active = array(0);
if (!empty($active[1]))
{
$vbulletin->userinfo['active'] = array($vbulletin->forumcache[$active[1]], $active[0]);
}
else
{
$vbulletin->userinfo['active'] = false;
}
$exec_totalposts = str_replace(',', '', $totalposts);
if ($exec_totalposts < 1)
{
$exec_totalposts = 1;
}
if ($jointime < 1)
{
$vbulletin->userinfo['postsperday'] = $vbulletin->userinfo['posts'];
}
else
{
$vbulletin->userinfo['postsperday'] = vb_number_format($vbulletin->userinfo['posts'] / $jointime, 2);
}
$vbulletin->templatecache['FORUMHOME'] = str_replace('$navbar','$navbar ' . $vbulletin->templatecache[forumhome_welcomepanel],$vbulletin->templatecache['FORUMHOME']);
}