форум vBSupport.ru > vBulletin > vBulletin 4.2.x > Вопросы по vBulletin 4.2.x
  • »
VBsupport перешел с домена .ORG на родной .RU Ура! Пожалуйста, обновите свои закладки - VBsupport.ru
 
 
 
 
bran
Простоузер
Question Публичные группы пользователей в форме регистрации
0

Всем привет!
Создал публичные группы пользователей.
Можно ли чтобы люди при регистрации выбирали в какую группу вступить?
Bot
Yandex Bot Yandex Bot is online now
 
Join Date: 05.05.2005
Реклама на форуме А что у нас тут интересного? =)
 
 
iiioroh
Продвинутый
 
iiioroh's Avatar
Default
0

Хороший вопрос, тоже интересует!
Может кто знает?
 
 
BTC
СпециалистЪ
 
BTC's Avatar
Default
1

Для тройки есть: http://vbsupport.ru/forum/showthread.php?t=23041 и http://vbsupport.ru/forum/showthread.php?t=32346 на форуме.
Для четверки смотрите сами.
 
 
iiioroh
Продвинутый
 
iiioroh's Avatar
Default
0

Все верно, для четверки есть такой мод - PB Usergroup Choice on registration
Но одно но, он для:
групп по умолчанию и дополнительных групп ( admincp/usergroup.php )
А нужен для публичной категории групп ( admincp/usergroup.php )

Там же описан способ - Select Usergroup on registration
Но я не уверен, что это именно то, да и в комментах пишут, дескать на 4.2.x способ не работает.

Само описание привожу ниже, причем скриншоты , что там были уже почили в бозе:

Well, here I will explain them to VBuletin 4.x, how to make the register can select a user group
I demonstrate using for Men and Women.

1_ Let User Profile Fields ---> Create new profile field ---> Single Selection

Code:
  Title:   Select your Sex 
 Description:  Here you select your sex 
 Options:   Man 
            Women 
 Set Default:   Yes, including a first option blank 
 Field editable by the user:   Just to register
(Leave everything else default, or put it in your opinion)

2_ Open the file register.php (It is located in the folder that your forum dode)

3_ Search:

PHP Code:
if ($vbulletin->options['verifyemail'])
    {
        
$newusergroupid 3;
    }
    else if (
$vbulletin->options['moderatenewmembers'] OR $vbulletin->GPC['coppauser'])
    {
        
$newusergroupid 4;
    }
    else
    {
        
$newusergroupid 2;
    } 
Replace:

PHP Code:
if ($vbulletin->options['verifyemail'])
    {
        
$newusergroupid 3;
    }
    else if (
$vbulletin->options['moderatenewmembers'] OR $vbulletin->GPC['coppauser'])
    {
        
$newusergroupid 4;
    }
    else if (
$vbulletin->userinfo['fieldX'] == "Women")
    {
        
$newusergroupid W;
    }
    else
    {
    
$newusergroupid 2;
    } 
NOTE: Here where is the X put the number of field of field of user profile created
Aca says the number of the field:

This line is the X

PHP Code:
else if ($vbulletin->userinfo['fieldX'] == "Women"
This line is the W

PHP Code:
$newusergroupid W
NOTE: With all this echo up here, provided they are registered and NO is selected confirmation email, provided that register and selects men are assigned the default user group that is the id number 2, and when women are chosen will select the user group that you placed the corresponding id.
But should they be assigned the confirmation email option, you must also replace this in the register.php.
(both steps are recommended in order to always be able or may not have the option to confirmation by email)

4_ Search:

if ($vbulletin->options['verifyemail'])
PHP Code:
            {
                
$activateid build_user_activation_id($userid, (($vbulletin->options['moderatenewmembers'] OR $vbulletin->GPC['coppauser']) ? 2), 0);

                eval(
fetch_email_phrases('activateaccount'));

                
vbmail($email$subject$messagetrue);

            } 
Replace:

PHP Code:
if ($vbulletin->options['verifyemail'])
            {
                if (
$vbulletin->userinfo['fieldX'] == "Mujer")
                {
                    
$activateid build_user_activation_id($userid, (($vbulletin->options['moderatenewmembers'] OR $vbulletin->GPC['coppauser']) ? 16), 0);
                }
                else
                {    
                    
$activateid build_user_activation_id($userid, (($vbulletin->options['moderatenewmembers'] OR $vbulletin->GPC['coppauser']) ? 2), 0);
                }

                eval(
fetch_email_phrases('activateaccount'));

                
vbmail($email$subject$messagetrue);
            } 
NOTE: Again, where is the X put the number of field of field of user profile created
Aca says the number of the field:

This line is the X

PHP Code:
if ($vbulletin->userinfo['fieldX'] == "Mujer"
5_ Al and have edited the register.php , there is only replaced by that of his board, and ready, at the time of registration, if they choose the women will have group sex user in this case would be if women and men choose will have the default is the user group man.

-------------------------------------------------------------
Может быть тут кто-нибудь поможет разобраться?

iiioroh добавил 08.10.2015 в 04:02
Вместо: А нужен для публичной категории групп ( admincp/usergroup.php )
Читать так: А нужен для публичной категории групп ( admincp/socialgroups.php )

Last edited by iiioroh : 10-08-2015 at 05:02 AM. Reason: Добавлено сообщение
 


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




All times are GMT +4. The time now is 12:58 AM.


Powered by vBulletin® Version 3.7.5
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Loading...