vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Mass change date of all posts/threads? (https://vborg.vbsupport.ru/showthread.php?t=263438)

Hobbit Stomper 05-10-2011 09:45 PM

Mass change date of all posts/threads?
 
Hi there,

I have a forum running (4.1.0) with about 6600 posts and 300 threads. Back when I created the forum in december, the server had the wrong year. I am about to fix the date on the server, but I would also like to change all the threads and posts in the mysql database by exactly one year.

How could I do that? Is there a script I can run to change all unix timestamps for posts/threads?

--------------- Added [DATE]1305084681[/DATE] at [TIME]1305084681[/TIME] ---------------

I could write my own php script that simple reads all dates of all posts of the mysql fields and then simply add the number 31536000 (amount of seconds for 1 year) to the current unix timestamp, assuming vbulletin uses unix timestamp.

So far I found the following tables and fields that would need to be updated:

Quote:

adminlog.dateline

editlog.dateline

forum.lastpost
forum.lastthread

moderatorlog.dateline

phrase.dateline
thread.lastpost
thread.dateline

poll.dateline
poll.lastvote

post.dateline

postedithistory.dateline

profilevisitor.dateline

reputation.dateline

stats.dateline

visitormessage.dateline

user.joindate
user.lastvisit
user.lastactivity
user.lastpost
Then I also found user.passworddate, which is not unix timestamp, plus I am not sure what it does (time user changed/created password?). Seems it's only important for the backend and won't affect the forum itself, right?

My question, which one of those fields really need to be updated to keep the forum clean, and which ones will not affect the users at all?
And which ones will be automatically updated when I run a system maintenance-> update counters?

Just so I get a rough idea on how not to break the forum

Thanks.


All times are GMT. The time now is 05:23 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01082 seconds
  • Memory Usage 1,711KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete