Comments (5)
Hi,
full support for legacy installations has been dropped a couple of versions ago.
You need to take care of loading the Tinify library yourself. Download the source, add it to your site package or any local extension and load the classes.
Best,
Alex
from tinyimg.
Closed due missing response.
from tinyimg.
Hi Alex
I wanted to implement the Tinify-Class with their functions without a composer with no success.
I placed the files in "Resources/Private/Libraries/tinify" and tried it with the Services.yaml and ext_emconf.php (autoload + classmap):
'autoload' => [ 'psr-4' => [ 'Vendor\\Namespace\\'=> 'Classes', ], 'classmap' => ['Resources/Private/Libraries/tinify/lib/Tinify.php'] ],
Could you provide a solution or give me a hint for loading the Tinify-Lib in a seperate extension?
I would appreciate it.
Thank you in advance
Robert
from tinyimg.
Hi Robert,
it's difficult to provide any help with so little information.
Which TYPO3 version are you running?
I'm not sure how TYPO3 handles class mapping if those have namespaces.
I think the easiest way would be to add a new extension under the tinify namespace to you system.
But after all, why don't you switch to a composer based setup? Makes life so much easier 😄
Aside from that, I think help requests like yours should be in the slack channel, as it's not an issue with the code:
https://typo3.slack.com/archives/C56P6PZ2S
Best
Alex
from tinyimg.
Hi Alex
Thank you for your answer.
I resolved the issue for me like this in the ext_localconf.php:
`<?php
defined('TYPO3_MODE') or die();
$boot = function () {
if (TYPO3_MODE == 'BE') {
$composerAutoloadFiles[] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('ext_key') . 'Resources/Private/PHP/tinify/lib/Tinify/Client.php';
$composerAutoloadFiles[] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('ext_key') . 'Resources/Private/PHP/tinify/lib/Tinify/Exception.php';
$composerAutoloadFiles[] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('ext_key') . 'Resources/Private/PHP/tinify/lib/Tinify/ResultMeta.php';
$composerAutoloadFiles[] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('ext_key') . 'Resources/Private/PHP/tinify/lib/Tinify/Result.php';
$composerAutoloadFiles[] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('ext_key') . 'Resources/Private/PHP/tinify/lib/Tinify/Source.php';
$composerAutoloadFiles[] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('ext_key') . 'Resources/Private/PHP/tinify/lib/Tinify.php';
foreach($composerAutoloadFiles as $file) {
require_once($file);
}
}
};
$boot();
unset($boot);`
Like you've said. The main thing was the namespace handle. TYPO3 created extra namespaces, while a function is executed in Tinify.php.
I hope this helps those, who have the same case.
Thank you again.
Kind regards
Robert
from tinyimg.
Related Issues (20)
- Working with ext image_autoresize HOT 2
- Cronjob PHP Warning HOT 12
- Add price calculation before compression HOT 1
- Internal Server Error when uploading file HOT 9
- (Internal Server Error) Upload of file image.png HOT 5
- TYPO3 10 compatibility HOT 2
- Manual installation of tinify PHP lib HOT 2
- Tinyimg not displaying correct file size in Version 1.5.1 HOT 3
- TypeError on execute() function in CommandController
- Extend README.md: Compare database after installation HOT 1
- Extend composer information
- CompressImagesCommand TYPO3 compatibility HOT 1
- Change signal calls to event calls
- Invalid Command::SUCCESS in CompressImagesCommand HOT 4
- Command::SUCCESS throws exception for symfony/command before 5.1 HOT 1
- Improve FileList template additions
- The 'sys_file' TCA configuration 'showRecordFieldList' inside the section 'interface' is not evaluated anymore and should therefore be removed. HOT 1
- TYPO3 12 compatibility HOT 5
- TYPO3 13 compatibility HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tinyimg.