Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'profile fields'

Viewing 25 results - 1,026 through 1,050 (of 3,608 total)
  • Author
    Search Results
  • #234772
    Matthias
    Participant

    Did not find a solution to work it out with the standard wordpress fields.
    The only way to go around this problem, was setting up xprofile fields…

    #234700
    Matthias
    Participant

    I think @azinfiro had the same problems a few month ago.
    Seems it is the normal buddypress behavior, not to show the wordpress fields
    https://buddypress.org/support/topic/wp-profile-fields-not-editable-in-bp-profile/

    This is a bit strange, cause I can change the wordpress fields in bbpress but not in buddypress?!?!
    Makes no sense to me!

    Thanks
    Matthias

    #234693
    shanebp
    Moderator

    You don’t need to touch any core files to add an Order By.

    Example for adding a Contributor option, put in bp-custom.php or theme/functions.php

    // add order options to members loop
    function ch_member_order_options() {
    ?>
       <option value="contributing"><?php _e( 'Contributing Members', 'buddypress' ); ?></option>
    <?php
    }
    add_action( 'bp_members_directory_order_options', 'ch_member_order_options' );
    
    // filter ajax members by contributing
    function ch_filter_ajax_querystring( $querystring = '', $object = '' ) {
    
    	if( $object != 'members' )
    		return $querystring;
    
    	$defaults = array(
    		'type'            => 'active',
    		'action'          => 'active',
    		'scope'           => 'all',
    		'page'            => 1,
    		'user_id'         => 0,
    		'search_terms'    => '',
    		'exclude'         => false,
    	);
    
    	$ch_querystring = wp_parse_args( $querystring, $defaults );
    
    	if( $ch_querystring['type'] == 'contributing' ) {
    	
    // to get members by xprofile field, you need some custom sql here
    // here's an example: 
    //https://codex.buddypress.org/developer/loops-reference/the-members-loop/#code-examples
    
    		$users = get_users( array( 'fields' => array( 'ID' ), 'role' => 'contributor' ) );
    		
    		$users_str = '';
    		foreach ( $users as $user ) {
    	             $users_str .=  $user->ID . ',';
    	        }
    		$users_str = rtrim($users_str, ",");
    
    		$ch_querystring['include'] = $users_str; 
    		$ch_querystring['type'] = 'alphabetical'; 
    		
    		return $ch_querystring;
    		
    	}	
    	
    	else
    		return $querystring;
    			
    }
    add_filter( 'bp_ajax_querystring', 'ch_filter_ajax_querystring', 20, 2 );
    #234671
    Matthias
    Participant

    hi @danbp,
    I’m using the plugin version of bbpress. And it’s running fine.
    I can edit all fields from the backend in the frontend, too under
    http://exampample.com/forums/users/USER/edit

    In buddypress I can access the users profile and I can set the password and the email notifications
    BUT
    there is no way to change the “public name” and the “website field” oder the “biographical info”
    For editing this, the user has to go to the backend!!!

    Thanks
    Matthias

    #234575
    danbp
    Participant

    Hi @myg0t,

    you do it wrong. WP auto embeds youtube videos automagically (and over 40 other online video providers). In a post or topic or mention, simply copy/paste the video URL, and it’s done.

    xprofile use a form with different fields. Because these fields are striped for security reason (classic form security), you can’t embed videos like previously described.

    But there is a URL field type ?
    Yes, this let you enter a video url, but the field will render the URL, not the embed action. It’s a form field and it’s striped.

    So what ?
    We will use a normal text field, and will only enter an alpha numeric value.

    How can i do this ?

    As example, we gona use this video https://www.youtube.com/watch?v=TZPN9g2pmPQ

    And to show the video on a profile, we’ll use only the doc ID: TZPN9g2pmPQ

    By entering this kind of text in a profile field, it is not striped and will be handled like an ordinary text field and throwed to DB with his filed ID and field value.

    To embed the video, we also have to add what WP does on a blog, but not on xprofile page, an iframe to control the video output, so it can be streamed correctly and be read by browsers.

    Now we first create a new field and name it Spotlight (or what ever). No matter where, you can use the Base group or any other custom group.
    We select the field type and give it a single text area type.
    Save.

    We go on a profile to modify it and enter TZPN9g2pmPQ in regard of Spotlight.
    Save.

    And voilà ! The video is correctly embeded and displayed.

    As usual for customisation, we’ll use a snippet which we put into bp-custom.php

    function set_video_field( $field_value ) {
    	$bp_this_field_name = bp_get_the_profile_field_name();
    	// field name (case sensitive)
    	if( $bp_this_field_name == 'Spotlight' ) {
    		$field_value = strip_tags( $field_value );
            // building the HTML and h/w of the iframe
    		$field_value = '<iframe width="420" height="315" src="http://www.youtube.com/embed/'.$field_value.'" frameborder="0" allowfullscreen></iframe>';
    	}
    	return $field_value;
    }
    add_filter( 'bp_get_the_profile_field_value','set_video_field');

    Caution: do not remove the iframe, or video won’t work.

    Hope this help.

    danbp
    Participant

    hi @dzagya,

    The new BuddyPress comes with SocialMedia fields encoded into the xProfile, and display with the Base profile fields.

    Is this gonna require a .php hack? – if so anyone got any tips for me?

    or does anyone know a good plugin to handle this?

    BuddyPres hasn’t social fields in the Base xprofile field group. There is only one field which is [username] !

    Check one of your plugin or your theme setings. Or maybe a custom function…
    Give details. Theme & used plugins for example.

    #234296

    In reply to: [Resolved] Bug?

    shanebp
    Moderator

    It’s not a bug. Read this.

    danbp
    Participant

    Hi @sbraiden,
    if you enter love,apple,pie it’s considered as a list, because words separated by commas are list eleents in form (extended profile fields are in a form). If you enter i love apple pie and muffins, but also spaghetti. it’s mostly not linked, except for one of the words before a ponctuation. Or the first word, or the last word in other case. I’ve never tested this precisely.

    For the URL not showing, do you use the URL field type ? Have you tried with a single line textarea, just to see if this makes a difference.

    Also important to know, when you enter an URL on front-end (field type URL on), you have to enter the full URL, http included. If you enter only http://www.sometinhg or example.com, it’s not valid and will be linked like other words to user profile.

    ckchaudhary
    Participant

    fields assigned with the URL type – they never show up once data is entered.

    Must be something in your theme/plugins. It works by default.

    text fields – data entered is being displayed with links added to words and phrases, linking to them as members.

    Yeah buddypress does it deliberately. The purpose is to show/search all members who have entered same value in any of the fields.
    You can disable it by adding following line of code in bp-custom.php or in your theme’s functions.php:
    remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 9, 2 );

    #234249
    Richgilberto
    Participant

    I would love to bump this one. I have a site that I’d like to push live soon; there are many extended profile fields that I would like to be part of the “directory” for people to search through.

    Specifically, the site is for a specific field where contractors are always looking for work, and potential employers will be able to filter by location, software experience, and job title.

    I’m sure this exists somewhere out there but I have yet to find it.

    Thanks for your time!

    #234120

    In reply to: Noob recommendations

    danbp
    Participant

    I published some BuddyPress use case, see here: http://bp-fr.net/realisations/
    There is also a category called showcase with some other examples.
    This will hopefully help you to see how BP is and can be used.

    – separating users is now possible with member_type (see codex)
    – scheduling is not avaible in BP, but thought there are some plugins for this (search on WP repo)
    – conditionnal xprofile fields is a popular question on the forum. You’ll probably find some discussion here.

    BuddyPress is first of all a great and awesome tool for building communities around the members.

    #233540

    In reply to: How to create template

    djsteveb
    Participant

    I think you are playing with the old bp default theme files which are no longer being used(?)

    see – https://codex.buddypress.org/themes/bp-default-theme-moving-forward-with-bp-1-9/

    and perhaps -> https:// codex.buddypress .org/themes/

    although I am pretty sure a bunch of the info on that buddypress .org / themes is talking about the old ways of doing things.. so check dates.. I think a bunch of that info is deprecated… however you may find what you are looking for in the codex..

    maybe what you are looking for in relation to profiles is touched on here: https://codex.buddypress.org/themes/guides/displaying-extended-profile-fields-on-member-profiles/

    #233528
    shanebp
    Moderator

    Nice hat.

    Yes, the use ofbp_field_has_data() can be a bit confusing.
    Remember that in this context, rather than check the field value, it checks if there is data in the visibility setting for that field – which will always be true.
    And bp_the_profile_field_value will be NULL for the same reason.

    Try this:

    <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
    	<?php 
    	$this_field = xprofile_get_field_data( bp_get_the_profile_field_id(), bp_displayed_user_id(), 'comma' ); 
    	if( !empty( $this_field ) ) :
    	?>
    	   <tr <?php bp_field_css_class(); ?>>
    		<td class="field-name"><?php bp_the_profile_field_name(); ?></td>
    		<td class="field-visibility"><?php bp_profile_settings_visibility_select(); ?></td>
    	   </tr>
    	<?php endif; ?>
    <?php endwhile; ?>
    #233443
    miguelcortereal
    Participant

    Thanks Henry for your quick response.

    I’m using Suffusion theme.

    I’m not using template pack conpatibility provided that since BP 1.7 it just became unecessary. However I’m using in child theme /buddypress/members/members-loop.php which I’ve copied from BP-legacy and customized to have a different layout and display xprofile fields information.

    I removed this file to force the use of the original BP markup and the problem remains.

    So it’s Ajax related.

    I’ll try to check theme’s and BP’s Javascript files.

    #233436
    modemlooper
    Moderator
    #233368
    peter-hamilton
    Participant

    Don’t know how to do that, but you could add extra fields to your Buddypress profiles to achieve a similar outcome.

    #232909
    spiritix
    Participant

    Hello guys

    What I used is:
    – BuddyPress with combination of either bbP private groups plugin or Members plugin or Restrict Content Pro – bbPress plugin
    – I created extended BuddyPress profile fields in registration
    – I restricted access to the forum with one of above mentioned plugins
    – I used my code mentioned in the beginning

    How it looks like:
    – my code works like a charm! once you choose User1 type in registration, it applies subscriber role, User2 subscriber as well, contributor for User3 – THIS WORKS.
    – what does NOT work is restriction via plugins. Have no clue why. With members plugin od pivate groups, I set Forum1 to be accessable ONLY to User3 type of user, but User1 and User2 can access too! Why?! It has nothing to do with my code, after registration you can clearly check it in WP Users that the role has been assigned.

    If I knew hot to restrict access to the forum based on the WP Role, my code would be sufficient to solve this. Can you help with that part?


    @youmin
    – are upi saying in BB 2.2 access to forum based on the WP role is fixed?

    #232907
    barodscheff
    Participant

    Yes, of course.
    I would like to link the sports which are profile fields. For instance if you click on male/Basketball you should get an overview of all members who are also male and do the sport Basketball.
    This is automatically possible in members loop but I would like to have it on my landing page.

    I hope it’s clear now.

    #232897
    mcpeanut
    Participant

    Hey @youmin and @spiritix i hear you both on this matter, after much testing myself on how to do this i have realized the best way to do this is via a few other plugins.

    firstly i would recommend using a membership plugin and a plugin to create your own registration forms as well as a roles capability management plugin, you can then overide the buddypress registration process (but you will lose the ability of integrating the custom fields you create for the buddypress registration unless you tie them into your own registration forms)
    but the way i got around this myself without the problem of having to tie them with my registration forms was to add a buddypress profile progression plugin so once they have registered they will see a notice in the header showing the percentage of the profile they have completed encouraging them to fill the fields in “you could even integrate it with an awards system the more they fill in” its up to you. (to me this works perfectly fine as i can still add as many buddypress fields as an when i want and have a simple registration process to boot).

    if you mess around with this idea you will see that assigning a user to a specific role does infact work with the right combo of plugins and effort, i know this seems a long haul work around but the way i have set it up works fine for me. i may go into more detail for you guys when i have more time and explain exactly how mine works. plus this way if you do decide to implement some kind of pay per view membership for higher levels in the future your ready to go!

    #232878
    danbp
    Participant

    That’s not a BuddyPress related question. BP provides already a few checks over xprofile fields, but not strict security checking.
    As you use contact form 7 plugin to build your fields, you have to check this plugin documentation to achieve this.

    #232741
    modemlooper
    Moderator

    find the template file edit.php in members/single/profile
    locate
    if ( bp_has_profile( 'profile_group_id=' . bp_get_current_profile_group_id() ) ) :
    change to
    if ( bp_has_profile( 'profile_group_id=' . bp_get_current_profile_group_id() . bp_custom_filter_xprofile_fields() ) ) :

    then add your function for field IDs

    function bp_custom_filter_xprofile_fields() {
    
    	$member_type = bp_get_member_type( bp_displayed_user_id() );
    
    	if ( 'member_type_here' === $member_type  ) {
    		return '&exclude_fields=3,5,9' ) );
    	}
    }

    you will have to find the IDs of the profile fields

    #231917
    r-a-y
    Keymaster

    Hi @caldwellysr,

    Thanks for testing the 2.2-beta.

    There was a bug concerning xProfile fields, which should be addressed in:
    https://buddypress.trac.wordpress.org/changeset/9345

    If you feel comfortable removing the lines referenced in bp-core/bp-core-template.php, please do so and retest.

    Thanks again for testing!

    #231630
    Oazar
    Participant

    hello again Shane,

    well it doesn’t work…

    i created the file, placed it in at the root of the plugin folder, and then aked to exclude one field to begin with, but this won’t work.

    maybe this has to do with “groups” ? i am using the x-profile plugon, and I have 3 groups of fields, so maybe I should also mention the group ID as well as the field ID ?

    #231579

    In reply to: How to "Like" ?

    djsteveb
    Participant

    I am guessing it would easy to add a function to one of the like / voter plugins mentioned above ( https://buddypress.org/support/topic/how-to-like/#post-231535 ) – that would also write something to the BP activity table – which would then show likes or votes on posts and such on the activity stream – if those like / vote buttons also work on media that is uploaded through rTmedia (or the new (beta) mediapress plugin) then that would be pulled into the activity feed.

    The tricky part beyond that is that buddypress does not have an integrated media thing – so there would need to be some kind of bridge between rtmedia, or mediapress or whatever was handling the media to display “likes” somewhere on the profiles.

    Maybe this is something the rtcamp or mediapress plugin guy can add that functionality or someone can create some kind of bridge / api thing to let the three seperate pieces all talk to each other – then you would need code in your theme to grab that database table and display numbers next to whatever…

    I think rtmedia’s plugin displays a number next to the media tab in my bp-social theme (for number of pics / videos someone has uploaded) – I wonder where this “# of likes” is to be displayed? Just a total number of likes in the main profile fields area – or number of likes broken down by media uploaded, blog posts liked, activity updates liked, etc.

    I like you thoughts on this @disha76 – I’d like to see this work – it sucks that BP does not have integrated media handling – it’s a major issue I have posted about in the past – brings us to this “4 separate things need to talk to each other” in order to get basic functions working / displayed.

    it would be awesome if the mediapress guy would offer to give that code to core BP – but then again, it appears there is not much work going into updating / maintaining BP these days – so getting things updated seems to depend more on third parties doing code for side projects money from what I can tell. Which of course means paying for custom stuff today – a future WP or BP update could cause the voting / like plugin to break and need to be recoded (by a dev that may not be responsive) and the media plugins could break.. and your theme may not display correctly – so you may have to try to pay all those people to make updates to keep those functions working in the future – if you can get those people to come back to projects.

    So – I hope it happens, but like many things buddypress – I would not hold my breath that something that can be modded to work today will not break in the future without a fix – I’ve had to let a previous buddypress like system go, and a few other plugins from around 1.5 that were nice.

    #231537

    In reply to: Men Woman Couple

    djsteveb
    Participant

    @mariovisie

    I stumbled upon something today that may be what are you looking to achieve here..

    Introducing Conditional Profile Fields for BuddyPress plugin

    I know nothing about how it works, but when I saw it, I thought about you post here and think that is kind of what you were asking to do…

Viewing 25 results - 1,026 through 1,050 (of 3,608 total)
Skip to toolbar