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)
-   -   Custom User Status by Usergroup [Final] (https://vborg.vbsupport.ru/showthread.php?t=41166)

Jen 07-15-2002 10:00 PM

Custom User Status by Usergroup [Final]
 
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. This hack has been tested on vB 2.2.6.

Jen 07-16-2002 06:29 PM

Here's a preview of how this hack is used and displays on my board.

For those wondering why you would want such a hack.. I use it for the paid memberships system that I wrote to work with vBulletin. I don't require membership to view/use the board, but do accept contributions towards site operating costs. This hack was part of the solution to adding that membership system and giving users 'status' based on their contributions to the site.

Velocd 07-16-2002 07:54 PM

There is another hack similar to this made by JJR512, although his uses a custom field other than creating a new table. I'm not sure if his is all that similar in code, but they seem to do the same thing.

Reference:
https://vborg.vbsupport.ru/showthrea...threadid=34968

Dean C 07-16-2002 08:17 PM

great hack...

Jen 07-16-2002 08:19 PM

Actually, they are quite different:

"Basically, all it does is show both a custom title, selected by the user, and the user's standard title"

This hack keys the custom title off of the users usergroup and it is only configurable thru the admin and can't be set by the user.

The other hack allows the user to set their custom title and has nothing at all to do with the user groups that the user is assigned to.

CeleronXL 07-16-2002 11:43 PM

Nice hack, but are you sure it hasn't been done before? Because at a forum I go to they've had a userselectable field, and then another field just like this and it's been there for a while. Only the admins get the second field, however, and they put stuff like "Coolness Admin, Cheese Eating Admin" and stupid stuff like that ;). But was this made before? I don't think the site creator is good enough with PHP to make his own. ;)

Jen 07-17-2002 12:13 AM

I do not believe that this hack has been done before (keyed off usergroup like this).

I searched the forums extensively before I wrote it, I found some similar, but none that did exactly what I was trying to do: Assign a custom title to each user within a specific user group and still keep the posters standard post count based user title. I suppose it could have been done (as has been done previously) with a 'hidden' user profile field that the admin sets, but I didn't want the hastle of setting this user field and like the ability to see who my contributing members are (and at what level) based on their usergroup.

My reason for needing this was to implement my paid membership system which has 5 different levels above standard member (Contributor, Bronze, Silver, Gold, Platinum) each based on the amount of $ sent in by the user and each getting a custom 'group' title in addition to their normal user title. The entire system is automated so all I have to do is enter the funds as they are received and the rest is handled within my membership system / vBulletin. The custom status is assigned as soon as the member is switched to a contributor user group.

And for those wondering, yes, I have a fully working and operational membership system tied into vB that tracks money sent in, expiration dates, totals, membership status, limits avatar dimensions and display based on usergroup (another reason for this hack), the whole nine yards, and it's completely automated once I enter the funds into the system. It took three existing hacks, this hack and two other hacks I wrote but have not yet published to create.

ZiRu$ 07-17-2002 02:37 AM

i shall install....SOON

Neo 07-17-2002 04:20 AM

Quote:

Originally posted by Velocd
There is another hack similar to this made by JJR512, although his uses a custom field other than creating a new table. I'm not sure if his is all that similar in code, but they seem to do the same thing.

Reference:
https://vborg.vbsupport.ru/showthrea...threadid=34968

I would have to say this would be better to use since it doesnt require another table for such a small thing.

Jen 07-17-2002 04:37 AM

There's no extra table created, only a modification to the usergroup table to add an extra field which contains the custom usergroup title if you want to use one.

The two hacks are different. This one is set by the admin and sets a custom usergroup title based on what usergroup the user is in. This is usefull if you want every member of that usergroup to have the same custom title and yet still keep the original user title based on post count.

The other hack referenced adds an additional profile field that allows the USER to set their own custom title in addition to their title based on post count.

If you want to allow the users to set their own custom titles or if you want to use the admin to set a custom title for individual users, then the other hack is probably what you want. If you want to set a custom title for all users within a specific usergroup and not override their user title, then this is the hack to use.

Basically, two differing ways of doing the same thing, just depends on what you're trying to do and how you want to control it.


All times are GMT. The time now is 01:59 AM.

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.01019 seconds
  • Memory Usage 1,740KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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