On the profiles, have a public block for the apps
How can I add a block on the person's profile that only shows content that they shared with the public and with members? When they share in closed groups, it doesn't look good on the person's actual profile.
Maybe I can take code from the app's homepage block where it shows public content and combine it with the member's profile number?
-
- · Genesis
- ·
I'm getting ready to start advertising my network. In the future, will I be able to do this with custom code and I can just worry about it later?
-
-
·
LeonidS
- ·
Hello @Genesis !
On this page https://github.com/unaio/una/wiki/Dev-API you may see that apps have the method which browses the author content like this one:
array (
'module' => 'bx_files',
'method' => 'browse_author',
'params' =>
array (
0 => '{profile_id}',
1 =>
array (
'per_page' => 'bx_files_per_page_profile',
'empty_message' => false,
'no_toolbar' => true,
),
),
)
So you need to modify via Developer it like to add the visibility limit:
array (
'module' => 'bx_files',
'method' => 'browse_author',
'params' =>
array (
0 => '{profile_id}',
1 =>
array (
'allow_visible_to' => 3,
'per_page' => 'bx_files_per_page_profile',
'empty_message' => false,
'no_toolbar' => true,
),
),
)
-
·
LeonidS
-
- · Genesis
-
·
In reply to LeonidS
- ·
Thank you!
-
- · Genesis
-
·
In reply to LeonidS
- ·
How do I add two or more visibilities?
-
- · Genesis
-
·
In reply to LeonidS
- ·
I put this and it still shows videos from closed groups for videos by author:
Original
array (
'module' => 'bx_videos',
'method' => 'browse_author',
)
New
array (
'allow_visible_to' => 3,
'module' => 'bx_videos',
'method' => 'browse_author',
)
-
-
·
LeonidS
-
·
In reply to Genesis
- ·
You may try to set the line
allow_visible_to' => 3,
like
allow_visible_to' => array(3,4,5)
But it may require the changes in the search file/class.
-
·
LeonidS
-
- · Genesis
-
·
In reply to LeonidS
- ·
What I mean is that it still shows the item on the person's profile even when I use this code. I put it in the Videos of Author block in developer app:
array (
'allow_visible_to' => 3,
'module' => 'bx_videos',
'method' => 'browse_author',
)
-
- · Will Monte
- ·
Why not use the same block on home to persons page? You can set by going to studio> pages> and on that block choose who can view that block.
-
- · Will Monte
- ·
Maybe i'm wrong and if i am i apologize.
-
- · Genesis
- ·
I mean the contents inside of the block. Only show videos that have a public visibility.
-
- · Will Monte
- ·
Visibility is set on individual content. If I upload a video and set it so that it is only visible to my friends, then anyone that is not my friend viewing the block won't see my videos. If they can, then there is an issue with the visibility.
-
- · Will Monte
- ·
By the way, remember that making code changes means that an update could revert such changes and expose content that you wanted to be hidden to be shown. It is OK to make code changes but I suggest that you note the changes and don't have updates automatically applied or you could be in for a surprise the next day.
-
- · Genesis
- ·
@LeonidS Is this possible? To only show content inside the member's profile submenu that was set to public and members visibility. Not the block, but the content inside the block. For example, the videos and albums, etc.
-
-
·
LeonidS
-
·
In reply to Genesis
- ·
About "not block" - you may leave only content part for the block's settings. And you may place 2 media blocks near each other and setup to show only content.
-
·
LeonidS