Thanks for fast response!
I have admin privilege, but it doesn't help for now.
My old forum is not a Nodebb installation, it's vBulletin. I've wrote a migration script which takes data from sql database and add topics and posts to Nodebb via api. If there is no way to change timestamps, looks like i'll change in in redis for all necessary resources. It will make my script much more complex but i need to complete the migration.
I'll also try to comment date changing in sources. I'm not familiar with JS but it looks obviously enough.
Thanks anyway
Ш
шЫкель грубый
@шЫкель грубый
Posts
-
How can I backdate topics and posts (for migration purposes)? -
How can I backdate topics and posts (for migration purposes)?Hello, i'm moving my old forum to a Nodebb engine and got several issues.
- There is no possibility to set timestamp for a new topic. I need to save topic (and 1st post also) creation date and time.
- When i use timestamp for post replying, it doesn't work too.
This timestamp is from 2011
DEBU[0000] post body: {"cid":87,"title":"topic","content":"my first post","tags":null,"timestamp":1309975440000,"_uid":272362} DEBU[0000] POST URL: https://forum.mydomain.ltd/api/v3/topics/ INFO[0000] 200 OK
But i got this as response:
INFO[0000] {Tid:2447, UID:272362, Cid:87, Title:"topic", Slug:"2447/topic", MainPid:2471, Postcount:1, Viewcount:0, Postercount:1, Scheduled:false, Deleted:0, DeleterUID:0, TitleRaw:"topic", Locked:0, Pinned:0, Timestamp:1676286542609, TimestampISO:"2023-02-13T11:09:02.609Z", Lastposttime:1676286542609, LastposttimeISO:"2023-02-13T11:09:02.609Z", PinExpiry:0, PinExpiryISO:"", Upvotes:0, Downvotes:0, Votes:0, TeaserPid:0, Thumbs:[]interface {}{}, NumThumbs:0, Category:struct {}{}, User:struct {}{}, Teaser:struct {}{}, Tags:[]interface {}{}, IsOwner:true, Ignored:false, Unread:false, Bookmark:1, Unreplied:true, Icons:[]interface {}{}, Thumb:"", Index:0, MainPost:map[string]interface {}{"bookmarked":false, "cid":87, "content":"<p dir=\"auto\">my first post</p>\n", "display_delete_tools":true, "display_edit_tools":true, "display_moderator_tools":true, "display_move_tools":true, "index":0, "ip":"192.168.1.17", "isMain":true, "pid":2471, "selfPost":false, "tid":2447, "timestamp":1.676286542609e+12, "timestampISO":"2023-02-13T11:09:02.609Z", "topic":map[string]interface {}{"cid":87, "mainPid":2471, "postcount":1, "scheduled":false, "slug":"2447/topic", "tid":2447, "timestamp":1.676286542609e+12, "timestampISO":"2023-02-13T11:09:02.609Z", "title":"topic", "titleRaw":"topic", "uid":272362}, "uid":272362, "user":map[string]interface {}{"banned":false, "banned:expire":0, "banned_until":0, "banned_until_readable":"Not Banned", "custom_profile_info":[]interface {}{}, "displayname":"Свуй", "groupTitle":"[\"Зергеры\"]", "groupTitleArray":[]interface {}{"Зергеры"}, "icon:bgColor":"#2196f3", "icon:text":"С", "lastonline":1.676286271926e+12, "lastonlineISO":"2023-02-13T11:04:31.926Z", "muted":false, "mutedUntil":0, "picture":interface {}(nil), "postcount":6, "reputation":4, "selectedGroups":[]interface {}{}, "signature":"", "status":"online", "topiccount":6, "uid":272362, "username":"Свуй", "userslug":"свуй"}, "votes":0}}}
So the post has current timestamp. May be i do something wrong?
At least, please add a possibility to set timestamp for new topics inPOST /api/v3/topics/
Thanks!
-
Why don't write api support custom topic publishing time?I really need this feature. I'm trying to migrate my very old forum to nodebb and need to create posts "in past".
I'm pretty sure i did it before with older nodebb version with write api plugin