Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'profile fields'

Viewing 25 results - 4,751 through 4,775 (of 5,755 total)
  • Author
    Search Results
  • #79208
    nickmy
    Participant

    please its important

    ekawaii
    Member

    Hello,

    I’ll break this down into 2 parts.


    xProfile Custom Fields



    I’ve looked around and can’t seem to find the solution to my problem.

    Basically what I’m trying to do is display a Headline at the top of my users profile if they have filled out the custom profile field, if they haven’t filled it out yet then I wanted to display their fullname. Sounds easy right? Yeah but I can’t seem to get it right.. I can get it to display just the username but when it displays the headline it’s also displaying the username.

    I’m also doing this outside of the profile_loop.php it’s inside the profile.php using a highly edited version of the cosmicbuddy template. If anyone could help me I’d greatly appreciate it!

    Here is an example of what I want the page to display and what my code some-what looks like:

    if bp_profile_field_data( ‘field=Headline’ ) is filled out (this is the line i’m having problems with)
    bp_profile_field_data( ‘field=Headline’ ); display headline
    else
    bp_user_fullname(); display fullname
    endif


    Profile User Css Customization


    With myspace and other popular social networks around users want to be able to customize their profile to be unique from other users. I find that this also makes them more active on their profile as well as the website.

    I’m trying to do the same thing with CSS by letting the user edit their profile page background using div style. I have it working and here is the code I used along with adding the appropriate xprofile custom fields:

    <div style=”background-color:<?php bp_profile_field_data( ‘field=Background Color’ ); ?>”>

    This is just a small snippet of what I want to achieve, I’ve also created background-image, background-repeat, etc. You would need to create an xprofile field called Background Color and the user would need to type either the color word or an HTML color such as #FF0000 which is Red. Then you would have to place the div into your template wherever you want them to change the background color then close the div.

    I’m new to buddypress and I’d call myself a beginner in php so I’m sure there are much better ways to go about this, I simply want to share what I’ve thought up so far and see what others have to say about this.

    Ideally I would like to display the background color if only they have entered anything into the field so it would look like..

    <div style=”
    if bp_profile_field_data( ‘field=Background Color’ ); is filled in
    then display background-color: bp_profile_field_data( ‘field=Background Color’ );
    endif
    “>

    Another thing I’m trying to do is allow the user to display a banner above their profile if they specify the URL in the custom profile field. The problem I’m having is getting it to display a specific width and height without creating a blank banner space on another users profile that has no image. If i just put the profile field it doesn’t assign a width and height to the URL which means they could put any size of image.

    It would have to look something like

    if bp_profile_field_data( ‘field=Banner Image’ ); is filled in
    then display <div style=”width: 600px; height: 100px;”> <img src=” bp_profile_field_data( ‘field=Banner Image’ ); “> </div>
    endif

    So hopefully someone can have some input on anything I’ve mentioned above ^_^;

    #79090
    Hugo Ashmore
    Participant

    Not sure it will be that simple you may have to loop out the whole section in other words replicate the code that the line refers to but changing the id for the newly copied code so you then had all groups being displayed.

    To be honest unless there is real compelling reason for a new group of fields I would simply add the new field to the ‘Base’ group. If it’s important for registration I think it’s better added to the base group and set to ‘required’.

    #78996
    acreifi
    Participant

    The problem:
    multiselectboxfields cannot be saved by trying to save profile of a user.

    the errror-message:
    “There was a problem updating some of your profile information, please try again.”

    is still present in buddypress 1.2.3 and wordpress 2.9.2

    I need this function for releasing a webside !!!!!

    Boone Gorges
    Keymaster

    Hi @pollyplummer. You have basically got the right idea, but there are a few problems.

    First, your check for usermeta is not formatted correctly. See https://codex.wordpress.org/Function_Reference/get_usermeta for get_usermeta syntax. In any case, get_usermeta gets stuff from the wp_usermeta table, and I used it as an example in my code to give you a sense of the kind of check you’d want to do. But that’ll only work if you’re checking against a piece of data that is stored using update_usermeta. BP xprofile fields are not. If the “114” information is stored in a bp xprofile field, you will probably have to do some magic with xprofile_get_field() to get it to work. The following will check for a field called “Type” and check to see if the current user’s Type value is 114:

    $field_id = xprofile_get_field_id_from_name( 'Type' );
    $field = xprofile_get_field( $field_id );
    $value = $field->data->value;

    if ( bp_the_profile_group_name() == 'awesome' && $value == '114' ) {

    There’s probably a slicker way to do this, but it works. Again, this is only relevant if you’re storing the salient data in the xprofile tables.

    The second problem is that you don’t want to repeat the bp_has_profile etc stuff inside of the if statement. If you want to feed a profile_group_id argument to bp_has_profile, you should do it in the initial loop.

    Then make sure that you include the markup inside of the conditional if statement. In edit.php, that means everything, including the

    tag, that creates the markup enabling the user to edit that group of profile items.
    becca37
    Participant

    I’d love to see (and would/will create it if I can figure out how) the ability to, via enhancements to the Group Management plugin (“BP Group Management” by Boone Gorges) the ability to

    (a) Remove a member from a Group when managing the GROUP (“remove” might actually be the existing “kick and ban” option but “kick and ban” sounds much more extreme than just “remove” so I’m scared to click it ;) )

    (b) Add / Remove a User to / from one or more Groups when editing the USER (preferably in conjunction with the http://buddypress.org/community/groups/creating-extending/forum/topic/desired-plugin-for-admin-interface-view-edit-of-buddypress-registration-fields/ “desired” plugin :) )

    So, am I crazy or what? ;)

    OR {hopeful look} maybe someone has already created such a plugin and I’m just missing it?

    Boone Gorges
    Keymaster
    rich! @ etiviti
    Participant

    not ideal… but may help for the time being (at least get to the buddypress profile page to perform the edits)

    this will add a ‘view bp’ link to the buddypress profile when viewing the user list within the dashboard
    http://blog.etiviti.com/2010/02/add-a-view-buddypress-profile-link-in-wp-admin-users/

    #78872
    mazen
    Member

    @boonebgorges thanks for your response and plugin link, in terms of functionality it is almost exactly what I need, only:
    – Need it to manage users instead of groups
    – Need it to show their full profile fields (including xprofile)
    – Need options to deactivate(very important) or delete users
    – Need function to export list to excel sheet

    becca37
    Participant

    I’d love to see (and would/will create it if I can figure out how) the ability to, via a plugin which adds these features to the admin interface not via manual code changes, a way to

    (1) View the BuddyPress profile data, including any “extended” fields”, for each user via the Admin interface

    (2) Update the BuddyPress profile data, including any “extended” fields”, for each user via the Admin interface

    Right now I can only see the data gathered on the BuddyPress registration screen in each indivdual user profile, and only the User can edit the data for those fields.

    In the admin interface I don’t see a way to get a listing of the field data, or to edit the data in those fields. For instance, I’m collecting User Display Name, City, State, Donation E-Mail Address, Donation on Behalf of Walker, and Donation Receipt Reference Number and I’d love to see all (or a selectable sub-set of) the registration data fields in a grid for every user (or a selectable sub-set of users i.e. based on profile field value (i.e. Walker1) or based on Group(s)) then be able to select an individual user record and edit that profile data if needed.


    | Edit | Display Name (core field) | City | State | Donation E-Mail Address | Donation on Behalf of Walker | Donation Receipt Reference Number |


    | X | userDisplayName1 | Denver | CO | user1@domain.tld | Walker1 | user1-receipt-reference-number |


    | X | userDisplayName2 | Denver | CO | user2@domain.tld | Walker2 | user2-receipt-reference-number |


    | X | userDisplayName3 | Denver | CO | user3@domain.tld | Walker1 | user3-receipt-reference-number |


    | X | userDisplayName4 | Denver | CO | user4@domain.tld | Walker3 | user4-receipt-reference-number |



    So, am I crazy or what? ;)

    OR {hopeful look} maybe someone has already created such a plugin and I’m just missing it?

    Boone Gorges
    Keymaster

    Inside of the while( bp_profile_groups() ) loop for each member, check to see if bp_the_profile_group_name() is one that should be displayed to that particular user. In other words, put the template markup inside of a big conditional:

    if ( bp_the_profile_group_name() == 'awesome' && get_usermeta( $bp->loggedin_user->id, 'awesome_user' ) ) {
    // Show the profile fields in the 'awesome' group only for those users with the usermeta 'awesome_user'
    }

    Do that for each user type and each profile field group. Only the right stuff will be displayed; groups not meeting the criteria will be hidden.

    Paul Wong-Gibbs
    Keymaster

    @bofw Ah, there you are. Was wondering when I’d find your username on here.

    Sarah – are you trying to hide particular fields, or field groups, on the ‘edit profile’ page?

    mazen
    Member

    Hey Guys,

    One of hte main reasons of running buddypress is to create a community, and hence a central point of management is required. Can anybody help guiding me on how to write a plugin / or point me to one if exists, which helps you manage your users from WP admin interface?

    What I have in mind a user profiles manager plugin, which once you browse to, you see a table with all users listed there including the extended profile fields that we create for them. Once you click on a user you can view their full details, and while at it it would be awesome if you can activate / deactivate users from this view. Finally, an export function which outputs the whole user profiles list into an excel sheet.

    I checked through phpMyAdmin, and it seems that wordpress divides the data into multiple tables, so you have your main users table which has basic details, then you have xprofile table which has the additional fields you created, but it seems that even if you need to get column titles for your table for the fields of xprofile, you need to get them from a third table.

    If this is all true, the logic in my head is to query the database based on userID, then match with ID on xprofiles and merge. For fields titles, probably a separate query which creates the first row which has titles in the same logic?

    Anybody can help with script please? :)

    Cheers.

    #78461

    @grosbouff For the purpose of your plugin, bp_profile_group_has_fields gets in the way. The purpose of bp_profile_group_has_fields in the default theme, is that it will skip over any group of fields that have no values filled in when inside the profile loop.

    I think what you want to use is bp_field_has_data().

    I also don’t think that this is a bug. All of those functions are doing exactly what is expected.

    Can you explain in more detail what you need these functions to do?

    #78400
    JohnnyPea
    Participant

    I was hoping I could add fields(as I can to standard WP profiles through edit_user_profile/show_user_profile hook) and store the values to the bb xprofile tables without modifying the core files.

    Could you suggest the way how can I add the usermeta fields into bb profile Public and Edit pages and store the values to the standard usermeta table when I hit “Save Changes” button?

    #78353
    Philipp
    Participant

    Hi!
    It seems to work great. But I still have problems to integrate it into the profile_loop.php.
    It tried it with a table and without….?! I just want to show it on the right side of the profilefields.
    And is it possible to use it with two cobinated profilefields?

    Thanks a lot for your help and greetings from Jerusalem!

    Philipp

    #11587
    5887735
    Inactive

    This is just an idea I want to float.

    It would be nice if users could create custom/additional profile fields. Specifically, profile fields such as education and employment where they could “add more” fields to jobs/schools/etc. Something like Facebook.

    Arx Poetica
    Participant

    Found it! I love it when I answer my own questions. ;p There’s a whole commented-out section in the members-loop.php section that details how to do it. Lovely!

    #11584
    radrew
    Participant

    I was wondering if anyone has experimented with a method for adding conditional profile fields; enabling certain profile field(s) dependent upon the selected value of a separate profile field.

    A perfect application for this type of relationship between fields would be user locations. Example: The selectable values of a “State” or “Providence” or “Region” dropdown select box would be populated dependent upon the value of a “Country” dropdown select box.

    I’m assuming this extension of functionality would be best suited as a plugin?

    Arx Poetica
    Participant

    ugh, it didn’t insert my code… let me try that again…

    bp_profile_field_data(‘field=Biography’);

    Arx Poetica
    Participant

    At first I thought I could just loop over all the profile fields w/ the bp_has_profile() loop, but that didn’t seem the most logical method — nor did it seem to work.

    Second stab? That failed.

    What do I need to do?

    #11581
    #78289
    Boone Gorges
    Keymaster

    Without a lot of custom coding, I don’t think you’re going to be able to make this work with xprofile fields. Those fields can only store data when they have been defined in the wp_bp_xprofile_fields table, but if they’re dynamically generated, that’ll be hard to do. It might be more straightforward to save the data as usermeta.

    I guess I’m assuming that you want to save the field data in the bp database tables. Or are you just hoping to display the checkboxes on the profile page, and have them handled by another script?

    In either case, as long as you can add fields to the profile page (which you could do either by hardcoding or hooking to the edit screen at bp_after_profile_field_content), you should be able to grab the $_POST data after xprofile edits are saved (at xprofile_screen_edit_profile) and then do whatever you want with it.

    JohnnyPea
    Participant

    I would like to add dynamically generated checboxes (I don’t want they be a static values which can I set in the admin but I would like to collect data with my own php functions). Is there any action or filter to add custom fields and save them? It is possible to create custom field type (which will include functions and data which I need and I will be able to simple add it or remove from the profile through the “Profile Field Setup”) through some filter or action? I was looking for solution how can I add custom fields with coding for quiet long time but I didn’t find anything useful. Thank you very much for any help.

    Psyber
    Participant

    I would like to know as well.

Viewing 25 results - 4,751 through 4,775 (of 5,755 total)
Skip to toolbar