miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Specific miniBB Support Forums / Specific /   

BB code - .JPG images in uppercase do not work

Author Bluesplayer
Registered
#1 | Posted: 10 Jan 2014 20:28 
When I add an image with a jpg extension everything is fine - using the above BB Code for the Picture button - but if I attempt to add an image with an extension JPG in capitals it fails. How can I fix this?

Author kuopassa
Registered
#2 | Posted: 11 Jan 2014 03:18 
Something to do with bb_codes.php. I don't have a clever answer, but a hack that might work. Inside bb_codes.php find all lines of code that have this:

(gif|jpg|jpeg|png)

Modify that stuff to:

(gif|jpg|jpeg|png|GIF|JPG|JPEG|PNG)

Author Paul
Lead Developer
#3 | Posted: 11 Jan 2014 10:30 | Edited by: Paul 
I am mostly sure the reason of why it fails is not the extension. All codes are programmed to support case-sensitive file names by default (you may note #i fragment after each expression - it means that, "insensitive"). You may try it out even here on our forums and you'll see it works.

Obviously you are trying to put an image which has too long URL or some specific characters in its name.

Author Bluesplayer
Registered
#4 | Posted: 11 Jan 2014 10:52 
Paul:
Obviously you are trying to put an image which has too long URL or some specific characters in its name.

Yes. After running a few more tests by uploading my own images with a JPG extension - short urls - the images are displaying, but as you mentioned the location of the image I wanted to display has a very long URL with lots of odd characters in it. Still I expect there is a work around for it. Will have to delve into the BB Codes file by the looks of it.

Author Paul
Lead Developer
#5 | Posted: 11 Jan 2014 12:58 
Bluesplayer:
Still I expect there is a work around for it.

There could be workaround for almost anything, but what we have for default codes, is coming not just randomly.

Mostly all image-based URLs should be "human", if some specific chars are appearing inside, it's a question of security - you could enable such URLs for your certain case, but who knows if someone will not use the same trick to exploit your board afterall.

Specific miniBB Support Forums / Specific / BB code - .JPG images in uppercase do not work Top

Your Reply Click this icon to move up to the quoted message

 Short link for this topic:

 ?
You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Proceed with the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB