Remark: tested with Oxwall 1.53 - modding 1.6 or earlier versions will need some research and testing first.
- hide your status messages on the "index page newsfeed" if your "view my profile newsfeed" privacy is set to "My friends" or "Only me". This will prevent non-friends and friends-of-friends to read your updates, or participate in your private discussions with your friends.
- hide your comments on the "index page newsfeed". Comments you place in discussions that are created by a owner with his "view my profile newsfeed" privacy set to "My friends" or "Only me", will be hidden from view on the "index page" newsfeed.
- hide your group posts on "index page newsfeed". Activity and comments you place in groups are hidden from the index page newsfeed if your "view my profile newsfeed" privacy is set to "My friends" or "Only me".
So, this mod will only affect the "site" newsfeed widget (if placed on your index page). Behavior of the dashboard and profile newsfeed is not affected.
This mod will "abuse" the newsfeed privacy setting "view my profile newsfeed" parameter for it's operation and we have renamed this setting on the privacy page to "view my newsfeed messages".
File affected: ow_plugins/newsfeed/classes/event_handler.php
Prerequisites: admin access to Oxwall, FTP access to your Oxwall site and access to the Oxwall database (e.g. via phpmyadmin). Read-only access is sufficient.
What will be done: we will change the visibility parameter of each activity post before it is written to the database if the privacy setting requires this.
Instructions and code:
Step 1
Create a new Oxwall user with standard rights and NO friends. Leave this user in existence!
Step 2
Access the ow_base_users table of your site's Oxwall database. Find the "id" field value of the user you just added, by sorting the view by "id" and move to the last result page and the last record. Note the value of the "id" field of your "friendless user".
Step 3
Download and open the file ow_plugins/newsfeed/classes/event_handler.php in a text editor and move down to around line 382.
Find the row that says: "$this->service->saveActivity($activity);"
Place the attached code BEFORE that line. (see attached file) Replace the text in the code that says "PUT THE ID NUMBER OF THE TEST USER HERE" with the id number you found for the test user.
Step 4
Save and upload the modded php file and test your work! Put your "view my profile newsfeed" privacy settings to "My Friends" and post an update anywhere on your site; e.g. on your profile page. Visit your homepage and see for yourself that your new post is not reflected on the index page Newsfeed.
Cheers!
Martin Beek.