[OzzModz/Banxix] Bump Thread

[OzzModz/Banxix] Bump Thread 2.1.0

No permission to download

John rus

Member
After installing add-on, topics with a large number of replies, not displayed on the list of topics in forum.
Threads containing more than 4000 replies are not displayed.
Can you advise something ?
 

Robert9

Well-known member
To simulate what this addon is finally doing, i can use one of the addons to change the post_date of posts and change the post_date of the last post in a thread to now. This also changes the field xf_thread.last_post_date to now. The next view of thread_list shows now our thread at the top.

But!

We have changed the post_date of a post owned by someone and have changed the time of creation.

Now my question to you: What will happen, if we
dont change xf_post.post_date and
do change xf_thread.post_date only?

The last post is not touched, the thread has a wrong value for last_post_date till we bump again or someone writes a new post.
Is there any reason not to do this?

Code:
/*
        $db->query("
            UPDATE xf_post
            SET post_date = ?
            WHERE post_id = ?
        ", [\XF::$time, $thread->last_post_id]);

*/
 

Robert9

Well-known member
But i see another problem now! When i bump a thread (with or without my changes), it is shown to me as "new" with a bolded title in thread_list.
Probably this is shown to everyone else also bolded now? This means that i believe to find a new post in this thread, but there is nothing new for me!

I feel tricked now, right?

Finally this is not the perfect solution.


We can sort the thread by

sort by "thread.new_field_with_bump_date DESC, thread.last_post_date DESC",

but then we have to get rid of the value inside thread.new_field_with_bump_date after some time with a cron_job;

some hours after a bump or every night at 2:00 for all bumped ones.


Any other idea?
 
Top