News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

a way to "interogate" a topic to find images

Started by iain sherriff, July 22, 2012, 04:23:05 PM

Previous topic - Next topic

iain sherriff

one of the reasons I have SMF gallery (Pro now) is that I want to keep images together as archive.
My forum is home to an amalgamation of UK Lowrider clubs. One of them had a big forum but it was badly run and crashed loosing everything. They had a BIG topic of UK lowrider history with lots of images. We are recreating this topic and what I want to know is

is there a way to "interogate" a topic to get a list of images posted in that topic.

I know I could go thro one at a time but the image links must be in the Db somewhere ?

I have no idea how to do this if its possible. I have a CPanel so PHPMyAdmin etc

anyone know if/how this can be done ?

thanks
SMF 2.0.12

Arantor

So, you want to go through a topic (to which you have raw DB access, presumably), find all the images linked in a single topic, and then do what exactly?

* Arantor is not understanding the connection between a thread full of links to images and a gallery.

iain sherriff

images on the old forum got lost as users had them on photobucket or whatever so when the board crashed and burned they were all effectively lost. Also over time users move image storage so links become dead.
I want to be able to "extract" the links from the topics so I can copy and store the images locally and put them in the gallery.

I have acces to the Db..........although I dont know how to use it  :o


thanks, hope I explained better that time.
SMF 2.0.12

Colin

"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

iain sherriff

thanks for your time and replies...........I guess I imagined a script that would get me a list of image links then go off and download them for me and i thought it would be something around already  :-[

your replies make me realise otherwise :)
SMF 2.0.12

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.
SMF 2.0.12

Advertisement: