![]() |
Quote:
|
Quote:
So i must only use this one? or must i something replace from the old one? (the values i must change, that i have understand ;)) |
Quote:
|
thx, m8, installed it, now i must wait until my girls log in :D
|
Quote:
|
tried with a fake account, but it doesnt go. take a look at the code plz:
// Place user in/out of selected single PRIMARY // usergroup, according to selection made in profile, via // custom radio button field. ver 1.04 // ************** UNTESTED CODE **************** // Enter values in the strings below for your forum // custom field containing your radio button $radio_field = 'field5'; // FIRST radio button option // Text shown in radio button for option $choice_text[0] = 'Weiblich/Bayan'; // Associated usergroup number $ug[0] = '20'; // SECOND radio button option // Text shown in radio button for option $choice_text[1] = 'Männlich/Erkek'; // Associated usergroup number $ug[1] = '2'; // THIRD radio button option // Text shown in radio button for option $choice_text[2] = 'keine Angabe/Bilgi yok'; // Associated usergroup number $ug[2] = '2'; // add additional radio button choices as needed // You don't need to enter anything below here // Derive additional needed variables $userid = ($vbulletin->userinfo['userid']); $pgrp = $vbulletin->userinfo['usergroupid'])); $new_pgrp = $pgrp; $fieldval = $vbulletin->userinfo[$radio_field]; // Do the work // Proceed only if there is a user choice if ($fieldval != '') { if($ug[0] != '') { $iii = 0; // Check user choice against possible options foreach ($choice_text as $value) { // If we have a match, set as new primary usergroup if ($fieldval == $choice_text[$iii]) { $new_pgrp = $ug[$iii]; } $iii++; } } // if new group different than current group if ($new_gprp != $pgrp) { // Put updated usergroup into database $updatefields = $vbulletin->db->query(" UPDATE user SET usergroupid='$new_gprp' WHERE userid=$usrid "); } } |
Quote:
|
This seems like an awesome hack. So far however I have not been able to get it to work like what I need. After spending the entire day trying different variations I finally decided to ask the experts and post here.
I want members to be able to select one or more public groups to join. I first tried using a multiple-selection checkbox and after not being able to get that to work I setup 7 different single radio button fields and created a different single radio button plugin for each field. That did not work either. My question is --> Will this work with a multiple-selection checkbox? I want to create a multiple-selection checkbox and allow members to check off the groups they would like to be a member of. Those that are not checked off, I would like them to be removed from. Can this hack be used to accomplish this? Appreciate any help and/or assistance you can provide. Thank you. |
Quote:
|
Thank you very much. Looking forward to your custom control script for multiple-selection checkbox field.
|
All times are GMT. The time now is 03:31 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|