We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Editing the Default Privacy Setting for Newsfeed. | Forum

Topic location: Forum home » Support » General Questions
E Rasmus
E Rasmus Jun 3 '15

Hi all, I am new here and new to Oxwall and loving it so far.

I am attempting to alter the default privacy setting for Newsfeeds to Friends_only and am editing the Plugins>newsfeed>classes> event_handler.php file.

 

On line 1710 I have edited code to: 'defaultValue' => FRIENDS_ONLY,

 

On new users this is defaulting to “Me Only” when viewed in user profile preferences privacy and when viewed on the site, any users, including guests can still see the Newsfeed?

 

Have I made an editing error?


I made the same edit to the photo plug in and that works just fine.

E Rasmus
E Rasmus Jun 4 '15
I note no one seems to have any idea on this and having looked more in to it I actually think this shows an error in the core code with the privacy on the Newsfeed. The succesful setting to Friends Only or Me Only for newsfeeds just does not work.

I saw this was raised a long time ago and was suggested was fixed by moderator on the forum, so I presumed it would have been by now as that post was over a yea rold, but it appears that is not the case.

Can anyone confirm - Is there an issue in the core code with the Newsfeed Privacy settings. This will save me trying to resolve if there is.
Taissa Team
Taissa Jun 4 '15
E Rasmus, take a look at this topic: http://www.oxwall.org/forum/topic/26248 .
E Rasmus
E Rasmus Jun 4 '15
Hi Taissa thank you, but that is the exact post that I took the edited code from posted by ross and it has changed the default newsfeed privacy settings from 'everybody' to 'friends only' but thats is not what is happening with the newsfeed..... it is viewable to all users!


1) Here is the code:
On line 1710 I have edited code to: 'defaultValue' => FRIENDS_ONLY,

2) This results in:

Changing the defualt value, on newsfeeds privacy to 'friends only' in user privacy settings.

3) Also results in, publicly viewable newsfeeds to all?!

Please see attached screenshots showing it clearly is not working; Privacy settings, then newsfeed viewable by a Guest and then by a different registered user.

Image showing Privacy settings

Image showing GUEST viewing 'friends only' newsfeed

Image showing another USER viewingg 'freinds only' newsfeed


The Forum post is edited by E Rasmus Jun 4 '15
Taissa Team
Taissa Jun 5 '15
E Rasmus, first of all you can manage the privacy settings only for the Profile Newsfeed. There are no settings in Privasy plugin for the main page newsfeed and dashboard newsfeed.
If you want to hide the main page newsfeed from quest:
1. go here: www.yoursite.com/index/customize
2. click on the newsfeed gear icon in the right upper corner
3. click on the restrict view check box and unchecked Guest option in Visible for user roles
3. save

If you want to hide the dashboard newsfeed from quest:
1. go to Admin Area> Pages&Menus> User Dashboard
2. click on the newsfeed gear icon in the right upper corner
3. click on the restrict view check box and unchecked Guest option in Visible for user roles
3. save

And remember that after changing the code you should clear browser and site cache. To clear site's cache enable DEV_MODE. Follow the instructions: https://docs.oxwall.org/plugin-tuts:enable-debug .
The Forum post is edited by Taissa Jun 5 '15