• Welcome to League Of Reason Forums! Please read the rules before posting.
    If you are willing and able please consider making a donation to help with site overheads.
    Donations can be made via here

Broken Stuff

arg-fallbackName="CosmicSpork"/>
Uh, you can disable the image size check if that's the issue here?

I would have thought all of this could be fixed without having edit much of anything. It'll be environmental most likely, so configuration changes should be all that's required.

For instance, the reason the images can't embed is because "allow_url_fopen" isn't enabled in the PHP configuration on the hosting.
 
arg-fallbackName="Prolescum"/>
Master_Ghost_Knight said:
My name is Sir Fixallot, don't be afraid to ask for help, we got your back bro...

I appreciate that. Do expect me to pester you regularly :)
And the broken posts with strange symbols can be fixed by a snooping program, just snoop the broken characters and replace with the appropriate ones.

Unnecessary, I just replaced all instances of the symbol combinations in wp_posts and phpbb_posts yesterday with the correct punctuation using:
Code:
UPDATE phpbb_posts SET post_text = replace(post_text, 'dodgy text', 'proper punctuation mark');

Which I suppose is practically the same thing, but with less swish.
CosmicSpork said:
Uh, you can disable the image size check if that's the issue here?

Tried that. No joy.
I would have thought all of this could be fixed without having edit much of anything.

Me too...
It'll be environmental most likely, so configuration changes should be all that's required.

For instance, the reason the images can't embed is because "allow_url_fopen" isn't enabled in the PHP configuration on the hosting.

I love when practical experience slaps gibberish in the face. However, assuming that's the problem, I'm not certain which directory I apply it to (we can apply bespoke local php settings and versions on my host, no worries).

Any more advice would be greatly appreciated. I'd rather fix what we have (mainly because it's brilliant).




My temp replacement is shockingly simple, although not nearly so pretty.
Code:
<img src="{URL}" alt="" style="max-width: 700px; height: auto;"/>

Add an href and some borders, it's all sweet...


Serious question: Is it entirely necessary to download the image, check its dimensions, and then resize it?
 
arg-fallbackName="CosmicSpork"/>
light-my-fire-titanium-spork-247-p.jpg


You missed a setting :) It will no longer download the image to check the image size.

General -> Board Configuration -> Post Settings -> Maximum image width per post
General -> Board Configuration -> Post Settings -> Maximum image height per post

Both now set to zero.

For some reason these don't show on the "Posting" tab
Serious question: Is it entirely necessary to download the image, check its dimensions, and then resize it?

It is if the board wants to determine if the image is larger than the maximum image dimensions. You can't just ask another webserver what size the image is.
 
arg-fallbackName="Prolescum"/>
CosmicSpork said:
light-my-fire-titanium-spork-247-p.jpg


You missed a setting :) It will no longer download the image to check the image size.

General -> Board Configuration -> Post Settings -> Maximum image width per post
General -> Board Configuration -> Post Settings -> Maximum image height per post

Both now set to zero.

For some reason these don't show on the "Posting" tab

Doh!
It is if the board wants to determine if the image is larger than the maximum image dimensions. You can't just ask another webserver what size the image is.

Of course, I don't think I worded that very well. I meant is it better that the webserver does that job than simply shunting the grunting to the browser using CSS/JS to make the calculation or resize to a set px, and why?

I'm probably being a berk (as usual).
 
arg-fallbackName="CosmicSpork"/>
Prolescum said:
Of course, I don't think I worded that very well. I meant is it better that the webserver does that job than simply shunting the grunting to the browser using CSS/JS to make the calculation or resize to a set px, and why?

I'm probably being a berk (as usual).
I don't think it matters really, I think it's just there to help keep site loading quicker in case people try to embed massive pictures. With decent internet nowadays it doesn't really effect most people as long as someone isn't stupid enough to embed a 500mb image.
 
arg-fallbackName="Master_Ghost_Knight"/>
Prolescum said:
Of course, I don't think I worded that very well. I meant is it better that the webserver does that job than simply shunting the grunting to the browser using CSS/JS to make the calculation or resize to a set px, and why?
I suppose you can devise a little script that checks the size of the image without the website having to download it, then on post just stop it from doing that. However JavaScript is client side, so technically there is nothing that stops me from posting an image bigger than it should.
However CSS can re-size the big pictures into small picture, keeping them looking nice in the board, however CSS is also client side, so in practice you are still downloading the big ass picture thus making it very slow to open even tough the picture appears small.
PHP is the surest way to be sure.
 
arg-fallbackName="he_who_is_nobody"/>
australopithecus said:
In some, yes. However now that restriction is limited to him account, not the threads.

If dotoree ever returns, I hope you will do the same to him.
 
arg-fallbackName="Prolescum"/>
CosmicSpork said:
I don't think it matters really, I think it's just there to help keep site loading quicker in case people try to embed massive pictures. With decent internet nowadays it doesn't really effect most people as long as someone isn't stupid enough to embed a 500mb image.

Fair enough. I thought there might be something I hadn't considered.
Master_Ghost_Knight said:
Prolescum said:
Of course, I don't think I worded that very well. I meant is it better that the webserver does that job than simply shunting the grunting to the browser using CSS/JS to make the calculation or resize to a set px, and why?

I suppose you can devise a little script that checks the size of the image without the website having to download it, then on post just stop it from doing that. However JavaScript is client side, so technically there is nothing that stops me from posting an image bigger than it should.
However CSS can re-size the big pictures into small picture, keeping them looking nice in the board, however CSS is also client side, so in practice you are still downloading the big ass picture thus making it very slow to open even tough the picture appears small.
PHP is the surest way to be sure.

I was talking about downloading in reference to the server, not the client. My fault. :)
 
arg-fallbackName="Master_Ghost_Knight"/>
Prolescum said:
I was talking about downloading in reference to the server, not the client. My fault. :)
Me to.
Not downloading server side->Solution:
1. JavaScript, checks image size, prevents from posting, but all handled exclusive client side. Not a sure way to prevent over-sized imaged from being uploaded, but does the trick assuming that user doesn't try to hack the system. i.e. modify the result of the java script on its end and post the image anyway.
2. Re-size with CSS thus preventing the image from destroying the website layout, client still needs to download the full picture, even tough it appears small.

Given how often people post big pictures and how often people actually try to hack the website, and in this case, hack the website with the purpose of posting big pictures, it is safe to say that they are still mostly safe.
 
arg-fallbackName="Prolescum"/>
Master_Ghost_Knight said:
Prolescum said:
I was talking about downloading in reference to the server, not the client. My fault. :)
Me to.
Not downloading server side->Solution:
1. JavaScript, checks image size, prevents from posting, but all handled exclusive client side. Not a sure way to prevent over-sized imaged from being uploaded, but does the trick assuming that user doesn't try to hack the system. i.e. modify the result of the java script on its end and post the image anyway.
2. Re-size with CSS thus preventing the image from destroying the website layout, client still needs to download the full picture, even tough it appears small.

Yes, but my question concerned the load on the server, not the client's bandwidth.

I'm pretty au fait with CSS, JavaScript and a couple of markup languages (you've seen my lubberly LoR gnome-shell theme...), not so much with php (though I do have a bit of experience), hence the question.
Given how often people post big pictures and how often people actually try to hack the website, and in this case, hack the website with the purpose of posting big pictures, it is safe to say that they are still mostly safe.

:lol:
 
Back
Top