Download the PHP package madj2k/t3-core-extended without Composer
On this page you can find all versions of the php package madj2k/t3-core-extended. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download madj2k/t3-core-extended
More information about madj2k/t3-core-extended
Files in madj2k/t3-core-extended
Package t3-core-extended
Short Description Adds some basic features to your TYPO3 installation
License GPL-2.0+
Homepage https://www.steffenkroggel.de
Informations about the package t3-core-extended
core_extended
core_extended
Custom Error Message For Content Rendering
Using the following configuration you can return a custom message upon an error in the frontend.
Copyright Information for Media
Use the plugin to output the associated copyright information for all your used media. This is especially helpful for stock images. You can also use it via Typoscript e.g. to print the copyright information for media-sources on each page:
Google Sitemap
This extension includes an automatically updated Google-Sitemap which can be accessed via
Missing Asset-Files- - @deprecated!
When using rendered images, it may be the case that a clearing of all caches results in 404-errors for images that have been shared via SocialMedia - but now have a different hash-value appended. The handler tries to find the image by searching for a file that begins with the same filename and setting a symlink to it.
Implement this directive in your Apache-configuration to activate the handler:
Alternatively you can use this configuration for NGINX:
StoragePidAwareAbstractRepository
This extension comes with an abstract repository class, which fixes the troublesome behavior of repositories to use the storagePid of the calling extension.
If your repository extends this class, it will always use its own storagePid - even if called through another extension
Slug-Helper for Routing with Aspects
This slug-helper normalized the generated routes when loading table-fields into the routes. This is especially useful when working with German Umlauts.
CSV-Importer
The CSV importer uses the TCA settings and can therefore be used for all tables in the context of TYPO3. The special feature is that the CSV importer also automatically takes over the TypeCasting and also supports the import into sub-tables within an import process. This makes it possible to import relationships between data records in different tables directly. The CSV importer automatically recognises whether an update or insert must take place when a uid is passed in the data records. By specifying search fields, it is also possible to search for existing data records based on defined table columns independently of specifying a uid. This prevents duplicate entries. In addition, standard values for fields can be transferred and restrictions can be set.
Usage
First you have to initialize the CSV-Importer and also define the primary table for the import.
Then you set the file or string to be read. The data can be read in either via a file or a string:
Now you have to tell the CSV-Importer which tables it is allowed to import. This is important because it can also import related sub-tables. Make sure at least your primary table is included in the list. Otherwise nothing will be imported at all:
After that you can add some additional settings described below. Finally you do the import by calling:
Feature: Import relations
Let's assume that for a table-field that creates a relation to another table, you want to import the corresponding data of the second table directly. This can be done by providing the header of the CSV data with a prefix that corresponds to the field name in the primary table. The CSV importer then automatically resolves the relation using the TCA configuration and imports both data sets. This is possible with unlimited nesting.
Example: Insert only
Example of a CSV-File for an import to fe_users
:
It is important that the tables concerned are also permitted for the relations AND they have to be permitted for import:
The import then results in three records per row that are directly linked to each other.
1) A record in the table fe_users
will be inserted and related via the field usergroup
to
2) a record "Usergroup X" in the table fe_groups
, that will be inserted and which in turn will be related via the field subgroup
to
3) a record "Subgroup X" in the table fe_groups
, that will be inserted and which represents the subgroup.
This works because the TCA contains the relevant information about the relations of the relevant fields and it is automatically interpreted by the CSV-Importer
fe_users:
fe_groups:
Example: Insert and Update
If you include e. g. the uid for the usergroup, then the CSV-Importer will work as described above, but will check if it can find the given uids and do an update instead of an insert for the corresponding record.
Example of a CSV-File for an import to fe_users
:
Assuming that the usergroups 1,2 and 3 exist in the database, the following will happen:
The import results in two records per row that are directly linked to each other.
1) A record in the table fe_users
will be inserted and related via the field usergroup
to
2) the existing record "Usergroup X" (identified via the given uid) in the table fe_groups
, that will be updated and which in turn will be related via the field subgroup
to
3) a record "Subgroup X" in the table fe_groups
, that will be inserted and which represents the subgroup.
You can do that in every combination possible.
Feature: Avoid duplicates
By specifying search fields, it is also possible to search for existing data records based on defined table columns independently of specifying an uid. This prevents duplicate entries.
Using the setting above the CSV-importer will search the table fe_user
using the two fields address
and email
and comparing it to the values of this two columns you are about to import via CSV.
If they match, the CSV-Importer will neither insert nor update the record, but set all relevant relations (if any). Existing relations are kept.
Please note: The CSV-Importer will update a record if he finds them by using the search-fields.
Feature: Import and reference last imported row
It may be the case that you want to add two records to the same imported record. Let's take a look at the following fictive example
Obviously the first two rows refer to the same person that simply belongs to two seperate usergroups.
But if you import the above example without any changes, it will result in two records for Mrs. Mustermann, each with one related usergroup
In order to achieve what we want, we can tell the CSV-Importer to refer the second row to the first by using the keyword LAST
in an added uid-column.
The result of that import will be
1) One record in fe_users for "Sabine Mustermann" will be inserted and related via the field usergroup
to
2) two inserted records in fe_usergroup ("Usergroup 1" and "Usergroup 2")
Please note that:
LAST
only works on the first level and not on sub-tables. This is because the sub-tables can only refer to one record and thus LAST makes no sense hereLAST
can be used several times. It always refers to the uid of the last executed insert to a table
Setting: Exclude fields from import
If you want to exclude some fields from the import for some reasons, you can define for each importable table (and subtable) which fields will be ignored during an import:
Setting: Include fields in import
If you want to include some fields in the import for some reasons, that are not part of the TCA (e.g. pid
), you can define for each importable table (and subtable) which fields will be added during an import.
Please note: There is no check if the fields exist in the database!
Setting: Add data explicitly to import
If you want to make sure that some fields of your CSV-import are filled with predefined values no matter what value is set via CSV, you can use the following method. This will override the values of the CSV-data for the defined columns and also add columns that may be missing in the CSV-data. If you want to set the values for a sub-table, you can also do this by adding the column-name as prefix
Please note: The call of applyAdditionData()
is obligatory because this feature changes the raw imported data. This way you have to confirm the changes twice.
Setting: Set default values
If you want to set default values for some columns you can use the following method. It will set the defined values, but the values will be overridden by the CSV-data if it contains a non-empty value (0 is interpreted as empty). It will also add columns that may be missing in the CSV-data.
Please note: The call of applyDefaultValues()
is obligatory because this feature changes the raw imported data. This way you have to confirm the changes twice.
Feature: TypeCasting and Sanitizing
Type-Casting and Sanitizing are done automatically based on the TCA-configuration of a column. This includes:
- TypeCast for DateTime to timestamp based on eval
- TypeCast for Float based on eval/type
- TypeCast for Integer based on eval/type
- TypeCast based on RenderType Checkboxes (1/0)
- Fix for Links based on RenderType Links
- nl2br and wrapping P-Tag for columns with RTE-enabled
- trim for all values
Simulate Frontend in Backend Context
This is extremely useful when working with CLI-commands or UnitTests and you need TYPO3 to behave like in frontend-context. If using it in the context of UnitTests, be aware that you MUST define a domain AND a page-object! Example:
Rootpage.typoscript
Global.xml
config.yaml
Your setUp() in your test-file
Your tearDown() in your test-file
Meta-Tag-Generator: Robots
The extension comes with a Meta-Tag-Generator for the noindex- and nofollow-attributes of ext:seo. The main difference is, that both attributes are inherited to the corresponding subpages. This way you are able to set noindex and/or nofollow to a whole page-tree. This is useful when you are about to set up a new website and don't want it to be crawled, yet.
Meta-Tag-Generator: Meta-Tags
The extension comes with a Meta-Tag-Generator for the keywords- and description-attributes. The main difference is, that both attributes are inherited to the corresponding subpages. This way you are able to set keywords and/or description to a whole page-tree.
Meta-Tag-Generator: Canonical-Path
Use Madj2k\DrSeo\MetaTag\CanonicalGenerator->getPath()
to get the current canonical path which is generated
by ext:seo which is part of the TYPO3 Core.
This is e.g useful for generating share-links.
Example:
TypoScript Libs
This extension includes Libs for
- adding a combined page-title to your page-header
- adding openGraph-data to your page header, including a watermark and copyright information
Example for usage:
TypoScript-Conditions
The extension comes with three TypoScript-Conditions:
BackendColPos (Backend-Context)
This condition is helpful e.g. in order to allow or disallow content elements for backend editors depending on the colPos they are editing.
Usage:
BackendLayout (Backend-Context)
This condition is helpful e.g. in order to allow or disallow content elements for backend editors depending on the backend layout. It also checks for the backend_layout_subpages field.
Usage:
ExtensionLoaded (Backend- and Frontend-Context)
This condition checks if a specified extension is installed
Usage:
Standard-Partials for FlashMessages and FormErrors
This extension comes with two standard files for FlashMessages and FormErrors for usage in your own extensions.
Usage:
-
Add partials to your own extension
- Refer to partials as usual
Additional features for usage of sr_freecap
This extension fixes some bugs in sr_freecap (if the extension is installed). Beyond that it
- adds a basic partial which prevents you from copying the same properties and partials in each of your extensions and makes it possible to use sr_freecap optional in your own extenions
- adds a custom validator which makes it possible to use sr_freecap optional in your own extenions
Usage:
-
Add partials to your own extension
-
Extend the AbstractCaptcha-class in your model. This will add the necessary fields for sr_freecap to work. There is no need to extend your database tables!
-
Add the validator to the desired action of your controller to validate the captcha
- Add Captcha to your form
XClasses
- Adds additional cookie "fe_login" which is accessible via JavaScript if a user is logged in. This can be used e.g. to trigger AJAX-calls which are relevant for logged in users only.
- Extends \TYPO3\CMS\Extbase\Service\EnvironmentService::isEnvironmentInFrontendMode() and \TYPO3\CMS\Extbase\Service\EnvironmentService::isEnvironmentInBackendMode() so that these methods also check for $GLOBALS['TSFE'].
- Fixes wierd bug in \TYPO3\CMS\Extbase\Service\ExtensionService which throws an exception for no reason
Some generic methods, Validators and ViewHelpers
[to be described later]
All versions of t3-core-extended with dependencies
ext-json Version *
typo3/cms-core Version ~10.4.0
typo3/cms-filemetadata Version ~10.4.0
madj2k/t3-dr-seo Version ~10.4.0 || ~11.5.0 || ~12.4.0
league/csv Version ^9.5