MyBB Community Forums

Full Version: missing attachments; how do I find which attachment is what
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
after merging from phpbb3 to mybb, the old attachments from the phpbb3 board did not convert over to mybb. this is a known issue and I'm fine with that. however, I'd like to start going through my forum to manually fix the attachments when I see a broken one. how do I tell which attachment belongs where? for example, in this thread on my forum:
http://damnfineshave.com/thread-facelath...hoto-essay

there are 24 attachments, the broken attachments say "attachment=24", "attachment=23" and etc. But I don't see them listed as such in /uploads. how can I find out which attachment belongs to which thread and/or post?
let me renew this topic so that an expert can guide further ..

now above referred site has all the attachments in uploads directory with correct
names as in database attachments table. they are also shown at the end of posts
as the attachments ; the problem is with auto insertion in to the posts ...

if attachments were inserted in to the posts , they are like below

.... .... ...  .... ... 
[attachment=4]
.... .... ...  .... ... 
[attachment=3]
.... .... ...  .... ... 
[attachment=2]
.... .... ...  .... ... 
[attachment=1]
.... .... ...  .... ... 
[attachment=0]

that is, if there were five attachments inserted into the post , they are shown as
above in the relevant posts . in general, attachments insertion order is like above .
(exception example)

now requirement is to
find such attachments code in the message and replace with correct attachment number .

that is :
get attachments IDs for a message from database and replace in the post

while not end of attachments count
|_______ get attachments IDs and their count for a post ID
|_____________ for i = 0 to count - 1
|_________________ replace [attachment=i] with [attachment=attachment id]
|_____________ next i

not sure if above method is correct AND coding something like above is easily possible ...

please note : the link in above post (by Shemo) was manually edited
hey, thanks for bumping this ranjani and thanks for helping me correct the other issue!

I hope Dylan can lend a hand.
The whole attachments module right now is in need of some serious work. But for now there are no work-arounds or fixes. Sorry.
(2011-09-02, 05:16 PM)Dylan M. Wrote: [ -> ]The whole attachments module right now is in need of some serious work. But for now there are no work-arounds or fixes. Sorry.

so manually fixing each post in the only way right now?
Unfortunately. If I spend the time digging