Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Aiheen aloitti: probeman - huhtikuu 12, 2020, 11:32:26 AP

Otsikko: Searching posts for a literal string?
Kirjoitti: probeman - huhtikuu 12, 2020, 11:32:26 AP
I need to search all my forum posts for a literal string. This string (":80"), will be in some embedded image links in some of the posts.

Is there a way to search for a literal string in all forum posts?
Otsikko: Re: Searching posts for a literal string?
Kirjoitti: vbgamer45 - huhtikuu 12, 2020, 12:39:48 IP
Do you need to do this though the forum search?  What is the reason for the search?
If not you can do a search in the database in the smf_messages table to get a list of posts.
Otsikko: Re: Searching posts for a literal string?
Kirjoitti: probeman - huhtikuu 12, 2020, 01:06:39 IP
Hi,
Thanks.

It's because some old image links utilized port 80 and they no longer work now that the web site is https.

Yes, I'd prefer to do it through the normal forum search if possible.
Otsikko: Re: Searching posts for a literal string?
Kirjoitti: vbgamer45 - huhtikuu 12, 2020, 01:10:23 IP
Lastly do you just need to a do find and replace? Like change one url to another url?
Otsikko: Re: Searching posts for a literal string?
Kirjoitti: probeman - huhtikuu 12, 2020, 03:02:06 IP
Not particularly.  Just find the posts containing the ":80" strings and edit them by hand would be great.
Otsikko: Re: Searching posts for a literal string?
Kirjoitti: Sir Osis of Liver - huhtikuu 12, 2020, 04:37:58 IP
You can search the _messages table in your database for the string using phpmyadmin.
Otsikko: Re: Searching posts for a literal string?
Kirjoitti: probeman - huhtikuu 12, 2020, 05:58:17 IP
Yeah, I appreciate that but I'm not qualified to do that sort of thing.  Is there no way to do it from the forum search (advanced?) web page?
john
Otsikko: Re: Searching posts for a literal string?
Kirjoitti: Sir Osis of Liver - huhtikuu 12, 2020, 06:24:40 IP
You can use advanced search to search all boards for :80.  It's sufficiently unique that you shouldn't get many bad hits.
Otsikko: Re: Searching posts for a literal string?
Kirjoitti: probeman - huhtikuu 12, 2020, 11:08:43 IP
OMG it's does do a search inside the link in the post.  Cool. I should have tried it first.