Search Results for 'profile fields'
-
AuthorSearch Results
-
November 16, 2015 at 4:12 am #246800
r-a-y
Keymaster@doublef – It’s probably a problem with the way your team has coded the Birthday plugin.
Can you post the relevant lines where you are creating the profile fields?
November 15, 2015 at 10:51 pm #246791doubleF
ParticipantHi @Sweeny,
Woffice developer team here !
Do you have any ticket open here : https://2f.ticksy.com/ ? Please send us some access to your website so our team can figure out what’s going on 😉
The issues is also present with some other themes but it seems to be caused by the Birthday extension. As we create new Xprofile fields, but if was working fine before 2.4.0 and we can’t reproduce it.
That’s why we need more details 🙂
Thanks @r-a-y btw !
Cheers
2F
November 13, 2015 at 3:33 pm #246718In reply to: Adding profile fields to members directory
Antipole
ParticipantThank you to all who have helped and especially @danbp who took time to explain things at length.
I have finally grasped how this thing works, more or less.I do need to apply the same quite complex filter to both the profile and directory list. I have now devised a common filter function plugin that can be invoked within the members loop as a filter and within the profile display as an action. I have to call it in different ways, depending on where it is being called from, and the trick was to call it from two separate hookable functions. The core of what I have follows:
// Remove standard filtering of profile fields function ovni_init() { remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 9, 2 ); } add_action( 'bp_init', 'ovni_init' ); // add our replacement filter, which is given a field value, to the members loop function ovni_filter_field_for_directory($field_value){ $field_name=bp_get_the_profile_field_name(); return ovni_get_field_searchable($field_name); } add_filter( 'bp_get_the_profile_field_value', 'ovni_filter_field_for_directory', 50, 1 ); // add fields to directory listing make them searchable according to rules of this plugin function ovni_add_info_to_members_loop() { echo '<div style="position: absolute; left:60px;">', ovni_get_field_searchable('Ovni model'),'</div>'; echo '<div style="position: absolute; left:100px;">', ovni_get_field_searchable('Rig'),'</div>'; echo '<div style="position: absolute; left:275px;">', ovni_get_field_searchable('Home waters'),'</div>'; echo '<div style="position: absolute; left:500px;">', ovni_get_field_searchable('Home port'),'</div>'; } add_action( 'bp_directory_members_item', 'ovni_add_info_to_members_loop' ); // the fuction that makes fields searchable according to the rules of this plugin function ovni_get_field_searchable($field_name) { global $ovni_no_link_fields, $ovni_social_networking_fields; $field_value = xprofile_get_field_data($field_name, bp_get_member_user_id() ); if ( $field_value) { // only if there is content in the field if (is_array($field_value)){ etc. etc.I have not included the code of my filter, but it is changing the way text in profile fields are turned into links, both when displayed in the directory entry and in the members list, thus:
(1) If is an array, serialise into a comma-separated string
(as used in outputing which social web sites a mobile number can be used for)
(2) If is an image, change HTML so that clicking on image will open full size in new tab/window
(3) If any field contians text in [ ], the contents of the [ ] pairs are turned into separate directory searches.
So if the entire text is in [ ] it overrides all other rules
(4) Fields in the list of ‘do not link’ fields are left plain
(5) The user’s web site is converted to its URL
(6) Fields containing social network user names are turned into links to those networks
(7) The remaining are turned into links to search the directory for matches.It has been a learning curve. My formative programming of this type was in the language B (the antecedent of C), which shows how far back I go!
thanks again for the help, Tony
November 13, 2015 at 4:50 am #246705In reply to: Customization questions
scoobs2000
ParticipantHi
in short everything you have asked can be done.But I’m a little bias as I honestly believe regarding technology there is nothing that can’t be achieved it just comes down to how much time and budget you have to invest… 🙂
Below is a bit of a ramble…. But might provide insight. after you organize your coffee and come back.
I have nearly completed a project that sounds similar in nature (few weeks from launch in final beta testing), however it was a highly customised solution (private membership site) .
With nearly 70 plugins, 100’s hours coding integration code (lots of trial and error) between the plugins and also compatibility tests with multiples of plugins to ensure no issues, because of slow load times the project requires deploying from CDN,fast servers and customised caching solutions.
most of work load appeasr to be bbpress – so an near out of the box solution, you prob don’t need to go that far.But not to scare you. Here are some pointers that might answer your questions, based on my understanding of the OP.
In my case I spent many months researching solutions with many platforms (open source / paid / managed premium) – buddy press was selected simply because is built on WordPress that’s already has the core abilities you need, you just need to “hook in to’em” and take advantage of this concept – you can keep working on bettering and adding separate components / features as time goes by, great for client, works out a bit cheaper in the startup phase and great for developer – land ya self a permanent support / ongoing development contract……
Is it possible to update profile content/meta? : In general yes, buddy press allows this out of the box
Either the user or the admin can update, you can have admin only fields (the user doesn’t access them – but the admin can)
if you use a membership plugin eg, s2member – you can extend this idea much further eg, only require email on signup, then all other fields are accessible from profile and can set fields on a per membership level,In your case, you might have different profile fields for students, teachers, Parents and only require a couple of basic fields to be completed on signup and all other fields can still be “required” when they reach their profile page.
For profile field management I recommend the s2membership pro plugin (free version available) http://s2member.com/My project has a “todo list” for each and every member – however I’m still to this day unable to find a plugin that interacts with a completed wp/bbp/buddypress site. So I had to code one. The todo list was designed / engineered in a way that interacts with “wordpress” in general, by storing a completely unique data feed much like the activity feed with time stamps and can be programmed to be linked to any site link, media download, page view, forum post, reply any activity on the site can be logged and applied to the feed which the to-do-list interacts with and auto completing (crossing of the item) each item also has dependencies, so you rattle off a list of activities before the task is crossed off and each to-do-list also has dependencies so it is not seen by a user until certain tasks are completed, eg, purchase a course from the store, or complete a previous to-do-list.
In short: Yes it can be done, however I’m not aware of any 3rd party plugin that does this successfully.
In my case I have the to-do-list shown in the sidebar so as a member goes through the tasks the list is also available to them no matter what page they are on. But possible to publish it in the profile page if required.
Regarding email notices, I recommend looking into the woo commerce sensei http://www.woothemes.com/products/sensei/ plugin for your courses that way you have management of email notices, in fact prob most of the things you require will be available via sensei – note this is a premium paid plugin with yearly ongoing licence costs.
Without a free trial version to try before you buy.But maybe gravity forms developer licence might be fine in your case as it has, gateway plugins, qiz and survey plugins – it would be possible to build certain simple courses on the gravity framework including delivery of custom emails – if building a form based system than certainly worth a look into – but would require a developers licence to get all the plugins you would prob require.
In fact what I do is use gravity forms email chimp plugin to send the members email address to an email list (automation campaign) in mail chimp (paid account) that auto sends a welcome emails that I have customize to suit the activity they have completed, this way I can send pretty html + marketing emails + scheduled follow up emails and take the work load off WordPress other than a quick API connect on demand.
Regarding: is it possible to have multiple logins or users access the same account/profile?
In simple: Yes, but it all comes to context of the profile, will each member be able to see other members profiles or will parents be able to edit a child profile etc.Although my project does not require the need for 2 or more members to edit a single profile, I do have multiple levels of context (horizontal and vertical memberships) all with their own set of rules who profiles they can see and what buddypress features are available to them – some members don’t have activity feeds or messages, But I needed to ensure that members that do have access to these features can’t access the features of cross membership and so on.
This is 100% custom code (no plugin) but while coding this up I recall thinking I’m 100% confident it is possible to add another level of check “if current user can edit displayed user” and go from there, all you would need is a profile field / meta that links multiple accounts together –
Eg, a parent account has a profiled field “child user name” – they just enter the child username / user ID – and now we would add the profile check if a parent is viewing the child’s profile.Regarding paying a deposit, and payment, this is my findings.
There was no single one membership / payment plugin that integrated perfectly into what I wished to achieve – I have tested many. please note I’m suggesting there are no plugins that do this stuff just none that achieved the outcomes I needed for my project.
– Tips: – start the project design based on the payment systems / gateway (the complete project and direction of development is 100% dependent on this) because the simple reason every feature you implement needs to check “is a paid member and what level (cap / role) ” – including free membership with paid features “is not a paid member” but has paid for… this includes recurring and non-recurring subscriptions with consideration of what you intend to do if a subscription expires.
Eg, a recurring subscription will either just auto subscribe and pay for the next time frame (or fail)
A non-reoccurring subscription will auto expire after a given time frame (or X cycles)The difference between to the two –
Is generally on a recurring subscription when it expires it also linked to a member account to “do something” eg downgrade membershipA non-recurring subscription is generally used for a onetime payment you have access forever feature- eg, a course and resources, you pay once on a deposit, subscription over several weeks when the subscription expires the member still has access to the course as long as they remain at minimum a free member on the site. (anyhow that’s how I have implemented things)
These two concepts are completely different in the way they interact with the member as well at many levels although on the surface appear to be almost the same, add in a deposit feature you are also opening another level of context to play with, mostly limiting the available options regarding the payment gateway service you will need to use or more so which services have this feature on offer.
As mentioned – my suggestion is start with the gateway solutions first and reverse the design back to the front end. – this is the big lesson I took away with this project (4 rewrites in total) as it was always a block relating to the gateway limitations (and laws relating to online subscriptions in my country).
My project:
Woo commerce (free) for shopping cart system including purchase of courses, subscription to site and deposit/ subscription to courses, plus all other products, deliverable products, workshops, webinars, one on one sessions, resource downloads from pdf to videos. Anything you can think off can be sold through wooWoo commerce quick cart – plugin (paid)– now I can add a buy now button on any page for any product including subscriptions – the membership info page has a standard 3 column price comparison chart with nothing more than a “sign up now” button – clicking the button auto adds the subscription to cart and opens the checkout popup with one click and without leaving the page (no need to send to store)
Sensei (paid)– for courses and fits well into woo commerce system (but requires a couple more plugins and custom integration code if implementing paid / subscription based courses )
Groups plugin (free) to easily manage roles and caps (as I have to teach client staff how to do this and manage the site) WordPress has this capability built in if your a coding ninja (I’m not)
Groups Woo commerce (paid plugin) to link groups to a purchase – apply a role / cap or groups of, to a user based on the purchase.
Then some custom code is required – to perform a check and if a user has a particular role or cap than apply the s2membership level – this check is done at the store level so if a member cancels or defaults on a payment – the membership level is auto adjusted depending on what role or cap is supplied to the user from the groups woo commerce automation. groups plugin manages non-recurring subscriptions so a expired subscription does not remove the users caps and roles (but a default on payment does)
S2member pro – for membership level management including profile fields management and most importantly complete site access management – I can apply access to each and every competent of the site this includes , forums, topics, replies, posts, pages, media, courses, and content within pages eg, home page displays different content based on the membership level / logged in or general public. s2member pro is also used to override default bbpress / buddy visibility settings eg, hidden forums only available to certain member levels – but requires custom code to apply or traverse access levels on submitting topics / replies to ensure widgets and other snippets don’t display private areas to members that don’t have access. (it allows you to write custom queries with zero concern or consideration to access levels)
For subscriptions (paid)– I use woo commerce Subscriptions plugin – this manages on its own site access based on paid recurring subscriptions (or in simple turns on or off user account based on payment) – pay x amount monthly to access certain site features, courses and resources, forums, pages, blog articles etc.
However – woo commerce subscriptions does not manage deposit / time based subscriptions (non-recurring subscriptions) eg, pay a deposit for a course and gain instant access then pay off on a subscription for x amount of weeks / months –
I was not able to find any plugin (free or paid) that does this, so I had to write a plugin currently under experimental concept stage.Other tips: often it’s better to find compatible, well supported and pay for premium plugins that have overlapping features and disengage these features you don’t want to achieve your goals and do as little integration code as possible, but anything you do needs to be well planned and though out as to not to touch core code in any platform, framework or plugin.
At the end of the day you want the ability to upgrade all systems as time go by.Eg, s2member plugin has its build in membership system that is “required to be active” for the plugin to work. – all I did was setup a single paid (never to be used membership) on a paypal sandbox store this includes setting up all the s2membership registration pages etc – then put a simple redirect in the .htaccess on any of these pages. Now to purchase membership you must go to the store (woo commerce) and purchase a subscription via woo – s2member has now has nothing to do with membership registration / payment systems.
And of course I have “force account creation” turned on at the store – you cannot make a purchase without signup at a minimum free site membership.
by disengaging the buddy, bbp, Wp, and all other means of registering (by redirect) but only leaving the woo commerce customer account registration available – The pop up registration form I use for free members is just a woocommerce customer account registration form (with no products attached) with a fallback to the s2membership cut down reg form (in case ajax / jquery etc not working on client side)And now all purchases, subscriptions, shop account, courses etc are now available from the buddy press profile page also via a “woo to buddypress” plugin (or in my case built into the theme)
May sound complicated but as mentioned I would really suggest starting with payment solutions and nut out this part of the project first as this will most likely force development direction,
one of my project goals was a solution that can cater for anything…. so,
Regarding variable deposit / costs amounts based on user input – if using similar approach as I did – you would just setup woo commerce discount codes per variable outcome / result and would just reveal the correct coupon code to the user on the checkout page. they just cut and paste this code into the discount field and click apply.
or setup up multi products – one product per price base. – have the user input their details first and the result would be – apply a groups cap / role then only offer the courses products in the store with the associated price base based on user caps / role –
woo discount coupons can be setup on multiple bases – eg, deposit amount / on going subscription amount or total amount or per product or per cart total etc.
for me was plenty of research into this including concept builds of other community platforms and as above is only a bit of a sample of features used relating to the OP.
I was under very strict key point goals and achievements requiring very specific outcomes many of these affected development direction how / why I implemented the above.There may be better simpler ways to suit your specific project, but thought it might be worth a mention for some direction. or at least insight into some of the plugins I use / ideas and concepts.
my usual disclaimer – if there is something in there for you, that’s great! if not that’s fine too!
enjoy!
November 12, 2015 at 7:31 pm #246689In reply to: Get all field names and ids
peti446
ParticipantYea it is xpofile what i mean actually i got it a solution, i was looking around the buddypres register file as there they need to show all the xporfile from the first group then i just changed it to my needs and used it and it worked ! Ty for all the help.
I let the solution here:if ( bp_is_active( 'xprofile' ) ) { if ( bp_has_profile( array('fetch_field_data' => false ) ) ){ while ( bp_profile_groups() ) { bp_the_profile_group(); while ( bp_profile_fields() ) { bp_the_profile_field(); //bp_get_the_profile_field_name() for get the name //bp_get_the_profile_field_id() for get the id } } } }November 12, 2015 at 7:03 pm #246686scoobs2000
Participantre, confirming if the settings stick – I’m unable to confirm as I had already stripped the visibility check from the child theme template to ensure all fields are displayed (base) no matter what, I was only using the admin enforce setting to remove the change links on the profile page.
I have now completely removed the visibility settings page from the profile and remove the links from the profile field loop. – I’m 100% happy with my solution (was a to-do-task) – any updates to the core will have no effect on my customs.
(I’m using s2member to manage all fields outside the base group)Cheers,
November 12, 2015 at 6:33 pm #246681In reply to: Get all field names and ids
ckchaudhary
ParticipantDo you mean xprofile fields?
November 11, 2015 at 11:22 am #246561djsteveb
Participant@redgard
seems to be a similar question with a couple of intersting answers here: https://buddypress.org/support/topic/html-or-wysiwyg-in-text-profile-fields/November 10, 2015 at 5:59 pm #246535In reply to: Adding profile fields to members directory
Antipole
ParticipantSo I am getting my extra user data fields with a line like:
echo '<div style="position: absolute; left:150px;">' , bp_get_member_profile_data('field=Ovni model'),'</div>';
But I would like them to be search links as it is in an individual profile. I have achieved this withecho '<div style="position: absolute; left:60px;"><a href=', $bp->pages->members, '?s=', bp_get_member_profile_data('field=Ovni model'),' rel="nofollow">' , bp_get_member_profile_data('field=Ovni model'),'</a></div>';However, I am now also using the plugin Custom Profile Filters for BuddyPress, which lets me set which profile fields should not be search links and also allows users to spilt their data up, so a profile field “[ocean] and [coast]” gets two separate search links, one for ‘ocean’ and another for ‘coast’. Neat. It seems to do this by adding a filter to bp_get_the_profile_field_value.
However, my manual addition of search links as above ignores these settings, and any [] in the fields comes through and are visible.
It occurs to me that, rather than fetching the fields with bp_get_member_profile_data(), I would do better to get the data however it is got for the individual profile display, as this method puts the search links in and obeys the options set in Custom Profile Filters for BuddyPress. I have spent much of today trying to find how to call bp_get_the_profile_field_value. If I use
echo '<div style="position: absolute; left:150px;">' , bp_get_member_profile_value('field=Ovni model'),'</div>';
I get an invalid link. I suspect it need a data type argument to get a search link. I have tried to find how it is called to display the user profile, but failed to find it. In the BP Codex I have only found how to remove the filter that puts the links in.If someone could enlighten me it would be most helpful. Thanks.
November 9, 2015 at 8:52 am #246500In reply to: [Resolved] Text Boxes Creating Unwanted Random Links
danbp
ParticipantHi @ma3ry,
unable to visit the indicated page due to redirection… BP’s xProfile text box contains are autolinked by default for the 5 first words.
This is handy when you use a field called city for example. The city name is autolinked and let each user click on it to find other who may entered the same name.Of course, an about me box with a long description, which several autolinked words has less interrest. Fortunately, you can deactivate xprofile autolinking.
Two options for this: all or selected.Here 3 snippets. The first can be used if you want to completely remove autolink from all field values.
The second is a new filter to let you choose the field(s) you want to deactivate. This need two snippet. The first to rewrite a filter and the second to remove / replace the existing BP filter.Add the snippet to bp-custom.php.
// remove any autolink from profile function remove_xprofile_links() { remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 9, 2 ); } add_action( 'bp_init', 'remove_xprofile_links' ); // custom filter to selectively remove autolink function my_xprofile_filter_link_profile_data( $field_value, $field_type = 'textbox' ) { // Access the field you are going to display value. global $field; // In this array you write the ids (separated by comma) of the fields you want to hide the link. $excluded_field_ids = array(2); // If the id of this $field is in the array, we return the value only and not the link. if (in_array($field->id, $excluded_field_ids)) return $field_value; if ( 'datebox' == $field_type ) return $field_value; if ( !strpos( $field_value, ',' ) && ( count( explode( ' ', $field_value ) ) > 5 ) ) return $field_value; $values = explode( ',', $field_value ); if ( !empty( $values ) ) { foreach ( (array) $values as $value ) { $value = trim( $value ); // If the value is a URL, skip it and just make it clickable. if ( preg_match( '@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@', $value ) ) { $new_values[] = make_clickable( $value ); // Is not clickable } else { // More than 5 spaces if ( count( explode( ' ', $value ) ) > 5 ) { $new_values[] = $value; // Less than 5 spaces } else { $search_url = add_query_arg( array( 's' => urlencode( $value ) ), bp_get_members_directory_permalink() ); $new_values[] = '<a href="' . $search_url . '" rel="nofollow">' . $value . '</a>'; } } } $values = implode( ', ', $new_values ); } return $values; } /** * We remove the buddypress filter and add our custom filter. */ function remove_xprofile_links() { // Remove the old filter. remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 9, 2 ); // Add your custom filter. add_filter( 'bp_get_the_profile_field_value', 'my_xprofile_filter_link_profile_data', 9, 2); } add_action('bp_setup_globals', 'remove_xprofile_links');November 6, 2015 at 10:10 pm #246456In reply to: Xprofile fields frontend editing
buckyb
ParticipantI’ve decided to try and put the fields in a separate custom editing page, and I’m searching for how to add each extended editable input xprofile field individually, with their id number. I think that will help solve the styling issue. I’ve been searching for something similar like this so I can see how to accomplish this, if anyone can suggest something I would greatly appreciate it! 🙂
October 20, 2015 at 9:18 pm #245772In reply to: custom output from registration form
shanebp
Moderatorcan anyone tell me how i could for instance output only label for email?
In register.php…
<?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?> if( 'Email' == bp_get_the_profile_field_name() ) echo 'Email: this is the email field'; //etcYou could use that approach for xprofile fields.
But ’email’ is not an xprofile field.
It is hardcoded in register.php ~Line 77October 18, 2015 at 8:59 am #245636danbp
Participantxprofile component use his own tables:
_bp_xprofile_data
_bp_xprofile_fields
_bp_xprofile_groups
_bp_xprofile_meta
See here for detailed structure: https://codex.buddypress.org/developer/buddypress-database-diagram/Somehow related to your question, this topic who explains how to use bp_update_user_meta (update_user_meta belongs to WP)
October 16, 2015 at 5:45 pm #245577In reply to: Profile URLs
Andrew
ParticipantYou need to add the target=”_blank” attribute to the profile field value anchors.
I think the best way to do this is by using str_replace. Add this to your functions.php or bp-custom.php
function profile_target_blank( $field_value, $field_type, $field_id ){ $field_value = str_replace('rel="nofollow"', 'rel="nofollow" target="_blank"', $field_value); return $field_value; } add_filter('bp_get_the_profile_field_value', 'profile_target_blank', 11, 3);I’ve tested this and it works. This should open a new browser window/tab for all profile fields that have a URL’s.
October 14, 2015 at 6:38 pm #245460In reply to: MP3 upload profile field
canadianmusicnetwork
ParticipantPerfect! Works great! Thanks so much for the reply! 🙂
You mentioned there were other ways to display this?
Can the user directly upload through profile fields & then automatically display in tabs like you showed without entering the url?
October 14, 2015 at 4:28 pm #245458In reply to: MP3 upload profile field
danbp
Participanti never used BuddyForms, so i can’t help you with this. Ask on their support if a specific audio field exist or can be added, and how.
That said, WP comes with all of this, but later. Meaning by this that a user will be able to upload an audio file once it is already registered.
It is commonly accepted that nothing can be added to a site as long as a new user is not validated or pending.
On a standart install, i would use a simple text field on a new field group named Audio. And, eg., if you allow 5 files, use 5 fields.
BP strips HTML on prfoile fields, so it’ not possible by default to get the automatted embed like in a post. Why is unclear to me, as embed is implemented since BP 1.6 for activities, groups, but not profiles… Anyway, a little bp-custom snippet magic (here it is ! ) will let you do this.
function set_audio_field( $field_value ) { $bp_this_field_name = bp_get_the_profile_field_name(); // field name (case sensitive) if( $bp_this_field_name == 'N° 1' || $bp_this_field_name == 'N° 2' ) { $field_value = strip_tags( $field_value ); $field_value = '[audio mp3 ="'.$field_value.'"]'; } return $field_value; } add_filter( 'bp_get_the_profile_field_value','set_audio_field');That’s it for site admin. Now for the user.
The new user capability should be “author”, so he can upload files. This is default, but you can change that, if you search a bit on WP’s codex.
First he have to upload his file. From Toolbar: Dashbord > Media > add new. Then he has to copy the file URL avaible on the media upload page, under “edit” and then in the right menu.
User goes to his profile > edit > audio tab and paste the file URL into the audio field, save and voila ! Here the result:

That’s only one possibility. the’re others, like custom post type…
October 14, 2015 at 2:08 pm #245450In reply to: MP3 upload profile field
canadianmusicnetwork
ParticipantThanks so much for the professional reply. I really enjoy Buddypress & The Support Community. I suggest this service to everyone else in the Canadian Music Industry. Sorry about the capital lock! Didn’t proof read before hitting submit! Lesson Learned 🙂
Anyways, I want to be able to create a Profile Field when Users/Artists sign up where they can upload (2) mp3 files so it will automatically display in their profile. This is the main page where there (2) Featured Songs will be displayed. The rest will be displayed in RTMEDIA or BuddyMedia.
I have some experience with coding, but was wondering how would I add a profile field that says audio to my drop down list in profile fields & output the mp3 player on the user end?
First Example (Second To Follow)

Second:

Thanks in advanced!
October 7, 2015 at 2:28 am #245168In reply to: Defoult user files
mrjarbenne
ParticipantSimilar answer to this topic. https://buddypress.org/support/topic/user-fields/
This plugin mentioned, with a bit of tweaking, can do exactly what you are talking about: https://wordpress.org/plugins/custom-profile-filters-for-buddypress/
October 5, 2015 at 6:07 pm #245089In reply to: User Fields
ckchaudhary
ParticipantDefault behaviour is to search through values of all profile fields for the search term.
So if someone has entered ‘london’ in ‘city’ field and you click on it, the search result doesn’t only contain members who have entered ‘london’ in ‘city’ field. It’ll also return members who have entered ‘london’ in any of profile fields.
That’s what makes you see the result set as inaccurate i guess.September 29, 2015 at 10:16 pm #244926In reply to: mySql querry help
shaunik
Participant@danbp: not sure why not working it comes with error
MySQL said: Not unique table/alias: 'wp_bp_xprofile_data'Tried query in phpmyadmin, same error:
SELECT wp_bp_xprofile_data.value, wp_users.user_email, wp_users.display_name FROM wp_users LEFT JOIN wp_bp_xprofile_data ON wp_bp_xprofile_data.user_id = wp_user.ID LEFT JOIN wp_bp_xprofile_data ON wp_bp_xprofile_fields.id = wp_bp_xprofile_data.field_id LIMIT 0, 30 MySQL said: Documentation #1066 - Not unique table/alias: 'wp_bp_xprofile_data'@shanebp: I wish wpdatatables allow php functions … it does’t
September 29, 2015 at 3:50 pm #244913In reply to: Profile Field Text Area Max Character or Word Length
@mcuk
ParticipantHi @danbp thanks for reply.
Tried the code you wrote in the link above and it works fine. But as with the one referenced in my first post it reduces the string length upon display rather than preventing the user typing in a large number of characters in the first place (and the data being stored in database).
So moved onto looking at the code snippet by @henrywright for the sign up page. Would be suitable if i could convert it to work with profile fields. Got to this stage with a few q’s:
function my_textarea_validation() { $custom_field_id = bp_get_member_profile_data( 'field=Mini Bio' ); //is the use of $_POST['field_' . $custom_field_id] correct to access desired profile field? if ( strlen( $_POST['field_' .$custom_field_id] ) > 5 ) { global $bp; //which $bp->... error message to use? $bp->signup->errors['field_'] = __( 'CUSTOM ERROR MESSAGE', 'buddypress' ); } } //which hook to use? (to affect the textarea on Profile > Edit navigation tab) add_action( '???', 'my_textarea_validation' );September 24, 2015 at 4:49 pm #244765In reply to: Edit profile groups on single page
DanielEngelhardt
Participanti did it that way and it worked for me. so i now have all my profile fields in one group and display only one of the fields on the registration-page
September 23, 2015 at 3:34 pm #244718danbp
ParticipantYou can add custom option fields for References and Places Worked:
Not sure that adding a memberlist as drop down is very clever. What if you get a community of hundreds of members ?
To get database info, see here: (that’s a common WP task)
https://codex.wordpress.org/Class_Reference/wpdbSeptember 22, 2015 at 9:56 pm #244694In reply to: Edit profile groups on single page
shanebp
ModeratorThen create a template overload of this file:
buddypress\bp-templates\bp-legacy\buddypress\members\register.phpIn that file, prevent the display of certain fields by checking them by using
bp_get_the_profile_field_id()orbp_get_the_profile_field_input_name()
in the loop:while ( bp_profile_fields() ) : bp_the_profile_field();September 22, 2015 at 9:33 pm #244692In reply to: Edit profile groups on single page
DanielEngelhardt
Participantthanks for your input, @danbp.
There is, of course, a reason why i want it as requested 🙂
On my registration form, i only want to show one field to not bother new users with unnecessary fields. this one field is in my base group.
All other fields are arranged in another group.From my point of view, it doesn’t make sense to show two tabs on the profile-edit page, but it does make sense to show as less fields as possible on the registration page. I think UX comes first today. Customers pay our rent, so we should avoid putting spokes in there wheel. I also think buddypress is doing a pretty bad job here regarding UX (Of course this behavior gives structure, but we pay with UX for it). Since we live in 2015 it shouldn’t be a matter of “hacking” to reduce the amount of inputs and clicks for such “trivial” actions (from a users perspective) like editing a profile.
Is that reason enough? 🙂
-
AuthorSearch Results


