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

Reply
 
Thread Tools
[HowTo] Categorize Who's Online on Forumhome Details »»
[HowTo] Categorize Who's Online on Forumhome
Version: 1.00, by KuraFire KuraFire is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 01-08-2003 Last Update: Never Installs: 28
 
No support by the author.

HACK: [HowTo] Categorize Who's Online on Forumhome
BY: KuraFire [www.kurafire.com]
REQUESTED BY: Xiphoid [www.creations.nl]
DESCRIPTION: Divide the active users bit on Forumhome into a Staff: section and Members: section
DIFFICULTY: Easy
INSTALL-TIME: 5 minutes

Xiphoid asked for a categorization on forumhome (Staff / Members) for vB 3, but since it's such an easy thing I decided not to wait for vB 3 but just make the hack myself

Kudos to xiphoid for a good idea

EXAMPLE HERE: click here for an example of this hack

Warning / note: The || and && operators in original vB code I put in the instructions here that you need to search on MIGHT BE "or" and "and" in your version. Keep that in mind if you can't find the code!

Note: I wrote this on my own board which is currently still version 2.2.5, it might well work on any version above that but that is not yet tested or confirmed! (nor for versions below)

INSTRUCTIONS ARE IN THE ATTACHMENT

If something did not work right, you did not follow the instructions properly

Enjoy!

Show Your Support

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

Comments
  #32  
Old 02-16-2003, 09:17 PM
Floris Floris is offline
 
Join Date: Jan 2002
Posts: 1,898
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, vB archive.
Reply With Quote
  #33  
Old 03-02-2003, 09:38 PM
Conundrum9 Conundrum9 is offline
 
Join Date: Feb 2003
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Which staff are listed? Obviously admins, but are both supermods and forum mods listed in the staff section or just supermods?

If it's both is there an easy way of changing it so that only supermods are listed with the staff, while forum mods stay listed with members?
Reply With Quote
  #34  
Old 03-05-2003, 06:56 AM
impakt impakt is offline
 
Join Date: Mar 2002
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I got this to work on 2.3.0

Great hack, and good job.
Reply With Quote
  #35  
Old 04-23-2003, 02:06 AM
WEForums WEForums is offline
 
Join Date: Apr 2003
Location: Jacksonville, Florida
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am using 2.3.0, and I can't seem to find the 'closing' tag.

If you followed the instructions properly, the last thing you did now was to delete (or comment out) the SECOND occurance of this line:

Code:
eval("\$activeusers .= \"".gettemplate('forumhome_loggedinuser')."\";");
Did that.

Below that is a closing tag ( } ), and below that closing tag, paste this bit of code:

Code:
$staffusers = implode(", ", $su_r);
  $normalusers = implode(", ", $nu_r);
  $activeusers = iif($staffusers!="", "Staff: $staffusers <br />", "") . iif($normalusers!="", "Members: $normalusers", "");
Anyone who knows where the closing tag is could you please point it out? Thanks.
Reply With Quote
  #36  
Old 04-23-2003, 08:33 AM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

WEforums:

in vB 2.3.0, around line 196 (unhacked index.php), you will find this bit of code:

PHP Code:
    }
  }
  
$DB_site->free_result($loggedins); 
The first } that you see there, is the closing tag that I'm talking about in the Hack instructions. So, your code should look like this:



PHP Code:
    }
  
$staffusers implode(", "$su_r);
  
$normalusers implode(", "$nu_r);
  
$activeusers iif($staffusers!="""Staff: $staffusers <br />""") . iif($normalusers!="""Members: $normalusers""");
  }
  
$DB_site->free_result($loggedins); 
Lemme know if you got it, now
Reply With Quote
  #37  
Old 04-23-2003, 08:43 PM
WEForums WEForums is offline
 
Join Date: Apr 2003
Location: Jacksonville, Florida
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was thinking great, it'll be simple now. That proves incorrect though. I did what you said, and I get this error:

Parse error: parse error, unexpected ',' in /home2/wef/public_html/forums/index.php on line 210

Line 210 is the following:

Code:
$staffusers = ", ", $su_r);
Of course this is probably an easy problem to fix for you 'veterans' but I am new to hacking up forums. I tried removing the ','s and of course that failed, lol.

Anyway, if you have an idea of what can be causing this I'd be thankful.

Also, thanks for the reply.
Reply With Quote
  #38  
Old 04-23-2003, 10:59 PM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<font size="7">I

Hate

vBulletin.org!</font>

*sighs*

stupid PoS system removes php functions from blocks of [php-] code! *mutters furiously*

change:

$staffusers = ", ", $su_r);

$normalusers = ", ", $nu_r);

into:

$staffusers = implode(", ", $su_r);

$normalusers = implode(", ", $nu_r);

Then it should work..
Reply With Quote
  #39  
Old 04-23-2003, 11:36 PM
WEForums WEForums is offline
 
Join Date: Apr 2003
Location: Jacksonville, Florida
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I hate feeling like a "newbie."

Truth is, I don't have any clue how to fix parse errors. Your instructions worked to fix that parse error, but a separate part of the code (one in which is identical to an 'unhacked' vB index.php) seems to be causing a parse error. (It must be to do with this code or I completely screwed up. heh)

Anyway, the current error is:

Parse error: parse error, unexpected ')' in /home2/wef/public_html/forums/index.php on line 336

Line 336 is:

list($key1,$val1)=each($iforumcache["$forumid"]) ) {

GRRR!

I am sure I am annoying, lol. Can't wait to get enough time to study PHP.

If you need any other info (or if you're willing to help) just let me know what to do. Sorry to burden you.
Reply With Quote
  #40  
Old 04-24-2003, 12:28 AM
WEForums WEForums is offline
 
Join Date: Apr 2003
Location: Jacksonville, Florida
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just to give a bit more code... Lines 330 - 342:

Code:
if ($depth<$forumhomedepth) {
          $forumbits.=makeforumbit($forum['forumid'],$depth+1,$forumperms);
        }
      } // END if can  view
    } // END while ( list($key2,$forum)=each($val1) ) {
  } // END while )
list($key1,$val1)=each($iforumcache["$forumid"]) ) {

  unset($iforumcache["$forumid"]);
  return $forumbits;
}

if (!isset($forumid) or $forumid==0 or $forumid=='')
Reply With Quote
  #41  
Old 04-24-2003, 08:15 AM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I

Hate

vBulletin.org!




Quote:
Line 336 is:

list($key1,$val1)=each($iforumcache["$forumid"]) ) {
Make that:


while(list($key1,$val1)=each($iforumcache["$forumid"]) ) {
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 05:04 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05026 seconds
  • Memory Usage 2,312KB
  • Queries Executed 25 (?)
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
  • (4)bbcode_code
  • (2)bbcode_php
  • (1)bbcode_quote
  • (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
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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