Search Results for 'buddypress'
-
AuthorSearch Results
-
August 19, 2015 at 9:56 pm #243402
In reply to: [Resolved] Not working with WordPress 4.3
danbp
ParticipantDo you use a custom function building a widget ?
if you used the old php4 method
parent::WP_Widget( false, $name = __( 'My widget' ) );you should now use
parent::__construct( false, $name = __( 'My widget' ) );This can also be in a theme or a plugin. BuddyPress use
_constructmethod and is not concerned.If you deactivate WP_DEBUG in wp-config, the notice will disapear. And it’s only a notice, nothing will sudenly stop to work.
August 19, 2015 at 7:04 pm #243391gametimemedia
ParticipantI know i can use BuddyPress Registration Groups since i just found it but it’s not a required field. I guess it does what i need but would be nice if it was a required field, even nicer if the group image was there instead of the check box.
August 19, 2015 at 6:07 pm #243388In reply to: New nav item
muskokee
ParticipantI am abandoning trying to use the profile.php file by adding a case and just going with a new file in members/single/filename using this similar code (which works as intended):
function custom_bp_nav() { global $bp; bp_core_new_nav_item( array( 'name' => __( 'Site Settings', 'buddypress' ), 'slug' => 'site-settings', 'position' => 80, 'screen_function' => 'site_settings_screen', 'default_subnav_slug' => 'site-settings', 'parent_url' => $bp->loggedin_user->domain . $bp->slug . '/', 'parent_slug' => $bp->slug ) ); } function site_settings_screen() { //add title and content here - last is to call the members plugin.php template add_action( 'bp_template_title', 'site_settings_screen_title' ); add_action( 'bp_template_content', 'site_settings_screen_content' ); bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/test' ) ); } function site_settings_screen_title() { echo 'Site Settings'; } function site_settings_screen_content() { echo 'Content here'; } add_action( 'bp_setup_nav', 'custom_bp_nav', 50 );August 19, 2015 at 3:19 pm #243384In reply to: [Resolved] Not working with WordPress 4.3
danbp
ParticipantBuddyPress roadmap:
https://buddypress.trac.wordpress.org/milestone/2.3.3
@chevalhack, of course it is ! This forum is installed on WP 4.3. What is not working… do you see warnings or notice ? Give details please !
@toggerybob, seems it’s your membership plugin who brings these warnings.
If it is Memberhip 2, it was updated today.
https://wordpress.org/plugins/membership/August 19, 2015 at 1:34 pm #243378In reply to: Child theme – profile.php
muskokee
ParticipantSorry, part of the above is not true. I am using bp-custom.php. The only function in there is to disable BP registration.
//EDIT
Oh my! I just found this post https://buddypress.org/support/topic/bp-legacy-in-bp-templates/ . Am I supposed to be using the files from bp-legacy as this post suggests? If so, what a terrible name for a folder!
August 19, 2015 at 1:18 pm #243377In reply to: Child theme – profile.php
muskokee
ParticipantThanks for your reply @danbp! I got the profile.php from bp-default. I had previously placed bp-default custom edit.php and change-avatar.php inside the child theme at single/profile folder without a problem.
Yes, I use many custom functions in my functions.php file but I have not made use of bp-custom.php.
I also have a custom template titled plugin-buddypress.php in my child-theme folder above the buddypress folder.
I disabled all the profile plugins (pics, follow, cover, conditional field groups) and commented out all functions acting on Buddypress in my functions.php file. This did not make a difference! I still have a blank loop with the profile.php added to my child theme.
//EDIT
And I am running BP 2.3.2.1 on WP 4.2.4August 19, 2015 at 11:26 am #243376danbp
ParticipantBuddyPress use bbPress when you allow group forums.
If the group is private, the attached forum is also hidden ton non members of that group. Same for public or private groups.You don’t have to change the group forum setting in the forum list.
The right steps
Create a group A
A is set to private
Allow a forum for A
—— The wrong step ——–
Going to dashboard forum admin, and set forum A to private. If you do this nobody will see it except site admin.
https://buddypress.org/support/topic/hide-buddypress-and-bbpress-items-from-guests/
https://buddypress.org/support/topic/buddypress-private-group-is-not-visible-in-bbpress/August 19, 2015 at 11:13 am #243375danbp
ParticipantPlease d’ont double post.
https://buddypress.org/support/topic/buddypress-forum-hidden-group-but-still-visible-on-page-by-members/August 18, 2015 at 10:09 pm #243364danbp
ParticipantReaders, see also this plugin used to hide XProfile Field groups from different user types based on the user’s role.
https://github.com/tannerm/buddypress-conditional-field-groupsAugust 18, 2015 at 7:45 pm #243361In reply to: Photo upload
djsteveb
Participant@ricsca2 – you are wise to be weary of plugins that are not in the wp-repo – but I think for the wrong reason. I am more concerned that plugins have not had the extra security checks that are run through the official repo. However I have seen more useful plugins for BP outside of the official repo – like the updated one for affecting the activity stream blocking – only on github, ones that get good support on wpmudev, etc.
I want to have faith in the ‘media press’ mentioned above, and I bet many are using it successfully – so it’s worth a try for a short term solution.
You concern about “extensions unofficial because if the developer ceases to update them” – should go beyond things in or not in the wp dot org repo – and it is a valid concern given the history of WP / BP and plugins in general – especially in regard to photo uploads / handling.
Back in the day it was “bp-album” – in the repo – worked. Support ceased – abandoned. Updates to wp / bp broke it.
Rtmedia came in (and for a very short while there was actually an importer / exported from bp-album to rtmedia!) – things have changed – rtmedia is likely the most used plugin for BP – and now they have made it an over-bloated POS (IMHO) – and now when things break they only offer support for paid / premium addons.
(begging for media export options here: https://buddypress.org/support/topic/rtmedia-export-script-attachments-api/
Now there are some other options – still no way to export the data. There are some things being worked on – but nothing definitive. Some great foundations being laid (bpattachments now a (not yet used) thing) –
This is why I have asked time and time again for picture / media handling to be added to BP core –
most recently a year and half ago (https://buddypress.org/support/topic/photos-albums-media-please/ ) – plus in the buddypress surveys.
so future updates will consider breaking this very important piece of live social networks.However for now we are stuck with not knowing if things are going to work now, or next update. Just like we have been for years..
August 18, 2015 at 4:47 pm #243352danbp
ParticipantYou’re declaring 3 arguments, but only one is given if you are testing this localy.
Possible local scenarion you used:
– you create a new user
– you login as admin and activate the pending user. You get 3 warnings. Logout.
– login as new user.
– you see the messageRemove $key & $user and redo the same and all went fine.
Usefunction send_msg_to_new_member( $user_id )and change 3 to 1.
Add also a conditional check to test if the messages component is active. (see link blow).Not tested yet on live site.
This was originally published by @henrywright here:
https://buddypress.org/support/topic/deliver-custom-message-via-buddypress-to-new-users/#post-229688August 18, 2015 at 4:15 pm #243350In reply to: Set page template for BuddyPress Registration.
danbp
ParticipantBP’s registration template is in: https://buddypress.trac.wordpress.org/browser/tags/2.3.2/src/bp-templates/bp-legacy/buddypress/members/register.php
Copy it to your child-theme, /your-theme/buddypress/members/register.php, and make your change in that copy.
In some case, you could also use bp_get_template_part filter.
August 18, 2015 at 3:38 pm #243348In reply to: Override Login Form (bp-core-widgets.php)
danbp
Participant@dineshravajani07, searching this forum for “login widget” have brought many answers.
August 18, 2015 at 3:28 pm #243346In reply to: Making display textfield empty
danbp
ParticipantHi @david-ar,
if you expect for help, give detais related to BuddyPress, not FB. Which option are you talking about?
https://buddypress.org/support/topic/when-asking-for-support-2/August 18, 2015 at 10:59 am #243337In reply to: how to check if the length of field is too long?
Henry Wright
ModeratorYes, I think you can. Try this:
function my_username_validation() { if ( strlen( $_POST['signup_username'] ) > 16 ) { global $bp; $bp->signup->errors['signup_username'] = __( 'Put your error message here.', 'buddypress' ); } } add_action( 'bp_signup_validate', 'my_username_validation' );August 18, 2015 at 9:29 am #243328In reply to: Photo upload
danbp
Participantif the developer ceases to update them This problem is the same for official or unofficial plugins.
Brajesh is a long year and well knowed buddypress plugin developper, you can trust his awesome work !
https://profiles.wordpress.org/sbrajesh#content-pluginsAugust 18, 2015 at 9:15 am #243323In reply to: Need urgent help with BP notifications
danbp
ParticipantI am writing all these code in bp-functions.php in my bududdypress folder within my theme folder. (this may be my problem).
Yeah, it is probably the problem. Custom functions for BP can/should be added to bp-custom.php, which should sit in wp-content/plugins/bp-custom.php, not in your child theme buddypress folder.
Or into functions.php of your child-theme.
bp-custom.php explained on Codex.
August 18, 2015 at 9:08 am #243322In reply to: how to check if the length of field is too long?
danbp
ParticipantHere an example for profile field lenght with some comments.
function bpfr_custom_textfield_length() { //Check if user is logged in & if xprofile component is activated if ( is_user_logged_in() && bp_is_active( 'xprofile' ) ) : $my_custom_textfield = bp_get_member_profile_data( 'field=Brief Biography&user_id='.bp_get_member_user_id() ); /* * The length = number of characters, not words. * Set the number of caracters to show. * The 3 dots are the appended text ending the excerpt. * Don't remove the quotes if you change this * BuddyPress 2.1 will add new class and id for custom fields. * The span can be omited to style this part. See ticket #5741 */ if ( strlen($my_custom_textfield) > 20) : //adjust to your need $my_custom_textfield = substr($my_custom_textfield, 20).'...'; //adjust to your need endif; // uncomment the following line to get a span around the displayed field content // echo '<span class="short-custom">'. $my_custom_textfield; .'</span>'; // comment the following line if you use the span echo $my_custom_textfield; endif; // is_user_logged_in } add_action( 'bp_directory_members_item', 'bpfr_custom_textfield_length' );Ticket #5741
August 18, 2015 at 9:01 am #243321In reply to: Need urgent help with BP notifications
chicho1969
Participantokay, This is almost done, but is really rare, not everything works as it should.
First of all, this is not a pluggin, I am writing all these code in bp-functions.php in my bududdypress folder within my theme folder. (this may be my problem).
Step by step:
1st Problem setup globals is not working as it espected:define( 'BP_NOTIFIER_CELBIRTHDAY_SLUG', 'celbirthday_notifier' ); function celbirthday_notifier_setup_globals () { global $bp, $wpdb; $bp = buddypress(); $bp->celbirthday_notifier = new stdClass(); $bp->celbirthday_notifier->id = 'celbirthday_notifier'; //I asume others are not going to use this is $bp->celbirthday_notifier->slug = BP_NOTIFIER_CELBIRTHDAY_SLUG; $bp->celbirthday_notifier->notification_callback = 'celbirthday_notifier_format_notifications'; //show the notification $bp->active_components[$bp->celbirthday_notifier->id] = $bp->celbirthday_notifier->id; do_action( 'bp_setup_globals' ); }This function is not doing nothing unless I call it directly:
celbirthday_notifier_setup_globals ();
I Know this is not the proper way, but it is the only way I found to make it run.
Does anyone know why it does not work properly?Continue with the notification:
//Format notifications function celbirthday_notifier_format_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) { if ( 'new_birthday' === $action ) { if ( (int) $total_items > 1 ) { if ( 'string' === $format ) { $famoso_name = get_the_title( $secondary_item_id ); return apply_filters( 'celebrities_multiple_verifications_notification','Say Happybirthday to '.$famoso_name); } } else { if ( 'string' === $format ) { //falta definir $famoso_link y mas $famoso_name = get_the_title( $secondary_item_id ); return apply_filters( 'celebrities_single_verifications_notification','Say Happybirthday to '.$famoso_name); // $return = apply_filters( $filter, '<a href="' . esc_url( $famoso_link ) . '" title="birthday anounce">' . esc_html( $text ) . '</a>', (int) $total_items, $text, $famoso_link ); // $message = apply_filters( 'bp_activity_at_message_notification_message', $message, $poster_name, $content, $message_link, $settings_link ); } } } do_action( 'celbirthday_notifier_format_notifications', $action, $item_id, $secondary_item_id, $total_items ); return false; }ok, this format function is working right, although I have to do some more work. After it, I have two more functions (mark and delete notifications) wich are also working fine.
//mark notification function celebrities_mark_screen_notifications() { global $bp; bp_notifications_mark_notifications_by_item_id( $bp->loggedin_user->id, $bp->celbirthday_notifier->id, 'new_birthday', $secondary_item_id = false, $is_new='0'); } add_action( 'bp_notifications_screen', 'celebrities_mark_screen_notifications' );and…
function celbirthday_notifier_remove_screen_notifications() { global $bp; bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->profile->slug, 'new_birthday' ); } add_action( 'bp_notifications_screen', 'celbirthday_notifier_remove_screen_notifications' ); add_action( 'xprofile_screen_display_profile', 'celbirthday_notifier_remove_screen_notifications' );As I say, this works fine, but a I am not sure if I need the second “add_action” (xprofile screen).
And finally, to add notification I use this code (which is not working)://Adding notification function buddypress_celebrities_add_notification() { if ( bp_is_active( 'notifications' ) ) { $fecha_act = date("Y-m-d"); $res_birth = $wpdb->get_results( "SELECT wp_best_favs.user_id, wp_postmeta.post_id FROM wp_best_favs LEFT JOIN wp_postmeta ON ( wp_postmeta.post_id = wp_best_favs.celeb_ID ) WHERE ( wp_postmeta.meta_key = 'fecha_na') AND (DAY( <code>wp_postmeta</code>.<code>meta_value</code> ) = DAY( '$fecha_act' )) AND (MONTH( <code>wp_postmeta</code>.<code>meta_value</code> ) = MONTH( '$fecha_act' )) "); $res_birth = array_filter($res_birth); $matriz = objectToArray($res_birth); //I use this function to convert objet array to simple array if(count($matriz)==0) { // está vacío } else { global $wpdb; $bp = buddypress(); $current_time = bp_core_current_time(); foreach ($matriz as $v1) { $famoso_id = $v1[post_id]; $receiver_user_id = $v1[user_id]; $args = array( 'user_id' => $receiver_user_id, 'item_id' => $famoso_id, 'secondary_item_id' => $famoso_id, 'component_name' => $bp->celbirthday_notifier->slug, 'component_action' => 'new_birthday', 'date_notified' => $current_time, 'is_new' => 1, ); bp_notifications_add_notification( $args ); } } } } do_action( 'bp_init', 'buddypress_celebrities_add_notification' );So this is my bigger problem:
Add notifications (function buddypress_celebrities_add_notification()) is not working.
I am pretty sure this is because I am not hooking properly, but I tried so many hooks and none of it did work.
I Know the code is fine because if I comment the two first lines and the two last lines (so I run the code not as a function) the notifications are being added to database.Anyone can help me, to find a proper hook, or just pointing me in the right direction.
Thanks in advance.August 18, 2015 at 8:57 am #243319In reply to: [Resolved] Warning: strstr(): Empty needle in
danbp
ParticipantHi @ramuzic,
read the related ticket for more explanation from here:
https://buddypress.org/support/topic/warning-strstr-empty-needle/#post-239979If the error is still in after changing to one of twenty theme, it’s possible you use a cache plugin containing some old files or your browser history is…very old. Clear it !
August 18, 2015 at 7:15 am #243313In reply to: restrict friend requests
Henry Wright
ModeratorHave you tried the BuddyPress Limit Friendship plugin?
August 17, 2015 at 11:56 pm #243306In reply to: Private Message Pagination
Henry Wright
Moderator@danbp I needed your answer 1 year 6 months ago 🙂
August 17, 2015 at 7:51 pm #243300In reply to: Private Message Pagination
danbp
Participantper_page option is availble for the message loop, like inbox (which is default), sentbox and notices where all received message are stored. This option let you paginat the result.
Now, the case of a long conversation. This start in the inbox, where you found it at page 1 or 12…
You click on the message and you see the content. This page is not concerned by the loop containing your per_page option. You can control that in the url.If you read the code in the file i indicated you previously, you’ll see that there is no pagination system in it.
Message option can be set in bp-templates\bp-legacy\buddypress\members\single\messages\message-loop.php
You need to copy this file into your child-theme first so you won’t loose your modification at next update. See codex if you need more infos about theming.
August 17, 2015 at 7:37 pm #243299danbp
ParticipantA username is not a real name and wordpress use only username, email and password (the only real security point) to allow access.
And the default behavior of WordPress is to set the nicename equal to the username. So, where is the security issue ?If you’re affraid by the Name field coming with BuddyPress during registration, rename it to Pseudonyme and you’re done. The field must contain a value, which can be first name, last name or whatever. The value is mandatory, not the name as name… ch1n3s3b0y is certainly not your name !
You’re asking to replace the username by a another value collected with the same register form. Do you think that such other field has less importance in regard of security ? Why would the username be critical and the custom field not ?
You can even disallow dashboard access to your subscriber, so they never can change anything outside of what is on hand on front-end profile management.
Please read here to calm you down (hopefully) 🙂
August 17, 2015 at 7:36 pm #243298In reply to: i want to, nobody can not change own gender.
Kailan Wyatt
ParticipantYou can try this plugin by BuddyDev
-
AuthorSearch Results