Jump to content

A Way to Replace All Pasted Images at once in 1500 topics ?


gabs007

Recommended Posts

Posted

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: @test.png.32186348313d5831d365ef0767e9348f.png
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: @test.png.32186348313d5831d365ef0767e9348f.png by this  @test2.png.1bd91327132e516276ed508c21aba096.png 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.

Posted
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 ?? 
 

Posted
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!

Posted

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.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...