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)

Mum 04-26-2009 03:12 AM

Any way to make this happen any time they change fields, not just on registration?

GHC Webmaster 12-31-2009 07:46 AM

I'm trying to get this mod to work on VB4.0 but it does not seem to work anymore. Would you be willing to modify the mod for vb4?

The relevant hook is still there I noticed. I especially need the gender example you posted in your original post.

Thanks in advance!

Regards,

Walrick

Artes_Marciales 04-09-2010 06:54 PM

Quote:

Originally Posted by Bellinis (Post 1755069)
Dear amykhar & others,

I'd been looking for such mod for a long time. Will this one still work for 3.8? I'm affraid not....
Is there an updated version of some similar mod?

Thanks a lot in advance!

Same here.. I am in need of this hack.

coffee 05-08-2010 03:38 AM

Installed on vBulletin 4.0.3 PL1 and is perfect !

bulldog51981 01-04-2011 06:29 PM

I had this mod working perfect until we updated to 4.1, I would be willing to donate if this could be updated please! I use it for the gender example and it was working great!

Stormlilly 01-11-2011 03:24 AM

I have a need for this too :) Would be great if it could be updated.

RebelliousKrimp 02-08-2012 12:13 PM

I would also love an update on this mod, if you would be so kind. :)

Tagged for now, I eagerly await your (hopeful) enthusiasm to rework it! =D

temsamane 04-03-2012 08:07 PM

i need this mod for vb4

Tyran1 04-10-2012 01:08 AM

need a fix for 3.8.7 please!!!!!

mavherzog 04-23-2012 10:44 AM

Quote:

Originally Posted by temsamane (Post 2316492)
i need this mod for vb4

Ditto!!

Rebecca217 08-14-2012 01:55 PM

Same here. :) Would be willing to donate.

imported_FreDy 09-07-2012 10:35 AM

I need this mod for vB4 too... I would pay for it

Ramsesx 09-22-2012 07:39 PM

It shouldn't be too hard to get this running, it's just a simple sql query more or less.
Couldn't one of the coders here give a hint?

BenniX12 01-01-2013 02:06 PM

Hi!

I figured out how to modify the code. The code works fine when it is inserted after line 1507. This is just behind the hook "($hook = vBulletinHook::fetch_hook('register_activate_proce ss')) ? eval($hook) : false;"

The code is:
// Get the value for field 5
$user = $db->query_first("SELECT field5 FROM " . TABLE_PREFIX . "userfield WHERE userid = $userinfo[userid]");

if ($user['field5'] == 'Test')
{
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids)
{
$membergroupids = 9;
}
else
{
$membergroupids = 9;
}
$userdata->set('membergroupids', $membergroupids);
}

My prob is, that it does not work when I use it as a plugin. Could anybody help?

I guess .... but it did'nt work

<?xml version="1.0" encoding="ISO-8859-1"?>

<plugins>
<plugin active="1" product="vbulletin">
<title>Put User in Secondary Group Based on Custom Profile Field Value</title>
<hookname>register_activate_process</hookname>
<phpcode><![CDATA[// Get the value for field 5
$user = $db->query_first("SELECT field5 FROM " . TABLE_PREFIX . "userfield WHERE userid = " . $vbulletin->userinfo['userid'] . "");

if ($user['field5'] == 'Mathebuch')
{
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids)
{
$membergroupids = 9;
}
else
{
$membergroupids = 9;
}
$userdata->set('membergroupids', $membergroupids);
$userdata->save();
}]]></phpcode>
</plugin>
</plugins>


All times are GMT. The time now is 11:57 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.01108 seconds
  • Memory Usage 1,743KB
  • 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_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
  • (14)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