How to change date posted?

How to change date posted?
613c11e7 Friday 25th May 2018, 21:26:13

I've been trying to migrate over my posts and replies from my previous forum that also used a flat file database.  I want to have the original post and reply dates show in the new forum.  I  made changes inside the data>>topic and reply files but the post/replies still show the recent date and not the original date.  If I make a modification to the topic/reply and change the date inside the topic/reply files the last modified date works just fine but not the .  Is there a way to change the posted/replied date to a previous date?  

image

Last modified by 613c11e7 on Wednesday 30th May 2018, 20:15:00

Replies 10
anonymous
23140480  Saturday 26th May 2018, 00:42:31

I've tried renaming the file.dat.php files to the original date while modifying the array date inside the "topic" and "reply" files but I get "page cannot load" error.  As soon as I change the dates and filenames back to what they were it works again.  Is there another database file that controls the dates that I cannot find?  I've been through all the data files. 

Fred
Fred  Saturday 26th May 2018, 22:25:34

Did you just try with Backup plugin?
  • Before ask a question, read the documentation.
  • 🎉  Featured as #1 product of the day on Product Hunt
  • Please like in alternativeto.net 👍🏻
  • ╰☆╮Flatboard╰☆╮ is a open source and community contributions are essential to project success!
  • <TextField>, my new CMS project designed by a passionate developer, for developers!
  • I am currently busy 😫.

7466c77e  Monday 28th May 2018, 18:37:46

No I'm not trying to backup anything.  I am migrating over my previous forum threads and replies (also used a flat file db) to the Flatboard platform.  I tried to make the changes inside the data files to make the dates consistent with the original dates of the old forum instead of the dates being showed as current.  Do you understand what I want to do?

Fred
Fred  Monday 28th May 2018, 18:49:57

Your old forum is under Flatboard or is it another project?
If it's another project, I could not help you ...
But if you attempt to change the dates, should and answers about the file name you either change in the files:
  - data/forum
  - data/reply
  - data/topic

However, it is impossible to change the modification date, because it is based on the modification date of the file.
So if your file on a previous release date and you save or rename your file, the modification date will take over.

Last modified by Fred on Monday 28th May 2018, 18:53:00
  • Before ask a question, read the documentation.
  • 🎉  Featured as #1 product of the day on Product Hunt
  • Please like in alternativeto.net 👍🏻
  • ╰☆╮Flatboard╰☆╮ is a open source and community contributions are essential to project success!
  • <TextField>, my new CMS project designed by a passionate developer, for developers!
  • I am currently busy 😫.

8210af62  Monday 28th May 2018, 22:18:21

I don't  need help migrating over the previous forum data ( not Flatboard).  I can do that manually because it was a flat file db also.  What I want to do is to change the date next to the calendar beside the username.  In my screenshot it states "13 hrs ago" I want that to read  Jan 01, 2002 or how ever many days 16 years adds up to.  Sorry if I am not making sense.  I don't speak french otherwise I may be able to explain it better.

Fred
Fred  Wednesday 30th May 2018, 20:14:22

Oh ok, I understand what you mean.
I will include this new feature for the next version, for that edit the file Utils.lib.php, search and replace line 107 by this code:
public static function toDate($id, $pattern = 'Y/m/d H:i', $cooldate = false)

And at the line 112:
if($pattern === $config['date_format'] && $cooldate && $diff < 604800) //1 week

By default I would put $cooldate=true, but leave you as is for what you want ;)
  • Before ask a question, read the documentation.
  • 🎉  Featured as #1 product of the day on Product Hunt
  • Please like in alternativeto.net 👍🏻
  • ╰☆╮Flatboard╰☆╮ is a open source and community contributions are essential to project success!
  • <TextField>, my new CMS project designed by a passionate developer, for developers!
  • I am currently busy 😫.

9304f5ae  Tuesday 5th June 2018, 22:59:30

Thanks for that but it didn't work  I still get the page not loading error message when making the changes in the Utils.lib.php file and adding '2001-09-11025053c419e' => '2001-09-11025053c419e', into the data>>topic file

Fred
Fred  Tuesday 12th June 2018, 15:52:48

  Hi,
I do not understand your request, because I tried on various environments the above code, and it works perfectly.
  • Before ask a question, read the documentation.
  • 🎉  Featured as #1 product of the day on Product Hunt
  • Please like in alternativeto.net 👍🏻
  • ╰☆╮Flatboard╰☆╮ is a open source and community contributions are essential to project success!
  • <TextField>, my new CMS project designed by a passionate developer, for developers!
  • I am currently busy 😫.

Suggested Topics
started
25.8K 0
Want to read more? Browse all categories or view latest topics.