Forum Replies Created
-
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.
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:
*UNTESTEDadd_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(); } }In reply to: avatar url insert databasefunctions.phpIn reply to: Rich text editor, tinymceditor in Message Compose?in post form we need to customize budypress.js because after sumbmision it generate textarea. Any idea how?
In reply to: Get Post ID from NotificationI believe we should write a ticket, because, it would be nice to get id if the item.
In reply to: Where iI think I should solve problem if you implement this patch into next release:
https://buddypress.trac.wordpress.org/attachment/ticket/5202/5202.02.patch
https://buddypress.trac.wordpress.org/ticket/5202In reply to: Where iHow 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.
In reply to: Broken Links [Resolved]I just love to be part of the community 🙂
I copy it into bp-custom.php:
Fatal error: Call to undefined function xprofile_set_field_data() in bp-custom.phpIn 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');In reply to: Change default user profile sub navigationPaste “add_action statement” also to the same place within your <?php ?> tags, otherwise it will no work.
In reply to: Change default user profile sub navigationDirectory: 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);In reply to: Change default user profile sub navigationYou can share your nice website, if you like 🙂
In reply to: Change default user profile sub navigationYour 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 ?>In reply to: Unable to find BP_Group_ExtentionThe latest BP and WP, and thanks to maintainers for updating codex. Pretty sweet.
In reply to: Unable to find BP_Group_ExtentionThis works for me: codex
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 )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. ]
In reply to: Enable Shortcodes in Activity Screen of BuddypressYou welcome.
In reply to: Enable Shortcodes in Activity Screen of BuddypressSolved:
<?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'); ?>