gabs007 Posted February 28, 2017 Posted February 28, 2017 Greetings. I have a section in my community where we review items. I have the review pictures attached in a post: 5 stars, 4 stars, 3 stars etc. Those review pictures are attached in a post inside a topic with the rules etc. For example this: We copy and paste those pictures to insert into the posts. The source is always the same, pasted in different topics. The problem is that I would like to replace ALL the pictures pasted in the review forums with a new one. I'd like to find a way to do it at once. I dont' want to go post by post to replace each picture. For example, I would like to replace all this pasted in the topics: by this for all the topics where the image has been pasted. Is there any possible way of doing this ? the code, the src part of the html code points to something like this: "www.url.com/uploads/monthly_2016_12/585d005fda3d0_reputationexcellent.png.97a9aad8e7fac6da8a2c8b02603cc9e8.png " Is there anything I can do to change all the pictures at once ? If I didn't make myself clear, I will try to do it better.
Apfelstrudel Posted February 28, 2017 Posted February 28, 2017 Why don't you replace only the pic file in the upload directory?
gabs007 Posted February 28, 2017 Author Posted February 28, 2017 20 minutes ago, Apfelstrudel said: Why don't you replace only the pic file in the upload directory? So you mean, I can go to the server, and replace the file directly ??
Apfelstrudel Posted February 28, 2017 Posted February 28, 2017 Yes. Why not? But only if you want to replace this pic everywhere.
Meddysong Posted February 28, 2017 Posted February 28, 2017 Yep, like Apfelstrudel says, give another image the same name, then upload it. It will overwrite the previous one.
gabs007 Posted February 28, 2017 Author Posted February 28, 2017 4 hours ago, Apfelstrudel said: Yes. Why not? But only if you want to replace this pic everywhere. Yes .. that's it! 3 hours ago, Meddysong said: Yep, like Apfelstrudel says, give another image the same name, then upload it. It will overwrite the previous one. Thank you so much, I was so focused on a software solution that I never thought of the server!
markymids Posted March 1, 2017 Posted March 1, 2017 The only problem is users images will be cached for a while. I've used something like this in phpmyadmin when smiley urls changed etc.... UPDATE `ibf_forums_posts` SET post = REPLACE(post, 'default_blush.gif', 'default_blush.png') WHERE post like '%default_blush.gif%' You could severely mess up your forum doing update sql commands if you're not confident with it though so the other solution may be better for you.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.