A friend of mine sent me this code that invision users can use to resize images inline (images hosted elsewhere obviously).
Is there ANY way we can get this to work as a custom bb code for vbulletin?
I don't understand the code, but I'm sure someone with more coding skills can figure it out.
Here's the code:
Code:
<!--=== *** START RESIZED IMG *** ===-->
<script>
tds=document.getElementsByTagName("td");
for (p=0; p<tds.length; p++) {
if (tds[p].className.match(/post[0-4]/i)!=null) {
tds[p].innerHTML=tds[p].innerHTML.replace(/\[img=([0-9]+?(?x|%)?),([0-9]+?(?x|%)?)\](.*?)\[\/img\]/ig,"<img src='$3' width='$1' height='$2' style='display:inline'>");
}
}
</script>
<!--=== *** END RESIZED IMG *** ===-->
-snake