[Tinhte] Image Attachment Optimization & CDN Support

[Tinhte] Image Attachment Optimization 2.3.0 20170315

No permission to download
OK.
Change your review too. :)

@Adam,
Can you view our discuss to find is there any issue in domain or MaxCDN setup?
Looks like I spoke too soon. It's not working again. I did nothing at all to change it either.

Guess it's back to Max CDN..
 
OK. Wait.
This

cloudflarecdn2-jpg.33624


Changed to this sometime after I hit the orange cloudflare button.




cloudflareagain.webp


Now attachments are broke again.
 
This

cloudflarecdn2-jpg.33624


Changed to this sometime after I hit the orange cloudflare button.




View attachment 33626


Now attachments are broke again.


Both are wrong.
In cloudflare: Add a cname: cdn -> 8thos.com
In your hosting control panel, you only need to add a pointed domain (cdn.8thos.com) to your hosting account.
Noone config DNS at 2 places.

That's all.
 
Both are wrong.
In cloudflare: Add a cname: cdn -> 8thos.com
In your hosting control panel, you only need to add a pointed domain (cdn.8thos.com) to your hosting account.
Noone config DNS at 2 places.

That's all.
In Advanced Zone Editor.

Name: I type 'cdn' only, it automatically fills out as cdn.8thos.com
TTL: 1400
Type : CNAME
CNAMe: 8thos.com




Right? That's what you said.

Well then when I click on Cloudflare and turn the cloudflare button on, it automatically changes it to this:


Name: cdn.8thos.com
TTL: 1400
Type : CNAME
CNAME: cdn.8thos.com.cdn.cloudflare.net


When that happens, the attachments don't show up.
 
ok. When I turn off the orange cloudflare button, it reverts back to CNAME: 8thos.com

So I said... screw cloudflare and tried setting up Max CDN again... and now it doesn't work at all. Neither do. o_O

I'm starting to think it's my host.
 
ok. When I turn off the orange cloudflare button, it reverts back to CNAME: 8thos.com

So I said... screw cloudflare and tried setting up Max CDN again... and now it doesn't work at all. Neither do. o_O

I'm starting to think it's my host.
i doubt it. we're having the same issues.
 
i doubt it. we're having the same issues.
Well this is what I did. I started over. Now it works (with max cdn)

What I WILL NOT DO is change who the cdn is for a subdomain.

What I WILL DO is create a separate subdomain for each different cdn.

So since cdn.8thos.com has been ruined by these experiments (as in it no longer works properly) I have moved the files to another subdomain and attached it to MAX CDN.

Everything works fine now.

So for Cloudflare itself, I will be using a different subdomain to test it out, this way I don't have to worry about any CHANGES that will screw it up.

Yeah you should try that too.
 
Okay I've confirmed that Cloudflare really does suck. Gonna roll with Max CDN with this one. You get what you pay for. :LOL:
 
Dinh, is there a way to keep the caching feature, saving queries & faster loading but stop guests seeing attachments?
I do not use a CDN, I'd like to keep the standard xenforo permissions if possible.
 
Dinh, is there a way to keep the caching feature, saving queries & faster loading but stop guests seeing attachments?
I do not use a CDN, I'd like to keep the standard xenforo permissions if possible.



No, this is the most important factor to save queries.
 
Please using parent::actionIndex() in
Tinhte_AttachImageOptimization_ControllerPublic_Attachment::actionIndex(),
because some addons extends XenForo_ControllerPublic_Attachment::actionIndex() doesn't work :(
 
Please using parent::actionIndex() in
Tinhte_AttachImageOptimization_ControllerPublic_Attachment::actionIndex(),
because some addons extends XenForo_ControllerPublic_Attachment::actionIndex() doesn't work :(

As you know that XF does not allow to attach changes during executing its action, so the only way to changes it is override it.
By adding that line, we would waste several queries for its default stuffs so to avoid this issue, we did not add it.
If you are developing your own addons or using addons that require to extend this file, please consider to add it by your own.
 
As you know that XF does not allow to attach changes during executing its action, so the only way to changes it is override it.
By adding that line, we would waste several queries for its default stuffs so to avoid this issue, we did not add it.
If you are developing your own addons or using addons that require to extend this file, please consider to add it by your own.

Of courses, i can extend your file but If users doesn't use your addons. What's happend :D.
 
Of courses, i can extend your file but If users doesn't use your addons. What's happend :D.
IMO, how do you thing if you waste some extra queries and you do not have any addon extends this file? Users who want to use another addons that extends XF Attach_Index should consider to add 1 line to it rather than waste several queries event do not use any of them.
 
Top Bottom