This is the current code, that doesn't throw a parse error..
I got rid of the height part of the style, as It retains proportion this way, and increased it to 150px as you can see.
$sb_message_txt = preg_replace("/\[img\](.*?)\[\/img\]/si","<p><a href=\"$1\" rel=\"thumbnail\"><img src=\"$1\" style=\"width: 150px;\" /></a></p>",$sb_message_txt);
I also changed the img tag to use the same variable so that it loads the same image as the thumbnail. Not making it any smaller or faster to load, but I don't have a script that will automatically generate the thumbs anyway.
This is the html that it produces.
Looks correct to me, not sure why it's not firing the script.
<p><a href="http://www.dynamicdrive.com/dynamicindex4/portrait.jpg" rel="thumbnail"><img src="http://www.dynamicdrive.com/dynamicindex4/portrait.jpg" style="width: 150px;" /></a></p>
Internet explorer throws an "error: expected identifier, string, or number" between these lines in the script.
So say the line starting with targetlinks: is 10 and the beginning of that if statement is 12
targetlinks:, //Array to hold links with rel="thumbnail"
the line number it throws and error for is 11. Which would lead me to believe the erorr is actually on 10. But I see nothing wrong with that. The script is supposed to load up that array, is it not? I mean, I'm not supposed to initialize it am I?
The script it self, in our imaginary line numbering scheme I stated says on line number 8, "no need to edit beyond here".
And that's exactly how it's running in the example.
I don't get it.