I'm creating a feed grabber for one of my forums on my site, to be displayed on my homepage, and I want to actually have access to the images that are attached to the posts.
Right now, the rss feed only shows an attachment link, so I've bypassed the rss feed since I'm on the same server, and am accessing the database directly, and parsing the bbcode to get the first attachment id, which I was able to use to generate an attachment url that would show the image.
The issue I ran into here is that only logged in users can view attachments.
So now, I've set up my script to access the attachment_data table directly, which is great because I can use the id and attachment hash to get the thumbnail sized image rather than the full sized image.
Where I need some clarification:
My attachment thumbnails are in /data/attachments/0/
Where is the zero folder being specified? Will all of my attachment thumbnails always go into that folder? Will there eventually be a /data/attachments/1/ or 2?
Looking at the attachment tables, none of the fields seem to specify that zero, so I'm not sure if hard coding that zero into my img src when calling the image attachments will eventually cause an issue.