How can I change the timeline post position?

Georgi Shindarov Posted in Component Development 1 year ago

Is it possible to upload my old posts to the top position in the timeline аlong with comments and likes?

Replies
Bulgarian Georgi Shindarov Replied 12 months ago

enter image description here

Bulgarian Georgi Shindarov Replied 12 months ago

I have installed the same component.. but unfortunately only the post numbers are showing.. without showing the posts themselves..

German Michael Zülsdorff Replied 12 months ago

Aside from that you may have a look at the list of lastest components bottom right
or use the SEARCH function of this site.
Now, that you knew the name of my component already, it's sufficient to simply search for 'pinned':


enter image description here


and click on Component Projects on the search results page


enter image description here

German Michael Zülsdorff Replied 12 months ago

Hmm ... looks like this is not really obvious, but the menu on top of this site is CLICKABLE!
Thus, if you want to download something - click on Download.
And since you wanted to download a component - click on Components.


enter image description here


Then a new page will open with a list of all available components - latest on top:


enter image description here


Click the component you are interested in - in this case the Pinned Posts component,
and the component's page will open:


enter image description here


As a last step click the orange Download button.

Bulgarian Georgi Shindarov Replied 12 months ago

Thank you very much! And if you could send me the PinnedPosts component.. or post a link to it here.. I would be very grateful!

German Michael Zülsdorff Replied 12 months ago

First of all: There's no such file - the post ids are stored in the database.
Next, this isn't the right way of thinking: You want to extend Ossn, thus - even if there was such a file - you can not just change anything existing, you have to add that extra functionality by means of a component, as Arsalan already wrote.
Okay, so what do we want?
We want something to be displayed on top of the newsfeed.
And browsing the list of components already gives a component which does right this: The Site Announcement component. So let's use it as a template - that is: make a copy and change it to what we want.

Now, that the placement question has already been solved, the next question is: How do we get the post id of the post we want to pin on top of the newsfeed?
Ah yes, we can simply click the post's date,

enter image description here

and get a new page with the id in the url:

enter image description here

Now, with our new component derived from Site Announcement we would enter that id at the admin backemd

enter image description here

enter image description here

And back on our frontend we'll get it already in place:

enter image description here

Bulgarian Georgi Shindarov Replied 12 months ago

..Can you tell me in which file I can change the post numbers manually? ..If it's possible of course.

Bulgarian Georgi Shindarov Replied 12 months ago

The component can be called "post on top" and apply only to the administrator if it is easier to do technologically

Bulgarian Georgi Shindarov Replied 12 months ago

Now I have to delete and repost my old post on top of other users' posts.. but that way I lose their comments and likes.. which might make them think I'm deleting them on purpose.. and I don't want them to offend me ..

Bulgarian Georgi Shindarov Replied 12 months ago

is it possible to put a button above edit and delete that will upload the post along with the comments and likes to the top position? In my opinion, this is quite an important and useful option