Forum Replies Created
-
In reply to: How to redirect to user profile
It helps a lot if you give some info about the ‘problem’.
In this case, I think he just forgot the
exit()call.Try changing to:
wp_redirect( bp_core_get_user_domain( $user_id ) ); exit();In reply to: bp-customDid you read this:
https://codex.buddypress.org/themes/bp-custom-php/‘bp-custom.php does not exist by default’
You need to create it.Maybe:
if ( bp_is_group() || bp_is_user() ) return $activities;In reply to: Profile is Forcing avatar uploadThat message is not caused by BP.
Are you using this plugin:
http://buddydev.com/plugins/bp-force-profile-photo/In reply to: Special characters in initiator.name tokenYou might be able to use this filter
apply_filters( 'bp_email_set_subject', $subject, $this );
And run stripslashes on the $subject.Something like:
function richdal_email_subject( $subject, $obj ) { $subject = stripslashes( $subject ); return $subject; } add_filter( 'bp_email_set_subject', 'richdal_email_subject', 15, 2 );But you shouldn’t have to, afaik.
The issue is probably just due to an over-sight.You can open a ticket here, using the same user / pw as this forum.
Include a link to this topic.
And if you try the filter above, the results of that test.In reply to: how do i add pagination in my recent topics?Sounds like you’re mkissing a call to bbpress pagination.
Maybe this?
<?php bbp_get_template_part( 'pagination', 'topics' ); ?>btw – this is BuddyPress support forums – bbpress support forums are here.
In reply to: Member pages won’t display members. Please help!Try switching to another WP, like 2013.
Try deactivating Membership Pro and BP Member Search.
That should provide some clues.
Do other BP pages work?
In reply to: Minor changes to user profile edit formThe file is:
buddypress\bp-templates\bp-legacy\buddypress\members\single\profile\edit.phpIn reply to: 2.5 HTML email styling not workingHave you read this section ‘Customize Email Template’ on this page:
https://codex.buddypress.org/emails/In reply to: How to display additional member directory.Please don’t call out people individually.
Create a Page – not a Post.
Create a template and assign it to that Page.
https://developer.wordpress.org/themes/template-files-section/page-template-files/page-templates/#creating-custom-page-templates-for-global-usePut your members-loop code in that page.
Also includeget_header()andget_footer()calls.In reply to: Update – Then HackedPlease do not double post.
I’m not aware of any security issues in the latest release.
Have you read this page?
https://make.wordpress.org/core/handbook/testing/reporting-security-vulnerabilities/#ive-been-hacked-what-do-i-do-nowIf you still feel the hack may have been related to BP, you’ll need to provide specifics.
And you should do so via a ticket that you can create here with the same user / pw you use for these forums.
Be very careful about what details you provide on a ticket – they are public.
Be sure to include contact info.In reply to: deny access to admins – PHP errorsTry:
function bpfr_hide_admins_profile() { if( bp_is_user() ) if ( bp_displayed_user_id() == 1 && bp_loggedin_user_id() != 1 ) bp_core_redirect( home_url() ); } add_action( 'wp', 'bpfr_hide_admins_profile', 1 );In reply to: Custom post type comment trackingTry this in your
function register_lesson_type()$args=array( "label" => __("Namaste! Lessons", 'namaste'), "labels" => array ( "name"=>__("Lessons", 'namaste'), "singular_name"=>__("Lesson", 'namaste'), "add_new_item"=>__("Add New Lesson", 'namaste'), 'bp_activity_admin_filter' => __( 'Lessons', 'namaste' ), 'bp_activity_front_filter' => __( 'Lessons', 'namaste' ), 'bp_activity_new_post' => __( '%1$s created a new <a href="%2$s">Lesson</a>', 'namaste' ), 'bp_activity_comments_admin_filter' => __( 'Comments about Lessons', 'namaste' ), 'bp_activity_comments_front_filter' => __( 'Lesson Comments', 'namaste' ), 'bp_activity_new_comment' => __( '%1$s commented on the <a href="%2$s">Lesson</a>', 'namaste' ), ), "public" => true, "show_ui" => true, "has_archive" => true, "rewrite" => array("slug"=>$lesson_slug, "with_front"=>false), "description" => __("This will create a new lesson in your Namaste! LMS.",'namaste'), "supports" => array("title", 'editor', 'author', 'thumbnail', 'excerpt', 'comments', 'post-formats', 'buddypress-activity'), 'bp_activity' => array( 'action_id' => 'new_lesson', 'contexts' => array( 'activity', 'member' ), 'comment_action_id' => 'new_lesson_comment', 'position' => 70, ), "taxonomies" => array("category"), "show_in_nav_menus " => 'true', 'show_in_menu' => 'namaste_options', "register_meta_box_cb" => array(__CLASS__,"meta_boxes") ); register_post_type( 'namaste_lesson', $args );In reply to: Buddypress 2.5 email customizatio – bracketsYou mean the square brackets?
[{{{site.name}}}]
afaik, this should be okay{{{site.name}}}In reply to: Custom post type comment trackingIt might be a timing thing –
bp_initis called before the namaste code creates the cpt.Anyhow… try this in the creation of the namaste cpt:
…
"supports"=>array("title", 'editor', 'author', 'thumbnail', 'excerpt', 'comments', 'post-formats', 'buddypress-activity'), 'bp_activity' => array( 'component_id' => buddypress()->activity->id, 'action_id' => 'new_namaste_lesson', 'contexts' => array( 'activity', 'member', 'groups', 'member-groups' ), 'position' => 70, ), "taxonomies"=>array("category"),…
In reply to: PHP to get Field-Group-ID given Field-Group-Name?In reply to: bp_core_add_message error customI’m trying to change a plugin …
What plugin are you referring to? Link?
In reply to: BuddyPress 2.5.1 – Maintenance releaseDid you try using the repair tool?
wp-admin > Tools > BuddyPress > Reinstall emails (delete and restore from defaults).
In reply to: List of group forums & topicsDid you try explicitly setting the forum id?
Something like:if( bp_group_is_forum_enabled($group) ) { $forum_id = groups_get_groupmeta( bp_get_group_id(), 'forum_id' ); echo 'forum id: ' . $forum_id; $bbp_args = array( 'post_parent' => $forum_id ); if ( bbp_has_topics( $bbp_args ) ) { //etcIn reply to: Change Buddypress default emailSince BP 2.5.0, BP Emails use a different hook for that.
Try:
add_action( 'bp_email', function( $email_type, $email_obj ) { $email_obj->set_from( "no-reply@Enter-your-domain-here.com", "Enter your Site Name Here" ); }, 10, 2 );In reply to: PHP to get Field-Group-ID given Field-Group-Name?Your function is not more efficient if the output of
bp_profile_get_field_groups()is already cached.btw – your query should use
$wpdb->prepareso that the variable is escaped.In reply to: Help! Website internal messengerI’m not aware of any plugin that controls 1-to-1 private messaging for BP.
You’ll most likely have to write it yourself or hire a developer.In reply to: PHP to get Field-Group-ID given Field-Group-Name?Use
bp_profile_get_field_groups().
It looks in the cache first.
Then walk the objects for the id that matches the name.// expose the structure function pp_get_field_groups() { var_dump( bp_profile_get_field_groups() ); } add_action( 'bp_ready', 'pp_get_field_groups' );In reply to: Remove members from group including their activityUse this hook ( from
buddypress\bp-groups\classes\class-bp-groups-member.php) to call a function that deletes the activity:do_action_ref_array( 'groups_member_after_remove', array( $this ) );In reply to: PHP to get Field-Group-ID given Field-Group-Name?As Paul told you, you can’t.
He provided a process for getting what you want – did you try it?