Search Results for 'custom activity page'
-
AuthorSearch Results
-
March 7, 2011 at 8:17 pm #107108
In reply to: How do I add a menu item on the profile page?
VirtualiParticipantOf coarse, simple. I’m understanding you now, just add another tab right?
Adding the screen function will add the tab next to your profile markup tab: Add to bp-custom.php. You were almost correct on your first approach.
`function my_test_setup_nav() {
global $bp;
bp_core_new_nav_item( array( ‘name’ => __( ‘test’ ), ‘slug’ => ‘test’, ‘parent_url’ => $bp->loggedin_user->domain . $bp->slug . ‘/’, ‘parent_slug’ => $bp->slug, ‘screen_function’ => ‘my_profile_page_function_to_show_screen’, ‘position’ => 40 ) );bp_core_new_subnav_item( array( ‘name’ => __( ‘Home’ ), ‘slug’ => ‘test_sub’, ‘parent_url’ => $bp->loggedin_user->domain . $bp->slug . ‘/’, ‘parent_slug’ => $bp->slug, ‘parent_slug’ => $bp->slug, ‘screen_function’ => ‘my_profile_page_function_to_show_screen’, ‘position’ => 20, ‘item_css_id’ => ‘test_activity’ ) );
function my_profile_page_function_to_show_screen() {
//add title and content here – last is to call the members plugin.php template
add_action( ‘bp_template_title’, ‘my_profile_page_function_to_show_screen_title’ );
add_action( ‘bp_template_content’, ‘my_profile_page_function_to_show_screen_content’ );
bp_core_load_template( apply_filters( ‘bp_core_template_plugin’, ‘members/single/plugins’ ) );
}
function my_profile_page_function_to_show_screen_title() {
echo ‘something’;
}
function my_profile_page_function_to_show_screen_content() {echo ‘weee content’;
}
}`March 3, 2011 at 7:52 pm #106746austinfavMemberI would assume it goes in the bp-custom.php file located in your plugins directory. However when i loaded it there I got all types of errors. The code given above is more of a reference then anything else i suppose, as there are a load of misspellings.
February 28, 2011 at 4:20 pm #106516In reply to: Add “Posts” Tab? Very frusterated
austinfavMemberI was looking EVERYWHERE for the same thing and nobody would answer my questions. I finally found out how to accomplish adding a tab to the nav bar.
Paste this code into your bp-custom.php file located in your “plugin” directory:
function my_test_setup_nav() {
global $bp;
bp_core_new_nav_item( array( ‘name’ => __( ‘test’ ), ‘slug’ => ‘test’, ‘parent_url’ => $bp->loggedin_user->domain . $bp->slug . ‘/’, ‘parent_slug’ => $bp->slug, ‘screen_function’ => ‘my_profile_page_function_to_show_screen’, ‘position’ => 40 ) );bp_core_new_subnav_item( array( ‘name’ => __( ‘Home’ ), ‘slug’ => ‘test_sub’, ‘parent_url’ => $bp->loggedin_user->domain . $bp->slug . ‘/’, ‘parent_slug’ => $bp->slug, ‘parent_slug’ => $bp->slug, ‘screen_function’ => ‘my_profile_page_function_to_show_screen’, ‘position’ => 20, ‘item_css_id’ => ‘test_activity’ ) );
function my_profile_page_function_to_show_screen() {
//add title and content here – last is to call the members plugin.php template
add_action( ‘bp_template_title’, ‘my_profile_page_function_to_show_screen_title’ );
add_action( ‘bp_template_content’, ‘my_profile_page_function_to_show_screen_content’ );
bp_core_load_template( apply_filters( ‘bp_core_template_plugin’, ‘members/single/plugins’ ) );
}
function my_profile_page_function_to_show_screen_title() {
echo ‘something’;
}
function my_profile_page_function_to_show_screen_content() {echo ‘weee content’;
}
}
add_action( ‘bp_setup_nav’, ‘my_test_setup_nav’ );This will add a button into the nav bar named “test” which redirects back to the profile page. It would only take a bit more tweaking to get it to display the page you want. Hope this helps.
February 14, 2011 at 1:23 am #105358acesParticipantI’m trying to keep this conversation within topic here where you originally mentioned it, rather than wild in the activity stream.
I’ve managed to get forums working on a 1and1 shared hosting…
I don’t think any of the wp-config.php or .htaccess or php.ini tricks for increasing memory work for 1and1 shared hosting. Even if wordpress tells you it has more, it will still behave as if it hasn’t…
As ray said, you should disable as many plugins as possible at least till the forums are enabled. I already mentioned what I had done about plugins here
To find out how much memory a plugin or theme is using I use https://wordpress.org/extend/plugins/wp-system-health/.
You appear to be using buddypress social theme – which I haven’t tried but it has lots of options and may use lots of memory. With limited memory it would be better to use a simple child theme of buddypress default and customise it.
February 10, 2011 at 2:36 pm #105083Boone GorgesKeymasterChanging the tabs is an appearance issue; it doesn’t have any effect on the activity items shown.
Try the following function in your functions.php or bp-custom.php. The logic is this: If the query string is empty (as it is when you first visit the activity page) and there is nothing in the POST variable that says which scope to show (that is, the user has not clicked ‘All Activity’ and thus set an AJAX request into effect), then show only my group content.
`function bbg_my_groups_activity_default( $qs ) {
if ( empty( $qs ) && empty( $_POST ) ) {
$qs = ‘scope=groups’;
}return $qs;
}
add_filter( ‘bp_ajax_querystring’, ‘bbg_my_groups_activity_default’, 999 );`February 9, 2011 at 7:03 pm #105033In reply to: Where are the functions
modemlooperModeratorhas_members()
next_member()
rewind_members()
members()
the_member()
bp_rewind_members()
bp_has_members( $args = ” )
‘type’ => $type,
‘page’ => $page,
‘per_page’ => 20,
‘max’ => false,
‘include’ => false, // Pass a user_id or comma separated list of user_ids to only show these users
‘user_id’ => $user_id, // Pass a user_id to only show friends of this user
‘search_terms’ => $search_terms, // Pass search_terms to filter users by their profile data
‘populate_extras’ => true // Fetch usermeta? Friend count, last active etc.bp_the_member()
bp_members()
//Misc
bp_members_pagination_count()
bp_members_pagination_links()
bp_member_user_id()
bp_get_member_user_id()
bp_member_user_nicename()
bp_get_member_user_nicename()
bp_member_user_login()
bp_get_member_user_login()
bp_member_user_email()
bp_get_member_user_email()
bp_member_is_loggedin_user()
bp_member_avatar( $args = ” )
bp_get_member_avatar( $args = ” )
‘type’ => ‘thumb’,
‘width’ => false,
‘height’ => false,
‘class’ => ‘avatar’,
‘id’ => false,
‘alt’ => __( ‘Member avatar’, ‘buddypress’ )bp_member_permalink()
bp_member_link()
bp_get_member_link()
bp_member_name()
bp_get_member_name()
bp_member_last_active()
bp_get_member_last_active()
bp_member_latest_update( $args = ” )
bp_get_member_latest_update( $args = ” ) {
‘length’ => 15bp_member_profile_data( $args = ” )
‘field’ => false, // Field name
bp_member_registered()
bp_get_member_registered()
bp_member_add_friend_button()
bp_add_friend_button( $members_template->member->id, $friend_status )
bp_member_total_friend_count()
bp_get_member_total_friend_count()
bp_member_random_profile_data()
bp_member_hidden_fields()
bp_directory_members_search_form()
bp_total_site_member_count()
bp_get_total_site_member_count()
//Check bp-core-templatetags.php for comments about nav tags
bp_get_loggedin_user_nav()
bp_get_displayed_user_nav()
bp_get_options_nav()
bp_get_options_title()
//Avatar Tags
bp_has_options_avatar()
bp_get_options_avatar()
bp_comment_author_avatar()
bp_post_author_avatar()
bp_loggedin_user_avatar( $args = ” )
bp_get_loggedin_user_avatar( $args = ” ) {
‘type’=> ‘thumb’,
‘width’=> false,
‘height’=> false,
‘html’=> truebp_displayed_user_avatar( $args = ” )
bp_get_displayed_user_avatar( $args = ” )
‘type’=> ‘thumb’,
‘width’=> false,
‘height’=> false,
‘html’=> truebp_avatar_admin_step()
bp_get_avatar_admin_step()
bp_avatar_to_crop()
bp_get_avatar_to_crop()
bp_avatar_to_crop_src()
bp_get_avatar_to_crop_src()
bp_avatar_cropper()
//Other
bp_site_name()
bp_core_get_wp_profile()
bp_get_profile_header()
bp_exists( $component_name )
bp_format_time( $time, $just_date = false )
bp_word_or_name( $youtext, $nametext, $capitalize = true, $echo = true )
bp_your_or_their( $capitalize = true, $echo = true )
bp_get_plugin_sidebar()
bp_page_title()
bp_get_page_title()
bp_styles()
bp_has_custom_signup_page()
bp_signup_page()
bp_get_signup_page()
bp_has_custom_activation_page()
bp_activation_page()
bp_get_activation_page()
bp_search_form_enabled()
bp_search_form_action()
bp_search_form_type_select()
bp_search_form()
bp_log_out_link()
bp_custom_profile_boxes()
bp_custom_profile_sidebar_boxes()
bp_create_excerpt( $text, $excerpt_length = 55, $filter_shortcodes = true )
bp_is_serialized( $data )
bp_total_member_count()
bp_get_total_member_count()
bp_signup_username_value()
bp_get_signup_username_value()
bp_signup_email_value()
bp_get_signup_email_value()
bp_signup_with_blog_value()
bp_get_signup_with_blog_value()
bp_signup_blog_url_value()
bp_get_signup_blog_url_value()
bp_signup_blog_title_value()
bp_get_signup_blog_title_value()
bp_signup_blog_privacy_value()
bp_get_signup_blog_privacy_value()
bp_signup_avatar_dir_value()
bp_get_signup_avatar_dir_value()
bp_current_signup_step()
bp_get_current_signup_step()
bp_signup_avatar( $args = ” )
bp_get_signup_avatar( $args = ” ) {
‘size’ => BP_AVATAR_FULL_WIDTH,
‘class’ => ‘avatar’,
‘alt’ => __( ‘Your Avatar’, ‘buddypress’ )
bp_signup_allowed()
bp_get_signup_allowed()
bp_blog_signup_allowed()
bp_get_blog_signup_allowed()
bp_account_was_activated()
bp_registration_needs_activation()
bp_mentioned_user_display_name( $user_id_or_username )
bp_get_mentioned_user_display_name( $user_id_or_username )
bp_get_option( $option_name )
bp_ajax_querystring( $object = false )
bp_last_activity( $user_id = false, $echo = true )
bp_user_has_access()
bp_user_firstname()
bp_get_user_firstname()
bp_loggedin_user_link()
bp_get_loggedin_user_link()
bp_loggedinuser_link()
bp_displayed_user_link()
bp_get_displayed_user_link()
bp_user_link()
bp_displayed_user_id()
bp_current_user_id()
bp_loggedin_user_id()
bp_displayed_user_domain()
bp_loggedin_user_domain()
bp_displayed_user_fullname()
bp_get_displayed_user_fullname()
bp_user_fullname() { echo bp_get_displayed_user_fullname()
bp_loggedin_user_fullname()
bp_get_loggedin_user_fullname()
bp_displayed_user_username()
bp_get_displayed_user_username()
bp_loggedin_user_username()
bp_get_loggedin_user_username()
bp_current_component()
bp_current_action()
bp_current_item()
bp_action_variables()
bp_root_domain()
bp_get_root_domain()
//Conditionals
bp_is_blog_page()
bp_is_my_profile()
bp_is_home()
bp_is_front_page()
bp_is_activity_front_page()
bp_is_directory()
bp_is_page($page)
bp_is_active( $component )
bp_is_profile_component()
bp_is_activity_component()
bp_is_blogs_component()
bp_is_messages_component()
bp_is_friends_component()
bp_is_groups_component()
bp_is_settings_component()
bp_is_member()
bp_is_user_activity()
bp_is_user_friends_activity()
bp_is_activity_permalink()
bp_is_user_profile()
bp_is_profile_edit()
bp_is_change_avatar()
bp_is_user_groups()
bp_is_group()
bp_is_group_home()
bp_is_group_create()
bp_is_group_admin_page()
bp_is_group_forum()
bp_is_group_activity()
bp_is_group_forum_topic()
bp_is_group_forum_topic_edit()
bp_is_group_members()
bp_is_group_invites()
bp_is_group_membership_request()
bp_is_group_leave()
bp_is_group_single()
bp_is_user_blogs()
bp_is_user_recent_posts()
bp_is_user_recent_commments()
bp_is_create_blog()
bp_is_user_friends()
bp_is_friend_requests()
bp_is_user_messages()
bp_is_messages_inbox()
bp_is_messages_sentbox()
bp_is_notices()
bp_is_messages_compose_screen()
bp_is_single_item()
bp_is_activation_page()
bp_is_register_page()
bp_the_body_class()
bp_get_the_body_class( $wp_classes, $custom_classes = false )February 7, 2011 at 5:07 am #104792VirtualityStudioMemberHas anyone figured this one out? I tried putting the code into custom.php and functions.php… but nothing happened. I second the idea above to merge all the personal, friends, groups and mentions into one as well… people are so used to the way fb works, it would be nice to do that for them
February 4, 2011 at 4:47 pm #104605In reply to: My 2 Cents
@mercimeParticipantSimply put, different loops and template tags for index, category, single pages etc. in WP. Then you have different loops and additional template tags for various components – activity, members, groups etc – in BP.
https://codex.buddypress.org/developer-docs/custom-buddypress-loops/February 3, 2011 at 9:43 pm #104542In reply to: My 2 Cents
alanchrishughesParticipantI guess all I am saying is I would like to see things more customizable and easy to follow. I’m sure it makes sense to programmers like you guys, but to designers like me, I just spent all afternoon messing with all the members/single/ php files trying to figure out how each /activity, /activity/just-me/, /activity/friends/, etc page works and pulls in that particular feed and I just realized all five of these pages some how come from the /activity/activity-loop.php file, and that file doesn’t seem very clear cut either.
February 3, 2011 at 8:05 pm #104534In reply to: My 2 Cents
alanchrishughesParticipantWould either of those methods result in faster loading times? Or both probably equal? To me, something like this should obviously be built and only exist if a theme includes it, not something built directly into Buddypress and requiring a hack (or whatever you would consider that) just to not have it.
I also think it would be great to have a tutorial/codex on how to Buddypress’ify a theme or inividual pages without having to use the template pack. Being able to build pages from scratch would be a giant step forward for Buddypress I would think. There is just so much going on behind the programming scene it is spilling over into the front end scene.
I’ve tried to follow this a bit https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/ to produce something like I described in my previous post, but I don’t see the connection between bp_has_activities() and the “accepted arguments.”
bp_has_activities(friends)
…seemed like the only logical way it could work, but no luck. And like I already mentioned, all the files for each activity page are all slurred together and editing them individually, is that even possible? I can’t even find the file for the @mentions page.
@modemlooper I’m not sure how you took what I said that way, I am suggesting for more options and forcing less built in stuff that not everybody wants, but still can be created, like the navigation bar.
I don’t see why any one would not enjoy a notification page, but that is something you could simply not link to if you don’t want it and wouldn’t require any special programming knowledge.
If more people than me have been suggesting a more Facebook like flow, I would guess it is because both do the same thing, but Facebook isn’t as confusing, Buddypress is too anal about things trying to divide everything up and categorize too much. Does anybody really need 5 tabs under the activity tab?
February 3, 2011 at 5:04 pm #104520In reply to: My 2 Cents
Boone GorgesKeymaster1. If you don’t want the nav bar, you can suppress it with the following line in your wp-config.php file:
`define( ‘BP_DISABLE_ADMIN_BAR’, true );`
or you can manually unhook it with the following lines in your theme’s functions.php:
`remove_action( ‘wp_footer’, ‘bp_core_admin_bar’, 8 );
remove_action( ‘admin_footer’, ‘bp_core_admin_bar’ );`
No need to hack anything.2. A vanilla installation of BP, using the default theme, loads one stylesheet: style.css. That stylesheet includes two others: _inc/css/default.css and _inc/css/adminbar.css. There is also a stylesheet for the Dashboard view. If you are using the template pack and are finding too many stylesheets, it’s possible that your WP theme is to blame. In this respect, BP is being fairly austere in the number of CSS files it’s loading. If you want to override things, there’s no reason to “hack” – just put your own overriding styles after the import commands in style.css.
3. This is a great idea, I think. Perhaps you could file a formal enhancement request at trac.buddypress.org (same username/pw as this site)
4. The way that the default theme handles profile, activity, friends etc separately, provides a large amount of straightforward customization in child themes. If bp-default had them consolidated, child theme authors would have to rebuild the pages to make them separate. We are erring on the side of enhanceability. You are welcome to build a child theme that incorporates these parts of the profile into a single page – I bet a fair number of people would be interested in such a thing.
February 2, 2011 at 7:01 pm #104448Paul Wong-GibbsKeymasterDoes this occur on the default theme? After you’ve disabled all plugins? Or have you customised your activity loop in some way? (looks like the activity stream item permalink/single page template)
January 18, 2011 at 12:49 am #103196pcwriterParticipantHurray!
The code snippet works just fine in functions.php. That’s good news for a theme designer: no worries about a theme overriding a user’s custom configurations in bp-custom.php.
Now I’m off to add “Group Landing Page” as an option in my new theme. It’ll be incorporated with the theme’s “Alternate Header” option too.Then I’ve got to adapt the code to work with member profiles. My initial attempts have failed, but I’ve been known to be persistent at times
For future reference, here’s the code snippet to add to functions.php or, if you have created it, bp-custom.php.
You can see it in action here: http://rspacesandbox.org/ Click any group.`function redirect_groups_to_forum() {
global $bp;
$path = clean_url( $_SERVER );
$path = apply_filters( ‘bp_uri’, $path );
if ( bp_is_group_home() && strpos( $path, $bp->bp_options_nav ) === false )
bp_core_redirect( $path . $bp->bp_options_nav . ‘/’ );
}
add_action( ‘wp’, ‘redirect_groups_to_forum’ );`January 17, 2011 at 10:08 pm #103184thealchemistMemberWell, I have created the bp-custom.php file, added the code they suggested, uploaded … and nada. So, I am likely missing something obvious. How does the page know to even ‘look’ at the bp-custom.php file? Also, the trick suggested works for groups … how would / could this be altered to work on the profile?
January 15, 2011 at 7:29 pm #102931In reply to: remove activity stream from front page
r-a-yKeymasterCreate a new WP page with the verbiage you want to add.
You might want to create your new page with a custom page template:
https://codex.wordpress.org/Pages#Creating_Your_Own_Page_TemplatesThen set this new page as your frontpage:
https://codex.wordpress.org/Settings_Reading_SubPanelJanuary 14, 2011 at 9:00 am #102827murasakiParticipantcool, let me know how it goes. im doing something similar, instead of the basic activity page, i want a custom page to show, and i give the user the option to navigate to their activity
January 10, 2011 at 9:47 pm #102507In reply to: Converting a Theme for BP Compatibility
thealchemistMemberSo the instructions for “automatic conversion” aren’t very thorough cuz I keep discovering pages not listed that need to be manually converted. Registration and activation pages etc.
But here’s a different ? regarding customization. I am trying to get the member profile/login section into the sidebar. http://xtreme.transmutationsciences.com/activity and I have copied some code from another theme and have gotten that section in there. However, as you can see, the subsequent widgets aren’t cooperating and acting as if the login box was right justified.
The original sidebar was:
``
The significant item in the other theme’s code is “
When I copied the new sidebar I originally kept their version of the sidebar hook. But the section did not display. When I substituted “ the section displayed but then I have the alignment problem.
Can anyone diagnose my ineptitude?
Full sidebar code from the theme I an borrowing the code from.
`<a href="”><a class="button logout" href="”>
<?php printf( __( ' You can also create an account.’, ‘buddypress’ ), site_url( BP_REGISTER_SLUG . ‘/’ ) ) ?>
<form name="login-form" id="sidebar-login-form" class="standard-form" action="” method=”post”>
<input type="text" name="log" id="sidebar-user-login" class="input" value="” />
<input type="submit" name="wp-submit" id="sidebar-wp-submit" value="” tabindex=”100″ />
`
January 5, 2011 at 10:00 pm #102017ErlendParticipantYeah, also tried making new pages, same thing. But, I’m starting to think this is a caching problem. I tried to log out and see if I could see it too then, but the system actually won’t log me out when browsing the introduction page. Browsing any other child or custom page shows the login prompt, so I am indeed logged out, the website seems to forget that whenever I’m browsing a top-tier page.
We use W3 Total Cache, I’ll ask over there.
December 25, 2010 at 10:49 am #101263In reply to: “My Favorites” Plugin
gulfleeParticipantcannot found bp-custom.php and there is a “favorite” when clicked it change to “remove favorite”, link show
http://xxx.com/activity/favorite/3/?_wpnonce=d6f0625717 but it did not save, when page refreshed it change back to “favorite” state.
any help, thanks in advanceDecember 17, 2010 at 5:41 pm #100804Boone GorgesKeymasterAre you talking about the Home, About, Blog, Community, Extend, and Support tabs on buddypress.org? Those are WP Pages. In BP 1.3, there will be better support for having a setup like this that is totally customizable, but even now bp-default does something almost exactly like this.
The way that individual user navigation (profile, activity, groups, etc) is laid out on this site is just like it is in bp-default.
Or am I missing something?
November 22, 2010 at 5:45 pm #98900In reply to: Disable Activity Stream for Profiles?
Brajesh SinghParticipantHi,
The reason it is happening perhaps hide_sitewide is not set to 1 for private activity. Most probably a conflict with some plugin as you already mention above. Can you check the database activity table to confirm that ?Have you put the code
`
define(“BP_DEFAULT_COMPONENT”, “profile”);
`
In wp-content/plugins/bp-custom.php, It will make the profile accessible if put in bp-custom.php. yes,it simply change the default profile component(landing page on profile) from activity to xprofile.November 22, 2010 at 5:45 pm #98899In reply to: Activity Stream on Home Page under a Sticky Post
imjscnParticipantI’m not sure which way is better, seems lots of people have done great jobs.
Here’s a tip I took as guiding to start my bp customizing journey : http://wpmu.org/how-to-widgetize-a-page-post-header-or-any-other-template-in-wordpress/After registered the widgets and created the new page template, style the widget area. Create Pages you need to use for bp compoents (activity, groups, members, …) ,choose the new page template.
Use Custom Field Template plug in or other means to write contents and bp loops in the widget areas. Custom Field Template says its php code is experimental, but my blog doesn’t have problem with it.Another way I want to try but not tried yet– copy bp componets pages and add widget in it. Not sure if this can be done or not.
November 22, 2010 at 4:24 am #98851In reply to: Setting Activity as BP home page.
r-a-yKeymasterCustom permalink structure shouldn’t matter, but have you tried resaving the permalink settings?
Also try disabling any plugins that might interfere with this. Including redirect and caching plugins.As a last resort, you can always create a page template copying exactly what is in /buddypress/bp-themes/bp-default/activity/index.php and setting that as the front page…
November 22, 2010 at 4:19 am #98850In reply to: Setting Activity as BP home page.
eorMembermy BP version is 1.2.6. I’m also using a custom permalink structure…./%post_id%/%postname%/
Do you think the custom structure may be affecting it? Should I use one of the common settings instead?
Also I’m using a non BP theme that I’ve used the template pack for and converted css etc.
Thanks,
EORNovember 17, 2010 at 5:40 pm #98513BytewoopyMemberI tried this method with Buddypress links, I want to make them my front page.
I got the links to show up on a custom page but the formatting is all screwed up and the share button seems to be broken. I think it is not loading the css file for the links or the added javascripts. How would I go about updating it so that it works properly?
This is what my custom template page looked like. I had to copy over the bp-links-default directory over to my-buddypress theme.
`
`Here is the actual page http://www.playbookit.com/frontpage
Anyone know how to fix this? I’ve been at it for a few days.
-
AuthorSearch Results