Profil > Picture Hide for users

yanick beaulieu Posted in Technical Support 2 weeks ago

Hello, I would like to use this code to hide all images in a user's album as well as all albums

<?php if(ossn_isLoggedin() && ossn_loggedin_user()->guid == $params['user']->guid){ ?><?php }?>
Catalan Yanick beaulieu Replied 1 week ago

I put this code at the beginning of each page on which I want it to take effect and so you can no longer navigate the pages of others it brings you back to your own page

German Michael Zülsdorff Replied 1 week ago

Can you tell us any results on this one?

Catalan Yanick beaulieu Replied 2 weeks ago

Thank you, I'll try to see what I can do

German Michael Zülsdorff Replied 2 weeks ago

knowing whether your code would really work would mean to know ALL places in advance where you need to add it.
The left side of the comparison is not the problem: ossn_loggedin_user()->guid is a function that would reliably return the id of the logged in member. But what about $params? It's just a multi-purpose variable used throughout Ossn. Sometimes it may include the User object, but sometimes it may not. And in the latter case your comparison can't be accomplished.

Catalan Yanick beaulieu Replied 2 weeks ago

OK, but is it possible? I'm working on a project for a private community and I'm looking to see if the requests can do it! I know the external tools but I want to develop but even if the link cannot be blocked I have found a temporary solution to bypass what I want to do!

Indonesian Arsalan Shah Replied 2 weeks ago

Simply use a cloud facility (like google drive) for users where they can just upload private things and share if they want, you don't need social network :)

Catalan Yanick beaulieu Replied 2 weeks ago

😅 The goal is not to deactivate it but to keep the photos private only to be

German Michael Zülsdorff Replied 2 weeks ago

but why not simply jump to your Ossn adminstrator page and choose
Components -> OssnPhotos -> Disable ?
This way there'll be no more albums without any coding.