Group and Pages posts newsfeed Download 2.1

5.0
Indonesian Arsalan Shah 5 years ago

Show a group and business pages posts in user neesfeed page. This component is highly experimental. Right now we don't have plan to make this component part of any future OSSN version.

USE AT YOUR OWN RISK
THIS COMPONENT MAY CREATE OTHERS UNSUAL ACTIVTIES/BEHAVIOUR ON YOUR SITE
THIS COMPONENT REQUIRED PopularPosts TO BE DISABLED

THIS WILL ONLY WORK FOR NON ADMIN USERS RIGHT NOW

2.1

  • Only first 10 posts is shown because of pagination offset sending to getMyGroups return no group

2.0

  • Added business pages posts on newsfeed
  • Delete old component first before using new release as its renamed.
Comments
Indonesian Arsalan Shah Replied 4 months ago

The issue seems in getMyGroups takes offset :) from pagination
Edit: Fixed with 2.1

$groups = new OssnGroup();
$list   = $groups->getMyGroups(ossn_loggedin_user(), array(
		'page_limit' => false,  
		'offset' => false, //set to false to avoid taking it from pagination offset
));
Indonesian Arsalan Shah Replied 4 months ago

Yes true there seems issue with pagination as its only shows first 10 posts need to find the culprit....

German Michael Zülsdorff Replied 4 months ago

@Arsalan
A, got it: It's a PAGINATION issue! The group posts have to be among the latest 10 posts to appear at /home. If they are older (post 11 and above) ..... they are not shown.

Dutch Eric redegeld Replied 4 months ago

Great to see this
I was also fiddling with the code
Got it working with group detailsImage

German Michael Zülsdorff Replied 4 months ago

"However i am not sure about old post that appears. maybe something in condition.."
Yeah, up to now I have no explanation for that. Just checked my database (object and 4 entities) : All 3 posts are stored exactly the same way. But the 3rd old post is not shown at /home for whatever reason ...
Image

The only difference from outer view is that it comes with a comment and has been liked ...

Indonesian Arsalan Shah Replied 4 months ago

Username: testuserone
Password: testuserone
https://premium.ossn.app/

It shows page that user liked and group posts that user is member of. Correctly (NON ADMINS)

Indonesian Arsalan Shah Replied 4 months ago

@Michael, just tested and your results are as expected

  • Non-Admins - being NO group member. Never see any group posts as it only shows the post for groups he is member of
  • Non-Admins - being A group member : true

However i am not sure about old post that appears. maybe something in condition..

Image

German Michael Zülsdorff Replied 4 months ago

Just gave it a try. My results:

  1. Admins - being a group member or not - NEVER see any group posts at /home
    (as noted in the component's description)
  2. Non-Admins - being NO group member - NEVER see any groups posts at /home
  3. Non-Admins - being A group member - ONLY SEE the latest group posts at /home

And that's a little strange. There are some posts from 2 years ago that must have been saved with Ossn 7.x which are NOT shown. Looks like they've been saved differently in the database?!?

Dutch Eric redegeld Replied 4 months ago

Bit off language barrier.
This Componenten does not work.
So i was starting to alter this myself.
But what i mean is just like forum. OssnGroup also as standard timeline post.

Indonesian Arsalan Shah Replied 4 months ago

I don't understand, forums shows on newsfeed fine, the only purpose of this component to show group and pages posts in newsfeed there is no other functionality of this component.

Component

Developer: Arsalan
License ossnv4
Type: Tools
Requires OSSN Version : 6.0
Latest Version: 2.1
Last Updated 4 months ago
Repository Url View Repository