Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Beta Releases
Custom User Status by Usergroup Details »»
Custom User Status by Usergroup
Version: 1.00, by Jen Jen is offline
Developer Last Online: Jun 2018 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 06-28-2002 Last Update: Never Installs: 8
Is in Beta Stage  
No support by the author.

I could not find a way to add an additional user status field based on usergroup other than setting a override, which got rid of the normal usertitle based on post count and I didn't want that. This is my solution.

This hack adds an additional field to the usergroup table and allows you to display that custom group status field in addition to the normal usertitle that is defined either custom for the user or normally by number of posts without overriding the usertitle variable.

The end result gives you something like this (depending on how you edit your postbit template) for the output:

Jen
Tyro Hacker
[Custom Group Status Here]
[Users Avatar]
[Users other details]

The custom group status is set within the cp from the user group modify function for each group you want to add this additional status field to.

Questions, Problems, etc.. ask here as I am unable to provide support via email.

Show Your Support

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

Comments
  #2  
Old 06-29-2002, 04:13 AM
Jen's Avatar
Jen Jen is offline
 
Join Date: Apr 2002
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

# NOTE: This code has been added to the download file. If you have a copy of the file without the User Profile mods, these instructions are for you. Otherwise, use what's in the file.

If you want to add the new custom user status to the users profile here's the edits to do so (These should be all one line and are broken up here to keep the screen from scrolling):

Edit admin/functions.php
find:
PHP Code:
if (!isset($usercache[$userid])) {
    
$usercache["$userid"]=$DB_site->query_first("
SELECT user.*,userfield.* 
FROM user 
LEFT JOIN userfield ON userfield.userid=user.userid WHERE user.userid='
$userid'"); 
replace with:
PHP Code:
if (!isset($usercache[$userid])) {
    
$usercache["$userid"]=$DB_site->query_first("
SELECT user.*,userfield.*, usergroup.groupcustomstats 
FROM user 
LEFT JOIN usergroup ON usergroup.usergroupid=user.usergroupid 
LEFT JOIN userfield ON userfield.userid=user.userid WHERE user.userid='
$userid'"); 
Then just add the following variable to your getinfo template as you want it to display.
PHP Code:
$userinfo[groupcustomstatus
Reply With Quote
  #3  
Old 06-29-2002, 06:48 AM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was thinking about something like this just last week. Good job
Reply With Quote
  #4  
Old 06-29-2002, 07:42 AM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

didn't work for me...
Reply With Quote
  #5  
Old 06-29-2002, 08:34 AM
Bugz Bugz is offline
 
Join Date: Feb 2002
Location: Cleveland
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

im going to try when i wake up later.

im preatty tired and watching mr. deeds
Reply With Quote
  #6  
Old 06-29-2002, 08:43 AM
Jen's Avatar
Jen Jen is offline
 
Join Date: Apr 2002
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mist: I think I figured out the problem.. a # character was right before the second replacement db query. I have fixed that in the file and it should install no problem now.

The hack code above is based on an un-hacked vB 2.2.6 install, but works wonderful with the Sig and Avatars by Usergroup hack.

I just tested the updated code on a fresh install of vB 2.2.6 and it worked perfectly.
Reply With Quote
  #7  
Old 06-29-2002, 05:58 PM
Jen's Avatar
Jen Jen is offline
 
Join Date: Apr 2002
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The download file has been updated to include the steps to add the new Group Custom Status to the user's profile page.
Reply With Quote
  #8  
Old 07-15-2002, 03:37 AM
Jen's Avatar
Jen Jen is offline
 
Join Date: Apr 2002
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If anyone has had any problems with this, please let me know. otherwise I'd like to move this up to a Final release.
Reply With Quote
  #9  
Old 08-15-2002, 10:08 AM
FeDe's Avatar
FeDe FeDe is offline
 
Join Date: Feb 2002
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just wanted to say, it's a great hack! Installed it yesterday and it works perfectly! Thanks .
Reply With Quote
  #10  
Old 11-02-2002, 10:29 AM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Have you ran the query?

Satan
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 09:26 PM.


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.04951 seconds
  • Memory Usage 2,288KB
  • 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
  • (3)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete