Search Results for 'profile fields'
-
AuthorSearch Results
-
February 8, 2018 at 1:04 pm #270675
Tom Corvus
ParticipantHi,
I develop a plugin based on ACF Pro & BuddyPress. I would like to know if I can create profile fields and group fields with function or method?
Like ACF Pro (acf_add_local_field_group), when the admin activate the plugin, I check if BuddyPress & ACF Pro are installed and activated. Then I create post types, ACF, and I would like to add Xprofile fields on the main profile tab and add a group fields with some fields inside.
How can I do this?
Thanks for your help.
Tom
January 29, 2018 at 6:14 pm #270408In reply to: Profile Links – Removing http/https
David Cavins
KeymasterHi there. If I’m understanding correctly, you’re wanting to modify URLs added to profile fields by your users. The profile fields are analyzed for search links and other links here:
https://buddypress.trac.wordpress.org/browser/tags/2.9.3/src/bp-xprofile/bp-xprofile-filters.php#L326BP uses the WP function
make_clickable()to make links clickable. It doesn’t look like that function is filterable at the moment (there’s a ticket: https://core.trac.wordpress.org/ticket/32787). I guess you could do something using the filter offered on the forum link you reference, but I’m not sure how you’d know which kind of links to modify (it’s not clear from your question what the goal is).January 24, 2018 at 6:10 pm #270290In reply to: IMPORT / EXPORT BUDDYPRESS DATA
Manish Kumar Agarwal
Participant@Onlineplaner BMI/BME plugin can import/export xprofilegroups and xprofilefields.
January 24, 2018 at 10:38 am #270282In reply to: IMPORT / EXPORT BUDDYPRESS DATA
radair2002
Participant@manishkrag: Hi, do your plugins ex-/import xprofilegroups and xprofilefields or just the standard user fields?
January 16, 2018 at 10:39 am #270131In reply to: Can’t import user’s birthday from CSV
leog371
ParticipantHmmmmm, well it simply sounds like the rows and columns might not be lining up exactly. Not sure.
I have worked out many city meta data files the same way for the purpose of importing into WordPress and faced similar issues, it almost always came down to some columns or rows not exactly the same or something like that. I would do an export of your wordpress first and compare the files, if that didn’t get me any closer i might go into php-myadmin in my cpanel and export a copy of the database portion that has all of your users info and compare that to your .net export. I think that table is going to be one of the following : Either “wp_bp_xprofile_fields” or “wp_users”. Maybe if you compare those with your .net export and work them the same in excel it will be easier?
Not really sure without seeing the files your working with.
I will do a tutorial on that within the next day or so, lol.January 11, 2018 at 12:56 pm #270053Peter Hardy-vanDoorn
ParticipantEdit each of the profile fields in turn and change the Visibility setting to Enforce field visibility.
December 30, 2017 at 8:56 am #269844leog371
ParticipantHey Frank, I guess the best question to ask you after all this is how comfortable are you with digging into or working with html, css and basic php?
If a pre made theme is what your looking for, how comfortable are you with taking hours and days looking thru theme demos to find your golden pony or at least making child themes or customizing code?
And then to answer you more specifically to your “How long would it take to develop a theme like the one I described?” , I guess that just depends really. Over the years I have accumulated many libraries of code and theme snippets and I know where everything is in WP/BP core and template files. So for me, A fully custom and dressed out theme might take anywhere from 3 days to 3 weeks if I know exactly what I am working towards at the beginning and have a clear, though out, planned out idea. If I hen peck it or free hand it” like I do from time to time” It may take a day or it might take 8 months, lol.
As a bit of comfort to your quandary, everything you asked for in your opening inquiry is all ready done for you in BuddyPress “for the most part”. A theme like the one you describe sounds like a 3 day to 1 week job to me. Keep in mind however that with me saying that, things always have a way changing and evolving into monsters, lol.
So lets break down your theme and see how it look on paper…. He He, my favorite part…
1. I want users to come to my site, register, and log in…… (Its all ready there) just have to set it up to your liking. It can all be customized quite a bit as well.
2. I would love to be able to customize the way these pages look!(background image, logo, and content inside them)……… (The logo, background and most of the design items are easy breezy as long as your ok with basic html and css and not looking for flying dragons and wizards shooting lightning bolts across the screen. Alas, even those can be done with css, flash and JS, lol. )
3. I’m not looking for a full-blown social media site (yet)…….No need to have what you dont want to use. BP has a full host of controls to limit what can be done onsite by users or what is implemented frontend in its settings. WP Dash/settings/buddypress. Select what you want to use. You also have the ability to write functions, and use hooks and actions and filters to limit or build on anything you like.
4. I want to build a site that where users can log in, create a “blog” excerpt with media …… There are several ways to do this in buddypress, just have to plan it out and test the methods and see what works for you. Mu, Activity and Groups/Forums.
5. They should also be able to put a location tag on it. ….. it sounds like this is what x-profile fields are good for. Just create your custom location field and add it with a template tag in the loop you want to use it in. They fill out the filed on their profile page and it will display in that loop.
6. When they post it, the only people I want to see that are the people they added as friends or if they have their profile set to public……BuddyPress frontend “user profile area” has a settings tab, under it are quite a few privacy features, not fully comprehensive in my opinion but there are a few plugins that add on to this and you can code it in as well. either way. Easy task.
7. And when it shows up on their friend’s news feed it should just show a featured image, title, and the beginning of their text with a like counter….. Easy enough, just write the loop that way, lol. Easy to do.
8. When their friends click on that post it brings them to the full blog post, not just the featured image. Their friends can favorite the content or comment on it. …..The natural behavior of WP and BP posts so we are good there.
9. On a users profile, I would like to show their recent posts, and posts they’ve favorited…. Thats what the friends tab shows but you can add custom queries, and stuff and otherwise tear it apart and pick it of the pieces you want and use them in other places to make custom loops and queries and all kinds of goodness, lol. As long as you make sure things are firing in the right places and make sure certain things are in the loops where they belong, No worries.
10. Site homepage is basically just a file called front-page.php. Copy the page.php from the theme root and then customize the heck out it. Work it up however you like.
As far as the themes go, I never use premade themes. I do however make full use of the libraries of code I have accumulated, (_s) and bootstrap for a lot of my work. Cheesy I know but hey, it saves me time and money and gives me freedom. I rarely find the need to actually make a complete custom theme or write much in the way of custom code from scratch anymore. And I certainly never purchase any themes. So I am not the best person to ask about themes really. I know that there are tons of themes that do all kinds of stuff available around the web. Just have to give them the litmus test and see if they fit your project.
Let me know if you have any other questions or what have you. I will be around.
December 25, 2017 at 4:50 pm #269755melhergui
ParticipantHi @edvard1 it’s not your theme. The plugin is broken since BP 2.9.1.
I was having problems with multiple checkboxes and made it work like this:
File: /conditional-profile-fields-for-buddypress/assets/bp-conditional-field.js
line 114: jQuery.each( $selected, function (index, $el ) { to: jQuery.each( [$selected], function (index, $el ) {And…
lines 350 to 369:
var parent_div = jq( jq( element ).parents( '.editfield' ).get(0) ); //;find its parent having class edit field if ( !match ) { //if the condition did not match, reverse visibility condition if ( visibility == 'show' ) { visibility = 'hide'; } else { visibility = 'show'; } } if ( !visible ) { parent_div.show(); } else { parent_div.hide(); }To:
var parent_div = jq( jq( element ).parents( '.editfield' ).get(0) ); visible = jq(parent_div).is(':visible'); //;find its parent having class edit field if ( match ) { //if the condition did not match, reverse visibility condition if ( !visible ) { parent_div.show(); } else { parent_div.hide(); } }Hope it helps!
December 17, 2017 at 2:27 pm #269613Topic: WordPress to BuddyPress profile sync
in forum How-to & Troubleshootingkrioteh
ParticipantIn BuddyPress there is a built-in mechanism for synchronizing profile fields from WordPress.
By default, it synchronizes only the “display_name” field, which is not always sufficient.
Here is an example of the code by which you can synchronize any available fields in the WordPress field with the Buddypress fieldsfunction xprofile_sync_bp_profile2( &$errors, $update, &$user ) { // Bail if profile syncing is disabled. if ( bp_disable_profile_sync() || ! $update || $errors->get_error_codes() ) { return; } // Querying data from a table "usermeta", first we get the value of the custom field "address" and substitute this value for the "Address" field of the xprofile BuddyPress $address = get_user_meta( $user->ID, 'address', 'true' ); xprofile_set_field_data( 'Address', $user->ID, $address ); //Similarly with other fields $firstname = get_user_meta( $user->ID, 'first_name', 'true' ); xprofile_set_field_data( 'Name', $user->ID, $firstname ); $lastname = get_user_meta( $user->ID, 'last_name', 'true' ); xprofile_set_field_data( 'Lastname', $user->ID, $lastname ); $description = get_user_meta( $user->ID, 'description', 'true' ); xprofile_set_field_data( 'Bio', $user->ID, $description ); // Querying data from a table "user" xprofile_set_field_data( 'E-mail', $user->ID, $user->user_email ); xprofile_set_field_data( 'Site', $user->ID, $user->user_url ); } add_action( 'user_profile_update_errors', 'xprofile_sync_bp_profile2', 10, 3 );Unfortunately, the fields are synchronized only when the profile is updated. I do not know how to start mass synchronization 🙁
I hope someone will find this information useful.
December 14, 2017 at 3:29 pm #269568In reply to: Creating custom registration page, moving elements
David Cavins
KeymasterHi there,
Here’s an example of adding a custom section to the registration form. All you have to do if it’s static is add it and handle the input:
https://gist.github.com/dcavins/e3e6a702e35d4f9ec8948c920d8b6c03You could similarly add other profile fields/field groups on any of the hooks available on the registration page, though I’d use a profile field group loop to output those items.
December 12, 2017 at 6:01 pm #269539In reply to: Showing groups, filter users
David Cavins
KeymasterHi Marc-
It sounds like you’re just getting started. Custom fields are part of the extended profile component. Read more about it here:
It is not really possible to show groups with any richness outside of the group page. Your best bet is probably to customize your group templates to show what you want. The template hierarchy will help you:
An all-user overview with search and filtering is the members directory available at yoursite.com/members
December 4, 2017 at 11:12 pm #269412In reply to: Custom BuddyPress email not always sending
bcanr2d2
ParticipantI am using WP Mail SMTP to get the mail to send without issues. But it seems to affect this particular email only, I am getting everything else as far as I am aware.
Here are my current active plugins – There is quite a long list.
I do use Autoptimize, so not sure if it’s affecting anything.
One of note, is Social Login, which when logging directs to their site, and redirects back to my site to log the user in via their social network, this is where it falls over and does not send this one email. It manages to send other emails related to the login, but it now gives me an idea to look into the code that sends this social email sign up notification.(BuddyDev) BP Auto Login on Activation (1.0.3)
Advanced Custom Fields (4.4.11)
Allow Multiple Accounts (3.0.4)
Autoptimize (2.2.2)
BP Profile Message UX Free (1.5)
BP xProfile Location (1.2)
BP XProfile WordPress User Sync (0.6.4)
BuddyDev Username Availability Checker (1.1.1)
BuddyExtender (1.0.1)
BuddyPress (2.7.4)
BuddyPress Member Type Generator (1.0.3)
BuddyPress Security Check (2.1.2)
BuddyPress Simple Terms And Conditions (1.3)
BuddyPress Xprofile Custom Fields Type (2.6.3)
BuddyPress Xprofile Member Type Field (1.0.4)
BuddyPress XProfile Validate with RegEx (0.1.2)
Cherry Parallax Plugin (1.1.0)
Cherry Plugin (1.2.8.1)
Child Theme Configurator (2.1.2)
Conditional Profile Fields for BuddyPress (1.1.9)
Contact Form 7 (4.6)
Contact Form 7 – Dynamic Text Extension (2.0.1)
Contact Form 7 Conditional Fields (1.0)
Contact Form 7 Get and Show Parameter from URL (0.9.7)
Contact Form 7 Honeypot (1.10)
Contact Form 7 Modules: Hidden Fields (2.0)
Contact Form 7 Shortcode Enabler (1.1)
Custom Hooks (1.0)
Custom Post Template By Templatic (1.0)
Custom Post Type UI (1.4.3)
Disable Comments (1.6)
Display Posts Shortcode (2.7.0)
FacetWP (2.7.4)
FacetWP – Map (1.0.5)
Flamingo (1.5)
GeoIP Detection (2.7.0)
GEO my WP (2.7)
Google Analytics Dashboard for WP (4.9.6.2)
List Plugins (1.4.4)
Meta Slider (3.4)
Optimize Database after Deleting Revisions (4.2.1)
Page-list (5.1)
PHP Compatibility Checker (1.4.0)
Popup Maker (1.4.20)
Shortcodes in Menus (3.2)
Social Login (5.2)
Stream (3.2.0)
String Locator (2.2.0)
Sucuri Security – Auditing, Malware Scanner and Hardening (1.8.3)
SuitePlugins – Advanced XProfile Fields for BuddyPress (1.0.3)
Theme Check (20160523.1)
Visual Builder for Contact Form 7 (2.0)
WPFront User Role Editor (2.13)
WP Mail SMTP (0.11.1)
WP Private Content Plus (1.13.1)
WP Smush (2.6.1)
Yoast SEO (4.3)December 3, 2017 at 10:05 pm #269398In reply to: Buddypress registration form and profile fields
Henry Wright
ModeratorIf I understand properly, you need conditional profile fields. Try BuddyDev’s Conditional Profile Fields for BuddyPress.
December 3, 2017 at 4:30 pm #269393Boone Gorges
KeymasterIt’s not possible to use a regular BP profile field to keep track of data changes over time. BP doesn’t keep records of old profile field values – it only stores the most recent one.
There are a number of ways you could accomplish it. If you had the technical know-how, you could build a tool that hooks into XProfile and syncs user-entered data to another system (maybe an array in usermeta or something like that). Another option is to manually created new fields every 3 months, but then you’d need to do some customization to the way fields are displayed on the front end so that the profile doesn’t show all past entries as separate items. Either way, some customization would be required.
Maybe someone on this forum knows of an existing tool that will help.
December 2, 2017 at 3:34 pm #269360In reply to: Register page editor
Boone Gorges
KeymasterBuddyPress’s Register page is a special kind of page that cannot be edited via the Dashboard. That’s why it’s blank when you view it in the normal way.
To add additional fields to the registration process, go to Dashboard > Users > Profile Fields. Add one for Address and one for Phone Number. Make them required and/or private, if you’d like. As long as they are part of the ‘Base’ profile field group, they will appear as part of the registration process.
November 28, 2017 at 10:54 pm #269210In reply to: Special characters output in profile fields
Boone Gorges
KeymasterHi @Sander – Thanks for reporting this. It looks like a legitimate bug. I’ve opened a ticket to track it: https://buddypress.trac.wordpress.org/ticket/7631
While we try to figure out a way to make this work better, you can work around the issue by disabling autolink for the field in question. Dashboard > Users > Profile Fields > Edit, and look for the Autolink metabox at the right.
November 20, 2017 at 8:21 pm #269091In reply to: BuddyPress email problem
Boone Gorges
KeymasterYou may be able to disable the linking in the admin. Go to Dashboard > Users > Profile Fields. Find the Email field, and click Edit. On the right-hand column, find the “Autolink” metabox. Switch it to ‘Disabled’ and save.
November 20, 2017 at 7:56 pm #269089In reply to: customize members page
Boone Gorges
Keymaster> i created customed fields for the inner-page of the user, but they don’t show in the members list page.
The details depend on how you created these “customed fields”. If they are xprofile fields, then the simplest way is to do this:
$user_id = bp_get_member_user_id(); $data = xprofile_get_field_data( 'Custom Field Name', $user_id ); if ( $data ) { echo $data; }If you stored it in user meta, do something similar:
$data = get_user_meta( $user_id, 'custom_field_name', true );Either way,
bp_get_member_user_id()is how you get the ID of the current user in the loop.November 18, 2017 at 7:16 pm #269034In reply to: Need to Export Profile Fields
Boone Gorges
KeymasterHi @barkins – BP doesn’t have a built-in tool for this (though it should – see https://buddypress.trac.wordpress.org/ticket/7393, https://buddypress.trac.wordpress.org/ticket/408). If you know that user IDs will remain the same between the local WP install and the live install, then you can do a simple database export/import, something like:
$ mysqldump -u db_user -p db_name wp_bp_xprofile_groups wp_bp_xprofile_fields wp_bp_xprofile_data > ~/xprofile-export.sql$ mysql -u db_user -p db_name < ~/xprofile-export.sqlIf the user names will not be the same, you’ll need to write a script to handle this, but the details will depend on how you plan to identify users (email address, etc).
November 6, 2017 at 6:36 pm #268860Boone Gorges
KeymasterHi @willallen83 – I’m afraid I haven’t integrated with s2member in many years, so I can’t provide exact advice. But briefly, it appears that the code above is meant to sync the
$s2member_fieldsfields – which I assume are defined somewhere in s2member – to the corresponding members of the$xprofile_fieldsarray. The latter fields are created in Dashboard > Users > Profile fields; make sure the names (like ‘Last Name’) match exactly, or the lookup will fail.Note also that it may be more reliable to fetch user info from the values passed by the ‘wp_login’ hook to the function. So something like this:
function s2_profile_field_update( $user_login, $user ) { //Array of xprofile field names $xprofile_fields = array('Last Name','Country','Introduce yourself to Aisha Salem'); //Array of s2member field slugs $s2member_fields = array('last_name','user_country','member_letter_aisha'); //Populates BP with S2 info get_currentuserinfo(); // if( current_user_is("s2member_level1") ) { for($i = 0; $i < sizeof($xprofile_fields); $i++) { if(xprofile_get_field_data($xprofile_fields[i], $user->id) == '' && get_user_field($s2member_fields[i]) != '' ) { xprofile_set_field_data($xprofile_fields[i], $user->id, get_user_field($s2member_fields[i]) ); } } // } }Note that, according to this code, it’ll only update the BP xprofile fields if they’re empty. You’ll have to remove that check if you always want s2member values to take precedence.
Beyond this, your best bet for figuring out why this is not working is to place some debug statements at various points. Use
error_log()or good old-fashionedvar_dump()to make sure (a) the function is actually firing at ‘wp_login’, (b) the xprofile field values are actually being fetched properly, (c) theget_user_field()function is fetching data properly, and from the correct user https://s2member.com/kb-article/user-custom-fields-via-php-code/#toc-460a2dd2, etc.November 3, 2017 at 4:45 pm #268803In reply to: Profile Fields Date format-> Range not working.
Boone Gorges
KeymasterSure, I’m happy to point you in the right direction.
The BuddyPress Custom XProfile Field Type plugin is probably a good one to start with. It uses the
BP_XProfile_Field_Typeclass to register its fields. It even has an existing Datepicker field that you can use as a starting place: https://github.com/donmik/buddypress-xprofile-custom-fields-type/blob/master/classes/Bxcft_Field_Type_Datepicker.phpThere are a few changes you’ll need to make in order for this to show two datepickers instead of one.
– The
set_formatvalidation regex expects a single date. This will need to be modified for your new format. https://github.com/donmik/buddypress-xprofile-custom-fields-type/blob/1126cf093bd2b6e9f917b5c15f52e203f17cbb9e/classes/Bxcft_Field_Type_Datepicker.php#L14
– You’ll need to modify theedit_field_htmlmethod so that it loads two separate input fields, and then write some JavaScript that assigns a jquery-datepicker to each one of them. Then you’ll need to write a little bit of extra JS that combines the two datepicker inputs into a single (probably hidden) field, which is the one that BP will actually save to the database. https://github.com/donmik/buddypress-xprofile-custom-fields-type/blob/1126cf093bd2b6e9f917b5c15f52e203f17cbb9e/classes/Bxcft_Field_Type_Datepicker.php#L29
– If you decide to store the start and end date in a single row in the profile field, you’ll also need some logic that splits it into start and end when you load theedit_field_html. Another option is to store the concatenated display text – say,April 2017 - May 2017– in BP’s native xprofile field, and to store the start and end date separately, as xprofilemeta. You’d need a custom save routine for this, but it may be a bit cleaner.Good luck! Sounds like a fun project.
November 3, 2017 at 4:26 pm #268799In reply to: Profile Fields Date format-> Range not working.
amitrwt
ParticipantIf you want your users to be able to select start and end times, my best suggestion is to create two separate xprofile fields, and name them accordingly: ‘Start Date’, ‘End Date’ or something like that.
That is exactly what I did, that was only way around I found for time being. If you have any insight can you pls tell me if it is possible to have a field with JQ datepicker where I can select start and end date. I’m planning to create a filed like this just need something to start with.. that’s the hard part once I’ll have a slate to start with I can write what I want. I’ve no issues getting my hands in code I’d rather enjoy it.
November 3, 2017 at 2:48 pm #268792In reply to: Profile Fields Date format-> Range not working.
Boone Gorges
KeymasterHi @amitrwt – The ‘Start’ and ‘End’ fields in the BP admin settings define the start and end dates of a single datepicker. That is, if you want to have a datepicker, but you only want to show dates between the years 1970 and 1990, you’d use those dates as the Start and End.
If you want your users to be able to select start and end times, my best suggestion is to create two separate xprofile fields, and name them accordingly: ‘Start Date’, ‘End Date’ or something like that.
November 3, 2017 at 2:24 pm #268788Boone Gorges
KeymasterHi @redcompolitica – I’ve built multi-page registration processes for clients in the past, but unfortunately, it’s not very easy to do – BP’s registration system is not built in such a way as to make it easy.
If your main goal is to make registration less overwhelming, you might consider moving some or most of your registration fields out of the “Base” group. This will mean that they don’t show up during the registration process, and users will have to fill them in by editing their profile after signing in.
If your goal is to have *conditional* registration steps – where, for example, step 2 depends on a specific value provided in step 1 – then I’m afraid it’d have to be custom-built. Much of the work could be done with a custom theme template
members/register.phpand by modifying the way that registration data is saved and validated https://buddypress.trac.wordpress.org/browser/tags/2.9.2/src/bp-members/bp-members-screens.php?marks=113#L72Some Trac tickets that are somewhat related that you might want to follow:
https://buddypress.trac.wordpress.org/ticket/1842
https://buddypress.trac.wordpress.org/ticket/4278Good luck with your project!
November 1, 2017 at 10:44 pm #268762In reply to: get age from date
psnation
ParticipantBuddyPress Xprofile Custom Fields Type plugin is what I use to do this.
It shows up on the profile as age. If you want it on the members page that takes some code editing. I saw a tutorial on BPDev site.
-
AuthorSearch Results