Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 226 through 250 (of 574 total)
  • @henrywright-1

    Member

    @shanebp good shout!

    @henrywright-1

    Member

    You can just comment out the line in register.php. So long as you’re just removing text, the registration process won’t be affected.

    @henrywright-1

    Member

    Ah I see what you’re trying to do.

    $i = '1';
    if ( $items = bp_get_profile_field_data( array( 'field' => 'Budget' ) ) ) {
        foreach ( $items as $item ) { ?>
            <div id="<?php echo 'size-' . $i; ?>">
            <?php echo $item; ?>
            </div>
            <?php $i++; ?>
        <?php }
    }

    @henrywright-1

    Member

    A unique ID is easy enough, just use the loop to output a unique value. e.g.

    
    $i = '1';
    if ( $items = bp_get_profile_field_data( array( 'field' => 'Budget' ) ) ) {
        foreach ( $items as $item ) { ?>
            <!-- put what you want here -->
            <?php echo 'item-' . $i; ?>
            <?php echo $item; ?>
            <?php $i++; ?>
            <!-- put what you want here -->
        <?php }
    }
    

    @henrywright-1

    Member

    Is budget a field that you’ve set up under WP Admin > Profile Fields? and is it of type ‘checkbox’? also are you displaying the values on the user’s profile page? if yes to all of these then this should work:

    if ( $items = bp_get_profile_field_data( array( 'field' => 'Budget' ) ) ) {
        foreach ( $items as $item ) { ?>
            <!-- put what you want here -->
            <?php echo $item; ?>
            <!-- put what you want here -->
        <?php }
    }

    Note: I’ve amended the code so you can insert HTML a bit easier

    @henrywright-1

    Member

    Hi @applegateian – I think the problem might be the snippet you’re using to output the data string.

    try doing something like this:

    if ( $items = bp_get_member_profile_data( array( 'field' => 'Budget' ) ) ) {
        foreach ( $items as $item ) {
            // put whatever you want here
            echo $item;
            // put what you want here
        }
    }

    Note: I haven’t tested.

    @henrywright-1

    Member

    @3rdaxis just to note that’ll work on that page only. If you want to link an avatar that’s on a member’s profile page or in the members loop for example you’ll need to use a slightly different way of getting the user’s ID.

    @henrywright-1

    Member

    You can filter bp_search_form_type_select.

    This will be the general idea:

    function my_select_filter ( $selection_box ) {
        // do your filtering here
        return $selection_box;
    }
    add_filter( 'bp_search_form_type_select', 'my_select_filter' );

    Once you’re done, pop it in your theme’s functions.php file.

    In reply to: activity stream gone

    @henrywright-1

    Member

    A child theme of bp-default? Make sure you have copied the files and folders over exactly. So for example:

    bp-default/members/single/messages/compose.php

    gets copied to

    your-child-theme/members/single/messages/compose.php

    In reply to: Email after activation

    @henrywright-1

    Member

    You could also try Welcome Pack by Paul Gibbs – it allows you to send a welcome email and also customise the various more emails BuddyPress sends out:

    https://wordpress.org/plugins/welcome-pack/

    @henrywright-1

    Member
    
    <a href="/members/<?php echo bp_core_get_username( get_the_author_meta( 'ID' ) ); ?>/">
    // put your avatar here
    </a>
    
    In reply to: Search for user role

    @henrywright-1

    Member

    @shanebp could the user’s role be assigned programmatically to an xprofile field? That would then be searchable using the standard member search

    @henrywright-1

    Member

    This can’t be done using BuddyPress as it comes out of the box. You’d need a plugin or some custom code which allows users to save a image file to their profile data.

    @henrywright-1

    Member

    Just wrap a <a href...> around that statement. That will turn the avatar into a link.

    @henrywright-1

    Member

    @pelaso as bphelp said, it actually explains how to do that in the members-loop.php template.

    @henrywright-1

    Member

    @kingdgm

    The BuddyPress Jobs Board is the best place to start:

    BP Jobs Board

    @henrywright-1

    Member

    @hnla

    As you say both approaches are valid which makes the choice difficult. A Codex guide on the advantages and disadvantages of each approach would be V useful. I find the attraction with bp-default is it is tried and tested. That said, the template hierarchy allows me to ‘get my house in order’ – everything in my theme that is BP is filed nicely under a community folder which makes good sense for maintenance or development down the line.

    I’m sure there are more advantages with each route so a Codex guide on this would certainly be useful to me at least.

    @henrywright-1

    Member

    @hughshields

    This can only be explained as a huge job. You would need to know both CSS and HTML to achieve that. I’d suggest reading up on those two technologies if you’re just getting started. Some knowledge of PHP, JS and Ajax would be helpful too although you’d just need to know what parts of the templates are best to avoid messing with.

    @henrywright-1

    Member

    @kingdgm

    BuddyPress with the help of the right plugins from the WordPress plugin repository (https://wordpress.org/plugins/) can do everything you’ve mentioned.

    11. Projects: Members can start projects and invite other members to join (kind of groups)

    This is the one point I’m not sure about off the top of my head. It may need some custom code as I’m not aware of a plugin that does this.

    @henrywright-1

    Member

    Yes definitely agree with that! especially in this case where loading the theme compat stuff unnecessarily will cause a little extra overhead.

    Can I ask – would you take this approach? e.g. still use a child of bp-default? or would you opt to use the new template hierarchy? I have always been an admirer of the bp-default theme (not so much the styles (I dequeue the CSS) but more so the ajax and js that comes with it).

    @henrywright-1

    Member

    @hnla apologies should have explained that a bit better – i’m not assuming, I think BP does the assuming. Take a look at the last line of Boone’s post:

    BP Theme Authors: make sure your theme registers 'buddypress' support

    @henrywright-1

    Member

    @modemlooper Thanks, I’ll give that a shot but then I may decide not to edit them altogether as they work well already. I could add my own .js elsewhere

    @hnla the site I’m working on was built pre BP 1.7 so uses a child theme of bp-default. I thought that BP assumes add_theme_support for bp-default child themes?

    @henrywright-1

    Member

    This snippet is what you need to paste into your file:

    <?php 
    wp_tag_cloud( array( 'number' => '8' ) ); 
    ?>

    If you are already using a tag cloud then find it and remove it. A basic tag cloud will look something like this:

    wp_tag_cloud()

    @henrywright-1

    Member

    @applegateian each checkbox should have a unique ‘id’ which you can use to target specific checkboxes.

    Do you have a link to your page with the checkboxes on it?

    @henrywright-1

    Member

    Do you mean a WordPress tag cloud as in wp_tag_cloud()?

    <?php 
    wp_tag_cloud( array( 'number' => '8' ) ); 
    ?>
Viewing 25 replies - 226 through 250 (of 574 total)
Skip to toolbar