XF 2.2 How to save date, when custom_fields are changed?

Robert9

Well-known member
I don't want to bump threads, but I also don't want to add a new field to xf_thread.
But I have to know when custom_fields are changed. And I need this information in thread and not in post only.

The deal is update
thread->last_post
post->post_date
(and forum->last_)

but what I do with
post->last_edit_date?

Could there be any problem, if the last edit_date is before the post->post_date?

Is it the best solution to do?
post->post_date to now;
then post_last_edit_date to now, if not 0



There is another possible way not to touch the threads:

set post->last_edit_date of first_post to now;
Daily cron job finds all posts with position==0 and last_edit_date > now-24 hours => thread_ids;
do what I have to do with those threads.


Any better idea; on how to know if custom fields are changed?



But ... maybe I should check things around "history" also?



Or maybe add a new table like:

xf_changed_threads
thread_id, date

add if custom_fields are changed

Do whatever is to do and delete rows here after.




Or maybe add a new whatever field in XF; i guess there are places to save data,
and just save the thread_ids?
 
Top Bottom