How to increase the size of filelinks content element in Typo3? - typo3

The content element file-links now accepts 10 files max. How to increase them ?
Typo3 Version: 4.4.8

There is an extension that solves your problem here:
http://typo3.org/extensions/repository/view/icti_ext_filelinks/current/

TYPO3 Backend Modul "Admin Tools" select "configuration".
Select "TCA" in the select box at the top. Then you can see the Typo Configuration Array.
Select (click on the small arrow) "tt_content", then "columns", then "media" then "config".
Now you can see the "maxitems". If you now click on the entry "maxitems" you will get an php code ($TCA['tt_content']['columns']['media']['config']['maxitems'] = 10;)
TYPO3 4.5 or newer: change the value and save, before 4.5 you need to do the next two steps:
Copy this code, change the value and insert into typo3conf/extTables.php
check if $typo_db_extTableDef_script = 'extTables.php'; is set in your localconf.php
Now you should be able to just change any TCA entry.
Have fun:)

Related

TYPO3 Remove "Select & Upload Files" button

Removing the "Select & Upload Files" button from Page properties works with the following line in PageTSConfig:
TCEFORM.pages.media.config.appearance.fileUploadAllowed = 0
Now I want to remove the "Select & Upload Files" button within content elements (for example with CType "textmedia"), too.
I tried out several things, but with no success. I found no working PageTSConfig "rule" for this case. Does somebody know how the "Select & Upload Files" button can be removed for content elements like textmedia elements?
Using TYPO3 8.7.1
The code you use is always the same.
In PageTsConfig you have to use:
TCEFORM.[TABLE].[COLUMN].config.appearance.fileUploadAllowed = 0
In TCA you have to use:
$GLOBALS['TCA']['TABLE']['columns']['COLUMN']['config']['appearance']['fileUploadAllowed'] = 0;
You have to replace TABLE with the table you want to modify and COLUMN with the column you want to modify.
In page properties you have pages as TABLE and media as COLUMN.
In textmedia you have tt_content as TABLE and assets (i think) as COLUMN.
You can set for each field separately, see post from Kevin Appelt. In this case you need to remember for any further field in future to add this setting too.
To adapt file upload for all fields globaly, you can use UserTSConfig edit_docModuleUpload. See https://docs.typo3.org/typo3cms/TSconfigReference/singlehtml/Index.html#document-UserTsconfig/Setup/Index
To avoid file upload for all fields simple add to ext_localconf.php of your customer extension (sitepackage):
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig('setup.override.edit_docModuleUpload = 0');
If you want use a separate configuration file for UserTSConfig, which I recommend add to ext_localconf.php
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:sitepackage/Configuration/TypoScript/User/Default.ts">');
and in your extension /Configuration/TypoScript/User/Default.ts
setup.override.edit_docModuleUpload = 0
If you also want exclude file upload and folder creation in file element browser (popup window) add following code to your extension /Configuration/TypoScript/User/Default.ts
# Hide 'file upload' and 'create folder' in link- and element browser
options.folderTree.uploadFieldsInLinkBrowser = 0
options.folderTree.hideCreateFolder = 1
options.createFoldersInEB = 1
This is a very simple way to remove "Select & Upload Files" button
User settings -> Edit and Advanced functions -> File upload directly
in Doc-module(uncheck this checkbox)

How to customize field size in TYPO3 BE

I'm using TYPO3 since version 3 but I have never tried to customize the TYPO3 BE.
Now, what annoys me more in the BE is that in 'Special Menus' the 'Selected Pages' field displays 3 lines by default. I wish to expand it to at least 10 lines.
Inspecting the BE page with FF Developer Tools shows:
<select id="tceforms-multiselect-57f39f13067b0673730065" size="3" class="formField.
Editing the size value to 10 in the Inspector is exactly what I need.
How could I change that size value in TYPO3?
#Markusson and #Vimal Usadadiya
As suggested deactivating and activating the extension did the trick. BTW no need to use Global. The code I put in ext_tables.php is:
$TCA['tt_content']['columns']['pages']['config']['size'] = 10;
You can override the default value by using below lines. You can put that lines into ext_tables.php file in your custom extension.
unset($GLOBALS['TCA']['table_name']['columns']['field_name']['config']['size']);
$GLOBALS['TCA']['table_name']['columns']['field_name']['config']['size'] = 10;
You can override this in your own extension via
$GLOBALS['TCA']['tt_content']['columns']['pages']['config']['size'] = 10;
Put it in ext:your_ext/Configuration/TCA/Overrides/tt_content.php
alternative in ext:your_ext/ext_localconf.php
TYPO3 Reference to override TCA

TYPO3: Duplicate content elements and fields after Flux 6.0.x update

Since updating from Flux 6.0.2 to the newest Flux TER-Release (7.0.0) I have the problem that all my defined flux:field.select items are switched. I have them defined as an array like this items="{0: {0: 'value shown as a CSS class in the frontend',1: 'value shown in BE'},}". But now I get the BE value in the frontend template.
Also all my content elements from my provider extension are shown twice (without a title) in the backend and the fields defined in the 'Configuration' section of my content element are shown twice.
There's also a RTE field shown at the bottom of my content element that has not been there before.
BE Output: view
Code on Pastebin: http://pastebin.com/CNcphn2k
Any help deeply appreciated.
EDIT:
I just set up a fresh instance of TYPO3 6.1.9 (blank package) and installed my extension with the above mentioned content elements. Dependencies were resolved automatically as it should (newest versions). Via the content wizard I tried to create a new element and I get the same result as in my existing install I first noticed this bug in.
EDIT2:
I was able to narrow it down to the flux:form.container tag. This duplicates the output in the BE. The select values are still switched though.
It is possible that you missed this official announcement:
http://fluidtypo3.org/blog/news/new-colpos-value.html
Failure to run the update script before letting TYPO3 change the type of the colPos value will result in the symptoms you describe. There is, unfortunately, no way to restore this (since your SQL will have cropped off all negative values and made them zero without any backup).
Restore from a backup and run the script and you should be fine.

TYPO3 extension: how to find certain TS setting

I found in typo3 admin side(/typo3), you can have two ways to set up TS,
you can set up through template->root, I think TS here will affect the whole site.
you can set up through template->certain page, it will only affect this page.
So my question is:
If I want to find where(which page) has TS setting such as : code = LIST, how could I do?
Use Web > Template module it has tools, you can for an example use Template Analyzer for the search
Try querying the database in phpMyAdmin or similar. The following looks in Template Setup:
SELECT pid, config, constants
FROM sys_template
WHERE config LIKE '%code = LIST%'
Replace config with constants to look in Template Constants. pid is the page ID.
If it is not set in the TypoScript, it perhaps has been set in the plugin itself. Just check the plugin content element itself.
In the Template module, go to the page where the setting is in effect.
Use the TSOB (Typo Script Object Browser) to search for "list":
This must show you all TS for this page that contains "list".
If you don't see the setting you can run a cmd/ctrl-F Search over the entire results.
You would have to search for "[code] = LIST".
Which will lead you to the following entry:
Hovering over the label will produce the above tooltip. Copy the line number.
Now change to the Template Analyzer. Here, you can click through all cascading templates and search for the line number:
This is definitely the line that sets that value.
From the "Template hierarchy" tree you will easily find the template that contains the setting.

typo3: what is the fast way to find which page has certain extension

I want to find which page has installed this extension: jc_register, I can check every page, but it takes too much time since there are many pages, so I wonder if there is any fast way to find it instead of checking every page?
If you mean you want to find a content record of type "Insert Plugin" set to a particular extension, you can use "Admin tools".
Open "Admin Tools -> DB check".
Select "Full search" from the drop-down list.
Select "Advanced query".
Tick "Use formatted strings, labels and dates instead of original values for results". This will give you page titles in the results when pid is displayed.
Set the query so that it finds your plugin and lists the page IDs (which means that the "Select fields" must contain pid).
Note: Tested in TYPO3 4.5 LTS and might not work in later versions.
Hi the extension name is located in "tt_content.list_type" field. So something like this should help you:
SELECT tt_content.pid,pages.title
FROM tt_content JOIN pages ON tt_content.pid = pages.uid
WHERE tt_content.list_type LIKE '%register%'
ORDER BY tt_content.uid DESC
gl
If you need to do it more often, you might consider the extension backendtools: http://typo3.org/extensions/repository/view/backendtools
It offers an extension listing with search functionality and links to the according page.