Announcement

Collapse
No announcement yet.

Change Thread ID.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Change Thread ID.

    Hi,
    I need to urgently change thread id of few threads which got deleted accidentally from one our forums.

    I am ready to do direct database alterations at my risk, please guide me how to do the same. We have recovered content of this threads via googles index (since this threads are very important for us) we need to restore them back to there original IDs, for search engine rankings.


    Thanks and Regards,
    TechArena - TechArena Community - News - Download - Video - Guide - Review

  • #2
    It is quite involved. I think there are about a dozen tables that require threadid to be consistent (thread, post, threadread, threadrate -- and more).

    I don't know what they all are, so I can't provide a query. But I would suggest just using some method of a permanent redirect (sending the 301 response). I believe most search engines won't fault you for these kinds of redirects. For example, something like this htaccess (untested):

    Code:
    RewriteEngine On
    RewriteCond showthread\.php?t=123 /showthread.php?t=789 [L,301]

    Comment


    • #3
      thanks chroder, thats the last option I have, since there where many important threads which got deleted I tried to avoid redirection.

      I am only concerned about a change in thread id, doesnt matters if postids are new. (unsure if this can be acheived)
      TechArena - TechArena Community - News - Download - Video - Guide - Review

      Comment


      • #4
        Bumping back seeking a solution.
        TechArena - TechArena Community - News - Download - Video - Guide - Review

        Comment


        • #5
          backup and close forum before do that

          SQL: (NTid = your new thread ID, OTid = your old thread ID, TP_ = your table prefix (if you use it))
          Code:
          UPDATE TP_infraction SET threadid = NTid WHERE threadid = OTid
          UPDATE TP_moderation SET threadid = NTid WHERE threadid = OTid
          UPDATE TP_moderatorlog SET threadid = NTid WHERE threadid = OTid
          UPDATE TP_post SET threadid = NTid WHERE threadid = OTid
          UPDATE TP_posthash SET threadid = NTid WHERE threadid = OTid
          UPDATE TP_subscribethread SET threadid = NTid WHERE threadid = OTid
          UPDATE TP_tachythreadpost SET threadid = NTid WHERE threadid = OTid
          UPDATE TP_thread SET threadid = NTid WHERE threadid = OTid
          UPDATE TP_threadrate SET threadid = NTid WHERE threadid = OTid
          UPDATE TP_threadread SET threadid = NTid WHERE threadid = OTid
          UPDATE TP_threadredirect SET threadid = NTid WHERE threadid = OTid
          UPDATE TP_threadviews SET threadid = NTid WHERE threadid = OTid
          after that update counters

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...
          X