Forum Replies Created
-
In reply to: redirect to profile page?
@famous
Try this out. This definitely works if you follow the instructions:
BuddyPress Redirect To Profile Trick Using A Landing Page.In reply to: Help with homepage redirect to Profile Page@henrywright-1
Thanks, I look forward to adding more tips and tricks in the future.
🙂In reply to: New Private Community Plugin For BP@profc
Hi, sorry so late for getting back to you. My ISP has been strange today. I just updated github Repo to 2.1 to allow up to 10 unblocked public pages. As before read the readme.txt and follow the commented instructions in private-community-for-bp.php
https://github.com/bphelp/private_community_for_bpIn reply to: Adding buddypress menu in theme navigation menu@compassseeker
Add the code in the link below to bp-custom.php:
http://pastebin.com/HSpJNLyV
Also see @mercime ‘s replies in the following thread:
https://buddypress.org/support/topic/adding-dynamic-profile-link-to-main-menu-item/In reply to: Help with homepage redirect to Profile Page@fpats
Leaving it commented out will not cause you any issues. Lots of developers use this technique while testing functions with other functions so they don’t loose the code by deleting it.
I can be contacted here:
bphelp.1@gmail.com@fpats
To comment out that block of code in your function just add /* after the opening php tag and before your function. After the last } then add */ before the closing php tag.
Note comments basically prevents php from reading the function.
Here is your function commented:<?php /* //Begin comment function redirect_group_home() { global $bp; $path = clean_url( $_SERVER['REQUEST_URI'] ); $path = apply_filters( 'bp_uri', $path ); if (bp_is_group_home() && strpos( $path, $bp->bp_options_nav['groups']['home']['slug'] ) === false ) { echo "HERE WE GO..."; echo "<PRE>"; print_r($bp->groups->current_group); echo "</PRE>"; echo $bp->groups->current_group->status; echo $bp->groups->current_group->is_user_member; if ($bp->groups->current_group->is_user_member || $bp->groups->current_group->status == 'public') { echo "<PRE>"; print_r($bp->bp_options_nav); echo "</pre>"; exit(); if ($bp->bp_options_nav['groups']['announcements']['slug']) { bp_core_redirect( $path . $bp->bp_options_nav['groups']['announcements']['slug'] . '/' ); } else { bp_core_redirect( $path . $bp->bp_options_nav['groups']['forum']['slug'] . '/' ); } bp_core_redirect( $path . 'welcome/' ); //quick hack for some other tab } } } */ //END COMMENT ?>@fpats
Have you tried temporarily commenting out your function to see if it is causing your issue?@fpats
Did you add it to bp-custom.php? Can you put a copy of it on pastebin and supply the link?@fpats
Did you put the code between opening and closing php tags? I have it working on fresh install of WP 3.6 beta2 and BP 1.8 beta1 so if its not working for you it may be some other code you introduced interfering with the function. That code doesn’t do anything to the profile menu in the top right, it just removes the node in the top left for sitename/dashboard.@fpats
This will remove it for subscribers but leaves it for admin. Add it to bp-custom.phpfunction bphelp_custom_toolbar($wp_toolbar) { global $wp_admin_bar; if ( !current_user_can( 'manage_options' ) ) { $wp_toolbar->remove_node('site-name'); } } add_action('admin_bar_menu', 'bphelp_custom_toolbar', 999);In reply to: non-logged in users access to private pages@profc
Use this plugin. Download the zip file and upload to your plugins directory. Read the readme.txt and make the adjustments in the commented code in private-community-for-bp.php before activating the plugin.
https://github.com/bphelp/private_community_for_bpIn reply to: don’t want registration page to show after login@benjino
This is a great community and I am sorry your issue cannot be resolved. Several people including myself has tried to help you but the issue is that your not comfortable with php. We have pointed you in the right direction but there comes a point when there is an expectation to do your part as well. Please don’t be offended as there are many new users that are in your predicament that are given the advise to hire a developer. I did not intend to offend you so please do not take it that way. If someone told me to wire a house with electricity I would be in your shoes in the beginning but my meticulous nature would kick in and I would study about how to wire a house with electric. Point is if I didn’t know any php I would study it so I did.In reply to: don’t want registration page to show after login@benjino
Then take @hnla ‘s advice. If you don’t know php then you have 3 choices,
1.) learn some php
2.) hire a developer
3.) just don’t play around with anything above your skill level.Without trying to sound rude or condescending you have had more than enough help for your topic and nobody can spoon feed you how to get it done when you don’t even know where to start. My suggestion is start learning php because it will save you some cash. You don’t have to be an expert but learning the basics is essential if you want customizations beyond the “Out of the Box” experience. 🙂
In reply to: don’t want registration page to show after login@benjino
Try following 3) Logged-out menu in this tutorial:
http://wpmu.org/how-to-build-a-facebook-style-members-only-wordpress-buddypress-site/In reply to: redirect to profile page?@famous
Use the last code because I made a slight change.In reply to: redirect to profile page?@famous
Try this just make sure you follow the instructions in the commented code. Place it in bp-custom.php :/* Redirects to profile upon login, and upon logout redirects to activity page unless changed */ function bp_help_redirect_to_profile(){ global $bp_unfiltered_uri; $bphelp_my_front_page = 'activity'; // WARNING: make sure you replace 'activity' in this line to the same thing you set dashboard/settings/reading front page to. if ( !is_user_logged_in() && ( $bp_unfiltered_uri[0] != $bphelp_my_front_page ) ) bp_core_redirect( get_option('home') ); elseif( is_user_logged_in() && ( $bp_unfiltered_uri[0] == $bphelp_my_front_page ) ) bp_core_redirect( get_option('home') . '/members/' . bp_core_get_username( bp_loggedin_user_id() ) . '/profile' ); } add_action( 'wp', 'bp_help_redirect_to_profile', 3 );In reply to: redirect to profile page?@famous
Try this just make sure you follow the instructions in the commented code. Place it in bp-custom.php :/* Redirects to profile upon login, and upon logout redirects to activity page unless changed in line 6 */ function bp_help_redirect_to_profile(){ global $bp_unfiltered_uri; $bphelp_my_home_page = 'activity'; // WARNING: make sure you replace 'activity' in this line to the same thing you set dashboard/settings/reading front page to. if ( !is_user_logged_in() && ( $bp_unfiltered_uri[0] != $bphelp_my_home_page ) ) bp_core_redirect( get_option('home') ); elseif( is_user_logged_in() && ( $bp_unfiltered_uri[0] == 'activity') ) bp_core_redirect( get_option('home') . '/members/' . bp_core_get_username( bp_loggedin_user_id() ) . '/profile' ); } add_action( 'wp', 'bp_help_redirect_to_profile', 3 );In reply to: don’t want registration page to show after login@benjino
This one works for me! Just add it to bp-custom.php or to your themes functions.php between opening and closing php tags./* Add registration menu item to logged out visitors only */ add_filter( 'wp_nav_menu_items', 'bphelp_custom_registration_nav_menu_item' ); function bphelp_custom_registration_nav_menu_item($menu) { if ( is_user_logged_in() ) return $menu; else $customreglink = '<li><a href="' . get_bloginfo('url') . '/register' . '">' . __('Register') . '</a></li>'; $menu = $menu . $customreglink; return $menu; }In reply to: How can I get the activity like facebooks?@henrywright-1
Yes it will display your personal and friends activity only.In reply to: Compatibility Help Please!!@wpgoddess
Never get hung up on one theme because the one you may love the most may be junk as far as coding
(Please don’t take offensive as it is not directed towards any individual). Try others, or hire a well known buddypress web designer like @karmatosed. I mainly do development so looking pretty is more a designers cup of tea but functionality is my thing!@luckyrajiv
Try the plugin in the link I provided instead off editing core files. It is safer to use the plugin. Last time I checked it was working with BP 1.7.2 however I cant promise it will work when BP 1.8 is released and I do not have plans to further update it.In reply to: setting the profile page as main page@programer2013
Expanding on @henrywright-1 suggestion you can add the below code to bp-custom.php
It will prohibit logged out visitors from viewing BP Pages and redirect to registration. Upon login it will direct them to their public profile.define( 'BP_DEFAULT_COMPONENT', 'profile' ); function bp_help_restrict_login_and_redirect_to_profile() { global $bp; $bphelp_change_slug = 'register'; //* if you changed 'register' to 'sign-up' then change 'register' in this variable accordingly EXAMPLE: change 'register' to 'sign-up' *// if ( !is_user_logged_in() && !bp_is_register_page() && !bp_is_activation_page() ) bp_core_redirect( get_option('home') . '/' . $bphelp_change_slug ); elseif( is_user_logged_in() && bp_is_register_page() ) bp_core_redirect( get_option('home') . '/members/' . bp_core_get_username( bp_loggedin_user_id() ) . '/profile' ); } add_action( 'wp', 'bp_help_restrict_login_and_redirect_to_profile', 3 );@ljmac @luckyrajiv
You can try this plugin but I quit updating it because I felt it was obsolete.
https://github.com/bphelp/activity-privacy-componentIn reply to: Redirect Homepage to Profile Page if Logged in@luckyrajiv
Try the snippets I provided in the below thread courtesy of @sbrajesh:
https://buddypress.org/support/topic/redirect-to-profile-page/