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

I have two important consecutive posts that I want to always be above the posts of other users in the news timeline

Indonesian Arsalan Shah Replied 12 months ago

This will make all posts appears in old post first.

What are you trying to do making only one post pin on top?

Bulgarian Georgi Shindarov Replied 12 months ago

When installing the component, is there any menu that appears somewhere around the post ..or some button that uploads the post to the top position?

Bulgarian Georgi Shindarov Replied 12 months ago

How to manage this component.. how to set the top position for a given post?

Indonesian Arsalan Shah Replied 12 months ago

I have not tested but this should work in your custom component

<?php

ossn_register_callback('ossn', 'init', function(){
        ossn_add_hook('wall', 'getFriendsPosts', 'wall_posts_order');
        ossn_add_hook('wall', 'getAllPosts', 'wall_posts_order'); 
        ossn_add_hook('wall', 'getPublicPosts', 'wall_posts_order');                                              
});
function wall_posts_order($hook, $type, $return, $params){
                $return['order_by'] = 'o.guid ASC';
                return $return;
}

.

Bulgarian Georgi Shindarov Replied 12 months ago

Can you tell me about the component.. what does it represent?

Bulgarian Georgi Shindarov Replied 1 year ago

I put everything back in place and everything is fine now

Indonesian Arsalan Shah Replied 1 year ago

Changing anything in database is a big mistake done by you.

Changing order can be done using a component instead i can explain in later post

Bulgarian Georgi Shindarov Replied 1 year ago

Is there any component to do this automatically?

Bulgarian Georgi Shindarov Replied 1 year ago

I tried by changing the object guid number in the database.. but I was able to upload only the content of the post.. without the comments and likes.

Premium Version

Due to the many requests in the past for additonal features and components we have decided to develope a premium version. Features like Hashtags, Videos, Polls, Events, Stories, Link Preview, etc included in it.

$199 (Life Time)
Learn More

Other Questions