Search Results for 'profile fields'
-
AuthorSearch Results
-
March 20, 2016 at 6:19 am #251532
In reply to: Registration page does not work
jrytesting
ParticipantHello, I had this same problem and this is how I fixed it. It was mentioned in this thread
(https://buddypress.org/support/topic/bad-link-to-profile-edit/)
that there may be a problem in the database table “wp_bp_xprofile_groups”. For some reason the first item id there is not “1” but something else. As you change the id to 1, everything works. Then it also shows the Profile details side Name field (required) in the registration page.Also there was a problem to edit profile, it went to “Page not found”. This gets fixed also now, now you can edit the fields.
This seems to be some kind of bug in the installing process in some circumstances. I tested this by removing the BuddyPress and also deleting the BuddyPress database tables. They must be deleted manually, they wont get out by deleting the plugin.
New installation put the first id number to “3” to “wp_bp_xprofile_groups” table. Even the group_id in the table “wp_bp_xprofile_fields” was “1” (after I activated some components in BuddyPress menu, before that the tables were empty) for the first field item. So now the field item and the group item never matched.
Hopefully this helps someone. It seems that there are a lot of discussion of this problem, and this is a very annoying problem if you are really using BuddyPress.
Basically the registering had a workaround for example by using plugin “Theme my login”. The registering also looks simpler as there is not that “extra” name field. It is however unknown how BuddyPress works without that name field. Well, but perhaps that is an another story.
March 15, 2016 at 12:50 am #251231In reply to: Minor changes to user profile edit form
richdal
ParticipantThanks! I was able to copy that to my child theme
/wp-content/themes/genbu-child/buddypress/members/single/profile/edit.php
and can do some basic edits. Not familliar with making these types of changes but how would I change up some of the form field information. As an example I wanted to add some description text next to the 3 date fields for the Birth Date. If looked like those were getting generated here…
<?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?> <div<?php bp_field_css_class( 'editfield' ); ?>> <?php $field_type = bp_xprofile_create_field_type( bp_get_the_profile_field_type() ); $field_type->edit_field_html();but not sure how to change those up.
March 8, 2016 at 2:03 am #250847In reply to: PHP to get Field-Group-ID given Field-Group-Name?
johnywhy
Participanti checked here, but not sure if answers my question:
March 7, 2016 at 6:45 pm #250817shanebp
ModeratorDid you create the phone & address fields via wp-admin > Users > Profile Fields?
BP stores profile data in a table called
{your table prefix as set in wp-config}_bp_xprofile_data.
So you need to write those fields to that table.Unless somebody here has used Form Maker, it is doubtful that you will get a detailed answer.
March 5, 2016 at 6:52 pm #250714In reply to: Using bp_parse_args() to filter members loop
shanebp
ModeratorPlease use the
codebutton when sharing code.The fields
field_idandfield_valuedo not exist in the function you are attempting to filter.
See this for accepted fields:
https://buddypress.trac.wordpress.org/browser/tags/2.2.1/src/bp-members/bp-members-template.php#L453I think you want this field
retval['include'].Something like:
function see_woman_gender( $retval ) { global $wpdb; $field_id = 3; $field_value = 'Woman'; $query = "SELECT user_id FROM " . $wpdb->prefix . "bp_xprofile_data WHERE field_id = " . $field_id . ' AND field_value = ' . $field_value; $woman_ids = $wpdb->get_col( $query ); if ( !empty( $woman_ids ) ) $retval['include'] = $woman_ids; return $retval; } add_filter( 'bp_after_has_members_parse_args', 'see_woman_gender' );There are field re meta data; I don’t think they work with profile data.
But you could try this and let us know if it works:function see_woman_gender( $retval ) { $retval['meta_key'] = '3'; $retval['meta_value'] = 'Woman'; return $retval; } add_filter( 'bp_after_has_members_parse_args', 'see_woman_gender' );March 4, 2016 at 12:13 am #250589In reply to: How to create profile fields for certain roles?
shanebp
ModeratorYou’ll need to be able to write and debug code.
You can create a template overload of this file:
buddypress\bp-templates\bp-legacy\buddypress\members\single\profile\profile-loop.phpSet a variable with the current user role. Google how to get that value.
Then create an array of profile field ids for a role.
For example :if ( $current_role == 'model' ) $show_fields = array( 1, 5, 23 ); elseif( $current_role == 'photographer' ) $show_fields = array( 1, 7, 12, 35 );Then check if the current profile field is in that array.
Something like:<?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?> <?php if ( in_array( bp_get_the_profile_field_id(), $show_fields ) ) : ?> <?php if ( bp_field_has_data() ) : ?> <tr<?php bp_field_css_class(); ?>> <td class="label"><?php bp_the_profile_field_name(); ?></td> <td class="data"><?php bp_the_profile_field_value(); ?></td> </tr> <?php endif; ?> <?php endif; ?>Avoid setting any fields to ‘required’ if you’re only going to show them based on role.
March 2, 2016 at 3:56 am #250447In reply to: How does the search function?
modemlooper
ModeratorBuddyPress search is not 100% accurate. Member search searches usernames and profile fields. Think of it more like a filter than search.
February 28, 2016 at 12:35 pm #250338miguelcortereal
ParticipantIssue solved.
It was a function at child theme filtering one of the xprofile fields.
Thanks a lot for your concern.
February 25, 2016 at 5:45 pm #250283In reply to: Create user field visible to user and admin only
shanebp
Moderatorafaik, by default all profile fields are visible ( and editable ) by site admins.
So there is no need for Visibility: Admins Only.
Fields set to Visibility: Only Me will be visible to the member and site admins.February 16, 2016 at 5:26 pm #249918In reply to: Multi option for selecting
shanebp
ModeratorThere are several multi-select fields available when you create a profile field.
https://codex.buddypress.org/administrator-guide/extended-profiles/February 16, 2016 at 2:43 am #249905In reply to: How to show field-froups on Registration form?
johnywhy
ParticipantFebruary 16, 2016 at 2:39 am #249904In reply to: How to show field-froups on Registration form?
johnywhy
ParticipantFebruary 13, 2016 at 7:33 pm #249838shanebp
ModeratorI’ve added a group in BuddyPress profile panel…
If you add / move that group into the
Base (Primary)field group inwp-admin > Users > Profile Fields, then it will appear on the registration screen.February 11, 2016 at 4:33 am #249742In reply to: Request: Add multi-line, plaintext field
johnywhy
Participantthe basic php filter code was share with me, needed for this. Now i’m investigating how to put a ‘Rich Text’ checkbox on the fields editor.
Feel free to help over here
https://wordpress.org/support/topic/how-to-add-textarea-field-to-buddypress-xprofile-custom-fields-typethx!
February 10, 2016 at 11:44 pm #249741In reply to: How To Get Plaintext Multiline Field?
johnywhy
Participantthank you very much!
your solution is slightly different from this other one, which helps me learn.
https://wordpress.org/support/topic/how-to-add-textarea-field-to-buddypress-xprofile-custom-fields-type?replies=5#post-8009134thx!
February 10, 2016 at 3:24 am #249701In reply to: How To Get Plaintext Multiline Field?
johnywhy
Participantnote, i also edited the .po file, and generated a new .mo from that
you can download my zip here:
https://www.dropbox.com/s/nx0ox3weg5khlpi/buddypress-xprofile-custom-fields-type-JW-TEXTAREA.zip?dl=0i noticed modernizr.js mentions ‘textarea’. Not sure what it’s doing, but i don’t think this is the cause:
‘ var c = a.html5 || {},
d = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,
e = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,
f, g = “_html5shiv”,
h = 0,
i = {},
j;
(function() {
try {
var a = b.createElement(“a”);
a.innerHTML = “<xyz></xyz>”, f = “hidden” in a, j = a.childNodes.length == 1 || function() {
b.createElement(“a”);
var a = b.createDocumentFragment();
return typeof a.cloneNode == “undefined” || typeof a.createDocumentFragment == “undefined” || typeof a.createElement == “undefined”
}()
} catch (c) {
f = !0, j = !0
}’February 10, 2016 at 2:38 am #249700In reply to: How To Get Plaintext Multiline Field?
johnywhy
Participanthmm, ok, taking a different approach. i’m inspecting donmik’s files in ‘buddypress-xprofile-custom-fields-type’. Hope that’s ok, donmik!
i found ‘datepicker’ in:
bp-xprofile-custom-fields-type.php
classes\Bxcft_Field_Type_Datepicker.php
lang\buddypress-xprofile-custom-fields-type.pot
lang\en_US.mo
lang\en_US.po(ignoring the non-english files for the moment).
i simply duplicated all the ‘datepicker’ code-chunks in these files, and replaced ‘datepicker’ with ‘textarea’.
also duplicated the file ‘classes\Bxcft_Field_Type_Datepicker.php’, renamed it ‘Bxcft_Field_Type_Textarea.php’, and removed any date-specific code i found there.
and so on and so forth.
then i zipped it, uploaded to wordpress, activate, and added my new Textarea field to a form.
i actually got no errors, and actually got a text field on my registration form!
unfortunately, it’s only a one-line textbox, not a multiline textarea.
hrm. In inspector, the displayed field is:
<input type="string">so something in donmik’s code, or BP, or WP, is causing this to render as an <input> rather than <textarea>
….
February 9, 2016 at 10:29 pm #249696In reply to: How To Get Plaintext Multiline Field?
johnywhy
Participantthx for that! css will be our quick-and-dirty fallback. But not a long-term solution.
it would be cool to develop a proper control. i’m guessing this is part of the recipe for displaying on the user-profile page:
bp_profile_field_data()
but would be awesome if someone can share the full recipe to develop a custom field.
i’m looking here for clues-
and also searching the buddypress install for ‘multiselectbox’– just to see how that one gets handled 🙂
thx!
February 9, 2016 at 8:42 pm #249689In reply to: How To Get Plaintext Multiline Field?
calvin
ParticipantAfter adding the fields you want using xprofile, go to your regi page. If you are using google chrome, right click on the multiline box and inspect
you should find out the the id of the visual/text box something similar this ‘wp-field_664-editor-tools’ (yours should be a bit different cos field number is different)
you should also find out the id of the mce panel using the same method
After that you should be able to add the custom css to your theme stylesheet.
Example (hiding the item using css):
#wp-field_664-editor-tools {display:none;}You may need to double check on the edit profile page. if it still appears there, you can use the same method to hide it.
Hope this helps.February 9, 2016 at 6:33 pm #249668In reply to: How To Get Plaintext Multiline Field?
johnywhy
Participanthi, thx for reply.
enter in user registration form, and display in user front-end profile.
want to be able to use it like any other field in “user fields” editor.
thx!
February 9, 2016 at 2:15 pm #249651SuitePlugins
ParticipantGreetings vendocartoni,
Cimy User Extra Fields seem to serialize these entries in the database. I do not know of a tool to assist with the import but if you are familiar with coding you can use
maybe_unserializeto unserialize the data to an array then create an update/insert function to store the information to BP Profile.February 9, 2016 at 5:55 am #249648In reply to: Where’s Conditionals?
johnywhy
ParticipantSolved.
It’s this plugin:
Introducing Conditional Profile Fields for BuddyPress plugin
really appreciate the awesome developer who built this!not this one. Unfortunately doesn’t work on WP 4.4.2
https://wordpress.org/plugins/buddypress-conditional-profile-field/February 6, 2016 at 12:13 pm #249532In reply to: Display profile fields on members page
skunkgrunt
ParticipantWhy in the world is it this difficult? This should be in buddypress core. Considering that buddypress is supposed to be a social network out of the box, and member profiles are such an integral part of any social network, very little thought has gone into the profiles page.
Compare adding fields in buddypress to any other social network platform (elgg, oxwall, jcow, dolphin, etc.) and it’s just not there. Why should I have to dig into code just to add a profile field. There should be a drag and drop profile builder.
Avatar location, cover photo, customizable sections and profile fields; they should all be drag and drop.
I wish I was a coder. This is #1 on my priority list of buddypress improvements.
February 6, 2016 at 12:04 pm #249530In reply to: Buddypress Profile Look
skunkgrunt
ParticipantI’d love to know more about this as well. I’ve been trying to find anything on modifying and customizing the profile page, but there is a serious lack of info on this subject. It’s like everyone using buddypress is perfectly willing to accept a crappy and mediocre profile page.
The most frustrating part for me is the simple inability to add custom fields from the backend to the profile page. Why in the hell is this so difficult?
Anyway, sorry for the mini rant, but at least I know I’m not alone in my quest.
February 1, 2016 at 11:30 pm #249367shanebp
ModeratorYou can add profile fields via wp-admin > Users > Profile Fields
You can search those fields with this plugin:
https://wordpress.org/plugins/bp-profile-search/ -
AuthorSearch Results