vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   vBindex v2.1 (https://vborg.vbsupport.ru/showthread.php?t=41916)

Chris M 10-06-2002 02:53 PM

You did...

This is because NTLDR did not include an Auto-Installer, meaning your home_shoutbox template would be a Custom Template, rather than a vBindex template;)

Satan

groovesalad 10-06-2002 03:34 PM

Oh, so I was supposed to make a custom template and call it home_shoutbox?

If so, where do I find the html code that goes in that template?

Chris M 10-06-2002 04:27 PM

It should be in the Templates folder:)

Satan

groovesalad 10-06-2002 06:03 PM

Hmm, weird. I don't have that.

Chris M 10-06-2002 06:34 PM

Oh...

Try Re-downloading the file;)

Satan

NTLDR 10-06-2002 07:22 PM

Quote:

Originally posted by groovesalad
Hmm, weird. I don't have that.
The shoutbox is only included in vBindex 2.1 RC1 and later releases, if you have installed 2.0.1 then you don't have the shoutbox code.

Till 10-08-2002 10:55 PM

This hack uses still 35 queries if all options are turned on?!

Just curious.

Thanks,
Till

groovesalad 10-08-2002 11:25 PM

Man, I can't get vbindex 2.0.1 to install correctly and I definitely can't get 2.1 to install correctly. How do I uninstall everything and just start over?

digitalJE5U5 10-09-2002 05:02 AM

Nice hack!

I've got the page up and running, but one problem? The only image that loads on my vbindex.php page is my avatar. All the others lare pointing to the wrong DIR.

Ive installed this vbindex.php file in my base DIR and the forums are in base folder/vbulletin .

Any ideas?


Thanks alot!
/DJ

P.S.
I could not find this in the admin/template.php:
PHP Code:

$only[\'showgroup\'] = \'Show Groups\'; 

So i could NOT replace it with
PHP Code:

$only[\'home\'] = \'vBindex\'; 

Is this the reason for my error??

I tried just adding the "$only[\'show...." but it messed things up.

Dunno
:tired:

Kohhal 10-09-2002 05:41 AM

First off, great hack :D

I'm running v2.1 RC1 with vBulletin 2.2.2 successfully for the past week but just noticed one problem today, the "Most users ever online" is getting overwritten from vbIndex somehow.

I've noticed some duplication between what's in my "Original vBulletin code" section and the "Users online today" section which may or may not be causing the problem. It could be because my original code is from v2.2.2 and maybe I should delete some or all of the maxloggedin code?

PHP Code:

// start vBulletin original code
// -------------------------
$activeusers "";
$loggedinusers "";
if (
$displayloggedin) {
  
$datecut=time()-$cookietimeout;

  
$loggedins=$DB_site->query_first("SELECT COUNT(*) AS sessions FROM session WHERE userid=0 AND lastactivity>$datecut");
  
$numberguest=$loggedins['sessions'];

  
$numbervisible=0;
  
$numberregistered=0;

  
$loggedins=$DB_site->query("SELECT DISTINCT session.userid,username,invisible,usergroupid
                              FROM session
                              LEFT JOIN user ON (user.userid=session.userid)
                              WHERE session.userid>0 AND session.lastactivity>
$datecut
                              ORDER BY invisible ASC, username ASC"
);
  if (
$loggedin=$DB_site->fetch_array($loggedins)) {
    
$numberregistered++;
    if (
$loggedin['invisible']==or $bbuserinfo['usergroupid']==6) {
      
$numbervisible++;
      
$userid $loggedin['userid'];
      if (
$loggedin['invisible'] == 1) { // Invisible User but show to Admin
        
$invisibleuser '*';
      } else {
        
$invisibleuser '';
      }
      if (
$loggedin['usergroupid'] == and $highlightadmin) {
          
$username "<b><i>$loggedin[username]</i></b>";
      } else if ((
$mod["$userid"] or $loggedin['usergroupid'] == 5) and $highlightadmin) {
          
$username "<b>$loggedin[username]</b>";
      } else {
        
$username $loggedin['username'];
      }
      eval(
"\$activeusers = \"".gettemplate('forumhome_loggedinuser')."\";");
    }

    while (
$loggedin=$DB_site->fetch_array($loggedins)) {
      
$numberregistered++;
      
$invisibleuser '';
      if (
$loggedin['invisible']==and $bbuserinfo['usergroupid']!=6) {
        continue;
      }
      
$numbervisible++;
      
$userid=$loggedin['userid'];
      if (
$loggedin['invisible'] == 1) { // Invisible User but show to Admin
        
$invisibleuser '*';
      }
      if (
$loggedin['usergroupid'] == and $highlightadmin) {
        
$username "<b><i>$loggedin[username]</i></b>";
      } else if ((
$mod["$userid"] or $loggedin['usergroupid'] == 5) and $highlightadmin) {
           
$username "<b>$loggedin[username]</b>";
      } else {
        
$username $loggedin['username'];
      }
      eval(
"\$activeusers .= \", ".gettemplate('forumhome_loggedinuser')."\";");
    }
  }
  
$DB_site->free_result($loggedins);

  
$totalonline=$numberregistered+$numberguest;
  
$numberinvisible=$numberregistered-$numbervisible;

  
$maxusers=explode(" "gettemplate('maxloggedin',0,0));
  if ((int)
$maxusers[0] <= $totalonline) {
    
$time time();
    
$maxloggedin "$totalonline " $time;
    
$DB_site->query("UPDATE template SET template='$maxloggedin' WHERE title='maxloggedin'");
    
$maxusers[0] = $totalonline;
    
$maxusers[1] = $time;
  }
  
$recordusers $maxusers[0];
  
$recorddate vbdate($dateformat,$maxusers[1]);
  
$recordtime vbdate($timeformat,$maxusers[1]);
  eval(
"\$loggedinusers = \"".gettemplate('forumhome_loggedinusers')."\";");
}
// -------------------------
// end vBulletin original code

// users online today by Mystics
// -------------------------
  
if ((int)$maxusers[0] <= $totalonline) {
    
$time time();
    
$maxloggedin "$totalonline " $time " " $maxusers[2] . " " $maxusers[3];
    
$DB_site->query("UPDATE template SET template='$maxloggedin' WHERE title='maxloggedin'");
    
$maxusers[0] = $totalonline;
    
$maxusers[1] = $time;
  }

  
$todayloggedinusers "";
  
$numbertodayonline 0;
  
$numbertodayonlineinvisible 0;

  
$todayusers=$DB_site->query("SELECT userid, username, usergroupid, lastactivity, invisible FROM user
                WHERE lastactivity > " 
mktime(0,0,0,date("m"),date("d"),date("Y")) . "
                ORDER BY username"
);
  while (
$todayuser=$DB_site->fetch_array($todayusers)) {
    
$numbertodayonline++;
    if (
$todayuser['invisible']==and $bbuserinfo['usergroupid']!=6) {
      
$numbertodayonlineinvisible++;
      continue;
    }
  }

  
$DB_site->free_result($todayusers);

  if (
$bbuserinfo[usergroupid] == 6) {
    
$todayonline $numbertodayonline;
  } else {
    
$todayonline $numbertodayonline $numbertodayonlineinvisible;
  }
// -------------------------
// end users online today 

As you can see the UPDATE query for maxloggedin is duplicated so I know something's definetly wrong here. I found a thread on vBulletin.com which seems to indicate the problem is with this hack.
So should I remove some or all of the maxloggedin code? From both sections or just the "original code" part?

Thanks and once again, great hack :classic:


All times are GMT. The time now is 08:35 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03986 seconds
  • Memory Usage 1,797KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete