Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • jessy
    Participant

    @jessy-marco

    I do not understand, what exactly is happening, should you be more clear?

    Try to use twentytwelve theme and just add there snippets. See what happen. What is your theme?

    Thank you.


    jessy
    Participant

    @jessy-marco

    For all private social network, but login and register page is available to access.

    add_action( 'template_redirect', 'redirect_to_login_page_for_premium_members' );
    function redirect_to_login_page_for_premium_members() {
      if( (!is_page_template("loginpage.php")) && (!is_user_logged_in()) && (!is_page("Register") )) {
          $page = get_page_by_title( 'Login' );
          wp_redirect(get_permalink($page->ID));
          exit();
      }
    }
    

    Restrict buddypress components just for logged-in users:
    *UNTESTED

    add_action( 'template_redirect', 'redirect_to_login_page_for_premium_members' );
    function redirect_to_login_page_for_premium_members() {
      if( (is_buddypress()) && (!is_user_logged_in()) ) {
          $page = get_page_by_title( 'Login' );
          wp_redirect(get_permalink($page->ID));
          exit();
      }
    }
    

    jessy
    Participant

    @jessy-marco

    functions.php


    jessy
    Participant

    @jessy-marco

    in post form we need to customize budypress.js because after sumbmision it generate textarea. Any idea how?


    jessy
    Participant

    @jessy-marco

    I believe we should write a ticket, because, it would be nice to get id if the item.


    jessy
    Participant

    @jessy-marco


    jessy
    Participant

    @jessy-marco

    How to customize “profile/change-avatar/” page?

    I have used “index-action-change-avatar.php” template, but javascript is not loaded and you can not crop image by your needs. I have copied all the content from /profile/change-avatar.php default buddypress template directory.

    Thank you.


    jessy
    Participant

    @jessy-marco

    I just love to be part of the community 🙂


    jessy
    Participant

    @jessy-marco

    I copy it into bp-custom.php:
    Fatal error: Call to undefined function xprofile_set_field_data() in bp-custom.php

    In my functions.php I used action, still do not work:

    
    function oi_bp_actions_and_filters() {
      xprofile_set_field_data('user_status', 39, 'spam');
    add_action('bp_init', 'oi_bp_actions_and_filters');

    jessy
    Participant

    @jessy-marco

    Paste “add_action statement” also to the same place within your <?php ?> tags, otherwise it will no work.


    jessy
    Participant

    @jessy-marco

    Directory: wp-content/plugins/bp-custom.php

    Paste there this code, everything, just like it is:

    function bp_change_default_profile_sub_nav() {
    	if ( bp_is_user_settings() ) {
    		global $bp;
    		$args = array(
    			'parent_slug'     => $bp->settings->slug, // Slug of the parent
    			'subnav_slug'     => 'profile',  // The slug of the subnav item to select when clicked
    		);
    	bp_core_new_nav_default($args);
     	}
    }
    
    // Change default sub navigation of profile settings main tab navigation
    add_action( 'bp_setup_nav', 'bp_change_default_profile_sub_nav', 5);

    jessy
    Participant

    @jessy-marco

    You can share your nice website, if you like 🙂


    jessy
    Participant

    @jessy-marco

    Your thinking is on the right way. 🙂

    Go to plugins directory and create file: bp-custom.php and the whole code just paste there and wrap it all by php tags: <?php ?>


    jessy
    Participant

    @jessy-marco

    The latest BP and WP, and thanks to maintainers for updating codex. Pretty sweet.


    jessy
    Participant

    @jessy-marco

    This works for me: codex


    jessy
    Participant

    @jessy-marco

    Solved:
    Define $group_id = NULL in the functions where errors appear, like this:

    function settings_screen( $group_id = NULL )
    function settings_screen_save( $group_id = NULL )
    function create_screen( $group_id = NULL )

    jessy
    Participant

    @jessy-marco

    I did, I palced the code into function display(), but without luck. Still Same Error.

    [Edited – please use pastebin or gist to share large chunks of code. ]


    jessy
    Participant

    @jessy-marco

    You welcome.


    jessy
    Participant

    @jessy-marco

    Solved:

    <?php
    // Enable Shortcodes for Side-wide Activity Stream
    function oi_add_shortcodes_to_activity_stream() {
    		add_filter( 'bp_get_activity_content_body', 'do_shortcode', 1 );
    }
    add_action('bp_init', 'oi_add_shortcodes_to_activity_stream');
    ?>
Viewing 19 replies - 1 through 19 (of 19 total)
Skip to toolbar