Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'custom activity page'

Viewing 25 results - 301 through 325 (of 831 total)
  • Author
    Search Results
  • #246792
    paragbhagwat
    Participant

    @r-a-y thanks i did read that and i added a front.php in my theme under buddypress/groups/single and it worked perfectly fine. I was then looking to have a different page for pubblic groups vs private groups so i created a new file called

    front-status-public.php and placed it under the same location of buddypress/groups/single

    That is not working. Only front.php works.. as given in the hierarchy it should look at the status file before it even picks up the front.php. As shown below the home.php seems to be looking only for front.php and not the hierarchy. Any idea what is going on?

    home.php code

    
    if ( bp_is_group_home() ) :
    
    						// Use custom front if one exists
    						$custom_front = locate_template( array( 'groups/single/front.php' ) );
    						if     ( ! empty( $custom_front   ) ) : load_template( $custom_front, true );
    
    						// Default to activity
    						elseif ( bp_is_active( 'activity' ) ) : locate_template( array( 'groups/single/activity.php' ), true );
    
    						// Otherwise show members
    						elseif ( bp_is_active( 'members'  ) ) : locate_template( array( 'groups/single/members.php'  ), true );
    
    						endif;
    
    
    #246705
    scoobs2000
    Participant

    Hi
    in short everything you have asked can be done.

    But I’m a little bias as I honestly believe regarding technology there is nothing that can’t be achieved it just comes down to how much time and budget you have to invest… 🙂

    Below is a bit of a ramble…. But might provide insight. after you organize your coffee and come back.

    I have nearly completed a project that sounds similar in nature (few weeks from launch in final beta testing), however it was a highly customised solution (private membership site) .
    With nearly 70 plugins, 100’s hours coding integration code (lots of trial and error) between the plugins and also compatibility tests with multiples of plugins to ensure no issues, because of slow load times the project requires deploying from CDN,fast servers and customised caching solutions.
    most of work load appeasr to be bbpress – so an near out of the box solution, you prob don’t need to go that far.

    But not to scare you. Here are some pointers that might answer your questions, based on my understanding of the OP.

    In my case I spent many months researching solutions with many platforms (open source / paid / managed premium) – buddy press was selected simply because is built on WordPress that’s already has the core abilities you need, you just need to “hook in to’em” and take advantage of this concept – you can keep working on bettering and adding separate components / features as time goes by, great for client, works out a bit cheaper in the startup phase and great for developer – land ya self a permanent support / ongoing development contract……

    Is it possible to update profile content/meta? : In general yes, buddy press allows this out of the box

    Either the user or the admin can update, you can have admin only fields (the user doesn’t access them – but the admin can)
    if you use a membership plugin eg, s2member – you can extend this idea much further eg, only require email on signup, then all other fields are accessible from profile and can set fields on a per membership level,

    In your case, you might have different profile fields for students, teachers, Parents and only require a couple of basic fields to be completed on signup and all other fields can still be “required” when they reach their profile page.
    For profile field management I recommend the s2membership pro plugin (free version available) http://s2member.com/

    My project has a “todo list” for each and every member – however I’m still to this day unable to find a plugin that interacts with a completed wp/bbp/buddypress site. So I had to code one. The todo list was designed / engineered in a way that interacts with “wordpress” in general, by storing a completely unique data feed much like the activity feed with time stamps and can be programmed to be linked to any site link, media download, page view, forum post, reply any activity on the site can be logged and applied to the feed which the to-do-list interacts with and auto completing (crossing of the item) each item also has dependencies, so you rattle off a list of activities before the task is crossed off and each to-do-list also has dependencies so it is not seen by a user until certain tasks are completed, eg, purchase a course from the store, or complete a previous to-do-list.

    In short: Yes it can be done, however I’m not aware of any 3rd party plugin that does this successfully.

    In my case I have the to-do-list shown in the sidebar so as a member goes through the tasks the list is also available to them no matter what page they are on. But possible to publish it in the profile page if required.

    Regarding email notices, I recommend looking into the woo commerce sensei http://www.woothemes.com/products/sensei/ plugin for your courses that way you have management of email notices, in fact prob most of the things you require will be available via sensei – note this is a premium paid plugin with yearly ongoing licence costs.
    Without a free trial version to try before you buy.

    But maybe gravity forms developer licence might be fine in your case as it has, gateway plugins, qiz and survey plugins – it would be possible to build certain simple courses on the gravity framework including delivery of custom emails – if building a form based system than certainly worth a look into – but would require a developers licence to get all the plugins you would prob require.

    In fact what I do is use gravity forms email chimp plugin to send the members email address to an email list (automation campaign) in mail chimp (paid account) that auto sends a welcome emails that I have customize to suit the activity they have completed, this way I can send pretty html + marketing emails + scheduled follow up emails and take the work load off WordPress other than a quick API connect on demand.

    Regarding: is it possible to have multiple logins or users access the same account/profile?
    In simple: Yes, but it all comes to context of the profile, will each member be able to see other members profiles or will parents be able to edit a child profile etc.

    Although my project does not require the need for 2 or more members to edit a single profile, I do have multiple levels of context (horizontal and vertical memberships) all with their own set of rules who profiles they can see and what buddypress features are available to them – some members don’t have activity feeds or messages, But I needed to ensure that members that do have access to these features can’t access the features of cross membership and so on.

    This is 100% custom code (no plugin) but while coding this up I recall thinking I’m 100% confident it is possible to add another level of check “if current user can edit displayed user” and go from there, all you would need is a profile field / meta that links multiple accounts together –
    Eg, a parent account has a profiled field “child user name” – they just enter the child username / user ID – and now we would add the profile check if a parent is viewing the child’s profile.

    Regarding paying a deposit, and payment, this is my findings.

    There was no single one membership / payment plugin that integrated perfectly into what I wished to achieve – I have tested many. please note I’m suggesting there are no plugins that do this stuff just none that achieved the outcomes I needed for my project.

    – Tips: – start the project design based on the payment systems / gateway (the complete project and direction of development is 100% dependent on this) because the simple reason every feature you implement needs to check “is a paid member and what level (cap / role) ” – including free membership with paid features “is not a paid member” but has paid for… this includes recurring and non-recurring subscriptions with consideration of what you intend to do if a subscription expires.

    Eg, a recurring subscription will either just auto subscribe and pay for the next time frame (or fail)
    A non-reoccurring subscription will auto expire after a given time frame (or X cycles)

    The difference between to the two –
    Is generally on a recurring subscription when it expires it also linked to a member account to “do something” eg downgrade membership

    A non-recurring subscription is generally used for a onetime payment you have access forever feature- eg, a course and resources, you pay once on a deposit, subscription over several weeks when the subscription expires the member still has access to the course as long as they remain at minimum a free member on the site. (anyhow that’s how I have implemented things)

    These two concepts are completely different in the way they interact with the member as well at many levels although on the surface appear to be almost the same, add in a deposit feature you are also opening another level of context to play with, mostly limiting the available options regarding the payment gateway service you will need to use or more so which services have this feature on offer.

    As mentioned – my suggestion is start with the gateway solutions first and reverse the design back to the front end. – this is the big lesson I took away with this project (4 rewrites in total) as it was always a block relating to the gateway limitations (and laws relating to online subscriptions in my country).

    My project:
    Woo commerce (free) for shopping cart system including purchase of courses, subscription to site and deposit/ subscription to courses, plus all other products, deliverable products, workshops, webinars, one on one sessions, resource downloads from pdf to videos. Anything you can think off can be sold through woo

    Woo commerce quick cart – plugin (paid)– now I can add a buy now button on any page for any product including subscriptions – the membership info page has a standard 3 column price comparison chart with nothing more than a “sign up now” button – clicking the button auto adds the subscription to cart and opens the checkout popup with one click and without leaving the page (no need to send to store)

    Sensei (paid)– for courses and fits well into woo commerce system (but requires a couple more plugins and custom integration code if implementing paid / subscription based courses )

    Groups plugin (free) to easily manage roles and caps (as I have to teach client staff how to do this and manage the site) WordPress has this capability built in if your a coding ninja (I’m not)

    Groups Woo commerce (paid plugin) to link groups to a purchase – apply a role / cap or groups of, to a user based on the purchase.

    Then some custom code is required – to perform a check and if a user has a particular role or cap than apply the s2membership level – this check is done at the store level so if a member cancels or defaults on a payment – the membership level is auto adjusted depending on what role or cap is supplied to the user from the groups woo commerce automation. groups plugin manages non-recurring subscriptions so a expired subscription does not remove the users caps and roles (but a default on payment does)

    S2member pro – for membership level management including profile fields management and most importantly complete site access management – I can apply access to each and every competent of the site this includes , forums, topics, replies, posts, pages, media, courses, and content within pages eg, home page displays different content based on the membership level / logged in or general public. s2member pro is also used to override default bbpress / buddy visibility settings eg, hidden forums only available to certain member levels – but requires custom code to apply or traverse access levels on submitting topics / replies to ensure widgets and other snippets don’t display private areas to members that don’t have access. (it allows you to write custom queries with zero concern or consideration to access levels)

    For subscriptions (paid)– I use woo commerce Subscriptions plugin – this manages on its own site access based on paid recurring subscriptions (or in simple turns on or off user account based on payment) – pay x amount monthly to access certain site features, courses and resources, forums, pages, blog articles etc.

    However – woo commerce subscriptions does not manage deposit / time based subscriptions (non-recurring subscriptions) eg, pay a deposit for a course and gain instant access then pay off on a subscription for x amount of weeks / months –
    I was not able to find any plugin (free or paid) that does this, so I had to write a plugin currently under experimental concept stage.

    Other tips: often it’s better to find compatible, well supported and pay for premium plugins that have overlapping features and disengage these features you don’t want to achieve your goals and do as little integration code as possible, but anything you do needs to be well planned and though out as to not to touch core code in any platform, framework or plugin.
    At the end of the day you want the ability to upgrade all systems as time go by.

    Eg, s2member plugin has its build in membership system that is “required to be active” for the plugin to work. – all I did was setup a single paid (never to be used membership) on a paypal sandbox store this includes setting up all the s2membership registration pages etc – then put a simple redirect in the .htaccess on any of these pages. Now to purchase membership you must go to the store (woo commerce) and purchase a subscription via woo – s2member has now has nothing to do with membership registration / payment systems.

    And of course I have “force account creation” turned on at the store – you cannot make a purchase without signup at a minimum free site membership.
    by disengaging the buddy, bbp, Wp, and all other means of registering (by redirect) but only leaving the woo commerce customer account registration available – The pop up registration form I use for free members is just a woocommerce customer account registration form (with no products attached) with a fallback to the s2membership cut down reg form (in case ajax / jquery etc not working on client side)

    And now all purchases, subscriptions, shop account, courses etc are now available from the buddy press profile page also via a “woo to buddypress” plugin (or in my case built into the theme)

    May sound complicated but as mentioned I would really suggest starting with payment solutions and nut out this part of the project first as this will most likely force development direction,

    one of my project goals was a solution that can cater for anything…. so,

    Regarding variable deposit / costs amounts based on user input – if using similar approach as I did – you would just setup woo commerce discount codes per variable outcome / result and would just reveal the correct coupon code to the user on the checkout page. they just cut and paste this code into the discount field and click apply.

    or setup up multi products – one product per price base. – have the user input their details first and the result would be – apply a groups cap / role then only offer the courses products in the store with the associated price base based on user caps / role –

    woo discount coupons can be setup on multiple bases – eg, deposit amount / on going subscription amount or total amount or per product or per cart total etc.

    for me was plenty of research into this including concept builds of other community platforms and as above is only a bit of a sample of features used relating to the OP.
    I was under very strict key point goals and achievements requiring very specific outcomes many of these affected development direction how / why I implemented the above.

    There may be better simpler ways to suit your specific project, but thought it might be worth a mention for some direction. or at least insight into some of the plugins I use / ideas and concepts.

    my usual disclaimer – if there is something in there for you, that’s great! if not that’s fine too!

    enjoy!

    #246516

    In reply to: Disqus Integration

    jrunfitpro
    Participant

    Thank you @shanebp . Is there a better looking bp comments plugin with some better styling? Also, my theme Optimize Press 2 has custom page layouts for lessons. The only problem, the bp activity stream will not pick up these comments.

    Any thoughts on a solution there?

    #246481
    jtorral
    Participant

    So I partially fixed it but I think I need buddypress input for the following.

    Here is what I did

    I created a custom template from a copy of the page.php in the themes directory. Inside of that template was a call to comments_template(); which I removed from the custom template.

    I then changed the “Members” page to use the new template with a name of “No Comments”

    Now when I load http://jorgetorralba.com/members/ I get the desired affect without the comments and ping backs.

    However, if I go one level deeper and click on a user name such as

    http://jorgetorralba.com/members/cjtorralba/

    The comments reappear. Same on Activity page even after changing activity to use the new custom templates.

    Any idea ???

    #246094
    splufford
    Participant

    Hi, struggling to get any of the the code in post #190874 to work. I have created a bp-custom.php file which I have uploaded to the root of the buddpress folder and my code looks like this:

    <?php
    // deny access to admins profile. User is redirected to the homepage
    function bpfr_hide_admins_profile() {
    	global $bp; 
    	if(bp_is_profile && $bp->displayed_user->id == 1 && $bp->loggedin_user->id != 1) :
    		wp_redirect( home_url() );
    	exit;
    	endif;
    }
    add_action( 'wp', 'bpfr_hide_admins_profile', 1 );
    
    // Remove admin from the member directory
    function bpdev_exclude_users($qs=false,$object=false){
        
        $excluded_user='1'; // Id's to remove, separated by comma
    	
        if($object != 'members' && $object != 'friends')// hide admin to members & friends 
        return $qs;
    	
        $args=wp_parse_args($qs);
    
        if(!empty($args['user_id']))
        return $qs;	
    	
        if(!empty($args['exclude']))
    		$args['exclude'] = $args['exclude'].','.$excluded_user;
        else
    		$args['exclude'] = $excluded_user;
    	
        $qs = build_query($args);
    
        return $qs;
    	
    }
    add_action('bp_ajax_querystring','bpdev_exclude_users',20,2);
    
    // once admin is removed, we must recount the members !
    function bpfr_hide_get_total_filter($count){
        return $count-1;
    }
    add_filter('bp_get_total_member_count','bpfr_hide_get_total_filter');
    // hide admin's activities from all activity feeds
    function bpfr_hide_admin_activity( $a, $activities ) {	
    	
    	// ... but allow admin to see his activities!
    	if ( is_site_admin() )	
    		return $activities;	
    	
    	foreach ( $activities->activities as $key => $activity ) {	
    		// ID's to exclude, separated by commas. ID 1 is always the superadmin
    		if ( $activity->user_id == 1  ) {			
    			
    			unset( $activities->activities[$key] );			
    			
    			$activities->activity_count = $activities->activity_count-1;			
    			$activities->total_activity_count = $activities->total_activity_count-1;			
    					$activities->pag_num = $activities->pag_num -1;				
    		}		
    	}		
    	// Renumber the array keys to account for missing items 	
    	$activities_new = array_values( $activities->activities );		
    	$activities->activities = $activities_new;	
    	
    	return $activities;
    	
    }
    add_action( 'bp_has_activities', 'bpfr_hide_admin_activity', 10, 2 );
    ?>

    Not sure what I am doing wrong. All help gratefully received! Thanks

    #246091
    mc9625
    Participant

    Hi, actually I’ve already added
    add_post_type_support( 'recipe', 'buddypress-activity' );

    to bp-custom.php in /wp-content/plugins. The recipes are counted in the “member activity stream”, but only the ones posted directly in the parent site, not the ones posted in the member’s blog.

    I think it’s a pity you can’t use a “blog” as the user profile page, or at least give the user profile page, the same kind of customisation as a full blog install. I think this is more a “Facebook” kind of approach, everyone will have more or less the same kind of page, with minimal customisation option (I guess the header profile). But since WordPress already has a multisite option, and Buddypress already support multisite environment, have the chance to use the user’s blog as if it were his “user profile” would have been a huge facility.

    pnet
    Participant

    Well as soon as I post it I figure it out.. go figure 🙂

    In case anyone else is confused here’s what I did and I had no clue going into it.

    Use this https://codex.buddypress.org/getting-started/customizing/customizing-labels-messages-and-urls/ for a reference on what to name your files and where to put them. (.po and .mo files, trust me I did not even know what these were)

    Download this editor/compiler here: https://poedit.net/download (it’s free!)
    You will need this to create (compile) the .mo file (if you want to know what these files are google it, that’s what I did)

    Use the buddypress link above and go to the “Translating with PoEdit” section, it will walk you through how to open the file with Poedit.
    (This part “This will open a settings dialog and you will be asked to fill in some details such as project name which we’ll skip. Click on ‘OK’ and you’ll be asked to save your language file.” did not happen for me, it asked me my language and I selected English United States, choose what you desire.)

    Now remember in my case I needed to change a few buddypress page titles.
    Example: I wanted to change the buddypress title “Groups” to “Chat Rooms” –
    While in Poedit with your .po file open, where you need to change it seems to be near the bottom of the file. Scroll down until you see something like this “Site-Wide Activity [component directory title]” (this was the first one for me). These are the buddypress page titles, this is where you can change them.

    Click on the title you want to change, my case Groups, below you will see “Source text” this is where “Groups” is showing. In the text area under that you will see “Translation”, this is where I typed “Chat Rooms”, as this is the title I would like it changed to.

    When finished Save your .po file. Back to Poedit, click File, select “Compile to MO” , save you .mo file as directed in the buddypress link above.
    Follow the rest of the instructions in the link to upload your .po and .mo files.

    I hope this helps out others who are new to buddypress! 🙂

    #244861
    sharmavishal
    Participant

    @danbp thanks for your reply. its highly appreciated. I understand its bit unnecessary.

    Am using a custom home page via BuddyPress Groups Extras. So on my site the home page for groups is gpages which doesnt have a slug in the URL which is great.

    now my second tab is “Home” which i renamed to “Activity”. This is also fine. But the slug of Activity page is “home”. so when i click on the activity tab the URL in the broswer shows group/name/home.

    I believe the previous versions of BP the home page was actually named as Activity right?

    the only way i can fix this is via hacking the core BP file bp-groups-loader.php

    // Add the "Home" subnav item, as this will always be present
    			$sub_nav[] = array(
    				'name'            =>  _x( 'Activity', 'Group screen navigation title', 'buddypress' ),
    				'slug'            => 'activity',
    

    Thanks once again

    #244443
    anbusurendhar
    Participant

    In buddypress, activity, members, group have a definite pages like ‘domain/activity’, ‘domain/members’, ‘domain/group’, respectively. Likewise I’m trying to create my own custom page like ‘domain/mycustom’.

    For this purpose I referred John James Jacoby’s Post in here. The snippet used in that link didn’t work for me. I don’t know where I’m missing.

    From that snippet, I found that $bp->current_component returns me an empty string.

    #244438
    anbusurendhar
    Participant

    @danbp : Thank You very much for your reply.

    Even I’ve tried bp_current_component() and bp_is_current_component() functions with no success.

    Actually this function works fine when used in default buddypress pages like domain/activity/. This returns me “activity”, which is exactly correct. But when I tried this in my custom page (domain/custompage), I’m getting an empty string.

    #244398
    Venutius
    Moderator

    Yes I would like better customisation options for activity stream to be able to identify exactly which items appear in the activity stream.

    Some new options could be to include updates to blogs and pages to be included in the activity stream. Similarly I would like to have the ability to choose not to show items such as members joining groups in the stream.

    Just would be nice to have some options over what is and is not included.

    djsteveb
    Participant

    @shubham9
    I have not used this, but I was looking at it yesterday and now thinking about it ->

    Facebook Like User Activity Stream for BuddyPress

    I imagine you could read up on the latest discussions about parse_Args and such and code this yourself.. I have a good imagination though..

    I myself have been considering asking for a way to display both the “profile tab” and the “activity” tab info below that.. with a selectable filter for “Just John Doe” or “John Doe and friends” or something like that.. think that would be cool – and likely not too hard to mashup…

    but I’m still learning php, maybe someone else has an idea on how to make that happen with a simple them functions.php mixin .. I already have a think in bp-custom to make the default profile page show the profile tab instead of the defaults.. so the code is here and there around here I guess.

    #243881

    In reply to: filter activity loop

    Angelo Rocha
    Participant

    Hi Henry Wright.
    I pasted in functions.php
    =/
    This is my custom loop:

    
    <?php do_action( 'bp_before_activity_loop' ); ?>
    <?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) ) ) : ?>
    	<noscript>
    		<div class="pagination">
    			<div class="pag-count"><?php bp_activity_pagination_count(); ?></div>
    			<div class="pagination-links"><?php bp_activity_pagination_links(); ?></div>
    		</div>
    	</noscript>
    	<?php if ( empty( $_POST['page'] ) ) : ?>
    		<ul id="activity-stream" class="activity-list item-list">
    	<?php endif; ?>
    
    	<?php while ( bp_activities() ) : bp_the_activity(); ?>
    		<?php locate_template( array( 'activity/entry.php' ), true, false ); ?>
    	<?php endwhile; ?>
    
    	<?php if ( bp_activity_has_more_items() ) : ?>
    		<li class="load-more">
    			<a href="#more"><?php _e( 'Load More', 'buddypress' ); ?></a>
    		</li>
    	<?php endif; ?>
    
    	<?php if ( empty( $_POST['page'] ) ) : ?>
    		</ul>
    	<?php endif; ?>
    <?php else : ?>
    	<div id="message" class="info">
    		<p><?php _e( 'Sorry, there was no activity found. Please try a different filter.', 'buddypress' ); ?></p>
    	</div>
    <?php endif; ?>
    <?php do_action( 'bp_after_activity_loop' ); ?>
    <form action="" name="activity-loop-form" id="activity-loop-form" method="post">
    	<?php wp_nonce_field( 'activity_filter', '_wpnonce_activity_filter' ); ?>
    </form>
    
    djsteveb
    Participant

    @jrunfitpro “there wasn’t a good answer for my question” –
    I think you should of imply replied to your previous (not dupe) thread – would keep things more tidy.
    Also you never reported back what your optimize press people had any details about the issue.

    anyhow, with your setup I wonder..
    “not pulling from certain pages ”
    – what exactly is not being pulled?
    from pages?
    posts?
    multi-site sub blogs?
    Pulled from media comments?

    If you switch to default 2014 theme – does it work then?

    If you use 2014 theme and disable all other plugins (and mu-plugins and bp-custom if you have those) aside from BP is the issue resolved?

    If “not pulling from certain pages” still does not work with 2014 and all other plugins removed, then you may find the answer on the other threads and solution hunting things posted:

    Post comments not appearing in activity stream?


    (and those items linked in comments from there)

    If “not pulling from certain pages” does work fine with 2014 as theme and other plugins disabled – then it’s an issue with your other theme or plugins (or combo of them).

    #243741
    djsteveb
    Participant

    @iseestarz

    Activity wall – Yes – in core.
    all members chat – private user to user email like messages in core. Chat rooms with plugins like “quick chat” – so yes
    sleek custom profiles for members, -hard to tell what is “sleek” – custom? for each member? There are a couple of plugins that played with this – not sure how they work, if they’ve been updated lately.. modding how all profiles look to make them “sleeker” than default 2015 – theme – possible..

    a paid membership option – that would be a plugin.. there are several that get into that.. s2member, paid memberships pro, ultimate member maybe? Some options from wpmudev as well I think.

    A way to let paid members make their own post/articles on the homepage – hmmm.. maybe prevent non paid members from even creating a blog.. or you mean any activity posts on home page – I think these things are possible.. BP recently added “user levels” but I have not see much actually use that.. but extending this should be easy to some degree..

    However if your focus is on paid members things, and you will need support to put all this together and keep it running (you are not a php coder with lots of time to read codex and test things) – then developing around BP is likely to get expensive, and you might be better off forgetting bp exists and looking at some of the more premium systems others have put together around wordpress (a few wpmudev plugins combined achieve what you describe without needing BP) – and there are others..

    Of course you don’t have to look for such a system revolving around wordpress either – there are more mature social network options that may save you time and sanity – things like phpfox, boonex dolphin, oxwall..

    random thoughts from a bp user.. I’m not a dev and have not tested all the things out there that get into paid members things and restrictions.. if you search the forums here there have been a few comments from others pointing to some other similar plugin options – and some people have pointed out troubles with some of those on the market.

    zoewsaldana
    Participant

    Fixed it!! Okay, for anyone who encounters this issue, the problem was that for some reason (I think perhaps how WP or my server is caching pages) the hooks I was choosing to target for the behavior weren’t working. So instead I added both functions to the “wp” hook, and now it works site-wide!

    
    /* You can add custom functions below, in the empty area
    =========================================================== */
    
    function bp_guest_redirect( $name ) {
        if( ! is_user_logged_in() ) {
            if ( bp_is_activity_component() || bp_is_groups_component() || bp_is_blogs_component() || bp_is_directory() || bp_is_user() || bp_is_members_component() ) 
                wp_redirect( get_option('siteurl') . '/new_member/' );
        }
    }
    add_action( 'wp', 'bp_guest_redirect', 1, 1 );
    function bpfr_hide_rss_feed_to_nonreg_visitor() {
     if ( !is_user_logged_in() ) { 	
       remove_action( 'bp_actions', 'bp_activity_action_sitewide_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_personal_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_friends_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_my_groups_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_mentions_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_favorites_feed' );
       remove_action( 'groups_action_group_feed', 'groups_action_group_feed' ); 
        }
    }
    add_action('wp', 'bpfr_hide_rss_feed_to_nonreg_visitor'); 
    
    

    My theme framework (WPZoom) also recommended I place theme modifying code in the functions/user/ pathway, so I modified functions.php there instead of using bp-custom. I think it would work either place, however.

    Thank you!

    danbp
    Participant

    Any ideas what I’m doing wrong? Using over 4 years old tricks ? 😉

    Give this a try (in bp-custom)

    function bpfr_guest_redirect() {
    global $bp;
    // enter the slug or component conditional here
       if ( bp_is_activity_component() || bp_is_groups_component() || bp_is_blogs_component() || bp_is_page( BP_MEMBERS_SLUG ) || is_bbpress() ) {
    	
    // not logged in user - user will be redirect to any link you want
       if( !is_user_logged_in() ) { 
    	//wp_redirect( get_option('siteurl') ); //back to homepage
    	//wp_redirect( get_option('siteurl') . '/register' ); // back to register page	
    	wp_redirect( get_option('siteurl') . '/your_page_title' ); // back to whatever page
    	} 
       }
    }
    add_filter('get_header','bpfr_guest_redirect',1);

    And to close the second entry door, which many users seems to ignore…

    function bpfr_hide_rss_feed_to_nonreg_visitor() {
    
     if ( !is_user_logged_in() ) { 	
    		
       remove_action( 'bp_actions', 'bp_activity_action_sitewide_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_personal_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_friends_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_my_groups_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_mentions_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_favorites_feed' );
       remove_action( 'groups_action_group_feed', 'groups_action_group_feed' ); 
        }
    }
    add_action('init', 'bpfr_hide_rss_feed_to_nonreg_visitor'); 
    #243519
    danbp
    Participant

    Hi @muskokee,
    BP nav menu code is in bp-core-template.php:3050 to EOF.

    To change the position of an item on profiles page, use this from within bp-custom.php
    Position is defined by the numeric value:

    function bpfr_profile_menu_tab_pos(){
    global $bp;
    $bp->bp_nav['activity']['position'] = 30;
    $bp->bp_nav['forums']['position'] = 50;
    $bp->bp_nav['profile']['position'] = 25;
    $bp->bp_nav['messages']['position'] = 10;
    $bp->bp_nav['notifications']['position'] = 40;
    $bp->bp_nav['friends']['position'] = 20;
    $bp->bp_nav['groups']['position'] = 60;
    }
    add_action('bp_setup_nav', 'bpfr_profile_menu_tab_pos', 100);

    You can also add some condition on the template. Ie

    if ( is_user_logged_in() ) :
       your custom menu stuff
    else
       something for non logged user
    endif;

    Other reference: https://codex.buddypress.org/themes/members-navigation-menus/

    #241989
    Roger Coathup
    Participant

    The default BuddyPress site setup only supports a single activity, members, groups directory page.

    One solution is to create your own custom page templates, and embed the code for the activity, member and group loops in the template. You’d then assign it to your duplicate pages. You can read more about coding your own loops in the documentation section of this site.

    You could also look to see if it’s possible to use the language files — dynamically loading the appropriate text domain translations of the BuddyPress text depending which language the user has selected. In this scenario, you’d work with the default ‘single’ page setup.

    Perhaps too late for your site (if you’ve gone down the polylang route), but for all our multi language solutions, we go the multisite approach and using the Multilingual Press Pro plugin. It gives a really clean solution. Remember to enable bp multiblog if you switch to this approach.

    #241869
    peter-hamilton
    Participant

    sorry, password is: demouser

    I hope it shows a bit more then just a bbpress forum thats added,
    Took me a long time to add the custom functions, especially the profile pages and activity.

    Prabin
    Participant

    hi @danbp
    Actually, I want to display the “Most Favorited Count” in single activity group page in custom drop-down select option called “Most Agreed”. See Above Images.

    ['type'] == 'featured'
    I wanted to compare option value inside the meta_query
    <option value="featured"><?php _e( 'Most Agreed' ); ?></option>

    I am not sure if it works. can you debug this for me ? or what code i need to add ?

    Prabin
    Participant

    @danbp, I have an issue..

    I have “Most Agreed” option in single group page. but the query is not returning desired value.
    can you look into this?

    Here’s the Screenshot
    Most Favourite dropdown

    and Here’s the code

    
    if( class_exists( 'BP_Group_Extension' ) ) :
    
    class bpgmq_feature_group {
    
    public function __construct() {
    $this->setup_hooks();
    }
    private function setup_hooks() {
    $bp = buddypress();
    
    add_filter( 'bp_ajax_querystring', 'custom_filter_ajax_querystring' , 999, 2 );
    // you need to do it for the group directory
    add_action( 'bp_group_activity_filter_options', array( $this, 'agreed_option' ) );
    
    }	
    public function agreed_option() {
    ?>
    <option value="featured"><?php _e( 'Most Agreed' ); ?></option>
    <?php
    }
    
    }
    
    function custom_filter_ajax_querystring( $querystring, $object ) { 
    #var_dump($querystring);
    if($object != 'activity' )
    return $querystring;
    
    $defaults = array('type'=>'active','action'=> 'active','scope'=> 'all','page'=>1,'order'=>'DESC');
    
    #exit;
    /*if( $bpgmq_querystring['type'] != 'featured' ) 
    return $querystring;*/
    $bpgmq_querystring = wp_parse_args( $querystring, $defaults );
    if( $bpgmq_querystring['type'] == 'featured' ){
    $bpgmq_querystring['meta_query'] = array(array('key'=> 'favorite_count','value'=> 1,'type'=> 'numeric','compare' => '>='));
    
    return apply_filters( 'bpgmq_filter_ajax_querystring', $bpgmq_querystring, $querystring );
    }
    var_dump($querystring);
    }
    
    function bpgmq_agreed_group() {
    if( bp_is_active( 'activity') )
    return new bpgmq_feature_group();
    }
    
    add_action( 'bp_init', 'bpgmq_agreed_group' );
    endif;

    Thanx in Advance

    Quinn Goldwin
    Participant

    Hey Danbp,

    Thank you for the quick responses and all your help. I tried playing around with your way but I’m not advanced enough for working with hooks and custom coding just yet.

    I did find an easier work around that I just pasted into my bp-custom.php and it did the trick. But for other members trying to do this, you need to have the plugin http://buddydev.com/buddypress/show-buddypress-communitysitewide-activity-on-user-profile/ for this to work.

    function bp_change_activity_subnav_default() {
    
    	if ( bp_is_user_activity() ) {
    	
    		$args = array(
    			'parent_slug' => 'activity',
    			'subnav_slug' => 'all-activity'
    		);
    		
    		bp_core_new_nav_default($args);
    	
    	}
    	
    }
    add_action('bp_setup_nav', 'bp_change_activity_subnav_default', 5);   

    I understand you guys aren’t getting paid for your services but now i’m just struggling on adding a “whats new” post form to the all activity page. Buddy dev had some directions on how to add it but I think its dated cause I couldn’t find the code that we needed to switch out. Is there a simple way to add a whats new post form to the all activity page? It would be awesome if it was simple enough to paste it into bp-custom.php.

    Thanks again for everything you guys are great!

    danbp
    Participant

    Which result when you use Twenty Fifteen theme ?
    Do you use some custom functions on group page ?

    Also, as of Codex https://codex.buddypress.org/administrator-guide/groups/
    This is a private group

    Options

    Group content and activity will only be visible to members of the group.

    #241218
    danbp
    Participant

    @quinngoldwin

    it goes to my personal activity instead.

    It’s intended so ! You’re on a profile page, and any links added directly to buddybar or his subnav is alwways, and only, user related. It’s a contextual menu.

    But you can use bp_member_options_nav action hook which is on the template.
    bp-templates/bp-legacy/buddypress/members/single/home.php

    Add this snippet to bp-custom.php your your child theme functions.php:

    
    function goldwin_custom_setup_nav() {
      if ( bp_is_active( 'xprofile' ) )
    ?>
    <li><a href="<?php bp_activity_directory_permalink(); ?>"><?php printf ('All Activities'); ?></a></li>
    <?php  
    }
    add_action( 'bp_member_options_nav', 'goldwin_custom_setup_nav' );

    By default, the hook is placed as latest item of the navbar items. To get as first item, simply move the action at the begin of the list.

    Default code looks like this:

    
    <ul>
    
    <?php bp_get_displayed_user_nav(); ?>
    
    <?php do_action( 'bp_member_options_nav' ); ?>
    
    </ul>

    that you can chage to:

    <ul>
    
    <?php do_action( 'bp_member_options_nav' ); ?>
    
    <?php bp_get_displayed_user_nav(); ?>
    
    </ul>

    But you can’t get your custom item as second, or third, or whatever. Only first or latest.

    How to use bp-custom, functions.php and child_theme is explained on the codex.

Viewing 25 results - 301 through 325 (of 831 total)
Skip to toolbar