Search Results for 'custom activity page'
-
Search Results
-
Hi,
I have created a welcome page on my BP site, where are some nice buttons to go to specific pages.
Now I need to link them, so that after clicking, user goes to appropriate page.
While http://platformatrop.traweczka.pl/activity/ or http://platformatrop.traweczka.pl/members/ work great, i have problem with profile, groups and notifications links, as they all have “*.pl/members/user_name/notifications and so on.
Can someone please help me with this issue?
Kindly,
Trawa šI’ having this old but new issue. Old because I forget about it until there is a new Buddypress update, then I’m painfully reminded again.
I’ve been showing User Posts to the WordPress site on the Buddypress Activity page by using an awesome function I found in a Forum. It adds a Button to Buddypress Nav, titled (POSTS), with post count. These are all the posts that a user posted to the WordPress site. The problem I’m having is everytime Buddypress comes out with a new Update I have to pass on it because it interferes with the (Posts) Nav and Vice Versa. I do not want to keep losing out on these updates but I also do not want to lose the user Posts button on the activity page.
Here is the function I used, can anyone tell me how to fix this:/* ------------------------------Start BP Post in profile code for function-------------------- */ function importSomething(){ return include_once 'bp-custom.php'; } add_action( 'bp_setup_nav', 'buddyboss_child_bp_nav_adder' ); add_action( 'bp_template_content', 'profile_buddyboss_child_loop' ); bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) ); function buddyboss_child_bp_nav_adder() { global $bp; $post_count = count_user_posts_by_type( $bp->displayed_user->id ); bp_core_new_nav_item( array( 'name' => sprintf( __( 'Posts <span>%d</span>', 'my-poems' ), $post_count ), 'slug' => 'Articles', 'position' => 250, 'show_for_displayed_user' => true, 'screen_function' => 'buddyboss_child_list', 'item_css_id' => 'articles', 'default_subnav_slug' => 'public' )); } function buddyboss_child_list() { add_action( 'bp_template_content', 'profile_buddyboss_child_loop' ); bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) ); } /*------- This is end of the code for above function ---------*/ function profile_buddyboss_child_loop() { $myposts = get_posts( array( 'posts_per_page' => -1, 'author' => bp_displayed_user_id(), 'post_type' => 'post' )); if( ! empty($myposts) ) { foreach($myposts as $post) { setup_postdata( $post ); if (has_post_thumbnail( $post->ID ) ): $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'sidebar-smallthumbnew' ); else : $image[0] = "http:/...com/wp-content/uploads/2015/10/userpost.jpg"; endif; echo '<li class="sidebar mostpop post-' . $post->ID . '"><span id="postimage"><a href="' . get_permalink($post->ID) . '"><img src="' . $image[0] . '" /></a></span><div id="postinfo"><a href="' . get_permalink($post->ID) . '">' . get_the_title($post->ID) . '</a></div></li>'; } echo '</ul>'; wp_reset_postdata(); } else { ?> <div class="info" id="message"> <p><strong><?php bp_displayed_user_fullname(); ?></strong> has No posts.</p> </div> <?php } } /* This is end of the code for above function */ remove_filter('bp_setup_nav',''); function count_user_posts_by_type( $userid, $post_type = 'post' ) { global $wpdb; $where = get_posts_by_author_sql( $post_type, true, $userid, true); $count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts $where" ); return apply_filters( 'get_usernumposts', $count, $userid ); } /* ------------------------------This is end of the code for post in profile above function-------------------- */Hello, I made up a site which users can upload their own posts.
So, on the profile page, I want to have a page which shows all of their own posts.On activitiy tab, I can choose ‘posts’ category but if I click it even if I’ve posted posts, it doesn’t show any.
Also want this post tab to contain custom post type’s posts.
Right now I just have
-activity
-profile
-notification
-messages
-freinds
-groups
-forums
-media
-settingsI want add ‘posts’ tab. How to do it ? Thank you š
I have created a custom page in my theme and it is almost the same as the activity page.
I’ve added the activity post form and activity loop. It is all working fine, but the mentions popup doesn’t appear when writing out a mention name in the post form. This is because the mentions.js and mentions.css is not adding (though it does add and work if I turn comments on for that custom page in the WordPress admin). Also some plugins that use the activity post form such as activity plus plugin is not being added to the post form, but it works fine on the activity page. someone else had this problem: https://wordpress.org/support/topic/use-on-custom-page-template?replies=6.
Is there something I’m supposed to add to make buddypress load up properly on a custom page?
Topic: Corrupt “Pages” tab content?
NOTE: when I tried to submit a bug ticket, I was unable to login to do so. I kept getting the same error at https://buddypress.trac.wordpress.org/newticket – FORBIDDEN – when I clicked on login.
ISSUE: (answers to your questions are below this description) THE SITE IS NOT LIVE NOW.
I am unable to associate blank pages titled Members, Groups, Register, Activity, Activation as needed. I get this message: The following active BuddyPress Components do not have associated WordPress Pages: Members, Activity Streams, User Groups, Activate, Register. RepairWhen I click on repair, it goes to the BuddyPress Settings “Pages” tab where for some of those items, there is no box to select the page to associate with the component, but only a “View” button (that goes to the blank page set up which is actually still blank, having only a page title) OR there is nothing next to the component at all – neither selection box nor View button.
I have deactivated, deleted, and reinstalled both BuddyPress and bbPress several times, to no avail. PLEASE HELP. I am using Themco’s X theme. Note that I am somewhat new.
1. Which version of WordPress are you running? WordPress 4.3.1 running X theme.
2. Did you install WordPress as a directory or subdomain install? Newbie! But this is on Bluehost and is a add-on domain to my primary domain.
3. If a directory install, is it in root or in a subdirectory?
4. Did you upgrade from a previous version of WordPress? If so, from which version? 4.3.1 was installed when I installed BuddyPress
5. Was WordPress functioning properly before installing/upgrading BuddyPress (BP)? e.g. permalinks, creating a new post, commenting. Yes
6. Which version of BP are you running? 2.3.4
7. Did you upgraded from a previous version of BP? If so, from which version? Not sure, but if so, likely the one previous.
8. Do you have any plugins other than BuddyPress installed and activated? If so, which ones? LOTS: Askimet, All in One SEO Pack, Backup Creator, bbPress, BuddyPress Captcha, Bulletproof Security, Contact Form 7, Revolution Slider (though not using yet), Wordfence Security. I had quite a few more, but deactivated them.
9. Are you using the standard WordPress theme or customized theme? Customized
10. Have you modified the core files in any way? No, I don’t know how.
11. Do you have any custom functions in bp-custom.php? Not that I know of (I’m not that sophisticated a user – sorry!)
12. If running bbPress, which version? Or did your BuddyPress install come with a copy of bbPress built-in? 2.5.8
13. Please provide a list of any errors in your serverās log files. Please provide instructions on how to look this up.
14. Which company provides your hosting? Bluehost
15. Is your server running Windows, or if Linux; Apache, nginx or something else? My computer is running Windows 8.1. It is a stand alone computer.
Basic Trouble Shooting:
Noted above in description plus deactivating unused plugins.I have a custom page and filtering the activity using parameters:
if ( bp_has_activities( bp_ajax_querystring( 'activity' ) . '&action=activity_update&per_page=20&scope='With the BuddyPress Follow plugin, does anyone know the parameter to filter the activity for who you are following?
I’ve tried a few like
scope=followingscope=bp-followinghttps://wordpress.org/plugins/buddypress-followers/
Any help appreciated
Topic: buddypress frontend links
Hi,
I use a custom theme. wordpress 4.3.1, and now I installed buddypress 2.3.4.
The buddypress pages weren’t created for some reason (“Membership – Anyone can register” was turned on when installing buddypress). I created the pages manually and assocciated them in buddypress settings (registrate, activate, activity stream, members).First of, when activating Buddypress plugin then this error (same kind of error occour everytime I visit any page in admin when buddypress is activated, so it doesn’t appear just on activiating the buddyress plugin, the error doesn’t occour when buddypress is deactivated):
2015/10/12 13:24:37 [error] 23074#0: *3 FastCGI sent in stderr: “PHP message: PHP Notice: bp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init(). Please see Debugging in WordPress for more information. (This message was added in version 1.7.) in /my/path/to/html/wp-includes/functions.php on line 3622″ while reading response header from upstream, client: my.computers.ip.number, server: mywebpage.com, request: “GET /wp-admin/plugins.php?activate=true&plugin_status=all&paged=1&s= HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9000”, host: “my.host.ip.address”, referrer: “http://myserver.com/wp-admin/plugins.php?plugin_status=all&paged=1&s”
Second issue is the frontend links, none of them work correctly, all links direct me to my users recent blog posts. The links in the URL look like this:
mywebpage.com/members/myusername/
mywebpage.com/members/myusername/friends/
mywebpage.com/members/myusername/messages/
mywebpage.com/members/myusername/notifications/
mywebpage.com/members/myusername/profile/
mywebpage.com/members/myusername/settings/“Log out” link works! when pressing the log out link I am logged out and redirected to /wp-admin/, on that page I have a message where it says: “You must log in to access the page you requested.”. It’s pretty logical that you need to be loged in to be able to access log out page, isn’t it?
For the links to work properly I guess I have to copy some of the buddypress files to my custom theme in wp-content/themes/mycustomtheme, but what do I need to copy?
/Robert
Hi,
I currently have a site developed using a BuddyPress specific theme, and it looks as though that element is going to become a part of a larger website – imagine it like a blog with a community section.
The BuddyPress theme that I’m using is no good for normal website pages and customising templates has caused me enough problems already – I need to be able to use a different theme for the other pages.
I considered multiple themes plugin, but I’d need to disable one theme to edit the other and it seems messy.
I looked into multi-site, but I find conflicting information everywhere I look and I’m going round in circles.
The community generates content (custom post type submitted from their profile) which I want to be able to use on the ‘main’ website – I don’t want any activity or other data on the main site. I also would prefer one login, although different users need to be put on different paths i.e. the community users get directed to their profile on login/registration; other site users need to remain on the page they were on or the ‘main’ site – I think I can handle that with a sidebar login widget.
Should I use multisite? If so, I would prefer to use subfolder vs subdomain.
Other options are separate installs, and hacking the code so that user tables are shared. I’ve also found BuddyPress Multi-blog (which doesn’t seem right because I want the community element contained apart from the CPT content) and installing BP on a secondary blog: https://codex.buddypress.org/legacy/getting-started/install-buddypress-on-a-secondary-blog/
The latter seems the way to go, but then WP advice re using multi-site puts me off. Also, the community site uses a lot of plugins so I’m worried about compatibility using MS.
Many thanks in advance if anyone can release me from my turmoil!
Hello, I am running buddypress on WordPress 4.3.1 running X – Child Theme: Renew theme. I have a site that uses Activity Streams and Groups components only.
For my groups home pages, I have created a custom Front Page with a welcome message and the activity from the group.
I dont use the member directory or any BP user profiles. I would like to keep the text from the activity on the page, but I dont want it to be a Link to their profile.
For example: ” MannyMember joined the group GroupOne 6 days, 23 hours ago ”
MannyMember and GroupOne are both links. I would like to remove the link for the member and group if possible, but more importantly just the Member.
I was hoping I could use a filter to modify the output of bp_activity_action(); but cannot figure it out. Any help is greatly appreciated.
Thanks.
Hi, I’m using latest version of buddypress. I want to customize my activity page to show updates on activity page for me and my friends only, so I’ve used the codes which was given by @R-A-Y. But I want to make the blogs updates to be shown in activity page to everyone irrespective of friend, but I don’t know how to achieved that because the code which I’ve used is restricting to me and my friends only. And even I want to give “News” update in activity page can anyone suggest me how to achieve that two things.
The codes which I’ve used for activity page which shows activity updates for me and my friends is given below:–
add_action( 'bp_loaded', array( 'BP_Home', 'init' ) ); /** * BP Home */ class BP_Home { /** * Our activity scope name. * * @var string */ const SCOPE_NAME = 'swa-home'; /** * Multiple scopes we will be using for our 'Home' tab. * * @var string */ protected static $scopes = ''; /** * Marker to determine when to stop our object buffer * * @var bool */ public $should_end_buffer = false; /** * Static initializer. */ public static function init() { return new self(); } /** * Constructor. */ public function __construct() { if ( ! bp_is_active( 'activity' ) ) { return; } // set our default scopes $this->set_default_scopes(); // add in our hooks $this->hooks(); } /** * Sets the default scopes used by the "Home" tab. * * Filterable. */ private function set_default_scopes() { $scopes = array(); $scopes[] = 'just-me'; $scopes[] = 'mentions'; if ( bp_is_active( 'friends' ) ) { $scopes[] = 'friends'; } self::$scopes = apply_filters( 'bp_activity_home_scopes', $scopes ); } /** * Hooks. */ private function hooks() { add_action( 'bp_activity_screen_index', array( $this, 'set_home_scope' ) ); add_action( 'wp_logout', array( $this, 'reset_activity_scope_cookie' ) ); add_filter( 'bp_after_has_activities_parse_args', array( $this, 'filter_activity_loop' ) ); add_action( 'bp_before_activity_type_tab_all', array( $this, 'ob_start' ), 0 ); add_action( 'bp_before_activity_type_tab_friends', array( $this, 'ob_end_clean' ), 0 ); add_action( 'bp_before_activity_type_tab_groups', array( $this, 'ob_end_clean' ), 0 ); add_action( 'bp_before_activity_type_tab_favorites', array( $this, 'ob_end_clean' ), 0 ); } /** * Override some activity default / AJAX parameters if we're on the Sitewide Activity page. */ public function set_home_scope() { // reset cookie for logged-out users if ( ! is_user_logged_in() ) { $this->reset_activity_scope_cookie(); return; } // override post title add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'post_title' ), 20 ); // if we have a post value already, let's add our scope to the existing cookie value if ( !empty( $_POST['cookie'] ) ) { $_POST['cookie'] .= '%3B%20bp-activity-scope%3D' . self::SCOPE_NAME; } else { $_POST['cookie'] = 'bp-activity-scope%3D' . self::SCOPE_NAME; } // set the activity scope by faking an ajax request (loophole!) if ( ! defined( 'DOING_AJAX' ) ) { $_POST['cookie'] .= "%3B%20bp-activity-filter%3D-1"; // reset the selected tab @setcookie( 'bp-activity-scope', self::SCOPE_NAME, 0, '/' ); //reset the dropdown menu to 'Everything' @setcookie( 'bp-activity-filter', '-1', 0, '/' ); } } /** * Resets BP's activity scope cookie to 'all'. * * Only reset if the activity scope is set to 'swa-home' since the 'Home' tab * will not be available when logged out. * * We do this when a user is logging out or is logged out. */ public function reset_activity_scope_cookie() { if ( ! empty( $_COOKIE['bp-activity-scope'] ) && self::SCOPE_NAME === $_COOKIE['bp-activity-scope'] ) { @setcookie( 'bp-activity-scope', 'all', 0, '/' ); $_COOKIE['bp-activity-scope'] = 'all'; } } /** * Filter the activity loop with our custom scope. */ public function filter_activity_loop( $r ) { if ( self::SCOPE_NAME !== $r['scope'] ) { return $r; } // add in our custom scopes $r['scope'] = self::$scopes; // change default empty activity text as well while we're at it add_filter( 'gettext', array( $this, 'override_empty_message' ), 10, 3 ); return $r; } /** * Start the object buffer before any activity tabs are outputted. */ public function ob_start() { if ( ! is_user_logged_in() ) { return; } ob_start(); } /** * Replace the "All Members" tab with "Home" on the Sitewide Activity page. * * Try to determine when to stop our object buffer and inject our "Home" tab. * Accounts for whether certain BP components are active or not. */ public function ob_end_clean() { if ( ! is_user_logged_in() ) { return; } if ( false === $this->should_end_buffer ) { $this->should_end_buffer = true; $buffer = ob_get_contents(); ob_end_clean(); // find the default 'All Members' tab $all_start = strpos( $buffer, '<li class="selected" id="activity-all">' ); $all_end = strpos( $buffer, '</li>', $all_start ); // our custom 'Home 'tab $home = '<li class="selected" id="activity-' . self::SCOPE_NAME . '"><a href="' . bp_get_activity_directory_permalink() . '">' . __( "Home", "bp-home" ) . '</a></li>'; // output and replace the 'All Members' tab with the 'Home' tab echo substr_replace( $buffer, $home, $all_start, $all_end + 5 ); } } /** * Post title override. * * Whee! Dirty hack! */ public function post_title() { global $wp_query; $wp_query->post->post_title = __( 'Home', 'bp-home' ); } /** * Overrides the "Sorry, there was no activity found. Please try a different filter." message. * * @param string $translated Current translated text * @param string $untranslated Untranslated text * @param string $domain Domain for the string * @return string */ public function override_empty_message( $translated, $untranslated, $domain ) { if ( 'Sorry, there was no activity found. Please try a different filter.' === $untranslated ) { $translated = sprintf( __( "It looks like you're new here. To see some activity, try posting an update or <a href='%s'>adding a friend</a>.", 'bp-home' ), bp_get_members_directory_permalink() ); } return $translated; } }I’m trying to add a link into the main WordPress menu that points to a subnav of a Buddypress page.
I see there’s an option for menu items that point directly to the main Buddypress pages (/activity/, /forums/, /groups/, /achievements/, etc), including my own custom slug (/kag/). I’d like to have a menu option that points to a subnav of my custom page (/members/USERNAME/kag/ship/) but since it has a varaible in it I can’t just setup a custom link (unless there’s something I’m missing).
Can anyone tell me how to add items to the Buddypress section of the Menu editor, or how to make a direct link to the subnav page?
I’m using the most current WordPress, Buddypress, bbpress, and BadgeOS. I’m using the Firmasite theme.
I’m trying to override the default /_inc/global.js file with a custom one, but after deregister the original one, every post_update is run twice, so each post is duplicated.
I’m using
Wordpress version 4.3
buddypress version 2.3.3
typal-makewp005 Chld themeIn bp-custom.php:
function deregister_bp_scripts(){ wp_deregister_script( 'dtheme-ajax-js'); wp_dequeue_script( 'dtheme-ajax-js'); } add_action('wp_enqueue_scripts', 'deregister_bp_scripts'); function mytheme_enqueue_scripts() { $params = array( 'my_favs' => __( 'My Favorites', 'buddypress' ), 'accepted' => __( 'Accepted', 'buddypress' ), 'rejected' => __( 'Rejected', 'buddypress' ), 'show_all_comments' => __( 'Show all comments for this thread', 'buddypress' ), 'show_x_comments' => __( 'Show all %d comments', 'buddypress' ), 'show_all' => __( 'Show all', 'buddypress' ), 'comments' => __( 'comments', 'buddypress' ), 'close' => __( 'Close', 'buddypress' ), 'view' => __( 'View', 'buddypress' ), 'mark_as_fav' => __( 'Favorite', 'buddypress' ), 'remove_fav' => __( 'Remove Favorite', 'buddypress' ), 'unsaved_changes' => __( 'Your profile has unsaved changes. If you leave the page, the changes will be lost.', 'buddypress' ), ); wp_enqueue_script( 'custom_dtheme-ajax-js', get_stylesheet_directory_uri() . '/js/global.js', array( 'jquery' ) ); wp_localize_script( 'custom_dtheme-ajax-js', 'BP_DTheme', $params ); } add_action('wp_enqueue_scripts', 'mytheme_enqueue_scripts');I already tried to set different priority , to move this code to functions.php instead of bp-custom.php, to use the twentyfifteen theme, to make a child of the bp-default theme, but no way…
What I need to do is to add some custom fileds to the activity form to create a facebook-like link-preview.I followed this post in which they say you have to add to global.js the new fields’ values, but I don’t want to change the global.js file directly (for next updates)
https://buddypress.org/support/topic/adding-a-second-element-for-posting-with-an-activity/
Does anybody know what am I doing wrong?