How can I get the activity like facebooks?
I had a look at your code and found it identical to Rich’s original code as far as I could tell – can you tell me any specific changes you made? Also, I need support for bp-follow, which Rich later added to his code (hence the reason I based my code on his). I also had to remove the code to show all activity to admins, as I want both an all activity stream and a Facebook-style wall.
All I did was change lines 27 and 51 in the plugins activity-privacy-component.php Rich’s code used is_site_admin() I changed it to is_super_admin() to reflect depreciated code, and I changed line 40 to return true instead of false. I think most of Rich’s code is still intact other than that. I also just added the loader.php and a check for BuddyPress. As you can see there was no major changes I made, and it was all in an effort just to get the needed functionality for my purposes of usage at that time. I hope this helps, and if you do something cool with it then that would be even better and remember sharing is caring! 🙂
Unfortunately it seems that only amateur coders like us are interested in this – we need a real coder to fix the problems with Rich’s code (or convert my new method into a function). 🙂
Give it time, maybe an expert will give you the insight you need to get it rolling. I am still fairly inexperienced, I am a jack of all trades and a master of nothing when it comes to BuddyPress! Have you tried writing a function, and hooking it to a do_action? Alternatively you could write a function in a child theme’s functions.php or bp-custom.php then copy the buddypress folder with the templates you want to modify and in the particular template file you could simply call that function.
I’m already using several custom templates together with custom functions, but that hasn’t been enough for me to get this feature working unfortunately. I know it must be possible though – bp-follow adds an entirely new scope without modifying core files, so a real coder could do this.
Supply me with a link to the bp follow plugin and I will look at it and see how it implements the new scope via a plugin and I will see what I can do. You really need to look at that plugins add_actions or add_filters as it should supply the hook followed by the function to execute. If someone more experienced comes along and helps you out then kudos to them! 🙂
Here’s BuddyPress Follow: https://wordpress.org/extend/plugins/buddypress-followers/
Here’s my new scope code again: https://buddypress.org/support/topic/ive-figured-out-how-to-create-a-facebook-style-wall-but/
I should point out that I need a way to apply the scope selectively, rather than universally i.e. I want both a normal site wide activity stream and a Facebook-style wall.
When you say selectively can you be more specific? Do you mean having a dashboard setting for switching between the options that you as the admin choose for your users, or do you mean having two different types of activity streams that a user can click on: Link 1.) Shows sitewide activity stream
Link 2.) Shows only you and your friends activity stream?
I am a bit flustered by your requirement, sorry!
Sorry for the slow response. Anyway, I mean the user being able to switch between the two activity streams. So it would have to be implemented as a function that could be triggered on an individual page, rather than simply a universal modification to the sitewide activity stream.
In all honesty that sounds a bit over my head and skill level but I would love to see if an experience Developer can help you resolve this. I will keep watch, and good luck! 🙂
Actually, if you can do it as a universal function, I can probably convert it to a page-specific function myself (I’ve actually split the main activity stream into five separate pages with different scopes on my site already). I could send you my set-up, but it might be better to do it privately, as the site contains some nudity. 🙂
Unfortunately I will have decline that offer based on the info you supplied above. No offense, it is just not anything I would want to be affiliated with so I hope you can understand respectfully. Like I stated before it is most likely above my skill level anyhow. 🙂
You would not be associated with my site in any way by doing this – this is just code that would help a lot of BuddyPress users (judging from the many requests for it). I simply suggested showing you my site to give you a clearer idea of what I’m already doing, and how the code I have so far works. If the site of the female human body offends you, you don’t have to look (that’s entirely your choice), but it shouldn’t have any bearing on whether or not you help to provide a much-requested BuddyPress feature.
@bphelp just took a look at your plugin, great attempt at activity privacy. Does it allow personal AND friend’s activity to appear in the same feed?
Yes it will display your personal and friends activity only.
- The topic ‘How can I get the activity like facebooks?’ is closed to new replies.