How to create a new extension in typo3 6? - typo3

How to create a new extension in typo3 6?
Is the kickstarter extension compatible with typo3 6?

You can use the extension "extension_builder". It generates (skeletons for) extbase/fluid based extensions and is compatible with TYPO3 6.0 (Makes even use of namespaces in generated extensions, which were only introduced in 6.0).
If you want to build fluid/exbase extensions, you should read this book to get familiar with these extensions. In german it is also available as paperback.
I'm not sure the "kickstarter" extension still works, but its last update is a maintainance release to make it work in TYPO3 v4.6, so there is a good chance it does.

Q: How to create a new extension in typo3 6?
A: There are two ways to create a new extension in typo3 6.
The first way is described in this post: See accepted answer on this
page. It is a point and click user interface. You have to install the extension "extension_builder"
The second way is via command line. It is described here: "Generating a Provider extension".
Simple example for the second way of creating an extension:
Log into your typo3 v6.2 project
Install extension "builder"
Open a shell
cd to document root of your typo3 project
type in this command to create an extension with the extension key "test":
./typo3/cli_dispatch.phpsh extbase builder:providerextension \
--extension-key test --author "Your name your#email.tld" \
--pages 1 --content 1 --controllers 1 --git 1 --travis 1 --use-vhs 1
Fire up your php editor and go to path_to_your_typo3_project/typo3conf/ext/test and edit your brand new extension.
For more information visit https://fluidtypo3.org/documentation/templating-manual/templating/provider-extension/generating-extensions.html
Q: Is the kickstarter extension compatible with typo3 6?
A: No. But the "old" pi-based extensions, you create with the kickstarter will still run on typo3 6.

Related

Where to find a TYPO3 extension?

What's the best practice to find a TYPO3 extension for my website? Where to look and how to find the best extension for my use case?
The main source for finding a TYPO3 extension is the TYPO3 Extension Repository (TER): https://extensions.typo3.org.
There you can search and filter extensions and see if they support your TYPO3 version.
If you are using TYPO3 in Composer Mode, another source is https://packagist.org/.
There you can search for TYPO3 extensions using https://packagist.org/?type=typo3-cms-extension.
Notice that the TER also displays how to install an extension package with Composer if an installation is supported this way:

typo3 crashed page after installed extension

After I instaled extension in typo 3 version 4.5 I can't log in to backend, my page is blank and after I try to go on http://mydomain/typo3/install/index.php I get this message :
The Install Tool is locked.
Fix: Create a file typo3conf/ENABLE_INSTALL_TOOL
This file may simply be empty.
For security reasons, it is highly recommended to rename
or delete the file after the operation is finished.
If the file is older than 1 hour TYPO3 has automatically
deleted it, so it needs to be created again.
Installing any extensions in such an old TYPO3 probably will kill your installation, as any modern extension is incompatible to the old sources.
Modern extensions have namespaces, autoloader, use API classes and functions unknown to the old installation, maybe even use PHP7 features unknown to the old PHP which is needed to run those old TYPO3.
now for your cleanup:
For entering the instal-tool do as the message indicates:
create/update that file and then you can enter the install tool.
but in 4.5 you will not get much help to get the system running again.
you must disable the malicious extension:
in the file typo3conf/localconf.php you need to delete the extension key from the list of installed (active) extension. For this you can use any editor. One is build in the InstallTool.
After that you need to remove the cached version of the localconf.php: remove the temp* files in the folder typo3conf/.
Now your system should work again (but still might be unclean).
you should remove the extension (typo3conf/ext/extensionkey).
Maybe there are new tables and fields in the database. Therefore do a database compare in the InstallTool.

How can I remove merged-xyz.js from Typo3 8.7 Backend?

I have a problem with the extension alm_iconpicker. This creates a new content element with a popup window and some Javascript. I deleted the typo3temp folder, and now I get a 404 of a merged js-file:
/typo3/typo3temp/assets/compressed/merged-adc822bc42f4d0d49c1bddf919a03b2a.js
I uninstall the extension and install it again, I clear all caches from TYPO3 but this file doesn't be created new. In earlier versions of TYPO3 I could say, no concatenates in the backend. But in 8.7 I don't find this option. Also I change the Mode to develope but still the same error. I search in the Database for the file, but I don't find it.
What can I do?

How to install extensions in contao 4.4

I installed contao 4.4 in my localhost successfully.After successful installation I tried to install an extension via contao manager.Unfortunately it fails with console error.So I download zip file of extenson from codefog
and put it in the folder root/system/modules .But the extension is not found in backend.I think the extension is not installed successfully. How to make it works? Please help me.
This is how i install extensions in my contao 4 standard-edition. As commented, this only applies to the standard-edition, not the managed-edition. If you don't want to change to the standard-edition, you may better wait, until they fix the problem in the contao manager... Otherwise this is how it works:
Installing a Contao 4 bundle
Info: A bundle is the best thing you can find for extending contao.
It is the cleanest way of adding functionality to the contao cms.
Find the module on https://packagist.org/
Get the "require ..." command from under the title
Connect to your hosting (or if local, open cmd or terminal)
Change to the root of your hosting
Execute the require ... command for this extension
composer require madeyourday/contao-rocksolid-columns
Add the module to AppKernel (File: app/AppKernel.php)
In the "$bundles" array we can now add our bundle to the list of bundles, that contao should load: (the bundle name used in this line can be found in vendor/%developer%/%extension%/src/ and then there is a ...Bundle... php File there, that tells you the name of the bundle)
new MadeYourDay\RockSolidColumns\RockSolidColumnsBundle(),
Open the installtool of contao (contao/install) and update the database
Installing a Contao 4 extension
Info: A contao 4 extension is defined by it's developer, it is actually still the same method of programming like in 3.5 but someone has tested it in contao 4 and approved of its functionality. This is the second best thing you can find for extending contao.
Find the module on https://packagist.org/
Get the "require ..." command from under the title
Connect to your hosting (or if local, open cmd or terminal)
Change to the root of your hosting
Execute the require command for this extension
composer require heimrichhannot/dlh_googlemaps
Add the module to AppKernel (File: app/AppKernel.php)
In the "$bundles" array we can now add our extension to the list of extensions, that contao should load:
new ContaoModuleBundle('dlh_googlemaps', $this->getRootDir()),
Open the installtool of contao (contao/install) and update the database
Installing a Contao 3.5 extension
Info: A contao 3.5 extension is your last hope, it is the same code as in contao 3.5 may or may not work - you have to test it yourself.
Find the module on github (or some other repo)
Conntect to your hosting with ssh (or if local, just open cmd or terminal)
Change into "system/modules"
Download the repo (e.g. git clone https://github.com/ContaoBlackForest/contao-system-notification system-notification) - notice the added "system-notification" at the end, that should be the foldername, in which the extions has to be (you can find the folder in the composer.json file inside the extension under "Resources/contao")
Create syslinks (bin/console contao:symlinks)
Add the module to AppKernel (File: app/AppKernel.php)
This line should be added once, just after "use Symfony\Component\HttpKernel\Kernel;" (this only has to be added once and only if you are using contao 3.5 extensions)
use Contao\CoreBundle\HttpKernel\Bundle\ContaoModuleBundle;
In the "$bundles" array we can now add our extension to the list of extensions, that contao should load:
new ContaoModuleBundle('system-notification', $this->getRootDir()),
Open the installtool of contao (contao/install) and update the database
Your Question
To awnser your question, as the module you want to install, is a contao 4 extension, you could use the according instructions from above.
contao 4 extension - https://packagist.org/packages/codefog/contao-news_categories
You do not need to install this extension manually. Simply run
composer require codefog/contao-news_categories
in the root folder of your Contao installation. Depending on how you installed composer the command might be different.

How can I add a composer.json to a static TYPO3 project?

I am using a working TYPO3 7.6.14 environment with many extensions. Now I want to add a composer.json file manually. I do not want to create a new project which will download the latest TYPO3 core and TYPO3 extensions. I am afraid that this could accidently overwrite some extension's PHP files.
I need a safe way to add a composer.json file which will not change the present TYPO3 PHP files automatically. I prefer to download TYPO3 and the extensions manually. Therefore I do not want to use the composer mode. I must find a way to prevent composer from overwriting my self written PHP files.
I need a composer.json file because I want to add the external TCPDF library which is on its own place on the file system and not inside of a vendor folder inside of TYPO3. And the file ext_autoload.php is not supported any more by TYPO3 7.6.
I have read the https://usetypo3.com/typo3-and-composer.html#c51 recommendations. But it only shows the way how to create a new TYPO3 project using the command line and the composer command. Is it also possible to download a composer.json file into a TYPO3 folder (which?) in order to tell the autoloader where it will find the external TCPDF library?
I have unzipped the TCPDF file under /var/www/html/TCPDF-master/tcpdf.php . I want to use TCPDF, TYPO3 and its extensions unchanged and never updated by any composer command.
Introducing Composer for not using it's features seems a bit strange to me, but yes, it's possible to define a dedicated version or commit-hash in a repository to disable updates.
However, I would recommend to make use of the tilde ~ operator to enable updates on the accordant branch, to e.g. include security updates automatically. For TYPO3 CMS this dependency would look like the following, to stay on the 7.6 branch:
"require": {
"typo3/cms": "~7.6.14"
}
Find further details on how to declare versions in the Composer documentation.
Besides that, it seems, that you're not using Composer at all for the root project. You could then create a wrapper extension for TCPDF with one of these options:
use Composer for that extension to require TCPDF and load the generated autoload file (e.g. in typo3conf/ext/tcpdf/vendor/autoload.php) in your wrapper extension
directly copy & paste TCPDF's source (which seems to be the scenario you're up to) and add the autoloading information to ext_emconf.php, which is similar to previous ext_autoload.php - find details about that in a blog post about class loading