Pin a post, is there such a component?

David Exodus Posted in General Discussion 2 weeks ago

My title says it all, is there a component to pin a post on top?

Replies
us Bansh33 - Replied 2 weeks ago

the easiest way to do this is the following:

  • write a component that can store a flag for pinned posts. you can either use existing tables like ossn_entities_metadata and ossn_entities or you could modify the ossn_objects table since that holds most post data.
  • make the post add a link to newsfeed posts (see the "dislike" component for an example of how to do this) when the logged in user is an admin. use a function like is_AdminLoggedIn() for ease.
  • modify the OssnWall component to check for this flag and resort the posts with pinned ones at the top.
ch David Exodus Replied 2 weeks ago

I know that there is a site announcement component. But i wanted to Pin a Blogpost on top.

se Johannes Genberg Replied 2 weeks ago

Does it even support pictures, links or html?

us Bansh33 - Replied 2 weeks ago

you could use the announcement component which is pretty similar: https://www.opensource-socialnetwork.org/component/view/3304/site-announcement