View Single Post
  #52  
Old 09-27-2005, 08:15 AM
dbembibre's Avatar
dbembibre dbembibre is offline
 
Join Date: Sep 2004
Location: Madrid (Spain)
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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'] / $jointime2);

            }

 

            
$vbulletin->templatecache['FORUMHOME'] = str_replace('$navbar','$navbar ' $vbulletin->templatecache[forumhome_welcomepanel],$vbulletin->templatecache['FORUMHOME']);


Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01246 seconds
  • Memory Usage 1,847KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete