I am putting together a regional geocaching forum, and i would like to allow my users to show their geocaching.com stats image in their signatures. A typical image is like this (mine):
http://img.geocaching.com/stats/img...uid=8386c231-1288-4c0f-93ae-0accf136bd15The default behavior of ubbthreads is to disallow images without an image extension. In a similar request made by someone else here back in October, Rick said:
I'll have to put in an option. Right now it checks to see if the image is being generated by a script as a security precaution.
If you're comfortable with regex, it's blocked on line 639 of libs/bbcode.inc.php.
I'm not particularly comfortable with regular expressions, but that code currently reads:
function handle_img($url, $align="", $bypass_filter = false) {
if ($this->total_images >= $this->image_limit || (!$bypass_filter && !preg_match('#^[^\[\'"\]]+?\.(gif|png|jpg|jpeg)$#i', $url))) {
if ($align != "") {
return sprintf('[img:%s]%s[/img]', $align, $url);
} else {
return sprintf('[img]%s[/img]', $url);
}
}
I don't know if $bypass_filter was inserted after that October post or not, but changing it to true does allow images without extensions. I do not, however find where that option can be changed except by hacking the file, nor am I sure that it is not causing some other problem (besides the possible security issue) when I do.
What can anyone tell me about this?