vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   New members in a different user group than registered (https://vborg.vbsupport.ru/showthread.php?t=36547)

fonzerelli_79 03-25-2002 08:11 PM

New members in a different user group than registered
 
wluke said that there was a hack for this :-

i run a football site

currently rival fans are banned but i want to be able to create a user group called rival fans
they will be able to post in one room on the site

is there a way to do this when they register
ie. ask which team when they support when they sign up and then automatically assign them to the user group rival fans

fonzerelli_79 03-26-2002 12:20 PM

ello peeps!!

Admin 03-26-2002 12:25 PM

Coming soon...

fonzerelli_79 03-27-2002 09:00 AM

thanks firefly ;)

luke said that it had already been done

im not the best at php etc but i assumed that it wouldnt be too difficult

anyhoo, thanx for the update

Admin 03-27-2002 09:03 AM

It's ready for testing if you want, shall I PM you the file?

It includes a new option for usergroups, "Can users choose to join this usergroup when signing up?", so you can control exactly which usergroups new users can sign up for.

fonzerelli_79 03-27-2002 09:07 AM

that would be great firefly

ill test it no problem and let you know how i get on, ie. any bugs suggestions

pm me the file and ill try it when i get home tonight

nice one

amk35 05-08-2002 06:14 PM

FireFly ,

I'm looking for this same hack, could you pm it to me also? Thanks!

zonegray 09-20-2002 12:16 PM

Did this go any further? Found this discussion looking for something similar (want to put users in a special group based on a code they enter at registration). Can't seem to find anything in Firefly's released hacks or betas.

Logician 09-20-2002 08:50 PM

Quote:

Originally posted by zonegray
Did this go any further? Found this discussion looking for something similar (want to put users in a special group based on a code they enter at registration). Can't seem to find anything in Firefly's released hacks or betas.
Login Admin CP, create a new user profile field, make it invisible to other users, note its id..

Edit register.php, find:

PHP Code:

$DB_site->query("UPDATE user SET usergroupid=2$dotitle WHERE userid='$u'"); 

Replace it AS:
PHP Code:


            $userfields
=$DB_site->query_first("SELECT * FROM userfield WHERE userid='$u'");
            if (
$userfields['fieldX']=='YYY'
            {
            
$DB_site->query("UPDATE user SET usergroupid=Z$dotitle WHERE userid='$u'");
            }
            else
            {
            
$DB_site->query("UPDATE user SET usergroupid=2$dotitle WHERE userid='$u'");
            } 

Replace X with your profile field id.
Replace YYY with your secret code
Replace Z with the usergroup id users will be inserted..

This will work provided that:
1- You didnt enable new user moderation
2- You enabled email validation
3- I dont know about COPPA thing but I guess it wouldnt matter..

Not tested but should work..

Aurore 09-22-2002 04:12 PM

Looking forward for the hack!!

Aurore 09-29-2002 04:21 PM

:p UP

Chris M 09-29-2002 04:42 PM

@Logician...

How would you make it so that they put in a word, like "DarkBlazes", and it puts them in the registered usergroup, put no word, and it puts them in the registered usergroup, and put "noXmedia", and it puts them in the noxmedia usergroup?

So you sort of add words via the admin cp, and the usergroupid to put them into, and it does that?

Satan

Logician 09-30-2002 08:00 AM

Quote:

Originally posted by hellsatan
@Logician...

How would you make it so that they put in a word, like "DarkBlazes", and it puts them in the registered usergroup, put no word, and it puts them in the registered usergroup, and put "noXmedia", and it puts them in the noxmedia usergroup?

This is no different than my code above.. Since "Darkblazes" and "no word" puts you into the same usergroup just use the code above and use word "noxmedia" for custom group. Others will be put into registered automatically.

Quote:

So you sort of add words via the admin cp, and the usergroupid to put them into, and it does that?
Well this is possible but not in 2 mins.. You have to add seperate columns in your setting table. Or I would recommend adding one field only and use a special format for entering data into this field like this:

[word1:2] [word2:12] [word3:14]

Then in register.php you'll divide the content of this field into small groups and get individual words and the usergroups..(preferrably put them inside an array) and then check the codes and put the user into relevant usergroup accordingly..

Does it shed a light about the algorithm?

Freefall 10-26-2002 07:33 PM

Hey Firefly: could you pm me the hack aswell?

Thanx,

-Freefall-

Almax 04-07-2003 10:19 PM

Logician can you add the code for say 3 diff signups so i can get the just of your last post
PLEASE

Logician 04-08-2003 07:12 AM

Quote:

Today at 02:19 AM Almax said this in Post #15
Logician can you add the code for say 3 diff signups so i can get the just of your last post
PLEASE

what do you mean by 3 diff signups?

Sacrifice 08-01-2003 01:55 AM

Firefly, can You Pm me it please?

Salazar 08-08-2003 12:31 PM

Hello FireFly, it would be great if you send me the file as well! :)

Logician 08-08-2003 04:16 PM

I'm having hard time to understand why people are constantly asking to get the hack in this thread via pm/email from FireFly?

Isn't the code I have given above working or is it invisible to everybody but me? lol

paddysplace 10-11-2003 05:40 AM

Looks perfect, I will be implimenting for certain permissions (like uuh, is coupon a good word?) More like giving codes for "Clubs". And only those members who have their club's code can go in..

Regards,
Patrick

PS: Hope that made sense..


All times are GMT. The time now is 04:44 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.01070 seconds
  • Memory Usage 1,758KB
  • 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
  • (2)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (20)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete