-
Henry Wright replied to the topic Making display name unique in the forum Creating & Extending 9 years, 4 months ago
If you take a look at the WordPress code base, you’ll see there is similar logic applied to username. The gist will be
1. Query the database for a list of display names
2. Throw an error if the desired name already exists -
Henry Wright replied to the topic Discussion Forums (bbpress) no longer an option? in the forum Installing BuddyPress 9 years, 4 months ago
bbPress is a separate plugin. You’d need to install that as well as BuddyPress.
-
Henry Wright replied to the topic Get Post ID from Notification in the forum How-to & Troubleshooting 9 years, 4 months ago
That particular notification is for a private message. See where it says
component_name
. Post IDs won’t relate to messages -
Henry Wright replied to the topic Get Post ID from Notification in the forum How-to & Troubleshooting 9 years, 4 months ago
My apologies, I missed parentheses. It should be:
$obj = bp_notifications_get_notification( bp_get_the_notification_id() );
var_dump( $obj );Can you paste what you get with that updated snippet?
-
Henry Wright replied to the topic Get Post ID from Notification in the forum How-to & Troubleshooting 9 years, 4 months ago
Inside the notifications loop can you do this and paste what you get?
$obj = bp_notifications_get_notification( bp_get_the_notification_id );
var_dump( $obj ); -
Henry Wright replied to the topic Get Post ID from Notification in the forum How-to & Troubleshooting 9 years, 4 months ago
Inside the notifications loop can you do this and paste what you get??
$obj = bp_notifications_get_notification( bp_get_the_notification_id );
var_dump( $obj ); -
Henry Wright replied to the topic Get Post ID from Notification in the forum How-to & Troubleshooting 9 years, 4 months ago
You shouldn’t need to do anything to bp-notifications-functions.php so revert those changes an your code should be good to go.
-
Henry Wright replied to the topic Get Post ID from Notification in the forum How-to & Troubleshooting 9 years, 4 months ago
You shouldn’t need to do anything to bp-notifications-functions.php so revert those changes.
-
Henry Wright replied to the topic Get Post ID from Notification in the forum How-to & Troubleshooting 9 years, 4 months ago
You’ll need to replace
$id
in my snippet with the actual ID of the notification. You should be able to get that withbp_get_the_notification_id()
if you’re using my snippet within the loop. -
Henry Wright replied to the topic Get Post ID from Notification in the forum How-to & Troubleshooting 9 years, 4 months ago
Just to note,
bp_notifications_get_notification()
returns anBP_Notifications_Notification
object so to getitem_id
you’d just access it like this:$obj = bp_notifications_get_notification( $id );
echo $obj->item_id; -
Henry Wright replied to the topic Get Post ID from Notification in the forum How-to & Troubleshooting 9 years, 4 months ago
The post ID should be passed to that function as either
item_id
orsecondary_item_id
. Then, if you have the notification ID, you can retrieve the data (post ID) at a later date withbp_notifications_get_notification()
-
Henry Wright replied to the topic Get Post ID from Notification in the forum How-to & Troubleshooting 9 years, 4 months ago
You can only get the post ID if it was added at the point
bp_notifications_add_notification()
was used. How are you adding the notification? -
Henry Wright replied to the topic Where to install in the forum Installing BuddyPress 9 years, 4 months ago
The reason I suggested you re-word your question is because the debate surrounding WordPress as a subdomain VS WordPress as a primary domain is a popular one which has been addressed lots of times already.
The answer really does depend on what you’re trying to do, as @shanebp already pointed out.
Hopefully this helps.
-
Henry Wright replied to the topic Modify profile menu css in the forum How-to & Troubleshooting 9 years, 4 months ago
See the Members Navigation Menus article.
-
Henry Wright replied to the topic Where to install in the forum Installing BuddyPress 9 years, 4 months ago
You install BuddyPress as a WordPress plugin so perhaps your question should be where should you install WordPress?
-
Henry Wright replied to the topic Delete profile fields in the forum How-to & Troubleshooting 9 years, 4 months ago
You could put it in your functions.php file, or even your bp-custom.php file if you have one. It only needs to be run once so make sure you remove it after visiting your website in a web browser.
Finding the group ID or the field ID is something you’ll need to do yourself. Take a look in your database and find table bp_xprofile_fields. Then look…[Read more]
-
Henry Wright replied to the topic Delete profile fields in the forum How-to & Troubleshooting 9 years, 4 months ago
To delete a profile field group, you can use
xprofile_delete_field_group()
. The function accepts the ID of the field group you wish to delete.To delete a specific field, you can use
xprofile_delete_field()
. This function accepts the ID of the field you wish to delete. -
Henry Wright replied to the topic Map of Users – Feature Request in the forum Requests & Feedback 9 years, 4 months ago
Have you tried searching the WordPress Plugin Directory? There seems to be lots of plugins that display a geographical map of users.
-
Henry Wright replied to the topic Auto share new posts on groups in the forum How-to & Troubleshooting 9 years, 4 months ago
You would need to hook a custom function to the
publish_post
action. Your custom function would loop through all of your groups, callinggroups_post_update()
on each loop iteration. -
Henry Wright replied to the topic Auto delete unactivated user in the forum How-to & Troubleshooting 9 years, 4 months ago
wp_delete_user()
is the function that can be used to delete users. Be vary careful when using it because once a user has been deleted, there’s no way of restoring their account unless you’ve taken a database backup.You’d need to generate a list of the user IDs you’d like to delete and then loop through them, using
wp_delete_user()
to delete the…[Read more] - Load More
@henrywright
Active 8 months, 2 weeks ago