Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 1 through 25 (of 558 total)
  • Avatar of henrywright
    henrywright
    Moderator

    @henrywright

    Thanks for your feedback @00mark. The buddypress.org site was actually open sourced back in the spring so you can now checkout, review, and patch the code yourself (if you want to). :)

    Ref: http://buddypress.org/2014/03/open-sourcing-buddypress-org/

    Avatar of henrywright
    henrywright
    Moderator

    @henrywright

    Also, take a look at the Your BuddyPress forum for links shared by the community.

    Avatar of henrywright
    henrywright
    Moderator

    @henrywright

    Hi @tightflks

    Try adding this to your theme’s functions.php file:

    function my_signup_redirect( $user_id, $user_login, $user_password, $user_email, $usermeta ) {
        wp_redirect( home_url() . '/members/' . $user_login . '/profile/edit/group/1/' );
        exit();
    }
    add_action( 'bp_core_signup_user', 'my_signup_redirect', 10, 5 );
    Avatar of henrywright
    henrywright
    Moderator

    @henrywright

    You could do this:

    echo '100' . bp_displayed_user_id();

    So, if the value of bp_displayed_user_id() was 1, then 1001 would be echo’d on screen.

    That said, I don’t see anything wrong in starting at 1. There’s no shame in being a brand new website. Everyone started at zero, even Facebook

    Avatar of henrywright
    henrywright
    Moderator

    @henrywright

    Hi @robparker,

    May I ask why you’re querying by username and not by user ID?

    You can simply use the author parameter with WP_Query. Using what you linked to as an example:

    $args = array(
        'posts_per_page' => 10,
        'paged' => $paged,
        'ignore_sticky_posts' => 1,
        'author' => $user_id
    );
    $query = new WP_Query( $args );

    Where $user_id will be bp_displayed_user_id() if you’re doing this query on a member’s profile page. Else, it’ll be something else depending on the context in which you’re using WP_Query.

    Avatar of henrywright
    henrywright
    Moderator

    @henrywright

    Hi @beenvy2

    The colour can be changed via CSS. If you’re not familiar with CSS, take a look at this tutorial to get you started.

    Info specific to WordPress can be found in the CSS Codex article.

    Avatar of henrywright
    henrywright
    Moderator

    @henrywright

    I wouldn’t advise editing the user IDs in the database as I have no idea what would happen when WordPress wants to allocate an ID to the next newest member and you’ve already used that particular ID.

    Which number would you like to start at? If it’s not very big then you could always create some dummy users yourself which would take up the first few IDs? Once real users begin to sign up you can delete the dummy users. To my knowledge, the dummy user IDs won’t get recycled.

    Avatar of henrywright
    henrywright
    Moderator

    @henrywright

    I want only the friends to be shown rather than all the members of the website for the chat option

    I’m not very familiar with the plugin’s code. Have you tried asking on the BuddyDev support forum?

    http://buddydev.com/support/forums/

    Avatar of henrywright
    henrywright
    Moderator

    @henrywright

    The hosting package you should choose depends on a few things. In general, give consideration to all of these things:

    • How many visitors you’ll get
    • Is your website’s functionality resource-hungry? Stuff like dynamic image resizing will be a heavy load on the server
    • Price of the hosting package
    • Hosting support. Does the hosting package come with good technical support?
    • Reliability. Is there an uptime guarantee or is it expected that your server will have lots of downtime?
    • more…

    Hopefully that will help you in your research to find a good hosting service.

    Avatar of henrywright
    henrywright
    Moderator

    @henrywright

    Hi @bacigaloop

    Posts are displayed by single.php. Take a look in your theme to see if there is a hook available in that file. If not you could always add one yourself by creating a child theme.

    Ref: http://codex.wordpress.org/Child_Themes

    Avatar of henrywright
    henrywright
    Moderator

    @henrywright

    Hi @flaviamelo

    BuddyPress doesn’t have a Login_Helper class or a change_buddypress_avatar method. Which plugins are you using? This is 99.99% likely to be due to one of them.

    Avatar of henrywright
    henrywright
    Moderator

    @henrywright

    bp_displayed_user_id() requires an echo for display.

    Just to confuse us all! ;)

    Avatar of henrywright
    henrywright
    Moderator

    @henrywright

    bp_displayed_user_id() is the member’s ID so perhaps that’s the same as a membership ID? I’m not sure it matters though as the important part is it’s a unique identifier so whatever name we give it is irrelevant.

    You should be able to add it to your member-header.php file. Which theme are you using? Some themes might not have it so you’ll need to create it yourself if that’s the case. It might be worth reading up on the Template Hierarchy to get a feel of how BuddyPress templates work.

    Avatar of henrywright
    henrywright
    Moderator

    @henrywright

    <?php bp_displayed_user_id(); ?> will work on the member’s profile page.

    Avatar of henrywright
    henrywright
    Moderator

    @henrywright

    Hi @anivarth,

    Check out BP Chat. It’s a “Facebook-like chatting plugin for BuddyPress”.

    Avatar of henrywright
    henrywright
    Moderator

    @henrywright

    Actually it’s not quite the same. On a quick glance, I noticed you have extra <div> tags such as <div class="effect6" style="width:100%;">, and you’re doing a str_replace() on some $_GET variable and also you’re wrapping some of your label’s text in <h2> tags. Not entirely sure if those changes are to blame though. Anyhow, glad you got it resolved :)

    Avatar of henrywright
    henrywright
    Moderator

    @henrywright

    Good point @danbp

    @bloodslayer, you’d need to be logged in as ‘editor’ or upwards (admin or super admin) for my example above to work.

    Avatar of henrywright
    henrywright
    Moderator

    @henrywright

    Hi @bloodslayer

    wp_insert_post() is a function provided by WordPress which lets developers add pages to the database without the need to access the WP admin area.

    So, as an example, you could use it like this:

    $post = array(
        'post_content' => 'This is some content',
        'post_name' => 'this-is-the-page-slug',
        'post_title' => 'I am the title of this page',
        'post_status' => 'publish',
        'post_type' => 'page',
        'post_excerpt' => 'This is the excerpt'
    );
    
    $post_id = wp_insert_post( $post );

    Notes: $post_id will be the ID of the new page or if wp_insert_post() failed (for whatever reason) it will be 0.

    So that’s how you create a new page programmatically. It’s more of a WordPress thing than a BuddyPress thing.

    Avatar of henrywright
    henrywright
    Moderator

    @henrywright

    In the absence of a plugin, you would need to create a front-end form and a server-side processing script which makes use of wp_insert_post().

    Ref: http://codex.wordpress.org/Function_Reference/wp_insert_post

    Avatar of henrywright
    henrywright
    Moderator

    @henrywright

    Hi @bea107

    Did you copy and paste @danbp‘s code? I haven’t tested it myself but if you have copied his code then it doesn’t look like you’ve copied it properly as some of it is certainly missing. For example, where did this bit in your code snippet come from?

    add_filter( ‘bp_core_get_last_activity’ );

    Avatar of henrywright
    henrywright
    Moderator

    @henrywright

    Perhaps your own processing is the cause of the nonce not validating? We still can’t be sure the nonce is the issue here because there’s no helpful error message but it’s a good place to start looking.

    Avatar of henrywright
    henrywright
    Moderator

    @henrywright

    I assume you’re letting BP handle the form processing in the default way and not doing your own processing?

    Can you try using this and see if the problem still happens:

    http://pastebin.com/aX2WS6hZ

    Avatar of henrywright
    henrywright
    Moderator

    @henrywright

    Hi @godavid33

    It’s likely the WP nonce is invalid. Usually you get a message such as “Are you really sure you want to do this?” so I can understand why the blank page looks weird.

    Have you modified the form at all? Perhaps you could paste the form’s markup into pastebin? I’ll take a look to see if I can see anything wrong

    Avatar of henrywright
    henrywright
    Moderator

    @henrywright

    Very nice plugin @shanebp!

    Avatar of henrywright
    henrywright
    Moderator

    @henrywright

    I think the field visibility settings are applicable to the member who is performing the setting.

    The suggested way to do what you want would be to make your notes profile field hidden to all non-admin members.

    The first step would be to create /wp-content/themes/your-theme/buddypress/members/single/profile/edit.php inside your theme.

    You can copy the contents of edit.php from:

    bp-templates/bp-legacy/buddypress/members/single/profile/edit.php

    Then you need to modify edit.php. In edit.php, find <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?> and add the following immediately after it:

    if ( ! current_user_can( 'manage_options' ) && ( bp_get_the_profile_field_name() === 'notes' ) )
        continue;

    Note: I’m assuming your field name is notes

Viewing 25 replies - 1 through 25 (of 558 total)