Search Results for 'custom activity page'
-
AuthorSearch Results
-
December 23, 2015 at 5:53 pm #248050
In reply to: Could not Save Basic Settings
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.
December 20, 2015 at 5:13 am #247920In reply to: How to display a custom field?
@mcuk
ParticipantHi,
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!
December 18, 2015 at 5:22 pm #247877Andrew
ParticipantThanks 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.
December 17, 2015 at 4:00 pm #247842Andrew
ParticipantI’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.
December 8, 2015 at 5:03 pm #247533mcpeanut
ParticipantTalking 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 🙂
November 29, 2015 at 10:36 pm #247273In reply to: Changing avatar images and profile links
jimme595
ParticipantSo 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
November 19, 2015 at 2:19 am #246930Henry Wright
ModeratorHey @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!
November 15, 2015 at 11:29 pm #246792In reply to: BP 2.4.0 – Group frontpage hierarchy question
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;
November 13, 2015 at 4:50 am #246705In reply to: Customization questions
scoobs2000
ParticipantHi
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 membershipA 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 wooWoo 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!
November 9, 2015 at 7:46 pm #246516In reply to: Disqus Integration
jrunfitpro
ParticipantThank 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?
November 8, 2015 at 3:47 am #246481jtorral
ParticipantSo 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 ???
October 28, 2015 at 2:48 pm #246094In reply to: Hide All Admins from All Buddypress Activities
splufford
ParticipantHi, 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
October 28, 2015 at 12:14 pm #246091In reply to: Buddypress in multisite
mc9625
ParticipantHi, 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.
October 19, 2015 at 8:13 pm #245729pnet
ParticipantWell 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! 🙂
September 28, 2015 at 5:39 am #244861In reply to: Rename Home URL+Slug in BP Group
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
September 16, 2015 at 8:46 am #244443In reply to: “$bp->current_component” returns empty string
anbusurendhar
ParticipantIn 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.September 16, 2015 at 4:59 am #244438In reply to: “$bp->current_component” returns empty string
anbusurendhar
Participant@danbp : Thank You very much for your reply.
Even I’ve tried
bp_current_component()
andbp_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.September 15, 2015 at 1:10 pm #244398In reply to: Activity stream customisation options…
Venutius
ModeratorYes 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.
September 3, 2015 at 7:08 pm #244033djsteveb
Participant@shubham9
I have not used this, but I was looking at it yesterday and now thinking about it ->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.
August 31, 2015 at 12:24 am #243881In reply to: filter activity loop
Angelo Rocha
ParticipantHi 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>
August 28, 2015 at 5:23 am #243748djsteveb
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:
(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).
August 28, 2015 at 12:22 am #243741In reply to: Quick question about this
djsteveb
ParticipantActivity 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.
August 26, 2015 at 10:30 pm #243681zoewsaldana
ParticipantFixed 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!
August 26, 2015 at 1:15 am #243627danbp
ParticipantAny 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');
August 24, 2015 at 4:14 am #243519In reply to: bp_core_remove_nav_item
danbp
ParticipantHi @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/
-
AuthorSearch Results