Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)

  • israelwebdev
    Participant

    @israelwebdev

    @ultimateuser @sameast I hacked together a widget in my functions.php using the Grunion Contact Form
    `function custom_buddypress_member_contact($args) {
    global $bp;
    extract($args); // Make before_widget, etc available.
    echo $before_widget;
    echo $before_title . __(‘Contact Me’,TEMPLATE_DOMAIN) . $after_title;
    echo do_shortcode(‘[contact-form widget=2 to=”‘.$bp->displayed_user->userdata->user_email.'” subject=”(‘ . get_option( ‘blogname’ ) . ‘) question” show_subject=”yes” ]’);
    echo $after_widget;
    }

    wp_register_sidebar_widget(‘BuddyPress_Contact_Form’, ‘BuddyPress Contact Form’, ‘custom_buddypress_member_contact’, array(‘description’ => ‘BuddyPress Member Contact Form’));
    `


    israelwebdev
    Participant

    @israelwebdev

    try sticking it in your plugins/bp_custom.php file, like:

    `function stuff_i_want_triggered_after_bp_loads(){
    global $bp;
    bp_core_remove_subnav_item( $bp->activity->slug, ‘favorites’ );
    }
    add_action(‘wp’, ‘stuff_i_want_triggered_after_bp_loads’);`


    israelwebdev
    Participant

    @israelwebdev

    Stopped being lazy and read the code.

    Firstly, I wasn’t paying attention to the “domain” of the strings I was translating, which seemed to be in both buddypress and the theme.

    BuddyPress language file had to be under wp-content/plugins/buddypress/bp-languages/, and be named buddypress-%locale%.mo (and .po) where %locale% is the configured locale, such as en_US

    The theme (from WPMUDev) had its own language files/domain, and those had to be in the theme’s language directory, and called %locale%.mo (and .po), and then a comment in the theme’s functions.php instructed me to:
    `/* uncomment if using custom mo / po file
    function init_theme_localization( $locale ) {
    return “en_US”; //must be same mo or po name in theme languages folder..it could be en_US or bp-en_EN etc
    }
    add_filter(‘locale’,’init_theme_localization’);
    */`

    Phew!


    israelwebdev
    Participant

    @israelwebdev

    not working for me either, hrmph


    israelwebdev
    Participant

    @israelwebdev

    metoo, news?

Viewing 5 replies - 1 through 5 (of 5 total)
Skip to toolbar