Forum Replies Created
-
In reply to: Editar visualizacion respuestas
It’s probably possible, but would require custom coding, which for activity is not so easy these days as with the Nuveau theme it heavily depends on JavaScript so overloading it is a lot more complex. There’s not an easy option that I’m aware of.
In reply to: Editar visualizacion respuestasIf you were able to do that, hw would users see the comments? do you want to turn commenting off altogether? I take it you are talking about the activity stream?
In reply to: Regarding Group EmailsYou can add the following code to your child themes functions.php:
function venutius_remove_notify_group_members() { remove_action( 'groups_custom_group_fields_editable', 'bp_nouveau_add_notify_group_members_checkbox', 20 ); } add_action( 'groups_custom_group_fields_editable', 'venutius_remove_notify_group_members', 10 );In reply to: Need Help Regarding Notifications and EmailsSo which unsubscribe link are you talking about?
In reply to: Bypass Email RequirementThat’s because this was a solution for a specific issue, one where the user already had code to input to get around the fact that the email is needed for the form validation. Removing the email field is not enough, you’ve got to input a pseudo email into the data before the form is validated.
In reply to: Need Help Regarding Notifications and EmailsIt’s unclear which unsubscribe link you are talking about, also, which BP theme are you using – BP Legacy or BP Nouveau?
In reply to: Adding a meta box to edit group in admin panelI think the hooks you are looking for are
bp_before_group_details_creation_stepandbp_before_group_details_admin.Hooking on these will allow you to insert your fields into the group creation and editing page for the group details.
It sounds like your site has not recovered entirely from the spam attack, though if it affected the sites functions it was more than spam. Which pages are giving 500 errors? Have you enabled the error log and what is it telling you?
In reply to: Register page keep refreshingHi there, that’s not actually your register.php file.
The one for BP Nouveau is located in
plugins/buddypress/bp-templates/bp-nouveau/buddypress/membersHowever that’s not likely to be the issue as I’m using the same file.
Look for a file in
wp-content/themes/your-child-theme/buddypress/membersAlso see if you have custom code in
wp-content/themes/your-child-theme/functions.phpAlso check to see if you have a file called `wp-content/plugins/bp-custom.php’
These are places where custom code could be located, so worth checking.
If these checks find nothing. How about switching to the BP Legacy theme to see if that works?
In reply to: Register page keep refreshingMorning,
I can confirm on your site hitting the register button takes me to the login page and no activation email is sent. However on my test system that’s not what happens, hitting registration takes you to the activation message. So something is different. You say it’s not a plugin or a theme, could it be you’ve overloaded the register.php file or added some custom code?
In reply to: Register page keep refreshingThere’s two registration pages in BP these days, if I’m to test this I need to know which one to try. One is BP Nouveau, and other is BP Legacy.
In reply to: Alphabetize groups?Yes there is, it involes a minor amount of code wrangling. First of all you need to install a child-theme. You can get plugins for that if you’ve not already got one. This will create a directory on your server called
wp-content/themes/your-child-theme.In that directory create a buddypress/groups directory.
The next step is to work out which BP Theme you are using. You can find that by looking in Settings>>BuddyPress>>Options.
Once you know that, you will be able to find a file called `wp-content/plugins/buddypress/bp-templates/your-bp-theme/buddypress/groups/groups-loop.php.
Take a copy of this file and find this part:
<?php if ( bp_has_groups( bp_ajax_querystring( 'groups' ) ) ) : ?>
Change that to:
<?php if ( bp_has_groups( bp_ajax_querystring( 'groups' ) . '&order=ASC&orderby=name' ) ) : ?>Next you put this file in the
themes/child-theme/buddypress/groupsdirectory you created earlier.In reply to: Register page keep refreshingThe next step is to take a look at the error log, the easy way is to install an error log viewer such as BWS Error Log Viewer. Once you have that installed try registering then look in the log for entries at the same time as the registration attempt. That should reveal any PHP errors. Which BP Theme are you using? Look in Settings>>BuddyPress>>Options, the theme setting is in there.
In reply to: How to count the number of result in a members loop?One thing I’d try would be to get it from the members template:
global $members_template; $count = $members_template->total_member_count;This is what’s used to work out the pagination count for the members page to hopefully it takes into account the excluded members. Not tried out though.
In reply to: Limit Activity Stream to Groups a user belongs to.Hi there,
One option is the overload the activity-loop.php file, find the part where bp_has_activities() is called and change it to this:
<?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) . "&scope=groups" ) ) : ?>In reply to: Missing Password ValidationUnfortunately there’s not a before save hook for this, only after save. I guess what you could do is wait until it’s saved then validate the password but that sounds like it’s not going to give the desired UI experience. Maybe you could ask for a hook to be added?
In reply to: searching for topics in private group-forumsyou might be better off asking this question in https://bbpress.org/forums/ BuddyPress does not provide the forums it uses, it just integrates with bbPress. As far as I’m aware any forum labelled as hidden will not show up in a search and you’d probably need to create a custom search to achieve this.
In reply to: Update avatar imageHi there,
I don’t know much about REST but I did notice that dealing with the Avatar has only just been added to the BP REST API, is that what you are working with?
In reply to: Email Tab hide/removeI think you should be able to do something like this:
function bpex_remove_email_item_on_usermenu() { global $wp_admin_bar; if ( bp_use_wp_admin_bar() ) { $wp_admin_bar->remove_node( 'my-account-settings-notifications' ); } } add_action( 'wp_before_admin_bar_render', 'bpex_remove_email_item_on_usermenu' ); function bpex_remove_profile_settings_email_tab() { if( bp_is_active( 'xprofile' ) ) : bp_core_remove_subnav_item( 'settings', 'notifications' ); endif; } add_action( 'bp_actions', 'bpex_remove_profile_settings_email_tab' );In reply to: Registered/UnregisteredHi there,
It’s not clear from the text exactly what you are looking for but it sounds like you’d need to do some customisation. For a lot of BP functions you only need to be a site members to perform a task and you’d therefore need to work out exactly what you’d like to restrict and then write the code for it. There are some plugins that do aspects of what you are looking for, for example https://wordpress.org/plugins/buddypress-restrict-group-creation/ will prevent standard users from creating groups and I’m currently working on a plugin to restrict messaging for users. For bbPress forums you could set the new user role to Spectator to prevent the creation of topics and replies but I think what you are looking for is probably ore granular than this and so will probably need custom code to deliver your vision.
What you could do is check if there is a thread_id for the new message, if it’s not set it’s a new message and you can remove the recipients so that sending fails.
function venutius_check_recipients( $message_info ) { $recipients = $message_info->recipients; $u = 0; foreach ( $recipients as $key => $recipient ) { // if site admin, skip check if( $GLOBALS['bp']->loggedin_user->is_site_admin == 1 ) { continue; } // make sure sender is not trying to send to themselves if ( $recipient->user_id == bp_loggedin_user_id() ) { unset( $message_info->recipients[$key] ); continue; } /* * Check if the the message has a thread_id, if not it's new and not allowed. * * If we get a match, remove person from recipient list. If there are no * recipients, BP_Messages_Message:send() will bail out of sending. * */ if ( ! isset( $message_info-thread_id ) ) { unset( $message_info->recipients[$key] ); $u++; } } /* * If there are multiple recipients and if one of the recipients is not a * allowed, remove everyone from the recipient's list. * */ if ( count( $recipients ) > 1 && $u > 0 ) { unset( $message_info->recipients ); } } add_action( 'messages_message_before_save', 'venutius_check_recipients' );You coud put this in your child themes functions.php or if you want it to apply to any theme, add it to your bp-custom.php in the plugins directory.
In reply to: Customizing Register PageHi Angela,
One way would be to customise the message already shown at the top of the register page. You can do this by creating your own translation of the text shown, and the translation can say what you like.
See this page for details on how you can create the translation:
Once you have created your translation file (.mo) my suggestion for the best way to add it to your site and manage it is to use WPT Custom Mo File.
I took a look at BuddyPress Like and it looks like it’s far from ready for use, so I think I’d look at https://wordpress.org/plugins/favorites/ instead, you could create a Profile page for the users list of likes and add your weighting based on your criteria.
I think based on your requirement that for your ultimate requirement you will need some custom coding. This is due to you wanting to add weighting to the likes.
One option would be to enable new blog posts to appear in the BuddyPress activity stream. That would automatically allow BuddyPress users to favorite the activity and for it to appear in their list of favorites in their profile. However you won’t easily be able to add your weighting since the BP favorites system dones not have this functionality. But that’s the same for any existing plugin. The potential downside is that the BP Activity stream is not just posts (which would have to be enabled with a bit of code).
There are also a number of WordPress post specific likes plugins, however these don’t give you a profile page with a list of your likes and the same issue remains that they would not support you weighting.
If it was me, I’d probably look to use a plugin such as BuddyPress Like as a basis for my solution. I’ve not looked in detail at this plugin but I’m assuming it adds the ability to like posts and display a list of likes in the users profile. That would serve as a good basis for what I was looking to do. It would then need some modification in order to support your specific weighting mechanism. The complexity of that task would depend on exactly how you want your weighting mechanism to work and the technique you use to account for it when displaying the likes list.
In reply to: Restricting private messagesYou can put it in the functions.php file of a child theme.