Search Results for 'buddypress'
-
AuthorSearch Results
-
April 18, 2015 at 7:25 pm #238012
In reply to: Where are loops put?
@mcuk
Participant* bp-legacy>buddypress>activity>index.php (in child theme folder)
April 18, 2015 at 7:17 pm #238010In reply to: How to change <title> tags order?
danbp
ParticipantThis question is related to bbPress.
See bbp_title filter in wp-content/plugins/bbpress/includes/common/template.php:2519
Similar technique is used by BuddyPress.
See function bp_modify_page_title in bp-core-filsters.php:514Here a usage example to uppercase BP titles.
function bpfr_profiles_wp_title( $title ='', $sep = '', $seplocation = '' ) { if( bp_get_displayed_user_fullname() ) { $bp = buddypress(); // Get the component's ID to try and get it's name $component_id = $component_name = bp_current_component(); // Use the actual component name if ( !empty( $bp->{$component_id}->name ) ) { $component_name = $bp->{$component_id}->name; // Fall back on the component ID (probably same as current_component) } elseif ( !empty( $bp->{$component_id}->id ) ) { $component_name = $bp->{$component_id}->id; } $title = str_replace( ucwords( $component_name ), '', $title ); } return $title; } add_filter( 'bp_modify_page_title', 'bpfr_profiles_wp_title', 20, 3 );April 18, 2015 at 7:12 pm #238008In reply to: Where are loops put?
@mcuk
ParticipantHi @danbp,
Thanks for reply. Yeah i know about those. I meant where would I put custom loops with my own filters etc. The wordpress codex says to put them in index.php. I assume that for Buddypress that would be:
bp-legacy>buddypress>activity>index.php
Then call it within bp-custom.php?
April 18, 2015 at 7:08 pm #238007In reply to: Where are loops put?
danbp
ParticipantLoops are in templates.
See bp-templates/bp-legacy/buddypress/
And read carefully template hierarchy to understand how all this is working together.
April 18, 2015 at 2:53 pm #237994In reply to: Calling a post authors activity stream
UrbanFix
ParticipantThe code im using to add a new tab isnt to add one to buddypress,
If this is what you are after it is done in a different way look at;https://buddypress.org/support/topic/how-do-i-add-a-menu-item-on-the-profile-page/
or subnav
April 18, 2015 at 2:22 pm #237991In reply to: Calling a post authors activity stream
UrbanFix
ParticipantSorry I thought I had!
This is code I have created to add a new tab to a cpt, its on
<?php add_filter('geodir_detail_page_tab_list_extend', 'geodir_detail_page_tab_list_extend') ; function geodir_detail_page_tab_list_extend($tab_array) { $tab_array['my_new_tab'] = array( 'heading_text' => __('New Tab',GEODIRECTORY_TEXTDOMAIN), 'is_active_tab' => false, 'is_display' => apply_filters('geodir_detail_page_tab_is_display', true, 'my_new_tab'), 'tab_content' => '' ); return $tab_array ; } add_action('geodir_after_tab_content' ,'geodir_my_new_tab_content'); function geodir_my_new_tab_content($tab_index) { if($tab_index =='my_new_tab') { echo "Hello world!!"; } } ?>These pages/cpts are created by buddypress users. So, on this new tab i have created i wish to call the activity stream of the author!
My php knowledge is almost nill so I am really struggling, I didn’t think it was to hard a thing to do!@mcuk
ParticipantYou need to create a new php file called bp-custom.php . Then post the code @danbp posted above into it.
See here:
April 18, 2015 at 12:54 pm #237987In reply to: Calling a post authors activity stream
Henry Wright
ModeratorHi @urbanfix
Here’s the standard loop taken from here.
<?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) ) ) : ?> <?php while ( bp_activities() ) : bp_the_activity(); ?> <?php locate_template( array( 'activity/entry.php' ), true, false ); ?> <?php endwhile; ?> <?php endif; ?>If you scroll down the page and take a look at filtering options, you’ll see
user_id. So your loop will look something like this:$post = get_post( get_the_ID() ); $filter = '&user_id=' . $post->post_author; if ( bp_has_activities( bp_ajax_querystring( 'activity' ) . $filter ) ) : while ( bp_activities() ) : bp_the_activity(); locate_template( array( 'activity/entry.php' ), true, false ); endwhile; endif;Note: I haven’t tested.
Caveat: This must be used within The Loop.
April 17, 2015 at 6:35 pm #237980In reply to: How to infinite scrolling Buddypress Messages ?
Ben Hansen
Participantsorry i don’t know any plugins or how to hack it but i think that would make a great feature suggestion for core if you can please add it to trac here:
https://buddypress.trac.wordpress.org
if not let me know and i’ll add it.
🙂
April 17, 2015 at 1:45 pm #237976shanebp
ModeratorTry using this hook from
function groups_delete_groupin buddypress\bp-groups\bp-groups-functions.phpdo_action( 'groups_before_delete_group', $group_id );April 17, 2015 at 1:27 pm #237974S. Panda
ParticipantThanks for the reply, unfortunately that patch didn’t help. Here’s what I have in wp-content/plugins/bbpress/includes/extend/buddypress/activity.php:
// Get the activity stream item, bail if it doesn't exist // ===== BBPRESS BUG WHICH RETURNS DUPLICATE ===== // ===== bbp_reply_created UPON EDITS ===== // $existing = bp_activity_get_specific( array( 'activity_ids' => $activity_id, 'show_hidden' => true, 'spam' => 'all', ) ); // if ( empty( $existing['total'] ) || ( 1 !== (int) $existing['total'] ) ) // ===== END BUGGY CODE / START PATCH ===== $existing = new BP_Activity_Activity( $activity_id ); if ( empty( $existing->component ) ) // ===== END PATCH ===== return null; $existing = new BP_Activity_Activity( $activity_id ); if ( empty( $existing->component ) ) // Return the activity ID since we've verified the connection return $activity_id; }danbp
ParticipantHi,
to show only notices (aka updates) on the SWA, try this snippet (place in bp-custom.php)
function make_swa_show_notice_only( $retval ) { if ( bp_is_page( 'activity' ) ) { $retval['action'] = 'activity_update'; } return $retval; } add_filter( 'bp_after_has_activities_parse_args', 'make_swa_show_notice_only' );Reference: https://codex.buddypress.org/developer/using-bp_parse_args-to-filter-buddypress-template-loops/
April 17, 2015 at 6:57 am #237963danbp
ParticipantHi @spanda,
it’s a bbpress bug who remains since BP 2.0.
A patch was provided 7 mounth ago but not applied in latest bbP (2.5.6).Note that the patch contains a bracket error: (
component ) ) {). Remove{!Open wp-content/plugins/bbpress/includes/extend/buddypress/activity.php
Remove or comment line 279 & 280 and replace by
$existing = new BP_Activity_Activity( $activity_id ); if ( empty( $existing->component ) )save and you’re done.
April 16, 2015 at 2:04 am #237949In reply to: [Resolved] Mention tag in forum how to get it ?
Svend Rugaard
ParticipantWas installing https://wordpress.org/plugins/buddypress-wall/ and it actually make the error go away .. :S
April 15, 2015 at 10:38 pm #237947Svend Rugaard
ParticipantHmm they say it isnt “compabitle” with buddypress only BBpress but it works but not on those 2 things.. isnt it possible for someone to help me or at least tell me how i find these blank spaces ? ..
I have done a clean install on http://area51.ps3geeks.dk/ only
April 15, 2015 at 9:23 pm #237944In reply to: New plugin: BuddyPress Mute
Henry Wright
ModeratorHey @djsteveb,
Would like to try this out one of my sites.. wondering though, how this comparing to buddy block or whatever it is called? Feature compare?
Check out the first two paragraphs of the README.md for how muting differs from blocking or unfriending.
Also, this would be excellent if it also could “mute” / hide / selected groups from the sidebar widgets and sitewide activity..
In v1.0.0 of the plugin, only muting users is supported. So at the moment, it works just like Twitter.
At some point in the future I might expand functionality to mute group updates, and perhaps even activity types.
also wondering if possible to hide posts from ‘muted users’ from appearing in the sidebar of sidewide posts when an annoying user has a blog with MU setup and stupid posts show up on the sitewide posts widget
Right now just activity items get muted. Muting posts is a great idea; something I’ll have to think about for a future release.
For answers to more of the plugin’s FAQs, see here:
https://wordpress.org/plugins/buddypress-mute/faq/
Hope this info helps 😀
April 15, 2015 at 8:31 pm #237940In reply to: [Resolved] Edit Registration page
goakes
ParticipantHello
Not sure where this question fits. If I go to login through the Buddypress login dashboard and only enter my user name then login, I’m taken to the WordPress login page. Is there a way to take me to keep me on the buddypress login page with an error message?
Equally is there a function for ‘forgotten password’ without going through the WordPress login page?
Gary
April 15, 2015 at 7:59 pm #237938In reply to: Unable to Edit Profile
David
ParticipantIn BuddyPress, if I click on the profile option it will show my profile that other users can click on in the BuddyPress groups. Once you click on the profile link it gives you an option to click edit to edit your profile….I just get a blank page with no options to edit anything.
April 15, 2015 at 7:30 pm #237935modemlooper
ModeratorI would google wordpress appointment plugin
There seems to be some options, you don’t necessarily need BuddyPress
April 15, 2015 at 6:42 pm #237932In reply to: wp_insert_comment and activity comments
shanebp
ModeratorPlease use the
codebutton when posting code.If I go into the admin panel and select Activities, I can see the same comment, but “View Activity” takes me to the activity panel, were I can see the parent activity and the post successfully.
As you can see, the url is being rewritten when you click on ‘view activity’.
You can either figure how the url is being rewritten.
Or create your own url using the fields from the comment object.
Something like:
$url = bp_core_get_userlink( comment[user_id] ) . '/activity/' . comment[comment_ID] . '/';April 15, 2015 at 3:23 pm #237920@mcuk
ParticipantHi all,
I’m still looking for the correct screen function to mimic/copy the existing favorites page and the method by which to load it. All I want to do is duplicate that page somewhere else.
The above code works to setup the new subnav tab but I can’t get any page content (ignore the link array item, that is obviously wrong).
Is the approach below the method by which to load a standard buddypress template to a subnav tab or is that just for custom screen functions? :
April 15, 2015 at 1:17 pm #237915shanebp
ModeratorWhere are you getting
bp_pre_group_queryfrom?
You can’t make up hooks :>
SeeBP_Groups_Group::getin buddypress\bp-groups\bp-groups-classes.php for more info.Try this:
function antares_groups_filter_options() { echo '<option value="user-league">User League</option>'; } add_action( 'bp_groups_directory_order_options', 'antares_groups_filter_options' ); function antares_ajax_querystring( $query_string, $object ) { if ( 'groups' != $object ) return $query_string; if ( ! bp_is_groups_directory() ) return $query_string; $query_args = wp_parse_args( $query_string, array() ); $page = $query_args['page']; if( isset( $query_args['action'] ) && $query_args['action'] == 'user-league' ) { $query_args = array(); $query_args['page'] = $page; $query_args['orderby'] = 'name'; $query_args['order'] = 'ASC'; $query_args['include'] = antares_get_groups(); $query_string = http_build_query( $query_args ); } return $query_string; } add_filter( 'bp_ajax_querystring', 'antares_ajax_querystring', 32, 2 ); function antares_get_groups() { // put your custom sql here // return a csv string of the groups ids // for example '1,22,57' }April 15, 2015 at 12:42 pm #237912Gayatriom
Participantok. one more question.
I see how they created businesses from groups and allow members to join ‘the hub’ which is essentially a group.But i can’t see the members that are a part of the ‘hub’.
Is that possible with buddypress?April 14, 2015 at 10:30 pm #237891In reply to: Remove Email requirement
shanebp
ModeratorUnless you’re specifically using the default theme, you only have to change this file:
\buddypress\bp-templates\bp-legacy\buddypress\members\register.phpAnd the recommended approach is to create a template overload in your theme:
April 14, 2015 at 10:14 pm #237890In reply to: Remove Email requirement
Dani-Girl
ParticipantSo, for a temporary solution, I edited the BuddyPress register.php page (in both Default theme and legacy template) to generate a random email address each time the register page loads, and hid the email required field.
would like an option, however, where I don’t have to touch the actual BuddyPress code.
-
AuthorSearch Results