The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Change Thread ID
I am posting this question here as well. (for faster responses if possible)
How can i change id of a thread, some important threads on one of our forums got deleted accidentally we need to restore them back to there original IDs to preserve our search engine rankings and page ranks. I am sure this requires database alterations, I am ready for same.. Thank You. |
#2
|
|||
|
|||
I can not really advice changing any id's in the database, as a lot of information is linked across tables using the id's.
But you could try the following (backup first!!!!!): [sql]UPDATE thread SET threadid = <newthreadid> WHERE threadid = <currentid>;[/sql] [sql]UPDATE post SET threadid = <newthreadid> WHERE threadid = <currentid>;[/sql] Never set to a new threadid that is higher then your current highest id! Also this will break any thread subscriptions etc... PS Backup first!!!!!! Use this at your own risk |
#3
|
||||
|
||||
thank you Marco, but sorry for bump I am unable to understand few words in the query.
newthreadid = new thread we have created in our forums ? currentid = old thread which was deleted ? UPDATE post SET threadid = <newthreadid> WHERE threadid = <currentid>; in above query which requires altering post table does newthreadid means new post number ? and currentid means deleted post numbers ? A big thanks for giving me right queries to alter here. Warm Regards, |
#4
|
|||
|
|||
newthreadid = new thread we have created in our forums ? <-- No newthreadid is the threadid you want it to have, ie the deleted threadid
currentid = old thread which was deleted ? <-- The currentid is the id of the new thread created. And no, also when updating the post table you should change the threadid, not the postid. |
#5
|
||||
|
||||
Thank You once again for your quick confirmations, I will post back the results in a short while.
Warm Regards, |
#6
|
||||
|
||||
Thank You Sir Marco van Herwaarden,
this worked like a charm I was able to restore all my deleted threads back again |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|