-
Henry replied to the topic Error: Missing argument 2 for wpdb::prepare in the forum How-to & Troubleshooting 10 years, 11 months ago
– I’ve turned off all PHP warnings like the first paragraph says so.
But are you a developer or a user?
With reference to any BP core changes being necessary – does the warning appear when using BP ‘out-of-the-box’ or are you introducing some code that is causing it? If it is resulting from some custom code, paste it here… and i’ll try taking a look
-
Henry replied to the topic in the forum Henry 10 years, 11 months ago
@barney92 you have to pass 5 variables to your filter function then return
$email_content
. So,function my_personal_message( $email_content, $sender_name, $subject, $content, $message_link, $settings_link ) {
$email_content = sprintf( __(
'%1$s sent you a new message:Subject: %2$s
"%3$s"
Welcome to the site! If you have any questions please…[Read more]
-
Henry replied to the topic Error: Missing argument 2 for wpdb::prepare in the forum How-to & Troubleshooting 10 years, 11 months ago
Take a look at this post which will give you some background as to why WP throws that warning at you.
-
Henry replied to the topic Notification and a blank page in the forum How-to & Troubleshooting 10 years, 11 months ago
@dsvay can you view your own notifications page?
Each member’s notifications page can be viewed by that member only. For example, you can’t log in as Member X and view Member H’s notifications page.
-
Henry replied to the topic is_page() does not work on BP pages in the forum Installing BuddyPress 10 years, 11 months ago
The terminology is important here. WordPress ‘pages’ shouldn’t be confused with the more loosely termed web ‘page’. Although BP ‘pages’ are webpages, they aren’t WordPress pages so
is_page()
isn’t going to work *most of the time*. The exception is register, activate etc.For a list of template tags you can use with BP ‘pages’ take a look…[Read more]
-
Henry replied to the topic Performance between loop and all conditional profile fields export in the forum How-to & Troubleshooting 10 years, 11 months ago
bp_get_profile_field_data()
queries the database once, so every time you use it will result in a database query taking place. You’re right to say lots of database querying impacts performance. Performance will depend on how many queries you’re using, your hardware spec and the amount user activity your site generates.where are you planning to…[Read more]
-
Henry replied to the topic Performance between loop and all conditional profile fields export in the forum How-to & Troubleshooting 10 years, 11 months ago
Hi @macpresss
What do you mean by ‘export all profile fields by a conditional tag’?
Doing what you’ve done above is good practice because if Country is an optional field and it has not been completed by the member then nothing will be outputted:
<?php if ( $data = bp_get_profile_field_data( 'field=Country ' ) ) : ?>
[Read more]
<!-- do something… -
Henry replied to the topic function that breaks the BP AJAX in the forum How-to & Troubleshooting 10 years, 11 months ago
@_dorsvenabili when adding custom functions to functions.php it might be a good idea to add a prefix to all of your function names. As you can see buddyboss has done it with
buddyboss_childtheme_
.You could have used
dorsvenabili_core_get_notifications_for_user
ormy_core_get_notifications_for_user
Saves conflicts from happening 🙂
-
Henry replied to the topic Display green border around avatar when user is online in the forum How-to & Troubleshooting 10 years, 11 months ago
@macpresss I wouldn’t use that code from web developers wall in the members loop as it will add a database query for each member. It is more intended for use on the profile page. For the members loop, there are better ways to do it performance wise.
-
Henry replied to the topic Create a separate home page for logged in users in the forum How-to & Troubleshooting 10 years, 11 months ago
Any initial thoughts on the most optimum way to achieve this considering the reporcussions on SEO etc?
Keep in mind the search engine bot will be visiting your site as a ‘logged-out’ site visitor, so it won’t see any of the content you display to logged in users only.
One approach you could take is to have a different front page…[Read more]
-
Henry started the topic BP_AVATAR_DEFAULT_THUMB broken? in the forum How-to & Troubleshooting 10 years, 11 months ago
Can anyone confirm that using
BP_AVATAR_DEFAULT_THUMB
in bp-custom.php actually works?BP_AVATAR_DEFAULT
works very well to customise the full size avatar – i’m just having trouble with the thumb.examples of what I’m doing
define ( 'BP_AVATAR_DEFAULT_THUMB', get_stylesheet_directory_uri() . '/images/icons/avatar-thumb.png' );
define (…
[Read more] -
Henry replied to the topic I need to get just the content string and just the activity update string in the forum Installing BuddyPress 10 years, 11 months ago
@matt-mcfarland
cc @modemlooperI recently had to find activity item info outside the loop and came across a nifty little function
bp_activity_get_specific()
which can be used like so$activity = bp_activity_get_specific( array( 'activity_ids' => $activity_id ) );
$activity = $activity['activities'][0];You can then do stuff like
echo…
[Read more] -
Henry replied to the topic [Resolved] New users don't receive activation emails in the forum How-to & Troubleshooting 10 years, 11 months ago
Also, perhaps the emails are being sent but falling into user’s spam folders. Perhaps ask them to check
-
Henry replied to the topic Passing user role to custom xprofile field in the forum Creating & Extending 10 years, 11 months ago
Hi @noizeburger, glad you finally got this working. I’m sure your tutorial will be helpful to many people too. I especially like the last snippet which shows you how to disable the editing of certain fields on the edit profile screen!
-
Henry replied to the topic Related Posts in the forum Creating & Extending 10 years, 11 months ago
Not that I know of although it is easily done. You could query the activity table to find all entries related to a particular entry. How you define related will determine your query. For instance, you could query by action (new private message, new member registration and so on) or you could query by component, date recorded and so on
-
Henry replied to the topic Custom Homepage. Please help in the forum How-to & Troubleshooting 10 years, 11 months ago
Definitely possible although it would need some custom code to accept a value from each user so that a different list of blog posts specific to each user can be displayed.
-
Henry replied to the topic How to Remove Public Messaging in the forum How-to & Troubleshooting 10 years, 11 months ago
Can’t you just disable it in WP Admin?
-
Henry replied to the topic Hide 'view all matched members' message in the forum Creating & Extending 10 years, 12 months ago
View all 9 matched Members – See more at:
Where does this come from? I’ve never seen it before.
Are you using a plugin to generate that text? I can’t find it anywhere in BP.
-
Henry replied to the topic Hide 'view all matched members' message in the forum Creating & Extending 10 years, 12 months ago
Viewing member 1 to 9 (of 9 active members)
I’m familiar with this text but where does the following text originate from? Are you using a plugin to generate it?
View all 9 matched Members – See more at:
You could hide it with CSS
display: none;
or remove it at the source, via a filter perhaps. -
Henry replied to the topic Activity Stream on Page in the forum How-to & Troubleshooting 10 years, 12 months ago
Hi @finchkelsey
Have you tried posting your requirements in the BP Jobs Forum? If you’re looking for a BP developer available for hire then that is a good place to start
- Load More
@henrywright-1
Active 9 years, 10 months ago