Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'custom activity page'

Viewing 25 results - 276 through 300 (of 831 total)
  • Author
    Search Results
  • BackpackersUnion
    Participant

    Is it possible to add an “All” activity tab to the Activity Submenu on a users profile (Personal + Friends = All [Excluding none friends, unlike the main feed])? It appears an issue preventing this was fixed in this trac, but I haven’t seen any successful implementation of this using bp-custom or a child function.php.

    The only viable solution I’ve seen is this plugin which goes beyond what I’d need. Has anyone had any luck implementing this with custom code (or even modifying a page template as a last resort)?

    Thanks!

    BP + WP Current Versions, 2014 theme

    #252456
    danbp
    Participant

    We’re unable to help you for Yoo Helios premium theme.

    Have you assigned a particular template to the mandatory BP pages: activity, members, groups,… ? If yes, remove them, as BP pages must stay “empty”. Just give them a title and nothing else.

    Instead of using an exotic function, better try this solution.

    is_buddypress fn definition: You can tell if a page is displaying BP content by whether the current_component has been defined. More here.

    Naomi
    Participant

    I’m running WP 4.4.2 and Buddypress 2.5.2 on my site http://www.charlottemasoneducation.org

    I’d like to add the member’s city and state to the member profile page right where it says when their last activity was.

    I have added these fields in a theme-my-login-custom.php file in order for them to be part of the registration process to my private site which I’m using the TML plugin for.

    From reading other threads, it sounds like I need to edit the member-header.php file?

    Here is the section that I think I need to add code to. Can you please tell me what code I would need to add and where to add it in order to have those fields show up correctly?

    <?php endif; ?>
    
    	<span class="activity"><?php bp_last_activity( bp_displayed_user_id() ); ?></span>
    
    	<?php do_action( 'bp_before_member_header_meta' ); ?>
    
    	<div id="item-meta">
    
    		<?php if ( bp_is_active( 'activity' ) ) : ?>
    
    			<div id="latest-update">
    
    				<?php bp_activity_latest_update( bp_displayed_user_id() ); ?>
    
    			</div>
    
    		<?php endif; ?>
    
    		<div id="item-buttons">
    
    			<?php do_action( 'bp_member_header_actions' ); ?>
    
    		</div><!-- #item-buttons -->
    
    		<?php
    		/***
    		 * If you'd like to show specific profile fields here use:
    		 * bp_member_profile_data( 'field=About Me' ); -- Pass the name of the field
    		 */
    		 do_action( 'bp_profile_header_meta' );
    
    		 ?>
    
    	</div><!-- #item-meta -->
    
    </div><!-- #item-header-content -->
    
    <?php do_action( 'bp_after_member_header' ); ?>
    
    <?php do_action( 'template_notices' ); ?>
    bradleyrf
    Participant

    Hey everyone,
    First of all, thanks so much for the work and effort you put into BP. It’s amazing what you all do.

    I recently updated to the latest BP and WP versions (the details you requested are below).

    Issues #1 – when someone initially posts into a group, not a reply to a comment, users who have requested All Email option from the BP Group Email Subscription Plugin receive an email using that BP Group Email Subscription plugin’s email template vs. the new BP email templates. If someone replies to the comment, then the new BP email templates work perfectly.

    Issue #2 – the email mentioned in #1 is from wordpress@mydomain.org. while the others are sent from mysite@mydomain.com.

    Thanks for any advice you can send my way.

    1. Which version of WordPress are you running? 4.4.2

    2. Did you install WordPress as a directory or subdomain install? subdomain

    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? From 4.3.3

    5. Was WordPress functioning properly before installing/upgrading BuddyPress (BP)? Yes

    6. Which version of BP are you running? 2.5.2

    7. Did you upgraded from a previous version of BP? If so, from which version? 2.4.2

    8. Do you have any plugins other than BuddyPress installed and activated? If so, which ones?

    Advanced Cron Manager
    Automessage
    Black Studio TinyMCE Widget
    BP Group Hierarchy
    BP Profile Search
    Broken Link Checker
    BuddyBoss Wall
    BuddyDrive
    BuddyPress
    BuddyPress Activity Plus
    BuddyPress Global Search
    BuddyPress Group Email Subscription 3.6.0
    Select BuddyPress Groups Extras
    Select BuddyPress Members Import
    Select BuddyPress Message Attachment
    Select CCL Salesforce Connector
    Contact Form
    Easy Google Fonts
    Events +
    Google Analytics by Yoast
    Google Doc Embedder
    Google Maps
    HiFi
    iframe
    Invite Anyone
    Page Builder by SiteOrigin
    PHP Code Widget
    PHP Snippets
    PopUp Pro
    Deactivate
    Post Tags and Categories for Pages
    Deactivate
    Private Community For BP Lite
    Redirection
    Search shortcode
    Shortcodes Ultimate
    Simple Follow Me Social Buttons Widget
    Simple:Press
    UberMenu 2 – WordPress Mega Menu Plugin
    User Role Editor
    Wordfence Security
    WordPress HTTPS
    WP-FormAssembly
    WPMU DEV Dashboard

    9. Are you using the standard WordPress theme or customized theme? BuddyBoss

    10. Have you modified the core files in any way? Nope

    11. Do you have any custom functions in bp-custom.php? Yes

    12. If running bbPress, which version? Or did your BuddyPress install come with a copy of bbPress built-in? Not running

    13. Please provide a list of any errors in your server’s log files. None

    14. Which company provides your hosting? BlueHost

    15. Is your server running Windows, or if Linux; Apache, nginx or something else? Apache

    damagomez
    Participant

    Hello, im having problems with the registration and activity pages on my website, im new at this, so i dont know if i’ve made a mistake and where i might have made it…

    I installed buddypress through wordpress plug-in search engine, and then went to settings and set up everything as i wanted, edited the profile fields as i needed, and then when i tried to visit the pages i only get the title of the page and the rest is blank, as if it where a normal page.

    I’ve been searching different forums about people having the same problem, but i haven’t been able to find a solution, they’ve either been posted a lot of years ago, or they just say solved and do not share how they solved it.
    If anyone can help, i will appreciate it a lot!!

    I have read the codex as many suggested, but it did not help because i did everything as it indicate to do it.
    I created the register and activate page and then assigned them under Settings/Buddypress/Pages, how the codex indicates so. (i did not edit in any way the pages, i only created and assigned them.
    I made sure that in Settings/General under membership the “anyone can register” is checked.
    I’ve checked if the register.php and activate.php files do exist.
    I read that it might be a bug, so i tried uninstalling this version (V2.5.2) and installing V2.5.1 and V2.3.5, just in case that would fix it…

    I truly don’t know what else to do.
    Its my first website and i do not know a lot of coding, im learning as i go.
    Could it be a bug in the plug-in? if so… how can i fix it?

    Just in case it helps, my host company is hostgator, WordPress is updated to the lates version, so is buddypress.

    I have the following plug-ins installed (i know they are a lot, but since i do not know how to code, i sort of need them…) :

    Admin Custom Login
    Black Studio TinyMCE Widget
    Black Studio Touch Dropdown Menu
    BP Registration Options
    BuddyPress
    BuddyPress Cover Photo
    BulletProof Security
    Confirm User Registration
    Contact Form 7
    Duplicate Post
    Hide Admin Bar From Non-admins
    Lightbox Plus Colorbox
    Meta Slider
    No Right Click Images Plugin
    Page Builder by SiteOrigin
    PMPro KISSmetrics
    Polylang
    Protect My Contents
    Quick Page/Post Redirect Plugin
    SB Welcome Email Editor
    SiteOrigin Widgets Bundle
    Spacer
    Title Remover
    Wordfence Security
    WordPress Access Control
    WP Bouncer
    WP Maintenance Mode

    Thanks in advance for your help!

    nyodulf
    Participant

    WordPress v4.4.2
    BuddyPress v2.5.1

    I’m having an issue with the link to a member’s Activity when viewing their profile. When clicking on it I am taken to the <site_root>/activity page, instead of <site_root>/members/<member_name>/activity . This also happens with ‘Groups’ (but not ‘Notifications’).

    At the moment I am using bp-custom.php to change the default tab to ‘Profile’. If I remove that definition, the single member’s page correctly defaults to the Activity tab and there is content visible there.

    I would be grateful for any help. In particular I would appreciate any information on how to track down the redirect sequence and what code is controlling it. I printed the output of the rewrite_rules_array and it contained no mention of ‘activity’, but using an online redirect tracker I discovered that the request to the member’s activity returns a 301 redirect to the site-wide version.

    I know that it is standard practice to disable any other 3rd party items to test, but at the moment that would be a last resort because it often leads to significant time spent setting up content and plugins again and I am under some pressure to keep the site as is for the moment.

    #251885
    sharmavishal
    Participant

    am creating a front.php page with regards to BP 2.4 Group Home Page feature. The group front page is created perfectly fine. But an additional tab now comes up in the group nav “Activity” and when i click on it its all css/js messedup design wise.

    Am i making some mistake? Do i need to remove activity tab if i got a custom front.php?

    Thanks

    #251464
    danbp
    Participant

    I’m afraid you can’t built another member’s directory. “Members” is a component and it use a dynamic page to output anything related to members.

    The only thing who change, is eventually the content template part (member directory vs. profile for example: both activity are on the same pseudo “page”.

    The only way i see for your case, is to add a custom filter and to define eventually another default output for member directory, based on the current filter. But it’s the user who has to choose what he want to see there.

    Default filter are recently active, recently subscribed and alphabetical order. To add more option, included “artists”, try to add “member type” or create you r own plugin to filter.

    Here the related codex page for member-type

    And codex page for how to add a filter on members directory.

    For the @ use, the correct way to use it is when you want to mention (@mention) somebody. And so far i can see this here, it doesn’t actually work on bp.org ! 😉

    So just keep in mind that you publish on a public forum. It is not intended to call mods individually. We’re not consultants here (we don’t charge you), but simple volonteers trying to guide and help other users.

    #251421
    kamarr
    Participant

    Special thanks to @valuser and @shanebp for helping create a custom member directory by adding the Buddypress members-loop.php to my themes page.php, and renaming it page-local-members-php.

    *For the step by step, here is the link to the discussion – https://buddypress.org/support/topic/how-to-display-additional-member-directory/#post-251127

    There are now two Directories listed on the website. The current issue resides with the styling. The original member directory appears to obtain its structure from the Buddypress index.php file located in the wp-content/plugins/buddypress/bp-themes/bp-default/members-folder, while the Secondary ‘Custom’ member directory is missing the original functions like the search, role search, order by, and some basic css such as removing the bulletins on the member list.

    What would be the best solution to fix this.

    Would adding the code from index.php file from the wp-content/plugins/buddypress/bp-themes/bp-default/members-folder solve it?

    *I wonder, would it be possible to make an additional page template that would shows on the wordpress frontend part of the plugin on the Dashboard/settins/buddypress/pages section as an additional directory.
    That way you could route it from to a page from the front end the same way you route member, activity stream, register, and activate page keeping all files it in the buddypress folder.

    Update:

    I’ve tried adding the code from the index.php file located in the wp-content/plugins/buddypress/bp-themes/bp-default/members-folder to the index.php file located in the wp-content/themes/my-theme/-folder however the default styling and functions are still missing.

    Any help on this will be greatly appreciated.

    #251336
    jrunfitpro
    Participant

    What’s the best way to make a full width BP page and add custom tabs to either the Activity Stream or Profile page?

    Thanks,

    Justin

    #251269
    kamarr
    Participant

    Special thanks to @valuser and @shanebp for helping create a custom member directory by adding the Buddypress members-loop.php to my themes page.php, and renaming it page-local-members-php.

    *For the step by step, here is the link to the discussion – https://buddypress.org/support/topic/how-to-display-additional-member-directory/#post-251127

    There are now two Directories listed on the website. The current issue resides with the styling. The original member directory appears to obtain its structure from the Buddypress index.php file located in the public_html/cosnetwork.us/wp-content/plugins/buddypress/bp-themes/bp-default/members-folder, while the Secondary ‘Custom’ member directory is missing the original functions like the search, role search, order by, and some basic css such as removing the bulletins on the member list.

    What would be the best solution to fix this.

    Would adding the code from index.php file from the public_html/cosnetwork.us/wp-content/plugins/buddypress/bp-themes/bp-default/members-folder solve it?

    *I wonder, would it be possible to make an additional page template that would shows on the wordpress frontend part of the plugin on the Dashboard/settins/buddypress/pages section as an additional directory.
    That way you could route it from to a page from the front end the same way you route member, activity stream, register, and activate page keeping all files it in the buddypress folder.

    ngoegan
    Participant

    And just to make sure I cover all my bases, here are my answers:

    1. Which version of WordPress are you running?
    4.4.2

    2. Did you install WordPress as a directory or subdomain install?
    Not sure, but I think as a directory.

    3. If a directory install, is it in root or in a subdirectory?
    root I think

    4. Did you upgrade from a previous version of WordPress? If so, from which version?
    No

    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.5.1

    7. Did you upgraded from a previous version of BP? If so, from which version?
    Yes, the one before it.

    8. Do you have any plugins other than BuddyPress installed and activated? If so, which ones?
    Yes, Akismet, BBpress, Buddypress Edit Activity, Buddypress Forum Editor, Buddypress Group Email Subscription, Buddypress Like, Dynamic Widgets (deactivated), Events Made Easy, Events Made Easy Frontend Submit, Hashbuddy, InfiniteWP CLient, rtMedia, Theme My Login, Wanguard, Wordfence Security, WP SMTP

    I did deactivate all of them except wordpress and the register page worked, I then activated Buddypress and the redirect issue began.

    9. Are you using the standard WordPress theme or customized theme?
    Twemty Twelve

    10. Have you modified the core files in any way?
    I modified Footer.php on WordPress to edit copyright

    11. Do you have any custom functions in bp-custom.php?
    I don’t know

    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.
    The error log looks blank. Maybe I’m looking at the wrong thing?

    14. Which company provides your hosting?
    Hostgator

    15. Is your server running Windows, or if Linux; Apache, nginx or something else?
    Basic Trouble Shooting:
    I don’t know. Maybe Apache?

    #250738
    agnesmeil
    Participant

    Yay for the new release! I love how the comments synchronise.
    I was super excited when I saw the Custom Post Type Comment Tracking function would be added to the new version of BuddyPress, so I’ve been waiting (im)patiently for the release, but I can’t get it to work. I want comments to lessons of the Namaste! LMS plugin (post type = namaste_lesson) to show up in the activity stream.

    I use WP 4.4.2 and BP 2.5.0, single site install
    I tried with twenty fifteen theme, still the same problem.
    I tried all repair tools, deinstalled all plugins, reinstalled just BP and Namaste, and also tried it without Namaste with another CPT
    I tried adding
    add_post_type_support( 'namaste_lesson', 'buddypress-activity' );
    to bp_custom.php
    I also tried this this snippet https://codex.buddypress.org/plugindev/post-types-activities/#1-add-comments-tracking-to-an-existing-post-type but I wasn’t sure how to use the namaste_lesson because of the underscore, for instance in
    'action_id' => 'new_blog_page',
    does that become
    'new_namaste_lesson'
    ??
    As you can tell I’m completely new to coding. I would love to learn, though.

    Thanks so much!

    #249732
    Andrew Tibbetts
    Participant

    To be clear, and provide further details to demonstrate that this hasn’t been answered previously, I’m looking to have 2 nav items in every group: Forum, Members.
    In that order, with the default page being Forum.
    I have achieved the default page being Forum with this:

    add_filter( 'bp_groups_default_extension', 'custom_bp_groups_default_extension' );
    function custom_bp_groups_default_extension() { return 'forum'; }

    But, again, when Activity Stream is disabled, Members becomes Home.
    So right now my nav is: Home, Forum
    I need a way to tell Home to revert to Members and go below Forum in the nav.

    #248779
    shanebp
    Moderator

    Please do not bump threads.

    You omitted an ‘&’ in this:
    <?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ).'&scope=just-me,friends,groups,favorites,mentions&per_page=15&action=friendship_created,joined_group,activity_update' ) ) : ?>

    You’re including all the default params for scope. Why include them at all?

    There are other ways of filtering the activity loop:
    https://codex.buddypress.org/developer/using-bp_parse_args-to-filter-buddypress-template-loops/
    https://codex.buddypress.org/plugindev/add-custom-filters-to-loops-and-enjoy-them-within-your-plugin/

    #248639
    Andrew
    Participant

    Resolved. Turns out WordPress page conditionals are not true during ajax requests. You can create conditionals using wp_get_referer() as a workaround. I created my own conditional, if anyone wants to create a page conditional to filter a custom activity loop with the parse args filter, here is a good starting point:

    //for page 'test-1'
    unction bp6801_is_test_1_page() {
        $is_test_1_page = false;
    
        if ( is_page( 'test-1' ) ) {
            $is_test_1_page = true;
        } elseif ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
            $referer_page_id = url_to_postid( wp_get_referer() );
            $referer_page = get_post( $referer_page_id );
            if ( $referer_page instanceof WP_Post && 'test-1' === $referer_page->post_name ) {
                $is_test_1_page = true;
            }
        }
    
        return $is_test_1_page;
    }
    #248394

    In reply to: Private Pages Glitch?

    burger0815
    Participant

    @fscbmwcca

    thanks for the comment. If I understand correctly then the option:
    allows an admin to select which Post types and BuddyPress Components are private
    seems to indicate that things like the activity component or the member community component
    could be set private.
    Did you test the plugin?

    The sentence:
    provides a Private checkbox in the upper right corner of every page, post, and custom post type selected in Settings

    is a bit irritating, finally that feature exists already in a standard BP wordpress version.
    That is at least in my BP wordpress version you can already mark
    pages as private (i.e. non accessible to non-logged-in members),
    i.e. there is already a checkbox. And if there wouldn’t be the bug then
    setting the member page and activity to private would have set “the component” to
    private, if I understood correctly.
    Is the plugin checkbox another checkbox?

    There is a plugin which, by its description, seems to set everything private:
    https://wordpress.org/plugins/buddypress-members-only/
    and which lets you specify which subadresses should be open.
    But in my case this is not so helpful because
    I want the blog to be public and the blog is not behind a /blog/ adress
    but behind the year /2015/… etc.
    so I would need to set each year adress open, which seems OK but not really
    straightforward.

    #248155
    jscmal
    Participant

    Hi,
    – WordPress 4.4 – Upgraded from the previous release
    – BuddyPress 2.4.3 – Upgraded from the previous release
    – No customization in buddypress core

    I have added a new post where I explained all the things in a better way, giving all the details about wordpress, buddypress and the plugins. But I added it 2 times but in both cases it was not published, I don’t know why.

    In practice is the Filtering that is not working for any user that is not admin. My admin account works properly.

    Another thing that happens is that keeping the Activity Stream page opened, the bar that says “Load Newest” appear also if there is no new post in the stream.

    I tested using the default WordPress Theme Tweenty Fifteen but the problem happens also there.

    About the theme used. It is Woothemes Canvas 5.9.3 and 5.9.15 . Never had problems with these themes using BuddyPress.

    The only customization that I did for BuddyPress are just CSS tags and when I upgraded to the new wordpress release and to the buddypress latest release, everything worked properly between buddypress, wordpress and the theme.

    About the plugins, I didn’t changed them until now. I will make a test deactivating some plugins.

    What is the reason that make you think that can be a plugin?

    Kind regards.

    G.Aloe

    #248050
    Hugo Ashmore
    Participant

    @ldesherl I think it might help if you could leave that link above switched to a WP default theme and with all plugins deactivated, just while you’re seeking help for this issue, as things stand I see no sight of BuddyPress or bbPress running, and the theme is a custom one with a lot of plugins running. Buddypress should default to using a series of pages that it will create, your ‘Activity’ example is named with a custom title, you also seem to have a lot of trashed pages as the members page slug has ‘-7’ added suggesting 6 other copies of a page named ‘members’ try deleting those.

    #247920
    @mcuk
    Participant

    Hi,

    Not used LearnPress so unable to comment much on that . The method I used to insert/display my own custom profile fields into a header on the user activity page was as follows (in this case, a Location field which was created in the WP dashboard).

    1. Add to bp-custom.php :

    //Add Location field to header if user has entered data into it
    //Nothing is shown if user hasn't entered anything into field
    function bptest_show_location_field () {
    	$location_field = bp_get_member_profile_data( 'field=Location' ); 
    	if ( ! $location_field  ) { 
    	   return; 
    	}   
    	else {
    	   echo '<span class="custom-field-text">' . $location_field . '</span>'; 
    	}
    }
    //user_bio_location_field is used within the member-header php template file
    add_action ( 'user_location_field', 'bptest_show_location_field' );

    2. In my member-header.php file (which was copied into my child theme) entered the div :

    <div id="user-location">
    	<?php 
    		do_action ( 'user_location_field' ); 
    	?>
    </div><!-- #user-location - function is found in bp-custom -->

    Obviously the php code in step two is placed wherever you want the field to display, just put it in the correct location of the correct php file. In my case it was member-header.php but for you i’m guessing its the one that generates your order page?.

    Not sure if you have already tried any of that or if it even helps!

    #247877
    Andrew
    Participant

    Thanks Henry. I’ve got more info on this to help the core team fix this issue.

    I think all WordPress conditionals are not working correctly inside the bp_after_has_activities_parse_args filter. Only BuddyPress conditionals are working inside it.

    I also have custom member pages too using bp_after_has_members_parse_args, but WordPress conditionals inside that are all working fine, example:

    // filter member pages
    function cm_members_filter( $retval ) {
    
    	if ( is_page('custom-page-3') ) {
    		$retval['per_page'] = 1;
    	}	
    	
    	if ( is_page('custom-page-4') ) {
    		$retval['per_page'] = 5;
    	}	
    	
    	if ( is_search() ) {  
    		$retval['per_page'] = 3;
    	}	
    		
        return $retval;
    }
    add_filter( 'bp_after_has_members_parse_args', 'cm_members_filter' );

    It is just the activity parse args that is having problems with WordPress conditionals. I can provide further info to help figure out why WordPress conditionals don’t work correctly inside bp_after_has_activities_parse_args, it has something to do with the way ajax is used on the load more button to load more items:

    If I remove activity ajax features by removing <div class=”activity”></div> or by removing bp-templates/bp-legacy/js/buddypress.min.js. The load more button now works like a pagination next page button (similar to the members directory pagination). This makes the WordPress conditionals work fine and all my custom activity pages are now filtering correctly.

    So to conclude, WordPress conditionals are working OK inside bp_after_has_members_parse_args, but they are not working correctly inside bp_after_has_activities_parse_args unless the activity ajax is removed.

    Andrew
    Participant

    I’m filtering my activity pages using the bp_after_has_activities_parse_args filter and using conditionals depending on the activity page. But my conditionals are not working correctly for my custom pages. I’m not great with PHP but I’ve followed the instructions the best I can to put this together and I hope someone can help me with this to find a work around.

    Here is what I’ve done.

    I’m creating custom activity pages by setting them up in admin>pages>add page ‘custom-page-1’, ‘custom-page-2’ etc. I’ve setup each of these pages similar to the activity/index.php to create the activity loop:

    <div id="buddypress">
    
    	<div class="activity">
    			
    		<?php bp_get_template_part( 'activity/activity-loop' ); ?>
    				
    	</div>
    </div>

    Now with the parse_args filter, I can use conditionals to filter some of the activity pages, but my conditionals are not working correctly for my custom pages – they work to begin with but when I click the load more button, the new items are not being filtered. Here is an example to show you what is working and what is not (using the per_page filter for demonstration):

    function cm_activity_filter( $retval ) {
    
    	// The following conditionals to filter are working fine:
    
    	// Activity directory
    	if ( bp_is_activity_directory() ) {
    		$retval['per_page'] = 2;
        }
    	
    	// User profile just-me component
    	if ( bp_is_current_action( 'just-me' )) {
    		$retval['per_page'] = 3;
        }
    	 
    	 // A custom component in the members profile I setup using bp_core_new_nav_item
    	 if ( bp_is_current_action( 'custom-compenent' )) {
    		$retval['per_page'] = 10;
        }
    
    	
    	
    	// The following conditionals to filter my custom pages are not working when the load more button is clicked :
    	
    	// custom activity page 1
    	if (is_page( 'custom-page-1' ) ) {
    		$retval['per_page'] = 2;
    	}
    	
    	// custom activity page 2 
    	if (is_page( 'custom-page-2' ) ) {
    		$retval['per_page'] = 8;
        }
    	
    	
    	
        return $retval;
    }
    add_filter( 'bp_after_has_activities_parse_args', 'cm_activity_filter' );

    So the is_page() conditionals are not working when the load more button is clicked. Is there a way to get this to work correctly. Any help appreciated.

    #247533
    mcpeanut
    Participant

    Talking about JavaScript @henrywright, without going off topic or meaning to hijack this thread I have a question for you that you may be able to help me with that’s driving me nuts, you know how we spoke ages ago about combining js scripts etc? well I have a problem on my members pages that is frustrating me, I have all my js files combined how I need them to be and working great on every single page of the website and have all js moved to the bottom instead of being at the top with the use of a plugin.

    Now the problem I have is on a users member/profile pages, on these pages 2 of my js files remain at the top which is causing me problems with another plugin I use on these pages, the plugins all work fine but makes the pages briefly flash when switching tabs, i have narrowed it down to these js files loading in the head that are causing the problem. The plugin I use to move the js to the bottom only supports pages and posts and not custom post types (so it works fine on the activity/members/groups main pages but not in the individual groups or personal members pages), now I have got the code to add the custom post types so that it can move the js to the bottom on the members profile pages but I am not sure what custom post types these pages use?

    The code I need to use is below, but what custom post type should I add for the buddypress personal members pages to be included any ideas?

    function stf_add_cpt_support( $post_types ) {
        $post_types[] = 'project';
        
        return $post_types;
    }
    add_filter( 'scripts_to_footer_post_types', 'stf_add_cpt_support' );

    sorry @rosyteddy but i only brought it up as henry mentioned JS 🙂

    #247273
    jimme595
    Participant

    So i’ve had some success trying to change the profile links with this code:

    function _bp_core_get_user_domain($domain) {
    	$url = get_home_url();
    	$user_id = bp_get_member_user_id();
    	if (empty($user_id)) {
    		$user_id = bp_get_activity_user_id();
    	}
    	if (empty($user_id)) {
    		//$user_id = bp_displayed_user_id();
    	}
    	$user_info = get_userdata($user_id);
    	$link = $user_info->display_name;
    	$domain = '' . $url . '/profiles/' . $link . '';
    	return $domain;
        }
    add_filter('bp_core_get_user_domain', '_bp_core_get_user_domain', 10, 4);
    apply_filters( 'bp_get_activity_user_link', '_bp_core_get_user_domain', 15, 1);

    This seems to work on every profile link except the one in the activity header section. This link is being changed but just to /profiles/. The display name is not being added to the end… so looking at my code this means i’m not retrieving the user id in the activity. Strangely enough though the user avatar next to the post has the correct link applied to it with the above filter! Any ideas?

    My other option is to use the buddypress member profile location but replace it with my profile templates. I tried to implement this by creaing a members/single/home.php in my wordpress custom theme folder… but the profile loads inside another page, i get a page within a page type effect with the username above the inner page… not sure what is going on there? If anyone can help with either of these solutions i’d really appreciate it!

    James

    Henry Wright
    Moderator

    Hey @alessandrat

    Welcome to the BuddyPress forum!

    1. Have two separate front ends for different user types (with differently configured profiles), appearances, and accesses.

    Yes. This can be done with either a plugin (try searching the Plugin Directory) or coded through the Member Types feature introduced in version 2.2.

    2. Have a place where shortcode could be put in so that users can take a questionnaire containing likert questions on their profile and/or while creating their profile.

    Either a post, page or perhaps even an activity update all spring to mind as possible places to add it.

    3. One but not both kinds of users can create their own group (public, semiprivate or private) or forum and browse/ join existing ones

    The ability for all members to create new groups comes as standard.

    4. One kind of user but not the other needs to be able to set up ways for the other type of user to purchase products (I assume I can use another plugin but will need a place to put the shortcode)

    This will need to be either custom coded, or you may find a plugin with the functionality you need.

    Hope this info helps!

Viewing 25 results - 276 through 300 (of 831 total)
Skip to toolbar