Forum Replies Created
-
ok, with thanks to http://cleverness.org/2010/08/08/add-user-types-to-wordpress-and-buddypress/ found another starting point:
Put this in you BuddyPress theme /registration/register.php file:
`
User Type A
User Type B
User Type C`
Put the following code in your theme’s functions.php:
`<?php
/* Add sign-up field to BuddyPress sign-up array*/
function bp_custom_user_signup_field( $usermeta ) {
$usermeta = $_POST;return $usermeta;
}
add_filter( ‘bp_signup_usermeta’, ‘bp_custom_user_signup_field’ );/* Add field_name from sign-up to usermeta on activation */
function bp_user_activate_field( $signup ) {update_usermeta( $signup, ‘signup_type’, $signup );
return $signup;
}
add_filter( ‘bp_core_activate_account’, ‘bp_user_activate_field’ );function synchro_wp_usermeta($user_id, $password, $meta) {
global $bp, $wpdb;$type = $meta[signup_type];
update_usermeta( $user_id, ‘signup_type’, $type );
}
add_action( ‘wpmu_activate_user’, ‘synchro_wp_usermeta’, 10, 3);
`This should create selection of account types on the signup page.
If anyone knows how to update profile-loop.php, so that every account type would have different profile group, please share your opinion.thanks.
@hnla
if you would look on the whole topic, you would see that discussion is about radio button with x selections, but discribed code includes only one selection, therefor my question seems a bit logical, as 60% of people here won’t be able to change code themselves (me too).
people that were mentioned in previous posts were involved in this question, or those who would like to help.
my problem? you could create poll to see, how many people would like to have this feature (I’ve seen last request few hours ago).definitely won’t disturb you any more, and your dog too

thank you.
hi @noizeburger
no, it doesn’t.
please, take a look on this topic:
https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/can-you-run-multiple-profile-loops-in-singleprofile-loop-php/hope some day it will be solved.
Sarah, couldn’t you share your experience re this question?
please?thnaks @boonebgorges ,
somehow first place where I get mistake is your mentioned `if` before `bp_has_profile`
taking all together I got this code for profile-loop.php :`
<?php
$field_id = xprofile_get_field_id_from_name( ‘Account Type’ );
$field = xprofile_get_field( $field_id );
$value = $field->data->value;if ( bp_the_profile_group_name() == ‘Account Type’ && $value == ‘Selection 1’ ) {
(if ( bp_has_profile( ‘profile_group_id=1,4’ ) ) ?><div class="bp-widget “>
<tr>
}
`
does this code make any sense for anyone?
Am I correct, that even if I will get this code to work, it still returns only one selection of radio button?thank you!
`<?php
$field_id = xprofile_get_field_id_from_name( ‘Type’ );
$field = xprofile_get_field( $field_id );
$value = $field->data->value;if ( bp_the_profile_group_name() == ‘Type’ && $value == ‘114’ ) {
( bp_has_profile( ‘profile_group_id=1,3,4′ ) ) : while ( bp_profile_groups() ) : bp_the_profile_group();
}
?>`Full code, which should be placed in profile-loop.php,
Did I understand correctly, what @boonebgorges tried to explain?
@hnla please, take a look on this.thank you guys!
sorry for the update, but I think base group should be added to every selection too, probably, it will go to:
“
thanks for reply hnla.
what I’m trying to put into profile-loop.php is:`
(repeat code above for other 3 selections)
`
idea is that I want to place radio button with four selections (Professional, .., …, … .) on the signup page (in group Base). when one of them is selected, profile group with same name appears on public and edit profile pages. If no one is selected, what is impossible, because field is “required”, then base group appears.
at the moment code does not work, any idea of corrections or exact line where to put it, would be highly appreciated!
thanks.
ok, as I understand, the easiest way for me to get it done, is to place radio buttons in the base group and create x profile groups, each of groups will be called after “if(bp_get_member_profile_data( ‘field=account type’ ) == ’name’) :
” for each particular profile type from radio buttons.
It will make only radio buttons to appear on the signup, but entering code into public and edit profile sections will force user to see only profile group, corresponding to his radio button?probably only I understood what I wrote

should I use (bp_the_profile_group() == “group number”) function?you did not understand the idea of what I wrote

hi @hnla ,
thanks for the starting point, will try to search forum again to find idea for further part of the code.
re your position of members obligation, have to say that your point of view re my respond is completely wrong as I respect what you guys are doing, in some cases it is even non-understandable why you are doing this…e.g. @pcwriter tried to help me in one question, writing x lines of code.
completely another point are people, who get help from members side, but later do not even respond on requests for help in the same question, what is selfishness.
returning to the code for account types, I’ve been trying to find solution in internet (bp forum too) for days, have seen several unresolved/ununswered topics, therefor I’m a bit surprised re your words that question was solved. If you mean that this code can be written taking X parts of code from X topics, have to conclude that my knowledge of php will not allow me to do this in the near future and for help to people like me, it would be great to write solution in one place, as I’m sure this question is interesting for a lot of people. If I will find this code, it definitely will be reposted here.thanks again!
hi @jarvo1980 ,
could you please tell whether is it possible to use your approach/code to make 3 types of account and each of them would lead to different custom profile fields?
probably, this is exactly what you want to do, maybe you could write full code?thank you!
P.S. there are several topics on this question, but as I see, those who have done it do not want to share their result.
one of them:
https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/can-you-run-multiple-profile-loops-in-singleprofile-loop-php/If someone knows how to, please share. I’m sure, a lot of people would love to use it.
don’t know why, but first API that I got did not work, so I had to get another one, which works well now.
sorry guys, code works well, however Google Map API V3 would be good update.
couldn’t you specify, where exactly I should put this code?
(probably, profile-loop, but somehow it does not work for me).V3 map api would be good, but my knowledge of html, php, etc..won’t allow me to do this.
P.S. “..Are you asking for permission?..” I just don’t know what all these plugins licenses mean. maybe authors of gPress will decide to eat my tiny www for this x lines of code

isn’t it allowed to just take necessary piece of code from gPress?
@Roger Coathup
hi,found information below, but still can not achieve any result. Maybe you could write necessary php code for me?
thank you!!bp_core_time_since( $older_date, $newer_date = false ) X-Ref
bp_core_time_since()Based on function created by Dunstan Orchard – http://1976design.com
This function will return an English representation of the time elapsed
since a given date.
eg: 2 hours and 50 minutes
eg: 4 days
eg: 4 weeks and 6 daysparam: $older_date int Unix timestamp of date you want to calculate the time since for
param: $newer_date int Unix timestamp of date to compare older date to. Default false (current time).
return: str The time since.@sicksight
thanks, I thought it is a question of WP, but if someone could point me on file in default WP+BP, it would really help.thanks again!
thanks, exactly I’ve been looking for!!
hi,
@Dwenaus (IE8 BP 1.2.5.2 WP 3.0.1) group tag menu in admin bar is shown as empty cell, however links to the group tags (group page)..is it possible to fix this, or remove this menu completely?
thanks.
@Roger Coathup @Modemlooper
It is tabbed sidebar and issue is that all available plugins (sidebartabs and so on) at wordpress.org do not work properly in BP…some show tabs + no widgets, some widgets + no tabs.
Manually it will be too hard for me, probably, will try to follow Jalien’s advice.thanks.
thanks @mercime, already found these links too. first works perfectly for me.
actually, it is quite hard for me to answer. I’m referring to widgets (categories, tags) that are native for WP+BP and which I want to use on my front page, not sidebar.
ok, I could ask in other way:is it possible to use two shortcodes for categories dropdown and tags dropdown (for regular BP posts), which I could insert in my index.php?
I mean some functions call, so that I don’t have to install additional plugins.
thanks.
actually issue re embeding live videos from other www is not solved yet, but if you want to embed sopcast or some other similar software, most of them have embeding codes where you just need to change the channel nr.