PDA

View Full Version : Broken smilie images in Last 10 Hack after 3.6 upgrade


TNI
08-18-2006, 03:38 PM
We're using the Last 10 Hack (aka Last XX Hack, Latest Posts Hack, etc) which allows you to pull the last x number of posts into any webpage in a customizable display.

After upgrading to 3.6 our smilies in the Last 10 Hack were broken images. The base URL was being generated twice in the image source.

We removed this: ".$url."/

...from this line:
$lastpostshort = str_replace($smiles[smilietext],"<img src=\"".$url."/".$smiles[smiliepath]."\" border=0>",$lastpostshort);

...and it fixed the problem!

Hope this helps if anyone is using the Last 10 Hack. It was real popular a few years ago, but I don't see it around much anymore.......