Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Details »»

Version: , by rylin rylin is offline
Developer Last Online: Dec 2003 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 10-18-2001 Last Update: Never Installs: 2
 
No support by the author.

http://www.b0fh.cx/vb2.html

Version 1.2

couldn't be arsed writing up upgrade info from the old version, but you should be able to re-trace your steps by checking the old version.. these instructions weren't written when i rewrote the hack, but were compiled now by looking at the current code.. i don't think i've left out anything, but if i have, slap me around a bit, mmkay?

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 10-19-2001, 03:05 PM
malc malc is offline
 
Join Date: Oct 2001
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for the hack !!

Can you update your URL ?! but i have access denied
Reply With Quote
  #3  
Old 10-19-2001, 03:07 PM
rylin rylin is offline
 
Join Date: Nov 2001
Location: Stockholm, Sweden
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oops, had added a block on 217.x.x.x (had to many code red hits from there ).. should work now :P
Reply With Quote
  #4  
Old 10-19-2001, 04:01 PM
Streicher Streicher is offline
 
Join Date: Oct 2001
Location: Reinbek, Germany
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can we see a screenshot please?
Reply With Quote
  #5  
Old 10-19-2001, 04:10 PM
DarkReaper DarkReaper is offline
 
Join Date: Oct 2001
Posts: 429
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What about expanding this hack to cover forums themselves. Such as: "Moderators of *this forum* currently online"
Reply With Quote
  #6  
Old 10-19-2001, 06:08 PM
rylin rylin is offline
 
Join Date: Nov 2001
Location: Stockholm, Sweden
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by Streicher
Can we see a screenshot please?
Reply With Quote
  #7  
Old 10-20-2001, 05:12 AM
drumsy's Avatar
drumsy drumsy is offline
 
Join Date: Nov 2001
Location: Charlotte, NC
Posts: 292
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please, forgive my newbiness, but can you please explain where ALL lines of code go in the index.php file???

Your directions give me line numbers (that's fine, I find where it all needs to go) but it does not tell me what code I need to replace it with, or if code needs to be removed, etc.....

For instance, your page says:

locate the line that says:
Code:
if ($loggedin=$DB_site->fetch_array($loggedins)) {
add:
Code:
if($loggedin['usergroupid']==6||$loggedin['usergroupid']==7||$loggedin['usergroupid']==5) {
 $modsloggedin[$loggedin['userid']]=$loggedin['username'];
}
I've screwed up my forums three times tonight, thank God editplus saves a backup!!!!
Reply With Quote
  #8  
Old 10-20-2001, 07:46 AM
rylin rylin is offline
 
Join Date: Nov 2001
Location: Stockholm, Sweden
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

right below the lines specified, except for the next-to-last one
Reply With Quote
  #9  
Old 10-21-2001, 05:04 AM
drumsy's Avatar
drumsy drumsy is offline
 
Join Date: Nov 2001
Location: Charlotte, NC
Posts: 292
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I have SERIOUSLY fugged something up!!! Here's what my index.php line looks like from right where the first edit of this hack goes in till the end of the last hack. Keep in mind, I've since added the hack (what I thought was the right way) and had to go back and try to set everything back as normal. Obviously, it has not worked, as this is what my "Who's Online" is showing!

(not displaying picture, as it is a bit large) http://www.purehonda.com/userpages/H...tors/error.jpg

Can you help???
Reply With Quote
  #10  
Old 10-21-2001, 10:12 AM
rylin rylin is offline
 
Join Date: Nov 2001
Location: Stockholm, Sweden
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the complete if($displayloggedin) clause should look like this when you're done (btw.. mods.. how much are we allowed to paste?? cut out some stuff if you have to )
PHP Code:
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,usergroupid,username,invisible
                              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)) {
    if(
$loggedin['usergroupid']==6||$loggedin['usergroupid']==7||$loggedin['usergroupid']==5) {
     
$modsloggedin[$loggedin['userid']]=$loggedin['username'];
    }

    
$numberregistered++;
    if (
$loggedin['invisible']==or $bbuserinfo['usergroupid']==6) {
      
$numbervisible++;
      
$userid=$loggedin['userid'];
      if (
$loggedin['invisible']==1) { // Invisible User but show to Admin
        
$username=$loggedin['username'];
        
$invisibleuser '*';
      } else {
        
$username=$loggedin['username'];
        
$invisibleuser '';
      }
      
//$location=$loggedin['location'];
      
eval("\$activeusers = \"".gettemplate('forumhome_loggedinuser')."\";");
    }

    while (
$loggedin=$DB_site->fetch_array($loggedins)) {
      if(
$loggedin['usergroupid']==6||$loggedin['usergroupid']==7||$loggedin['usergroupid']==5) {
       
$modsloggedin[$loggedin['userid']]=$loggedin['username'];
      }

      
$numberregistered++;
      
$invisibleuser '';
      if (
$loggedin['invisible']==and $bbuserinfo['usergroupid']!=6) {
        continue;
      }
      
$numbervisible++;
      
$userid=$loggedin['userid'];
      if (
$loggedin['invisible']==1) { // Invisible User but show to Admin
        
$username=$loggedin['username'];
        
$invisibleuser '*';
      } else {
        
$username=$loggedin['username'];
      }
      
$location=$loggedin['location'];
      eval(
"\$activeusers .= \", ".gettemplate('forumhome_loggedinuser')."\";");
    }
    
reset($modsloggedin);
    while(list(
$key,$val)=each($modsloggedin)) {
     
$modloguname=$val;
     
$modlogid=$key;
     eval(
"\$moderatorsloggedin .= \"".gettemplate('forumhome_modsloggedin')."\";");
    }
  }
  
$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')."\";");

Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:53 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.04560 seconds
  • Memory Usage 2,330KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete