I’m using BuddyPress for an intranet solution. Now I want to display absences of my users. Can I create a custom field with a date from / to and display current abscences in a sidebar? Also I’d like to have an overview page with all absences – best would be some kind of calendar or a chronical list. Is there even some kind of plugin for that?
No, you do it wrong. Read the codex links i provided.
buddypress-functions.php in the bp-templates\bp-legacy folder or profile-loop.php are not the right files.
I told you to put the snippet into bp-custom.php OR in your child-theme functions.php
Why do you hack core files ? They will be overwriten at next BP update… 👿
Wait!!! No I got sucessfull! @danbp I inserted this code on the buddypress-functions.php in the bp-templates\bp-legacy folder, and it is fantastic, very great!
http://tiquality.com.br/intranet/members/mallandro/profile/
Thanks guys, very thanks for your help!
hello!
thanks so much my friend for the help.
I Inserted the code “function tiquality_add_custom_field() {” in profile-loop.php and inserted the “add_action(‘bp_member” in the functions buddypress, and the result was not ok, see: http://tiquality.com.br/intranet/members/ayrton/profile/
hi @tiquality,
to show the user’s mail above the other user information, you can add the following snippet to bp-custom.php or child-theme’s functions.php
Assuming users gave a valid email at registration, we can output that address.
Avantage is that they haven’t to enter their mail a second time while completing their profile.
So we just need to manually add this address to the template, using one of the action hook avaible in profile-loop.php
function tiquality_add_custom_field() {
if ( bp_is_active( 'xprofile' ) ) :
if ( is_user_logged_in() ) {
?>
<div class="bp-widget <?php bp_the_profile_group_slug(); ?>">
<table class="profile-fields">
<tr class="my_mail">
<td class="label">Contact me</td>
<td class="data"><a href="mailto:<?php bp_displayed_user_email(); ?>"><?php bp_displayed_user_email(); ?></a></td>
</tr>
</table>
</div>
<?php
}
endif;
}
add_action('bp_profile_field_buttons', 'tiquality_add_custom_field');
If you prefer it on the profile header, use the action hook indicated by Brajesh
add_action('bp_member_header_actions', 'tiquality_add_custom_field');
Hi @henrywright sorry for the delayed response but I had other things to tend to. Yes, I am seeing the problem on both the localhost and my online server. The only difference between the two is that my local server is returning the error code and my online server is not.
I am once again updated to the latest versions of both WordPress and BuddyPress.
Hi All,
I’m sure there’s a simple answer here, but I haven’t been able to find it.
I need to allow subscribers to post to buddypress, but never access the wordpress admin panel. The following code blocks subscribers from the admin panel:
// Block subscribers from the WordPress back end admin
function block_subscriber_admin(){
if (current_user_can('subscriber')){
wp_redirect( home_url() );
exit;
}
}
add_action( 'admin_init', 'block_subscriber_admin');
Problem: a side-effect of this code is that it somehow breaks the AJAX for posting and commenting on Buddypress pages. Instead of displaying the newly posted content, buddypress instead renders the home page of the site.
Is there a better way of blocking access to the WP admin panel? One that will not break BP?
Many thanks,
Adam
Hallo @rene-streber,
First of, i would recommend that you revert to a basic WP install using 2014 or 2015 theme and the WP’s german language activated and all plugins deactivated.
If you have a local install, suggest you do your test on it instead of the prod site.
Once this is done, you activate BuddyPress. German language will automatically be uploaded to the right folder (wp-content/languages/plugins/buddypress-de_DE.mo)
The original translation is here. It is complete to 100%. (and also the official translation).
FYI deckerweb provides a translation for bp 1.9 & 1.9.1. So seems to me it is outdated now.
Check if anything is correctly übersetzt. Theoretish sollte es jetzt funktionnieren.
If ok, you activate the main theme. Recheck everything. If ok, reactivate your plugins one by one and check each step to isolate an issue, if ever.
If everything is correct again, you can handle the specifics for your homepage. But remind one thing: BuddyPress components use a page system which is only in for internal purpose. This means that you can’t apply a page model like for an usual WP page. And if you use a special template just for the homepage, you have to adjust it to work with BuddyPress.
Each activated BP component should have a page assigned. And this page must be unique and empty, whithout any template or model settings, just a title.
I see that you have some issue with page names in your menu. Button show community2 and the permalink contains community-4. Check this too, to get community only everywhere. And probably clear your trash as it may contain some duplicates from previous attempts.
Once this is cleaned, und mit klarer aussicht, simply resave your permalinks to reinitialize all links.
bp_is_user_forums(), check if forums component is active.
https://buddypress.trac.wordpress.org/changeset/6484
Which type of forum do you use ? Standalone or group, or both ?
In bbPress you have a folder called extend containing the BP specific templates. Should you use them depends the forum type.
If bbPress is standalone, the plugin is totally independant of BuddyPress in regards of templates at least.
Hi support team, recently posted this issue one week ago, but may be in the wrong forum. Hope you can help me.
Hi,
I’m using Buddypress (version 2.2.3.1).
All the groups in my community are displayed in the group list/directory but unfortunately I’m not able to open to the single group pages as well as create a new group. In both cases, the error 404 is presented.
I recently installed the new Boss Theme (version 1.1.5) on my homepage but it is the same problem as a tried it with the former theme (buddyboss version 4.1.9).
The permalink structure is based on the post name: it is like https://sport-und-ms.phil.fau.de/community/gruppen/sherlock-holmes/ (as example for single group page)
The support team of the buddyboss theme considered a slug issue or another hierarchical issue
Additionally, we are translating some of the *.po files of buddypress into german. Could this be a reason? I reran the original language file in (http://deckerweb.de/sprachdateien/buddypress/) but the problem still exists.
Buddypress runs in conjunction with bbpress (2.5.7), and buddypress…private activity (1.3.6), follow (1.2.1), wall (0.9.4), group documents (1.9.3.1)
Wordpress version 4.2.1
kind regards, René
Sorry if I am late here.
I just tested the plugin today with BuddyPress 2.2.3.1 and It is working. I have updated a new version too that cleans it a little bit.
Hope that helps.
Hi,
Is your theme BuddyPress compatible, if yes, Please check if there is ‘members/single/member-header.php or buddypress/members/single/member-header.php
If yes, you can put the code anywhere in that file. If your theme does not have this file, It can be added via ‘bp_member_header_actions’ too like this
add_action('bp_member_header_actions', 'devb_show_displayed_user_email' );
which you can put in the bp-custom.php too.
If you add the code below to your style.css file it won’t appear on the page:
#buddypress .field-visibility-settings-notoggle {
display: none;
}
Hi !
I’m using a wp template based on twig file and I want to add a Private message button on post which are create by Buddypress user.
I found this code “bp_core_get_userlink() ” but I don’t know how to write it in my twig file…
I try that but it doesn’t work, someone can help me ?
{% set url = bp_core_get_userlink() %}
<FORM ACTION="{{url}}">
<INPUT TYPE="SUBMIT" VALUE="Envoyer un message au propriétaire"></FORM>
@danbp
members/single/index.php does exist, I created it. It also takes as a valid template. If you use home.php erroneous p tags are placed throughout the page.
bp_is_user_forums() doesn’t seem to work.
I think the template names were all changed, https://codex.buddypress.org/themes/theme-compatibility-1-7/template-hierarchy/#single-member-pages
/members/member/forums/ doesn’t list anything, returns nothing.
/members/member/forums/replies – lists the topics, although they aren’t replies they are topics started.
Thanks for reply.
p.s.
This works only in the member loop.
Not sure what you mean by a user standard page, but if you mean a normal WP page, see here first:
Template Hierarchy
or more simplier, see
https://wordpress.org/plugins/bp-profile-search/
Deactivate all plugins except BuddyPress and activate 2014 theme.
See if it works. Then reactivate one by one until you find a culprit.
members/single/index.php doesn’t exist. It’s members/index.php
elseif(bp_is_user_forums()) is in members/single/home.php
bp_is_user_forums function is in bp-core/bp-core-templates.php:1791
Confused ? Or really lost ?
Anyway, your question is How can I serve my own template, and inside that template how do I query a members topics?. Right ?
Guess you have to do some homework. See:
Template Overload from a Plugin
bp_core_new_nav_item()
Other example, see here (you just have to change the post type probably: post vs. topic)
https://buddypress.org/support/topic/creating-a-custom-tab-that-takes-in-the-info-from-wp-recent-posts/
if you’re sure you strictly followed these instructions, enable wp_debug and see which kind of error you get when on the group front-end settings page.
Can you upload user avatars correctly ?
Can you upload pictures to Media Library ?
And last but not least, give your theme name or the site url.
@danbp Thanks for reply.
Inside of members/single/index.php
There’s some logic to serve the correct template.
I notice at the line
elseif(bp_is_user_forums()) :
This never actually runs… It’s not until the “// if nothing else sticks” fail safe the logic matches and the plugins template is loaded.
So two problems… How can I serve my own template, and inside that template how do I query a members topics?
Basically I’m working with the legacy templates which ship with the plugin to get started with this theme.
Also, sidenote… BuddyPress seems to inject weird paragraph tags throughout the inner templates if you don’t have the correct template names in your-theme/buddypress
Only seems to happen when a buddypress folder exists inside the theme.
I can’t explain better as the Codex. You simply have to follow what’s explained here:
Twenty Eleven Theme