General Community > Scripting Help
a way to "interogate" a topic to find images
MrPhil:
I don't think you're going to find a canned script to do this (it could be done).
OK, so you have an SMF database still in working order, and want to extract [img] tags from within posts (messages)? That could be done via phpMyAdmin, but it will be a lot of labor. You will have to cut and paste page after page of results into a file, and then edit to clean it up to just the image URLs. Running MySQL directly from the command line might be easier, as you should be able to capture directly to a file. If you can get to your server's command line, Linux has various editors including "sed" (stream editor) which could be used to snip out the image URLs into a smaller file. Note that a given post (message) may have more than one image in it.
Now that you have the various image URLs in a file, what do you want to do with them? Are you going to copy the images over to your gallery? Hopefully there is a way to bulk import images from a file! Linux has commands to help you with eliminating duplicates and sorting names. I take it you don't need to associate images with any particular post or member? If you do, such post information might be brought along with the image URLs and used somehow (caption?).
Before starting any of this, make sure you're in the clear copyright-wise in taking all these images. You might need to get clearance from the photo hosting companies, from their members, from the original SMF posters, and/or from the original photographer or source!
Images which were entered as attachments would be handled differently (get URLs from the attachment table, I would presume).
iain sherriff:
thanks.
detailed and informative
but
also beyond what I would attempt ::)
I'm only talking a few hundred so i'll just do it manually from the forum pages. Thses are all photos posted by the taker so copyright is OK.
Navigation
[0] Message Index
[*] Previous page
Go to full version