Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'profile fields'

Viewing 25 results - 2,551 through 2,575 (of 5,755 total)
  • Author
    Search Results
  • talooz
    Participant

    Hello

    I have this loop:

            $output .= '<ul class="item-list>';
            if ( bp_has_members( 'type=popular&max=6' ) ) :        
                while ( bp_members() ) : bp_the_member();                      
                $output .= section_members_li();
    
                endwhile;
            endif;
            $output .='</ul>'; 

    On the site i have profile field that used for gender selection by the user.
    I want to make this so that if a Men is logged so it will show only Woman, And if Woman is logged it will show only Men.
    I was searching the internet for an answer and i couldn’t find one, Can anyone help me with that?

    Thank you

    #172177
    KS Web Designer
    Participant

    Hi, I would like to create a custom search page that allows users to select various criteria from user profiles to search on. For example if I create a profile field that allows user to select either male or female in their profile I would also like to allow users searching to filter on that field.

    Can anyone help or point me in a useful direction?

    #172169
    bp-help
    Participant

    @randygootjes
    This would be easy using just BuddyPress Xprofile fields:
    https://codex.buddypress.org/user/buddypress-components-and-features/extended-profiles/
    You could create a dropdown menu and make it required and only allow the selection from say 21 to 120 years of age (“Not like most of us will live that long anyway unfortunately”) But also have a check box that is required that all information entered to join the site is true etc.

    #172163
    bp-help
    Participant
    #172161
    serie3369
    Participant

    okay first, how do you create a child theme?

    Second, how do you make the child theme to only change the color of the profile fields from white to black.

    I would love some step-by-step here since I know little about editing code and what not.

    P.S. I do have my themes original style.css posted above for convenience.

    PLEASE HELP!

    Paul Wong-Gibbs
    Keymaster

    Good idea, though you’d want the code to look like this:

    id="<?php echo esc_attr( bp_get_the_profile_field_name() ); ?>" ...

    This ensures the output is correctly escaped to avoid XSS attacks.

    #172103
    BobbyMelbourne
    Participant

    Hi,

    I have a role-type which requires a specific registration form and xprofile fieldset.

    Ideally, I would like to capture this via a custom static page however I’m kind of stuck trying to route it and load the correct template.

    add_filter('bp_static_pages', 'mta_static_pages');
    
    function mta_static_pages($pages)
    {
        $pages['register-agent'] = __('Register - Travel Agent', 'buddypress');
    
        return $pages;
    }

    Has anyone had any previous experience with making this work?

    Thanks.

    #172096
    Rishikant
    Participant

    @amareshsingh
    Hi, you should first make a child theme for your theme, then paste code to child theme’s style.css.
    That is the best way of making changes.

    nileshkul
    Participant

    I figured out the way to do this..just add in the markup of template file<?php echo sanitize_title( bp_get_the_profile_field_name()); ?>

    nileshkul
    Participant

    i am trying to add unique class or id to each extended profile field

    #172074
    xKroniK13x
    Participant

    Well if you have access to a database, you can easily change the values. The coding would look something like this, I wrote it but didn’t test it. You’d need BP global enabled to fetch the User ID, and you’d also have to set the field ID to change as you needed it to, or just make a loop that iterates through all the available fields. But this will get you on the right path, I think.

    
    <?php
    if(isset($_POST['update']))
    {
    $dbhost = 'DB_HOST'; //Host of BuddyPress Database
    $dbuser = 'DB_USER'; //Username of BuddyPress Database
    $dbpass = 'DB_PASS'; //Password of BuddyPress Database
    $dbname = 'DB_NAME'; //Name of BuddyPress Database
    $field_id = '2'; //ID of the field you are updating
    $user_id = $bp->loggedin_user->userdata->ID; //Must have $bp global enabled, can probably grab the user ID in a different fashion if needed
    $conn = mysql_connect($dbhost, $dbuser, $dbpass);
    if(! $conn )
    {
      die('Could not connect: ' . mysql_error());
    }
    
    $input = $_POST['input'];
    
    //This query will update the field set with the ID set above, you could have easily change it via coding, I just made it static for ease
    $sql = "UPDATE wp_bp_xprofile_data ".
           "SET value = $input ".
           "WHERE field_id = $field_id AND user_id = $user_id" ;
    
    mysql_select_db($dbname);
    $retval = mysql_query( $sql, $conn );
    if(! $retval )
    {
      die('Could not update data: ' . mysql_error());
    }
    echo "Updated data successfully\n";
    mysql_close($conn);
    }
    else
    {
    ?>
    <form method="post" action="<?php $_PHP_SELF ?>">
    <table width="400" border="0" cellspacing="1" cellpadding="2">
    <tr>
    <td width="100">Field data:</td>
    <td><input name="input" type="text" id="input" value="<?php xprofile_get_field_data($field_id); ?>"></td>
    </tr>
    <tr>
    <tr>
    <td width="100"> </td>
    <td> </td>
    </tr>
    <tr>
    <td width="100"> </td>
    <td>
    <input name="update" type="submit" id="update" value="Update">
    </td>
    </tr>
    </table>
    </form>
    <?php
    }
    ?>
    bp-help
    Participant

    @whitewolf1988
    Here is one way you could add xprofile fields name as well as the value to the members directory! Just remember to replace “Field-Name with the names of your fields in the 5 variables in my code. Also remember it is case sensitive. If you notice the pattern of 5 in my code you can easily see how to add more fields if you need them. Place this code in bp-custom.php:

    
    <?php
    add_action('bp_directory_members_item', 'bphelp_dpioml');
    function bphelp_dpioml(){
    $bphelp_my_profile_field_1='Field-Name';
    $bphelp_my_profile_field_2='Field-Name';
    $bphelp_my_profile_field_3='Field-Name';
    $bphelp_my_profile_field_4='Field-Name';
    $bphelp_my_profile_field_5='Field-Name';
           if( is_user_logged_in() && bp_is_members_component() ) { ?>
    		<div class="bph_xprofile_fields" style=" margin-left: 25%;">
                              <?php echo $bphelp_my_profile_field_1 ?>:&nbsp;<?php echo bp_member_profile_data( 'field='.$bphelp_my_profile_field_1 ); ?><br />
                              <?php echo $bphelp_my_profile_field_2 ?>:&nbsp;<?php echo bp_member_profile_data( 'field='.$bphelp_my_profile_field_2 ); ?><br />
                              <?php echo $bphelp_my_profile_field_3 ?>:&nbsp;<?php echo bp_member_profile_data( 'field='.$bphelp_my_profile_field_3 ); ?><br />
                              <?php echo $bphelp_my_profile_field_4 ?>:&nbsp;<?php echo bp_member_profile_data( 'field='.$bphelp_my_profile_field_4 ); ?><br />
                              <?php echo $bphelp_my_profile_field_5 ?>:&nbsp;<?php echo bp_member_profile_data( 'field='.$bphelp_my_profile_field_5 ); ?><br />
                    </div><?php
           }
    }
    ?>
    
    #172054
    xKroniK13x
    Participant

    If you’re planning on hiding all access to the profile, I’d suggest just adding a link somewhere that takes you to the default edit page. It’s going to be much easier than essentially recoding the entire page – why reinvent the wheel?

    #172035
    martinbeaulne
    Participant

    If i hide the bottom tabs and the admin bar, each user can’t modify their profile.

    #172030
    cwjordan
    Participant

    I looked into this further, and looks like the “last_updated” field for just the profile fields in the same group gets updated. The “last_updated” field for profile fields in other groups doesn’t get touched. So I should be able to do what I need as long as I create a separate group for each type of information I want to track the update time on separately.

    #172023
    nileshkul
    Participant

    is it possible in anyway to have clonable or repeatable fields or group of repeatable fields for buddypress user profile

    #172013
    danbp
    Participant

    @martinbeaulne,

    Gloabally, each BP member can, by default, modify his profile. So why do you want to add a form for doing this ?

    If you speak french, ask on bp-fr.net, i’ll answer you there.

    #172005
    martinbeaulne
    Participant

    By “easy”, I meant “There must be simple functions for posting things to the database; but I don’t know them”. I often see people answering to questions with pages and pages of code from outer space, so I thought my little question would be a very simple one….

    Well.. Let’s make my question “less general”.

    I want to get rid of the bottom tabs of the member profile page. Still, I want the members to be able to edit their profile. I want to style that directly in the member-header.php page.

    I want that kind of thing:

    
    <div><?php 
    if ( bp_is_my_profile() )
      echo "Hi there, since it's your profile, you can edit the value of field number 46";
      echo '<form id="formtochangefield46" name="updatefield46" onSubmit=" " action=" "  method="post" >
      <div>New value</p></div>
      <div><input type="text" id="updatefield46" name="field46" size="20" style="width:150px;"   maxlength="150" value="">
      </div>
      <div><input type="submit" name="submit" value="Submit"></div>
      </form>';
    endif;
    $embed = wp_oembed_get( xprofile_get_field_data('46'), array( ‘width’ => 400 ) );
    echo $embed;
    ?><br></div>
    

    I guess there must already exist wp functions to… call the database and update a field from a form’s submitted values… I mean, how does one creates a custom register page ? It must be the same functions after all…

    I hope my question is more precise… And sorry for my english, I don’t really speak it.

    #172004
    serie3369
    Participant

    Thanks for that, but still searching for a solution to this problem…

    #172002
    Paul Wong-Gibbs
    Keymaster

    I moved the inline CSS into the pastebin link because it made this thread massively long.

    #171987
    serie3369
    Participant

    Couldn’t find anything in my style sheet… The color of the text is white and I want to change it to Black or dark grey.

    Here is the code: http://pastebin.com/n0YAb8P3

    #171986
    @mercime
    Participant

    @ranebo You can disable registration by going to Settings > General and making sure registration is not enabled.

    The users can only fill out whatever Extended Profile Fields the Site/Super Admin created in the backend via Users > Profile Fields, users cannot create new profile fields. These profile fields can only be edited by the user in the front end via Member Profile Screens and not in the back end via User > Your Profie

    #171950

    In reply to: considering BuddyPress

    modemlooper
    Moderator

    1. members are searched by profile fields
    2. you can create unlimited profile fields
    3. there may be an events plugin
    4. BP has invite only private groups
    5. there was a geo plugin, not sure its up to date
    6. members are unlimited

    #171938
    gdecuir
    Participant

    Hello,

    I’m trying to determine which social networking plug-in will work best for my site needs.
    I didn’t find a clear answer to some of the questions I have while searching the support forum or on the site.

    1. members directory: I need members to be able to search for other members by hobbies or interest, etc. For example I would like to search for all members who like “bike riding” or “reading”. This way I can start a group for bike riders.

    2. Profiles: Could I add additioanl profile fields for members to fill-in

    2. Events calender: Can members or groups start there own event. It would be great if they can sell tickets on our site and we’ll get a small precentage over the sale. This would help support the site.

    3. Can groups be private. By invite only

    4. geo location: looking for members/groups with like intrest in a certain area.

    5. Number of members limited. Is there a limit to the number of members that could sign up?

    I’m more than happy to add extra plug-ins to make this happen. Thanks

    #171933
    wp_lover_4ever
    Participant

    You should look into the style.css of your theme, and edit the profile field div, and change the html color code from white to black.
    You can edit your style.css of your theme either from the dashboard by going to editing, or through FTP access.

    Good luck!

Viewing 25 results - 2,551 through 2,575 (of 5,755 total)
Skip to toolbar