1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Tool to fix broken attach tags

Discussion in 'Super Deepthroat' started by detritus, Nov 22, 2015.

  1. detritus

    detritus angry angry Staff Member Administrator

    Joined:
    Nov 23, 2009
    Messages:
    996
    Likes Received:
    117
    Mad props to @tmb for this tool. Whipped it out in no time. ;)

    This will fix the use of ATTACH, ATTACHIMG, and ATTACHURL tags used in the old SMF forums and fill in the proper attachment IDs.

    The workflow is pretty straight forward:

    1. Go to the Attachment converter

    2. Enter the post ID that needs to be repaired. You can get this fairly easily. While viewing the post having issues, hover over the links to edit or like it and you'll see the post ID in the URL. Example:
    Code:
    https://www.undertow.club/posts/XXXXX/edit
    Take the number here             ^^^, not the whole link
    
    Please don't confuse this with the thread ID.

    3. Click submit and it'll spit back out the raw BBCode you need to edit the post with in the Result box. Copy that output, edit your post, paste it in, replacing everything that was there before and save your changes. All the text below the Result box is for debugging and isn't necessary to carry over.

    4. Profit.

    We've done some preliminary testing and it looks to be ready to go. If you find any cases where it's not getting you the right attachment IDs or fudges up your formatting, please let us know in this thread. If you use the tool and accidentally break your post, you should be able to revert your edit using the history. If you can't, ask @stuntcock to do this for you.

    If you're getting good use out of this tool, send some love to @tmb
     
    Last edited: Nov 22, 2015
    Mineur and Huitznahua like this.
  2. stuntcock

    stuntcock Club Regular Staff Member Moderator

    Joined:
    Jun 5, 2012
    Messages:
    1,509
    Likes Received:
    352
    Hey @tmb - great work! I've used your tool to fix a few posts and it has worked flawlessly.

    One quibble: it seems to ignore the ATTACHMINI tag. Example.
    Fixed! Thank you.

    Edit: it also seems to skip or ignore ATTACHTHUMB. Example. This is the post in question, which includes three attachments (but the tool reports "no attachment").
    Fixed! Thank you.
     
    Last edited: Nov 23, 2015
    tmb likes this.
  3. detritus

    detritus angry angry Staff Member Administrator

    Joined:
    Nov 23, 2009
    Messages:
    996
    Likes Received:
    117
    Ah that's on me, didn't know those tags existed. FFFF-

    Let me figure out how the behavior of those tags differs from the others and work with him on that.

    Edit: actually I don't think I'll have to nag him about it. Give it a try now.
     
    Last edited: Nov 23, 2015
    tmb likes this.
  4. Will Lawrence

    Will Lawrence Potential Patron

    Joined:
    Jul 14, 2016
    Messages:
    1
    Likes Received:
    0
    For some reason, many links don't work
    Anything with sdtmods.com/index.php?topic=XXXX.0 (where XXXX is four numbers) doesn't work for me. I keep seeing people getting told to go to those links, but every time I use them, it just brings me to the home page.
     
  5. stuntcock

    stuntcock Club Regular Staff Member Moderator

    Joined:
    Jun 5, 2012
    Messages:
    1,509
    Likes Received:
    352
    What you're seeing is a historical artifact. Undertow.club is an amalgamation of several pre-existing websites. The merge was not perfect; some hyperlinks have become invalid.

    In addition to this technical problem, the forum includes many old posts (often made by members who are no longer active). The information found within those posts may be out of date. The tools that they mention may be outdated, or no longer available. Hotlinked images may have vanished.

    The general-purpose fix for such issues is to Report them by clicking the small "Report" button beneath a post. Staff members will review the problem and attempt to fix it. It's not practical for us to proactively read through thousands of posts in search of errors, but we can react to specific complaints.