PDA

View Full Version : How to clean [IMG] tag after import forum SMF


nee5
Sun 20th Apr '08, 5:54am
I have problem with IMG tag after import from SMF forum.
All IMG tags like this:
http://img186.imageshack.us/img186/1681/43347361du5.jpgSo, all of images can't be displayed. I want to clean all "width" and "height" on img tag.

How to fix this problem with clean.php?

nee5
Mon 21st Apr '08, 12:54pm
Is someone can help me? i have used member support system and i didn't get good answer. They don't tell me about regex pattern to get rid off all my IMG tag.

Jerry
Mon 21st Apr '08, 2:50pm
Is someone can help me? i have used member support system and i didn't get good answer. They don't tell me about regex pattern to get rid off all my IMG tag.

I answered and gave you the exact regex to clean those tags out:


$text = preg_replace('#\(.*)\#siU', '$2', $text);

nee5
Tue 22nd Apr '08, 3:20am
I try your regex to clean those tags, but i can't clean out those tags. I found new issue about database. There are different tag in database and in my forum.

example
(in my forum):
http://img186.imageshack.us/img186/1681/43347361du5.jpg(in my database):
[ img ]http://img186.imageshack.us/img186/1681/43347361du5.jpg[ /img ]I have used impex cleanup and try rebuild thread, forum, post cache (all), but still can't fix this problem.

Jerry
Tue 22nd Apr '08, 2:01pm
example
(in my forum):


In the target or the source forum ?

krohnathlonman
Fri 16th May '08, 4:36am
I answered and gave you the exact regex to clean those tags out:


$text = preg_replace('#\(.*)\#siU', '$2', $text);

so uhh... where do I use this?

Jerry
Fri 16th May '08, 2:24pm
cleaner.php it's in the tools dir of ImpEx and the instructions are inside the file.