I changed the location of my Threads installation. Now I'm looking for a script that will help me change the referenced location of images within
posts bodies from "old-folder" to "new-folder" -- I'm not talking about post attachments mind you (they changed), I mean gremlins.
I had a script that helped me move the avatars from the "old-folder" to the "new-folder". Normally I can figure out how to simply massage a script to adapt it but I'm a little leery about fooling around and risking messing up my database.
Here's the avatar-mover script I successfully used in case that helps:
<?<br />$strQuery = "";<br />$strUpdate = "";<br />$strQuery = "SELECT U_Number, U_Picture FROM w3t_Users";<br />$sth = $dbh -> do_query($strQuery);<br />while ( list ( $lngNumber, $strPicture ) = $dbh -> fetch_array ( $sth ) )<br />{<br />if ( !empty( $strPicture ) )<br />{<br />$strNewPicture = str_replace( "/****OLD-FOLDER****/", "/****NEW-FOLDER****/", $strPicture );<br />$strUpdate = "UPDATE w3t_Users SET U_Picture = '$strNewPicture' WHERE U_Number = '$lngNumber'";<br />$dbh -> do_query ( $strUpdate );<br />}<br />}<br />$dbh -> finish_sth( $sth );<br />?>
I appreciate your help!
DeltaJo