Forum Replies Created
-
To allow all users to see the tab, comment or remove this line
'user_has_access' => ( bp_is_my_profile() || is_super_admin() ),comment just the line ‘author’ in the 2nd widget.
Here a slightly rewamped version, with a sub nav tab.
function bpfr_get_post() { /* * to get all post, comment the line 'author' */ $myposts = get_posts( array( 'posts_per_page' => 3, // set the number of post to show 'author' => bp_displayed_user_id(), // show only this member post 'post_type' => 'post', 'orderby' => 'post_date', 'order' => 'DESC', 'post_status' => 'publish' )); if( ! empty( $myposts ) ) { foreach($myposts as $post) { setup_postdata( $post ); $page_object = get_post( $post ); /* * uncomment next line to show only a list of titles linked to full post * if you uncomment, you have to comment the 2 echo below */ // echo '<a href="' . get_permalink($post->ID) . '">' . get_the_title($post->ID) . '</a>'; /* * comment the 2 following echo (or remove them) if you use the above */ echo '<h3 class="profile_post">'. $page_object->post_title .'</h3>'; echo $page_object->post_content; } wp_reset_postdata(); } else { echo '<div class="info" id="message">No post to show actually.</div>'; } } add_action ( 'my_profile_post', 'bpfr_get_post' ); function bpfr_post_profile_setup_nav() { global $bp; $parent_slug = 'posts'; $child_slug = 'posts_sub'; bp_core_new_nav_item( array( 'name' => __( 'Posts' ), 'slug' => $parent_slug, 'screen_function' => 'bpfr_profile_post_screen', 'position' => 40, 'default_subnav_slug' => $child_slug ) ); //Add subnav item bp_core_new_subnav_item( array( 'name' => __( 'Latest posts' ), 'slug' => $child_slug, 'parent_url' => $bp->loggedin_user->domain . $parent_slug.'/', 'parent_slug' => $parent_slug, 'screen_function' => 'bpfr_profile_post_screen' ) ); } function bpfr_profile_post_screen() { add_action( 'bp_template_content', 'bpfr_profile_post_screen_content' ); bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) ); } function bpfr_profile_post_screen_content() { do_action( my_profile_post); } add_action( 'bp_setup_nav', 'bpfr_post_profile_setup_nav' );hi @splendorito,
add these snippets into bp-custom.php or your child-theme functions.php
The first one builds a new tab called Posts on the user’s profile page:
// building the new tab function bpfr_post_profile_setup_nav() { global $bp; $parent_slug = 'post'; $child_slug = 'post_sub'; bp_core_new_nav_item( array( 'name' => 'Posts', 'slug' => $parent_slug, 'parent_url' => $bp->loggedin_user->domain . $parent_slug.'/', 'screen_function' => 'profile_page_show_screen', 'position' => 40, 'default_subnav_slug' => $child_slug ) ); } function profile_page_show_screen() { add_action( 'bp_template_content', 'profile_post_page_screen_content' ); bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) ); } function profile_post_page_screen_content() { do_action( my_profile_post); } add_action( 'bp_setup_nav', 'bpfr_post_profile_setup_nav' );The second snippet display the user post on the new tab:
function bpfr_get_post() { $myposts = get_posts( array( 'posts_per_page' => 6, // set the number of post to show, -1 if all 'author' => bp_displayed_user_id(), 'post_type' => 'post', 'orderby' => 'post_date', 'order' => 'DESC', 'post_status' => 'publish' )); if( ! empty( $myposts ) ) { foreach($myposts as $post) { setup_postdata( $post ); $page_object = get_post( $post ); / uncomment next line to show only a list of titles linked to full post //echo '<a href="' . get_permalink($post->ID) . '">' . get_the_title($post->ID) . '</a>'; // comment the 2 echo (or remove them) if you use the above echo '<h3 class="profile_post">'. $page_object->post_title .'</h3>'; echo $page_object->post_content; } wp_reset_postdata(); } else { echo '<div class="info" id="message"> <p><strong>'. bp_displayed_user_fullname() .'</strong> has No posts.</p> </div>'; } } add_action ( 'my_profile_post', 'bpfr_get_post' );Tested with bp 2.0.2 / WP 4.0 on twenty thirteen
In reply to: Xprofile field description under field labelif you’re comfortable with HTML, you can try to modify the template by moving the field description to the place you want it to see.
The file is register.php in wp-content\plugins\buddypress\bp-templates\bp-legacy\buddypress\members
Make a copy of that file into your child-theme
/your theme/buddypress/members/register.phphi @ernstl,
it is a very bad idea to hack a core file. The modification you added will be lost at the next bbpress update.
In reply to: Buddypress as business directoryhi @paatukka,
you have to explain what kind of information your business directory should have !
Don’t think about plugins or theme before you now exactly what the project is intended to show.
I guess it would be wise trying to use – so far as possible – the existing before thinking of adding extra stuff.Once installed, and depending the activated components you use, BuddyPress has already a member, a group, a forum and a blog directory.
hi @rzelnik,
you’re welcome ! 😉
Before creating something, read first the comments in bp-activity-template.php:357In reply to: [Resolved] Installing BP from git/svnHi @jreeve,
Perhaps try directly from buddypress svn, https://buddypress.trac.wordpress.org/browser/trunk
This let you also provide patches, which is not possible on github.An install guide is here:
https://make.wordpress.org/core/handbook/installing-wordpress-locally/installing-via-svn/Bravo ! Glad you got it ! 😉
In reply to: Admin Customization Based on RolesOn a single install, users have never access to the dashboard. This only happens if they have a blog on a multi site. And the admin they see is the admin of their blog, not the main blog where BP is installed.
But first, read here please, provide the information and your theme name. be warned that if you use a premium, that you can’t expect much help on this forum, as we have no access to such themes.
FYI: the admin toolbar or any of the BP menus are working like any other menus and toolbar labels on wordpress. Is explained on the WP codex.
For more advanced details, see here.For specific BP customization, read the BP Codex.
In reply to: Avatar Cropping Not WorkingIf you think it is not CSS who breaks the js query working in the background, i guess you think false.
For example if you changed some class name, the script can’t correctly handle the cropping.
Here a very old topic, related to a css problem with avatar. Nothing to do with yours today, but to make you understand that playing with CSS is not a innocent game.
You could also read this related to avatar customization on the codex.
Have you deactivate the actual theme and tried with 2014 ?
Now, at least, as you use a premium theme, you have to ask on the theme support if you encounter issues. We cannot help much for such themes, as we have no access to them.
In reply to: BuddyPress Group Friend Invite Email Link Loop ErrorHum… 😉
Just answered about Premium theme debuging on this topic.
Please read and follow the same instruction.If you can get the error, ask on the theme support. Here we cannot help you, as we have no access to premium themes.
In reply to: Simple Way to Enable Image posting in ForumsYour reply start good, but ends bad 😉
Helas for you, BuddyPress is not Facebook, it will get used 😉
The snippet is written in php, and has nothing to do with CSS.You can add it into your child theme’s functions.ph or into bp-custom.php
Deactivate the plugin when you test the snippet and remember that it could only be used by user with admin role. Anyway, if you use the plugin, the snippet won’t be usefull.
I tested the bbPress Enable TinyMCE Visual Tab plugin and it works correctly for group forums. In this case, only user with author role can see and use it.
I don’t know what happens to the insert to post button in your dashboard. 🙄 This is generally due to a js conflict.
What theme do you use ?
When the Visual Tab plugin plugin is deactivated, can you use this button when inserting a picture into a post ?
Have you plugins ? Give the names please.In reply to: BuddyPress Group Friend Invite Email Link Loop Errorhttps://buddypress.org/support/topic/when-asking-for-support-2/
with theme name please ! Thank you !In reply to: Simple Way to Enable Image posting in Forumsbbpress use tinymce, and you can add some tools to the editor. Search on the tinymce support forum. Also some topics on the bbpress forum around this.
As admin you can use this snippet, to get the same media button as n the backend editor.
Be aware that allowing access to anybody to your medias is risky.
That’s why the default bbP editor is only shipped with an image linker.
So i guess shane’s tip to use the plugin is best to do for now.It exist also this plugin, with image upload allowed for authors and above roles.
https://wordpress.org/plugins/bbpress-enable-tinymce-visual-tab/function bpfr_bbp_editor_upload_media( $args ) { $args['media_buttons'] = true; return $args; } add_filter( 'bbp_before_get_the_content_parse_args', 'bpfr_bbp_editor_upload_media' );In reply to: Disable Canvas sidebar on Buddypress pagesIn reply to: Extended Profiles / Can't edit the fieldsIf you have suggestion or enhancement request, feel free to leave them on
https://buddypress.trac.wordpress.org/newticket
You might use the same login as on this forum.In reply to: List or display posts on a user's profilehi @cyndimarie,
no idea of what you erased by error. 😉 But can this snippet help you ?
Add it to bp-custom.php or functions.phpfunction bpfr_get_post_on_profile() { $myposts = get_posts( array( 'posts_per_page' => -1, 'author' => bp_displayed_user_id(), 'post_type' => 'post' )); if( ! empty($myposts) ) { echo '<h5>My awesome posts:</h5>'; echo '<ul>'; foreach($myposts as $post) { setup_postdata( $post ); echo '<li><a href="' . get_permalink($post->ID) . '">' . get_the_title($post->ID) . '</a></i>'; } echo '</ul>'; wp_reset_postdata(); } else { echo '<div class="info" id="message"><p><strong>'. bp_displayed_user_fullname() .'</strong> has No posts.</p></div>'; } } add_action ( 'bp_before_member_header', 'bpfr_get_post_on_profile' );In reply to: Extended Profiles / Can't edit the fieldsIt is not an issue, it is intended so !
The logged user’s profile tab comes with 3 sub menus:
– View (public)
– Edit (private)
– Change avatar (private)On the main navigation of the member, you have at least
– Settings with 3 sub nav items:
– account credential (email, password)
– notifications
– field visibility settingsAnd if component is activated:
– Friends
– Groups
– ForumI agree that this Setting is confusing, at least, because those labels should indicate My Friends, My Groups, My Forums and My profile fields visibility settings, which is too long i grant you. 😉
FYI: such distinction wern’t really possible untill now in the original english version.
But the upcomming BP 2.1 brings some better context disambiguation just to improve such situation.To solve this today, you can:
1) create a translation file and modify the wording (but, as said, without disambiguation)
2) use a child theme and hardcode the text you want into the template file (best approach)
3) wait a few days for 2.1 to use the first optionIn reply to: Searching Members Results Screen – Issue with linksno worry about your english, mine is not perfect either.
We are here on a buddypress support forum and it is probably clear to everybody that we essentialy talk about BuddyPress and that the most of us know (more or less) how to use and manipulate it.
The problem is that if you want something to be replicated, you have to do it in the same condition as the user telling about an issue. In your issue description, the important thing is not the how, but the why.
No ?
Please try to understand that it is important to give at least your WP and BP version and the used theme
In reply to: [Resolved] Sort user list by last nameBravo mom ! 😉 Glad you got it to work…
In reply to: [Resolved] how to export/import groupsIncredible: you got it! You’re welcome 🙂
In reply to: Avatar Cropping Not WorkingIn reply to: Searching Members Results Screen – Issue with linkshi @cartographer,
Can you replicate the issue ?
How could somebody replicate an ignored context ?Please read here:
https://buddypress.org/support/topic/when-asking-for-support-2/
and also add the theme nameIn reply to: Extended Profiles / Can't edit the fieldsPlease read here and give also some infos about your theme
https://buddypress.org/support/topic/when-asking-for-support-2/