Home Page Posts Download 1.3

5.0

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.

Screenshot

Screenshot

How to support

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 :-)

Changes

  • Version 1.3
  • Fix Avoid caching the JS files. Thanks to Arsalan Shah to solve the issue and Tamás Varga for finding the glitch.
  • Added all OSSN supported languages. Except for EN, PT, and ES files, all others need to be translated

Known issue

If any other component uses the ossn_get_homepage_wall_access() function it is necessary to change it to hpage_posts_get_homepage_wall_access() for everything to work correctly. As far as I know, this function is used in the following components:

  • HashTag
  • PopularPosts

Thanks to Hugo for testing and reporting

##Contributing

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.

Comments
Hungarian Tamás Varga Replied 4 years ago

Idea. OSSN monitors what language a user speaks in their profile. Those who speak English will only show the feed in English, if the account setup speaks Hungarian, only Hungarian users will see it. Good for a start.

Indonesian Arsalan Shah Replied 4 years ago

@Tamas it will be huge work. Besides that you don't know which langauge the post is created.

Hungarian Tamás Varga Replied 4 years ago

I want users to come in more than one language. Is it possible to automatically show only entries for people whose language is the same as my language? It's good for friends in all languages ​​to see your post. All user posts will only be available in the language I set. Can it be solved?

Hungarian Tamás Varga Replied 4 years ago

Works great, thank you for your work!

German Michael Zülsdorff Replied 4 years ago

Rafael,
wouldn't it make sense to change the init to

if(ossn_isLoggedin() && !ossn_loggedin_user()->canModerate()) {

? I mean, if I'm logged in as admin and clicking these links doesn't make a difference - why should I see them at all? :)

cl Erassus ︎ ︎ Replied 4 years ago

Thanks for the update Rafael, tested and working fine, if i find any problem i will comment that asap.

German Michael Zülsdorff Replied 4 years ago

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.

Hungarian Tamás Varga Replied 4 years ago

There was a user error. The ingredient works nicely. The problem now is that red is always the friends caption. Nice work, congratulations!

Hungarian Tamás Varga Replied 4 years ago

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.

German Michael Zülsdorff Replied 4 years ago

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.

Component

Developer: Rafael
License ossnv4
Type: Uncategorized
Requires OSSN Version : 6.0
Latest Version: 1.3
Last Updated 4 years ago
Repository Url View Repository

Versions