Đã hoàn thành

326015 Javascript/PHP/SQL rewrite

I need a way to rewrite Blogger image URLs within of Blogger blog posts that have been imported into a Wordpress blog.

Here's my test site:

[url removed, login to view]

I wanted to do this via a find-and-replace in the database (using SQL) but I'd need to use wildcards. The reason is that the Blogger image URLs are not uniform. EVERY image path is different, and are even of different lengths. This is not a matter of replacing "[url removed, login to view]" with "[url removed, login to view]" The blogger URLs look like this:

[url removed, login to view]

[url removed, login to view]

Those images are on the SAME PAGE. Note how the paths are completely differnet, and therefore cannot be replaced without wildcards. The only way to replace them is with some sort of wildcard pattern-match, like replacing:

http://*[url removed, login to view]*/*/*/*/*/


[url removed, login to view]

BUT, SQL won't allow wildcards in the replace function, or so I'm told.

So, I'd like either:

1. (Ideally) A way to find and replace in the DB using wildcards that I don't know about,


2. Some kind of PHP or Javascript snippet that will rewrite the URLs on the fly. In this case, I'd leave the DB alone, but the script would rewrite the image URLs as the page loads.

To see all of this in context, please visit the test blog I set up at [url removed, login to view]

I'd actually like to rewrite the entire linked snippet for each, which looks like this:

<a onblur="try {[url removed, login to view]();} catch(e) {}" href="[url removed, login to view]"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 200px; height: 200px;" src="[url removed, login to view]" alt="" id="BLOGGER_PHOTO_ID_5327633152834904930" border="0" /></a>

with a simple image tag:

<img src="[url removed, login to view]">

It needs to be generic enough (using wildcards) that it will rewrite all of those ridiculous Blogger image blocks of code, in all of their varied lengths and manifestations.

Totally pulling my hair out. Anyone who solves this will be my personal hero.

Thanks in advance.

Kĩ năng: Bất kì công việc gì, Javascript, MySQL, PHP, SQL

Xem nhiều hơn: wordpress blocks, wanted a blogger, test my javascript, test a javascript, need to find a blogger, look php id, img wordpress, how to find blogger, how to find a blogspot, how to find a blogger on wordpress, how find the blogger, how do i set up a blog, find the blogger, find javascript, find a blog on blogger, find a blogger test, find a blogger on wordpress, anyone need a blogger, t-sql with, t-sql in

Về Bên Thuê:
( 1 Nhận xét )

ID dự án: #2071822

Được trao cho:


Hello Sir , I can do this.Regards.

$50 USD trong 1 ngày
(0 Đánh Giá)