[Tinhte] Image Attachment Optimization & CDN Support

[Tinhte] Image Attachment Optimization 2.3.0 20170315

No permission to download
hi dinh, are those codes memcached? if so, can i use this addon with these settings? i dont know much about cache, hopefully you can help me.

Code:
$config['cache']['enabled'] = true;
$config['cache']['backend'] = 'File';
$config['cache']['backendOptions'] = array('cache_dir'  => '/home/xxx/public_html/internal_data/cache');
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] = array('caching'  =>  true,
                                            'automatic_serialization' => true,
                                            'lifetime'    => 1800
);
 
hi dinh, are those codes memcached? if so, can i use this addon with these settings? i dont know much about cache, hopefully you can help me.

Code:
$config['cache']['enabled'] = true;
$config['cache']['backend'] = 'File';
$config['cache']['backendOptions'] = array('cache_dir'  => '/home/xxx/public_html/internal_data/cache');
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] = array('caching'  =>  true,
                                            'automatic_serialization' => true,
                                            'lifetime'    => 1800
);



This is file cache, not memcached. Memcached is a software service which you need to install to your server. You can learn here: http://xenforo.com/help/cache/
 
Question:

Why would I add /forums/ when that is NOT where the CDN data is?
I'm sorry, I thought that both are same address but just change the domain name. I found that you said that your CDN is .com domain. But when I tried viewing an attachment from your CDN address, I cannot access the attachment.

Your original attachment I tried: http://www.sociallyuncensored.eu/forums/attachments/472px-mitt_romney-jpg.100/
Your attachment from your CDN must be: http://www.sociallyuncensored.com/attachments/472px-mitt_romney-jpg.100/

But I get the "Can I help you find something?" I think you should check your CDN setting.
 
I'm sorry, I thought that both are same address but just change the domain name. I found that you said that your CDN is .com domain. But when I tried viewing an attachment from your CDN address, I cannot access the attachment.

Your original attachment I tried: http://www.sociallyuncensored.eu/forums/attachments/472px-mitt_romney-jpg.100/
Your attachment from your CDN must be: http://www.sociallyuncensored.com/attachments/472px-mitt_romney-jpg.100/

But I get the "Can I help you find something?" I think you should check your CDN setting.
That's because I don't use those paths.

I use the default path that XenForo uses ;)
 
The default data in the CDN is demo data.... delivering some images via a different domain is not a CDN, and in fact, would slow your load down as it would be perceived as an external source the software has to load from. A CDN is a distribution of servers around the globe in which allows you to put specific files upon so that your users grab certain data locally, which thus speeds up their browsing experience of your site by reducing the ping and load upon a single or multiple server setup.

You don't need a CDN unless you're delivering extreme levels of images / files, ie. a photo site or download site, would benefit from using a CDN service, as users are grabbing large data locally from a server in their region versus one across the globe.
 
  • Like
Reactions: DRE
Is this compatible with xF 1.1.1? I get the following error when I attempt to view an attachment in my forum:

Code:
Fatal error: Call to undefined method XenForo_Application::getCache() in /home/XXXX/public_html/library/Tinhte/AttachImageOptimization/ControllerPublic/Attachment.php on line 9

When I disable the add-on, everything is working fine again.

Example Thread: http://civilwartalk.com/threads/middle-bridge-over-the-antietam.72851/
Example Attachment URL: http://civilwartalk.com/attachments/bb-jpg.5012/
 
Is this compatible with xF 1.1.1? I get the following error when I attempt to view an attachment in my forum:

Code:
Fatal error: Call to undefined method XenForo_Application::getCache() in /home/XXXX/public_html/library/Tinhte/AttachImageOptimization/ControllerPublic/Attachment.php on line 9

When I disable the add-on, everything is working fine again.

Example Thread: http://civilwartalk.com/threads/middle-bridge-over-the-antietam.72851/
Example Attachment URL: http://civilwartalk.com/attachments/bb-jpg.5012/

Not tested on 1.1.1 yet, but It's seem getCache was not supported there.
 
I get the common "Please enter a valid callback method." error upon trying to install the latest version (fresh install).

I tried the following to fix the issue before posting this, and of course didn't have any luck:
  • Re-uploaded files via FTP multiple times
  • Re-uploaded files via FTP changing between Binary and ASCII
  • Ensured every addon file was on the server and no bytes were missing.
  • SSH'd into /www/library/ and wget'd the addon.zip and extracted it instead of going through FTP
  • Opened the XML file and tried 3 different encodings - ANSI, UTF8, UTF8 without BOM (the last one is what it originally was).
After trying the above I still cannot get past "Please enter a valid callback method."

Anyone have any ideas? Thanks in advance.
 
I get the common "Please enter a valid callback method." error upon trying to install the latest version (fresh install).

I tried the following to fix the issue before posting this, and of course didn't have any luck:
  • Re-uploaded files via FTP multiple times
  • Re-uploaded files via FTP changing between Binary and ASCII
  • Ensured every addon file was on the server and no bytes were missing.
  • SSH'd into /www/library/ and wget'd the addon.zip and extracted it instead of going through FTP
  • Opened the XML file and tried 3 different encodings - ANSI, UTF8, UTF8 without BOM (the last one is what it originally was).
After trying the above I still cannot get past "Please enter a valid callback method."


Anyone have any ideas? Thanks in advance.

This issue happen when you upload to wrong place. Unzip, go to upload foder, you see library, upload this library folder to your forum root.
 
This issue happen when you upload to wrong place. Unzip, go to upload foder, you see library, upload this folder to your forum root.
I made sure it was uploaded to the proper place during my initial troubleshooting.

The path is as follows:
-site root-/library/Tinhte/AttachImageOptimization
 
I've just Download zip file then upload, import XML. Installed successfully on a new Xenforo.
No issue. Check your files properly (upload to right folder, right server) and don't choose wrong xml file to import. I think that's the reason.
 
I've just Download zip file then upload, import XML. Installed successfully on a new Xenforo.
No issue. Check your files properly (upload to right folder, right server) and don't choose wrong xml file to import. I think that's the reason.
Unfortunately I've checked these variables over and over and still no dice. Everything is correct from what I can see. Really not sure why this one isn't working, I installed your first release fine, then when this update didn't work, I uninstalled to try it fresh and still no avail. I'll look into it some more, really not sure what the issue could be at this point.

Thanks for taking the time to verify and test it yourself, really appreciate it! Hopefully I can figure the issue out, if I do I'll post what it was in case anyone else experiences the unique issue I'm having.
 
Heh, snagged your latest update, uploaded the files and overwrote whatever was already on the server, went to install the addon (since I wasn't able to previously), and it installed fine. No callback error. :)

No idea what the issue was but ah well, works now.
 
Top Bottom