Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 1,701 through 1,725 (of 3,787 total)
  • @danbp

    Participant

    @amedic,
    Which menu are you talking about and where do you add that element ? In dashboard apparence > menu or with a custom function or else ?

    @danbp

    Participant

    I was running WP and BBPress… and user where handled as forum user by bbPress. Now you use BP and bbpress aside.
    Deactivate bbpress and make sure you have only one member page (and no one in trash too). Sync BP profiles with WP – all this can be done in BP settings. Check that all is working correctly, then reactivate bbPress.

    Now if it still doesn’t work, sorry for you, but there is no result without effort. You have an issue and we’re trying to debug it.

    I presume you have no local install where you could test previously from prod site ?

    Keep Twenty Twelve active and deactivate all plugins, as the issue may come from a js conflict which we have to isolate at first.

    If you use some mu-plugin or custom functions in bp-custom.php, think to remove them temporary.

    @danbp

    Participant

    I can confirm that Raindrops theme is working correctly with BP and taht the admin bar is showing up to logged in users.

    Deactivate and delete the admin bar plugin. Remove also any custom code you have added in the past concerning the toolbar. The idea is to revert back to a fully standard WP install.

    If this doesn’t work, you have to go to your db and check the wp_options table for the toolbar setting.
    Search for option_name hide-loggedout-adminbar where value must contain 1.

    @danbp

    Participant

    Are users allowed to change their avatar ? See BP settings.
    If yes:
    Test with Twenty Fourteen theme and without any plugin as BP.
    Also, while testing, enable debug mode in wp-config (from false to true).

    In reply to: Custom URL for Users

    @danbp

    Participant

    hi @dangersparkjm,

    add this to bp-custom.php define ( 'BP_ENABLE_ROOT_PROFILES', true );

    Codex reference:

    Changing Internal Configuration Settings

    @danbp

    Participant

    you’re welcome !

    @danbp

    Participant

    Please use the code button when you publish code !

    First, you can’t use a function name twice. (setup_globals)
    Second, it’s more easier to do after reading the correct documentation:

    bp_notifications_add_notification

    And to find some answers once you have this information:
    http://stackoverflow.com/questions/23148948/add-a-custom-notification-in-buddypress

    The dev discussion around the new notification system:
    https://buddypress.trac.wordpress.org/ticket/5148

    And the appropriate filter bp_notifications_get_notifications_for_user which let non BP component hook into notification:
    https://buddypress.trac.wordpress.org/changeset/7578

    @danbp

    Participant

    Hi,

    i’m not familiar with bp-attachment yet, so sorry in advance.
    First, I would check that BP is installed and setup correctly and test it with Twenty something theme, and all other plugins deactivated.

    An error occurred. Please try again later. is only used in one place: bp-core/bp-core-attachment.php
    This error is related to bp_attachments_get_plupload_default_settings function, which controls some default settings to get plupload to work on your install.

    Read through it to see what is checked by this function, and maybe you will have an idea of which plugin or theme is messing up the upload process. It’s probably nothing important (pictures are uploaded), but you see that message, which is weird, of course. A little js conflict perhaps. Or a plugin with some bad code or not correctly updated…

    The other reason i tell you to re-check BP settings, is this URL to a profile.
    http://www.adventureridingnz.co.nz/members/members-2/martin_worswick/
    Can you explain why you use /members/members-2/ and how you built it ?

    Usually, a profile URL looks like this: `http://www.adventureridingnz.co.nz/members/martin_worswick/
    `
    As the attachment API use js, it is possible that the uploader doesn’t find the correct way to end the upload, or something like that, due to this URL.

    Headlights call from a Guzzi. πŸ˜‰

    @danbp

    Participant

    @umar007, it’s not a problem, it’s how it’s intended to work. πŸ˜‰

    Above snippet handles the activity output, not the activity filters. I wrote also it’s a kind of all or nothing thing….
    Understand that if you have, for example, an activity wall showing only updates and posts, you can’t filter this wall by new member or profile information. You can’t filter what you deactivated !

    You can use another approach, by adding eventually other filters or use a specific scope on the template, for example updates, which will show by default an activity wall of only updates, but where users can get all other activities if they use the one or other avaible filter.

    As example, try:

    
    function my_bp_add_custom_activity_dropdown_filter() {
    
    //This filters the activity loop by new blog posts, blog comments and forum topics.
    
            $types = 'new_blog_post,new_blog_comment,bbp_topic_create,new_forum_topic'; 
    ?>
     
            <option value="<?php esc_attr_e( $types ); ?>">New Content</option>
     
    <?php
    }
    add_action( 'bp_activity_filter_options', 'my_bp_add_custom_activity_dropdown_filter' );

    Hope to be clear. πŸ˜‰

    @danbp

    Participant

    The mistake comes from you ! You probably confused bp-legacy and bp-default. You must use the id’s and classes used by bp-default theme, not thoose comming from buddypress legacy templates.

    BP-default was designed to be used by BP < 1.7/1.9. Now, BP can be used with any theme…

    When you check for CSS names, read the page source (right click on browser screen > show source).

    First screenshot is the whats-new form. You highlighted the CSS and can see that it has nothing to do with the css rule you try to apply to activity avatar.
    The div there is called whats-new-avatar and the class is photo.

    Code source is in bp-default/activity/post-form.php

    Try
    div#whats-new-avatar .photo {}

    Idem for the second screenshot. It’s the activity page of bp-default theme, which use different names as the actual buddypress template.

    Bp-default theme is building a list for activities. Means you’re in a ul/li serrie. Avatars are somewhere inside a li.
    You have to try something like

    ul#activity-stream .photo {}

    All concerned templates are in bp-default/activity/

    Can’t help you more as i stopped to use bp-default since a few years now. Simply keep in mind that you’re working on an old theme which has not much to do with the way BP is currently handling with themes.

    Codex contains some old reference to bp-default if you have other issue with that theme.

    Keep your eyes open and have a nice day. πŸ™‚

    @danbp

    Participant

    Glad you got it from the right forum. Thank you for sharing.

    @danbp

    Participant

    To create a shortcode, you use the same function as in the mentionned topic and instead echoing, you return what you need. Like this:

    function bpfr_message_shortcode() {	
    $author = get_the_author();
    $message = 'Login to send a message to this author !';
    
    if( is_user_logged_in() ) {
    	return '<a href=" '.wp_nonce_url( bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?r=' . $author ) .' title="Private Message to Author" ">Contact the author</a>';
     } else {
        return $message;
     }
    } 
    add_shortcode( 'ksam', 'bpfr_message_shortcode' );

    Add this to bp-custom.php or your child-theme functions.php.

    Use the shortcode [ksam] at the place you want and you’ll see a Contact the author link.

    Note that I tested it only within a post, meaning you need to be in a post loop to fetch an author.

    @danbp

    Participant

    I tested the snippet on Buddy theme, so i’m pretty sure you have a user menu. This menu is on WP’s Toolbar. You see it when you’re logged in.

    counter menu on Buddy theme

    To choose an item position, you have to do it differently, as explained here:

    [Resolved] Position Notification Counter Bubble after Specific Navigation Tab ID

    For more about menu handling and functions, see WP Codex, as this is not really related to BuddyPress. Now it’s your turn to work a little !

    @danbp

    Participant

    Remove the defines from bp-custom or functions.php and use only the CSS.
    CSS was successfully tested on twenty thirteen.
    Use also F5 to refresh your screen.

    @danbp

    Participant

    @danbp

    Participant

    Check also that your site has the minimum requirements for WP and BP.
    PHP version 5.2.4 or greater
    MySQL version 5.0.15 or greater

    php_memory_limit 32 mo / 64 recommended if BP and some other plugins

    htaccess must contain RewriteEngine On
    Much more here: https://codex.wordpress.org/New_To_WordPress_-_Where_to_Start

    @danbp

    Participant

    Yes you can, but why would you do that as all those counters are already in the user menu (on top right, under Howdy) and on each profile ? Tsssss…., but you’re the boss ! πŸ˜‰

    To count friends use friends_get_friend_count_for_user( bp_loggedin_user_id() );
    To count messages use bp_get_total_unread_messages_count( bp_loggedin_user_id() )

    Complete solution

    function my_counter_nav_menu($menu) {  
    
    $notif_url = bp_core_get_user_domain(bp_loggedin_user_id()) .'notifications/';
    $friends_url = bp_core_get_user_domain(bp_loggedin_user_id()) .'friends/'; 
    $msg_url = bp_core_get_user_domain(bp_loggedin_user_id()) .'messages/';    
          
        if (!is_user_logged_in())
            return $menu;
        else
            $notif = '
    
    <li><a href=" ' .$notif_url. ' ">Notif ['. bp_notifications_get_unread_notification_count( bp_loggedin_user_id() ) .']</a></li>
    <li><a href=" ' .$friends_url. ' ">Friends ['. friends_get_friend_count_for_user( bp_loggedin_user_id() ) .']</a></li> 
    <li><a href=" ' .$msg_url. ' ">Messages ['.  bp_get_total_unread_messages_count( bp_loggedin_user_id() ) .']</a></li>
    
    ';
    				
        $menu = $menu . $notif;
        return $menu;
    }
    add_filter( 'wp_nav_menu_items', 'my_counter_nav_menu' );

    Bu yardΔ±m olabilir ! πŸ˜‰

    @danbp

    Participant

    Add this to bp-custom.php and give a try ! Should show at the left of the logout button on Buddy theme nav bar

    function my_nav_menu_notif_counter($menu) {  
    
    $url = bp_core_get_user_domain(bp_loggedin_user_id()) .'notifications/';   
           // condition: user must be loggedin
            if (!is_user_logged_in())
                    return $menu;
            else
                    $notif = '<li><a href=" ' .$url. ' ">Notif ['. bp_notifications_get_unread_notification_count( bp_loggedin_user_id() ) .']</a></li>';
    				
                    $menu = $menu . $notif;
                    return $menu;
    }
    add_filter( 'wp_nav_menu_items', 'my_nav_menu_notif_counter' );

    @danbp

    Participant

    Sorry, my chinese is inexistent ! Can you reformulate please ?

    @danbp

    Participant

    @lo133,

    i modified your topic by adding the correct URL to bp-reshare (by @imath) on Github.

    Note that it’s an old plugin and that you can have some issue with it. If it’s the case, feel free to contact the author. Here the topic where you can add your comment. Topic is in french, but since past BuddyCamp in Brighton, imath is well versed in english, so you can write him in english of course !

    @danbp

    Participant

    @toggerybob select any of the permalink option EXCEPT default

    @danbp

    Participant

    Use the CSS for this, as said previously.

    @danbp

    Participant

    @danbp

    Participant

    Thank you for sharing.

    @danbp

    Participant

    When you override CSS, use !important to get the new rule to work. Cibling the ID is also a good practice in this case.

    #buddypress div.activity-avatar img.avatar {
    height: 40px!important;
    width: 40px!important;
    }
Viewing 25 replies - 1,701 through 1,725 (of 3,787 total)
Skip to toolbar