Tool to fix broken attach tags

detritus

angry angry
Staff member
Administrator
Moderator
Ryonani Teamster
Joined
Nov 23, 2009
Likes
164
#1
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 stuntcock to do this for you.

If you're getting good use out of this tool, send some love to @tmb
 
Last edited:

stuntcock

Staff member
Moderator
Joined
Jun 5, 2012
Likes
657
#2
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:

detritus

angry angry
Staff member
Administrator
Moderator
Ryonani Teamster
Joined
Nov 23, 2009
Likes
164
#3
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:
W

Will Lawrence

#4
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.
 

stuntcock

Staff member
Moderator
Joined
Jun 5, 2012
Likes
657
#5
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.
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.

There are a lot of broken links throughout the forums. These can't automagically be fixed on their own because we mashed three sets of overlapping data into one site that had conflicting identifiers. We're relying on people to update their own threads accordingly when they get a chance. If you find any administrative threads with outdated information, please report the post with the appropriate reason so we can address it.
 
Top Bottom