Search Results for 'buddypress'
-
AuthorSearch Results
-
March 10, 2017 at 8:13 pm #264652
In reply to: template overload isn’t working as expected
r-a-y
Keymaster@kalico –
Template hierarchy doesn’t work for bp-default themes or older-style BuddyPress themes that are derivatives of bp-default.In your situation, I would just modify/themes/YOUR-THEME/groups/index.phpdirectly.If this doesn’t exist in your theme, that means you are using a child theme, so copy/themes/PARENT-THEME/groups/index.phpto your child theme and make your mods.I’m so wrong! Read my updated reply below.
March 10, 2017 at 7:13 pm #264649In reply to: Activity Custom Content After Post Iteration
tommyhares
Participantdo_action( 'bp_before_activity_loop' ); ?> <?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) ) ): if ( empty( $_POST['page'] ) ) : ?> <ul id="activity-stream" class="activity-list item-list"> <?php endif; ?> <?php $count = 0; $args = array( 'posts_per_page' => 100000, 'offset' => 0, 'category' => '', 'category_name' => 'freedom-friend-news', 'order' => 'desc', 'orderby' => 'date', 'include' => '', 'exclude' => '', 'meta_key' => '', 'meta_value' => '', 'post_type' => 'post', 'post_mime_type' => '', 'post_parent' => '', 'author' => '', 'author_name' => '', 'post_status' => 'publish', 'suppress_filters' => true ); $news_articles = get_posts( $args ); while( bp_activities() ): bp_the_activity(); bp_get_template_part( 'activity/entry' ); $current_user = wp_get_current_user(); if( $current_user->user_login == 'tommy' ): $count++; $news_iteration = $count / 7)-1; // Loop through news articles as long as there are articles. if( $count % 7 == 0 && !empty( $news_articles[$news_iteration] )): echo 'News Article'; echo 'Iteration: '.$news_iteration; echo $news_articles[$news_iteration]->post_title; echo $news_articles[$news_iteration]->post_excerpt; endif; endif; endwhile; ?> <?php if ( bp_activity_has_more_items() ) : ?> <li class="load-more"> <a href="<?php bp_activity_load_more_link() ?>"><?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; ?>March 9, 2017 at 10:11 pm #264632In reply to: template overload isn’t working as expected
kalico
ParticipantI’m now trying to re-word my original response, so hopefully it will get past whatever filter is preventing me from reposting the dropped message.
Thanks @danbp. Unfortunately, this wasn’t the solution I needed. Partly, perhaps, but not entirely.
As you pointed out, I was wrongly copying files from bp-themes rather than bp-templates (a codeblind mistake on my part). But I was doing everything else correctly, in terms of file structure and use of
/community/according to your write up.I went through my steps again, this time copying
/bp-templates/bp-legacy/buddypress/groups/index.phpover to
/community/groups/index.phpwith zero impact. (I test this by adding a bit of text in a spot that should display on the live site, and it does not show up. Tried several different places, no effect.)
This would seem to demonstrate that BP is not reading that index.php file at all. It’s only reacting to the template change if it is called “index-directory.php”.
I changed the file name (without moving the file) from index.php to index-directory.php, just as I did before, but again, it did not work as expected. The groups directory page picked up the new template, but it displayed a completely stripped-down version of the page, with no CSS at all (white background, default font, everything left-aligned, etc).
I have been assuming that the index.php file would be a proper starting point (a template) to create custom modifications to the groups directory page (i.e., index-directory.php), but clearly that does not hold true.
This seems very strange, because in looking at the php code in index.php, it’s got all the elements I see in the source for my live groups directory page. So it appears to be getting that exact same information from “somewhere else” within the plugin structure, but I can’t figure out where.
My question is now: What file should I use as a starting point to duplicate my existing groups directory, so I can make custom modifications?
I do hope you (or someone) can point me in the right direction. Thanks in advance!
March 9, 2017 at 8:39 pm #264628In reply to: Static page to Dynamic
Henry Wright
ModeratorYou use
bp_core_new_nav_item(). See this article for more info:March 9, 2017 at 9:58 am #264613In reply to: template overload isn’t working as expected
danbp
Participantbp-default theme is the old mandatory theme. BP doesn’t use it anymore since 1.9. This historical theme is only in for backpat compatibility perhaps still in use on some very old installs…
Actually, BP fits to almost any modern theme, correctly formated and respecting WP’s code standarts.
What you can try is to create in your child theme, a directory called “community” or “buddypress”.
If you need to alter a bp template, you copy the original file from here:
/plugins/buddypress/bp-templates/bp-legacy/buddypress/You copy only the file you need and you respect the folder structure who starts from
/buddypress/.../Note that you if you want to use
/community/in the child, this folder is equal to/buddypress/in the original template folder. You copy (for ex.) group’s index.php file.
From:
/plugins/buddypress/bp-templates/bp-legacy/buddypress/groups/index.php
To:
/themes/my_child/community/groups/index.phpMarch 9, 2017 at 9:44 am #264610In reply to: Buddypress Nouveua
danbp
ParticipantNot defined yet. It’s still a work in progress.
https://github.com/buddypress/next-template-packsor follow tickets related to “bp-nouveau” on Trac.
March 9, 2017 at 4:40 am #264594rafiquej
ParticipantThanks for your replies 🙂
@danbp your solution only changedFromemail address. But i want to changeReply-toemail address tonoreply@example.com
@r-a-y I placed your code in functions.php but when i tried to register, i am getting this error.Fatal error: Call to a member function get_address() on string in /public_html/wp-content/plugins/buddypress/bp-core/classes/class-bp-phpmailer.php on line 94It only appears when i use this code, or else it works fine. That’s weird :/
March 8, 2017 at 9:39 pm #264586In reply to: Profiles: How to expand it?
r-a-y
KeymasterView this guide to create your own profile fields:
March 8, 2017 at 9:37 pm #264585r-a-y
KeymasterI commented on this behavior in this ticket comment:
https://buddypress.trac.wordpress.org/ticket/7051#comment:3BuddyPress sets the
Reply-Toemail header to the admin email’s address by default.To override this, you have to use the
'bp_email_set_reply_to'filter since'wp_mail_from'only handles theFromemail address header and notReply-Toheader.The following would work:
add_filter( 'bp_email_set_reply_to', function( $retval ) { return new BP_Email_Recipient( 'noreply@example.com' ); } );March 8, 2017 at 7:54 pm #264580In reply to: White Page
danbp
ParticipantBP pages should be empty, and specially when you open them on dashboard. The content is dynamic and is added depending the context.
Please read here to understand how this works:
March 8, 2017 at 7:09 pm #264578Venutius
ModeratorThat sounds like an error with the configuration of your Media plugin, not BuddyPress. There’s probably a setting somewhere for an upload limit per group or individual.
March 8, 2017 at 5:58 pm #264574In reply to: Issue with Avatars: wrong upload path
giobby
ParticipantFYI – I’ve also tried to disable all the plugins except buddypress and to use a standard wordpress template (twentyseventeen), but the problem is still there.
March 8, 2017 at 3:52 am #264566In reply to: fatal error message
paripari
ParticipantThank you guys.
This one did the trick.
Your theme is using an older BuddyPress function – bp_is_member().
Switch that out for bp_is_user().
Theme author will update
/Hamid
March 7, 2017 at 10:41 pm #264563In reply to: Record activity when xprofile field is updated
danbp
ParticipantSorry, but as i said, you’re alone. If you’re stuck with coding, try to hire a dev.
March 7, 2017 at 10:37 pm #264562danbp
ParticipantHi,
ever heard about MyCred plugin ? Give it a try, was initially made for BuddyPress… 😉
Note: bbpress can work with BuddyPress, but is a separate plugin, with his own support. Here we help only for BuddyPress.
March 7, 2017 at 7:47 pm #264558In reply to: Record activity when xprofile field is updated
danbp
ParticipantHi,
as you noticed, BP can’t do this. BuddyPress is member oriented, not “field” oriented.
In the activity stream you will see a member’s activity (Exentric updated his profile), but you can’t expect to see that field ID 5896 on Exentric’s profile was modified.
Note that with php, nothing is theoretical impossible, so feel free to code something who fit your need. But you’ll be alone to start this adventure.
March 7, 2017 at 6:59 pm #264557In reply to: Record activity when xprofile field is updated
exentric
Participantok from all the reading I have done , this in buddypress is impossible to do …… any other suggestions , all i need is a field in the profile fields that when is updated will show in the activity stream ?
March 7, 2017 at 6:11 pm #264554In reply to: Translation stopped working
danbp
ParticipantHi,
2 – define (‘WPLANG’, ‘en_US’); in wp-config
3 – Dashboard >> Settings >> General >> Site Language (buuddpress-en_US is not in the list)2 is no more necessary since WP 4.0. Remove it.
3 is not intended to show in that list. General settings are for WordPress language, not for plugins.WP’s language files use only the domain name (en_UK.mo, en_US.mo, be_BE.mo, etc)
Plugin language files like BuddyPress use their name in addition to the domain (buddypress-fr_FR.mo, buddypress-en_US.mo, and so on)In your case, you can use WP default language setting (english) and a more specific lang for BP, en_US. It is an avantage for you, as there are only few difference beetwen US and GB, and you can even omit BP translation, as it is coded in english. The situation is much more annoying for all other non english languages!
https://codex.wordpress.org/Installing_WordPress_in_Your_Language
March 7, 2017 at 5:46 pm #264553In reply to: Translation stopped working
LavishDhand
ParticipantForgot to mention I also tried deactivating and reactivating BuddyPress which did not work.
Now, finally something has worked for me. While trying random things, I switched to English (UK) in Dashboard >> Settings >> General >> Site Language and switched back to English (United States) and it has worked.
Anyone, facing this issue try the above.
Thank you!
March 7, 2017 at 1:41 pm #264548In reply to: Buddypress, BBPress, and breadcrumbs
danbp
ParticipantBuddyPress doesn’t use breadcrumbs. This belongs to bbpress and sometimes to a theme or a plugin.
Ask on respective support. Or try out this plugin.
March 7, 2017 at 10:25 am #264541Paul
ParticipantThis is the method I use
using loco translate plugin
March 7, 2017 at 7:55 am #264540In reply to: BuddyPress Newsletter relaunched
Slava Abakumov
ModeratorA new issue was released yesterday!
BuddyPress Newsletter #23 – several new plugins (mainly) and a possible new look of BuddyPress.org
March 7, 2017 at 2:51 am #264538In reply to: Changing the groups slug
Henry Wright
ModeratorThe BP Edit Group Slug plugin has been updated to work with BP 2.8. See this Tavern post for details:
BuddyPress Core Contributors Working on a Way to Safely Edit a Group’s Permalink
March 6, 2017 at 10:17 pm #264535In reply to: Not getting BuddyPress registration emails
March 6, 2017 at 10:07 pm #264534In reply to: List of Group Member IDs
danbp
ParticipantThe first part of this topic gives a solution for your question:
https://buddypress.org/support/topic/access-xprofile-field-data-in-a-custom-page/ -
AuthorSearch Results