One of the things I did to help a bit of debugging was to query the database directly to see if things were happening as they should.
Here's a few pointers that might help. Tweak them as you see fit like is the iei_parsed set or not. Based on the queries in the actual code.
Code:
select * from iei_img;
Code:
SELECT t.threadid, postid, p.dateline FROM post p INNER JOIN thread t ON p.threadid = t.threadid WHERE iei_parsed=1 and pagetext LIKE '%[/IMG]%' order by postid limit 0,100;