Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

cstromme

macrumors regular
Original poster
So I'm making an app to read a specific webforum, and I thought it would probably be a good idea to bundle the emoticons used on this forum in the app itself, and just parse the html and replace the <img src="http://boardurl/1.gif"> with a <img src="1.gif"> and thereby not having to use bandwidth for each one. But this doesn't seem to work.

I've checked my compiled bundles, and the images are there (in the root), and as far as I can see this is supposed to work, yet it isn't. I have checked my code afterwards and the replacing of the string seems to work, so what else might be wrong here?

This is one of the strings that have been replaced:
HTML:
<img class="BoardFace" src="4.gif" border="0" alt="grin" hspace="0" vspace="0">

The pictures load fine if I don't replace that part before 4.gif
 
Think about what you are asking it to load and where the gif will come from - will it try and get it from the the remote server or will it try and load it from your app bundle?

Here's a clue...url's are relative unless otherwise specified.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.