vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Add User to Secondary Usergroup Based on the Value of a Custom Profile Field at Reg. (https://vborg.vbsupport.ru/showthread.php?t=82993)

futuredood 06-15-2006 08:57 PM

is their any way to make this a hack with a user interface?

amykhar 06-15-2006 09:38 PM

It's not the kind of mod that's really conducive for a user interface. It's one of those set it once and never touch it again kinds of things.

futuredood 06-16-2006 02:38 AM

hmm.. i'd like to have it so that people can select from the list. the thing is, if i have a list of five options, say A B C D E, and then I end up adding a 6th option and still wanted to maintain the ABC order, I'd place it between the A and the B. the problem with that is, users who selected B are now changed because the list changed by one line. any ideas?

patrickstar 06-28-2006 12:58 AM

ok this is what i did:
1. created new profile field: gender
2. value = 'M' or 'F'
3. created new usergroup: female
usergroup id: 10

i have made the neccesary changes to the xml file and now the silly question. how do i upload it to my plug in manager. i just save text and upload?

thanks and great hack.

paulfletcher 06-28-2006 04:29 AM

AdminCP > Plugin System > Plugin Manager > Add New Plugin

I think this is what your looking for.

Thanks,
Paul

paulfletcher 06-28-2006 04:31 AM

Oh, if you already have the plugin installed and you just want to make a code edit. Inside the Plugin Manager, click on the plugin you want to edit. Once the next page has loaded, located Plugin PHP Code... To the right of that is where you can edit your code.

Thanks,
Paul

patrickstar 06-28-2006 08:38 AM

Quote:

Originally Posted by paulfletcher
AdminCP > Plugin System > Plugin Manager > Add New Plugin


I think this is what your looking for.

Thanks,
Paul

yea i found that but my question is, how do i download the xml file? its not allowing me the option to save it, it just opens up to the text.

amykhar 06-28-2006 11:19 AM

Right click - > 'Save As'

patrickstar 06-28-2006 01:17 PM

lol. that easy uh?

well i just wanted to make sure, i havent uploaded a plug in yet.

thanks again, this is a great hack, that i am going to use.

patrickstar 06-29-2006 01:14 AM

hello amy can you help me out. i thought i did everything right.

1. i added new usergroup = 10
2. i have gender field '7'
3. i have required email verification
4. i have gender required at time of registration
5. M or F

this is what i have as php code:
// Get the value for field 7
$user = $db->query_first("
SELECT field7
FROM " . TABLE_PREFIX . "userfield
WHERE userid = " . $vbulletin->userinfo['userid'] . "
");

if ($user['field7'] == 'F')
{
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids)
{
$membergroupids = $membergroupids . ", 10";
}
else
{
$membergroupids = 10;
}

$userdata->set('membergroupids', $membergroupids); }


but when i enable the plug in, everything seems to go fine when registerring, but i get this message after following my registration link and logging in:

Your account has already been activated so please try logging in.

everytime i try to log in.

can you please help with any suggestions. thanks.


All times are GMT. The time now is 11:24 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.01109 seconds
  • Memory Usage 1,735KB
  • 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
  • (4)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