Forum Replies Created
-
In reply to: Get Post ID from Notification
That particular notification is for a private message. See where it says
component_name. Post IDs won’t relate to messagesIn reply to: Get Post ID from NotificationMy 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?
In reply to: Get Post ID from NotificationInside 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 );In reply to: Get Post ID from NotificationYou shouldn’t need to do anything to bp-notifications-functions.php so revert those changes an your code should be good to go.
In reply to: Get Post ID from NotificationYou’ll need to replace
$idin 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.In reply to: Get Post ID from NotificationJust to note,
bp_notifications_get_notification()returns anBP_Notifications_Notificationobject so to getitem_idyou’d just access it like this:$obj = bp_notifications_get_notification( $id ); echo $obj->item_id;In reply to: Get Post ID from NotificationThe post ID should be passed to that function as either
item_idorsecondary_item_id. Then, if you have the notification ID, you can retrieve the data (post ID) at a later date withbp_notifications_get_notification()In reply to: Get Post ID from NotificationYou 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?In reply to: Where to installThe 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.
In reply to: Modify profile menu cssSee the Members Navigation Menus article.
In reply to: Where to installYou install BuddyPress as a WordPress plugin so perhaps your question should be where should you install WordPress?
In reply to: Delete profile fieldsYou 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 for the id column and the name column. Say the name of the field you want to delete is ‘Social’. Just look for ‘Social’ in the name column and find the id of that particular row. Then you have your field ID.
In reply to: Delete profile fieldsTo 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.In reply to: Map of Users – Feature RequestHave you tried searching the WordPress Plugin Directory? There seems to be lots of plugins that display a geographical map of users.
In reply to: Auto share new posts on groupsYou would need to hook a custom function to the
publish_postaction. Your custom function would loop through all of your groups, callinggroups_post_update()on each loop iteration.In reply to: Auto delete unactivated userwp_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 current user in the loop.I know this isn’t a full solution, but hopefully it’ll show you what’ll need to be done.
In reply to: Auto delete unactivated user@henrywright thanks for the suggestion, but it does not serve well to my expectation.
Ah, that’s a shame!
I don’t think I’ve seen a plugin around that will do exactly what you need. I think you might have to write some custom code to get this done 🙁
The snippet I wrote wasn’t designed for copy and pasting. You’d need to modify it to your requirements using PHP.
In that case you’d base your condition on the chosen language value. Here’s an example:
// You'll get $lang from your language switcher plugin. if ( $lang == 'thai' ) { // Redirect to Thai } else { // Redirect to English }In reply to: Auto delete unactivated userTake a look at Unconfirmed.
In reply to: Create activity records for old blog postsDoes anyone have a function that loops through old posts and generates activity records?
What do you mean by an activity record? Do you mean any kind of activity? Like let’s say, a change of profile photo
How does the user select the language?
In reply to: How to create search box on my Software websiteTry asking specific questions relating to exactly what you’re trying to do.
In reply to: Advice on HostingTheir basic plan offers 5GB of web space, 50GB of monthly bandwidth
This sounds reasonable. The key point here is they’ve said upgrading is easily done. That’s important because you’re able to scale as your website gains popularity.
In reply to: Advice on HostingIn my opinion, there’s no point using a sledge hammer to crack a nut so I wouldn’t go crazy to begin with. Hosts are generally able to scale with your needs. So, you could choose a basic VPS package to start and then monitor usage. If at any point you feel you need more horsepower then upgrade. If your host has good support, they’ll do this for you quite easily.