miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Specific miniBB Support Forums / Specific /  
 

BB code - .JPG images in uppercase do not work

 
Author Bluesplayer
Partaker
#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
Partaker
#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 
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
Partaker
#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
 Share Topic's Link

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


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑