I would like it if images are converted to normal links when you quote a message. Quote on quote on quote looks pretty horrible, and with images, even worse.
I have the PHP part...
Just before
in /scripts/newreply.inc.php
add
$RawBody=preg_replace("#\[img\]([^?\['\"]+?)\.(gif|png|jpg|jpeg)\[/img\]#i", '\1.\2 ',$RawBody);
$RawBody=preg_replace("#\[image\]([^?\['\"]+?)\.(gif|png|jpg|jpeg)\[/image\]#i", '\1.\2 ',$RawBody);
$RawBody=preg_replace("#\[img:(left|right|center)\]([^?\['\"]+?)\.(gif|png|jpg|jpeg)\[/img\]#i", '\2.\3 ',$RawBody);
$RawBody=preg_replace("#\[image:(left|right|center)\]([^?\['\"]+?)\.(gif|png|jpg|jpeg)\[/image\]#i", '\2.\3 ',$RawBody);
But I also need to hack ubb_js/quickquote.js just before the line
But javascript and me are not best friends (in fact, we met 5 minutes ago
). Can anyone help me port above code to javascript?
Above expressions remove the [img] tags, and add a space behind. Just in case somebody put some images right next to each other.