@Eric
https://github.com/compie67/OSSN-Newfeed-filter
Just wondering what is use of this function as OssnWall already have
Example this component https://www.opensource-socialnetwork.org/component/view/5673/home-page-posts
You can simply edit siteactivty siteactivity.php into your component and based on user selection you can show the posts types.
I believe your function will break the actual functionality of the methods (getPublicPosts , getAllPosts, getFriendsPosts)
Also never head such a hook in OSSN before ossn_add_hook('action', 'user/settings/save', .......)
Instead of using such a code why don't you simply use OssnUser object to save cutstom option?
$user = $params['user'];
$user->data->newsfeedorder_preference = $input;
$user->save()
And get it by $user->newsfeedorder_preference
Instead of the lengthily annotation code.
Thanks a lot for your sharp and constructive feedback. kudos
I'm really learning a lot from thi.
OSSN invites experimentation, which makes it fun to explore and try different things. But it's even better when someone points out: hey, there's a cleaner and more OSSN-native way to do this.
This module was exactly one of those "figuring-it-out" cases I got it working, but it quickly became a mix of older annotation logic and non-standard hooks. Your tip about using $user->data and simply overriding siteactivity.php really brings clarity. That feels like the missing puzzle piece.
I’ll think i after test the redcrest module implement your tip much appreciated!
Eric
Due to the many requests in the past for additonal features and components we have decided to develope a premium version. Features like Hashtags, Videos, Polls, Events, Stories, Link Preview, etc included in it.
$199 (Life Time)