find replace html tag
Permalink: http://www.ramonfincken.com/permalink/topic212.html
Rating : 3 / 5Rate this article (5 = best) 1 2 3 4 5
Tags:
View previous topic
::
View next topic
Author
Message
accentmedia Get a free globally recognized avatar It's free! Joined: 13 Apr 2010 Posts: 1 Location: Italy
Posted: Tue Apr 13, 2010 10:33 am Post subject: find replace html tag
Hi.
I downloaded and installed the wordpress plugin FIND REPLACE.
It is very nice indeed with 2.9.2. However, I would like to change the size of images of all my posts because I am planning to modify the template.
so from <a><img></a>
I want to find: -300x200.jpg" width="300" height="200"
and replace with: .jpg" width="525" height="300"
The problem is the plugin inserts slash / to the text being searched. So it could not be found and replaced.
Any ideas how to solve this?
Thanks in advance.
D
Back to top
Google adsense Advertisement
Posted: Tue Apr 13, 2010 10:33 am Post subject: find replace html tag
Advertisement
Back to top
GravityForms Advertisement
Posted: Tue Apr 13, 2010 10:33 am Post subject: find replace html tag
Advertisement
Back to top
ramon fincken Site's programmerGet a free globally recognized avatar It's free! Joined: 03 Aug 2007 Posts: 281 Location: A'dam/Diemen, The Netherlands
Posted: Wed Apr 14, 2010 7:34 am Post subject: Re: find replace html tag
Hi Accentmedia,
I will take a look at that tonight!
The slashes are needed to ensure database security.
Regards,
Ramon
Back to top
ramon fincken Site's programmerGet a free globally recognized avatar It's free! Joined: 03 Aug 2007 Posts: 281 Location: A'dam/Diemen, The Netherlands
Posted: Fri Apr 16, 2010 3:41 pm Post subject: Re: find replace html tag
Hmm no time yet I have a solution for you this weekend.
Back to top
ramon fincken Site's programmerGet a free globally recognized avatar It's free! Joined: 03 Aug 2007 Posts: 281 Location: A'dam/Diemen, The Netherlands
Posted: Sun Apr 18, 2010 7:37 am Post subject: Re: find replace html tag
Are you sure?
I just tested this and no problem here. Did you select the right post type?
All instances of
Code: 1271341996237-300x129.png" alt="" width="300" height="129"
will be replaced with
Code: 1271341996237-300x129.png" alt="" width="25" height="35"
when server resources are available.
Query:
Code: UPDATE LOW_PRIORITY xxxtable_posts SET post_content = REPLACE(post_content, '1271341996237-300x129.png\" alt=\"\" width=\"300\" height=\"129\"', '1271341996237-300x129.png\" alt=\"\" width=\"25\" height=\"35\"') WHERE post_type = 'page' OR post_type = 'post' or post_type = 'trash'
Resulted post snipplet:
Code: title="_1271341996237" src="http://www.domain.com/wp-content/uploads/2010/04/1271341996237-300x129.png" alt="" width="25" height="35" />
</a>
Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum