This component allows users to decide to see posts from all or friends only by showing two options below the new post block in News Feed.
If you want to help me to make more components, click on the button down bellow and buy me a coffee. It's up to you how much coffee I'll drink :-)
If any other component uses the ossngethomepagewallaccess() function it is necessary to change it to hpagepostsgethomepagewall_access() for everything to work correctly. As far as I know, this function is used in the following components:
Thanks to Hugo for testing and reporting
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
The problem now is that red is always the friends caption
That's what I wrote below: It's a caching issue. ;)
And I'm sure Rafael will fix it with the next release.
There was a user error. The ingredient works nicely. The problem now is that red is always the friends caption. Nice work, congratulations!
Michael: I'm sorry, it's a difficult task for me, I don't understand what to do. I’m not a programmer, I just love OSSN.
My finding:
With Ossn cache turned on, accessibility switching is still working correctly under the hood.
But since homepageposts.php is cached now, the admin's last chosen setting gets cached too for everyone - no longer reflecting the individual user's actual setting. Hence it would need some jquery inside to adapt the class to the chosen setting. For example by reading a cookie which has been set on the friends/public page.
It always stays red. Only this "everyone can see" red. Click to reload the webpage. Everyone's entry is visible as both a user and an admin. I deleted admin cache and user web browser cache.
Admin user can see any posts. Do you have tried with a normal user?
https://elittag.hu even though I turn off Hashtag on my website, the friend-everyone post selection doesn't work. the caption will appear: only friends and everyone can see it. I click and refresh the page, but the filter doesn't work, everyone's posts are visible. OSSN 6.1
Version updated to solve selector menu bug into /u/[userName]. Also, added in Readme know issues section. Thanks to @Hugo for testing and reporting.
Thanks, i made the suggested changes and now is working.
As advice for anyone, Popular Posts is needed to be reinstalled and clic the Initialize button in the components page after to add the new line in the code, if anyone is currently running that.
So both component can works flawslessly.
Because popular posts overrides siteactivity.php file also what you can do is to add
$accesstype = hpage_posts_get_homepage_wall_access();
into popular posts site activity file
https://github.com/rafaelmamorim/OSSN-HomePagePosts/blob/master/plugins/default/wall/siteactivity.php#L13