Create upload folder in FlexForm - typo3

Good afternoon. I have a flexform that loads images and it works fine. But she does not know how to create a folder for unloading herself. Is there an additional config for this in TYPO3
<settings.sideImages>
<TCEforms>
<label>Images</label>
<config>
<type>group</type>
<internal_type>file</internal_type>
<allowed>gif,jpg,jpeg,png</allowed>
<uploadfolder>uploads/tx_MYPLUGIN/</uploadfolder>
<maxitems>20</maxitems>
<size>3</size>
<show_thumbs>0</show_thumbs>
</config>
</TCEforms>
</settings.sideImages>

For create upload folder in your custom TYPO3 extension. You need to add below configuration in ext_emconf.php like below.
$EM_CONF[$_EXTKEY] = array(
'uploadfolder' => 'true',
)
After added this changes you need to once Install / Un-install extension.

Related

VSCode - How to enable CSS class autocomplete in Laravel Blade files?

I've installed the extension called HTML CSS Support - https://github.com/ecmel/vscode-html-css
I configured the remote URL's I want to autocomplete classes from:
"css.styleSheets": [
"https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.0.0-beta3/css/bootstrap.min.css",
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css",
],
This works perfectly in HTML files, but not Blade files, or even PHP files.
So I went ahead and tried adding them:
"css.enabledLanguages": [
"html", "php", "blade",
],
This still does not autocomplete in blade OR PHP files. I tried a .blade.php file and a .php file, neither worked. I also tried adding an entry for *.php to my VSCode file associations, which also did nothing.
How do I get this CSS autocomplete working in my blade and PHP files?
So I ended up trying this extension instead - https://github.com/Zignd/HTML-CSS-Class-Completion
Which actually works perfectly without even having to do any additional configuration.

TYPO3 form - Editing of form.yaml files not possible in the backend

I need to edit the configuration files of the TYPO3 form extension on the webserver. As I have no access via FTP I need to edit the files in the TYPO3 backend. The problem is, I am not allowed to edit files with the extension .form.yaml.
In the install tool I added
[SYS][textfile_ext] = txt,html,htm,css,inc,php,php3,tmpl,js,sql,yaml,form.yaml,form
Now I can edit files with the extension yaml but no files with the extension form.yaml
Is there another configuration option I have to set to be able to edit the form.yaml files?
Is it possible to change the standard extension of my configuration files from .form.yaml to .yaml?
I am using TYPO3 8.7.30 and form 8.7.30.
As Bernd already said, since TYPO3 8 editing of .form.yaml files is not allowed in the backend for security reasons.
I wanted the editing to allow backend users the definition of different upload folders.
But different upload folders can also be defined in the central .yamlconfiguration file (TYPO3 8 form - Define several file upload folders).
So there is no need to enable editing of .form.yaml files for backend users.

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

Magento 2.0 override admin css (style.css)

I am working in magento 2.0 and want to make changes in admin login panel.
please suggest me how to override admin css files or how to add new css file.
Thanks
you need to add a custom module and define css in desired xml or if you want to add in all pages create default.xml
1) add a module Ex. Emizentech/NewAdmin
2) create a new file view/adminhtml/layout/default.xml in the module
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<css src="css/emizentech.css"/>
</head>
</page>
3) Add .css file in web folder as below path:
view/adminhtml/web/css/emizentech.css
after this you need to clear cache and deploy static content
php bin/magento cache:clean
php bin/magento setup:static-content:deploy
Better way to create child theme so when you update magento your change not remove.
You can create child theme as like created for frontend theme.
Backend this are vendor/magento/theme-adminhtml-backend.
You can get reference for create child theme from vendor/magento/theme-frontend-luma, because that this is child theme of Magento/blank, you can check that from file vendor/magento/theme-frontend-luma/theme.xml.
For more about create theme you can get reference form: http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/themes/theme-create.html

XAMPP + Zend Framework = .phtml files don't render

I have an installation of XAMPP and an application built on Zend Framework that works in a normal apache2 + php5 environment. The application resides inside a vhost correctly configured and as a precaution I also added .phtml files to match php compiler
<FilesMatch "\.php$|\.php5$|\.php4$|\.php3$|\.phtml$|\.phpt$">
SetHandler application/x-httpd-php
</FilesMatch>
When I access any page of the application I get the php code rendered in browser instead of the rendered html. PHP files are compiled, so a die('aaa') in any place before rendering works as expected. But when Zend_View includes the script file in method _run() everything gets outputed to browser as text.
I tested with a plain index.phtml file in a test directory and it acts like a php file. it is interpreted by php.exe, but when zend includes view scripts I can't figure out what's happening.
Can someone offer some help ?
I found where the problem is, after 3 hours.. I can't believe it took me that long, but the issue was configuration did not allow php_short_tag, which is a great feature when dealing with templates.
I have enabled short tag in php.ini and restarted apache:
short_open_tag = On
I've posted the answer here because someone might have my problem some day.
I don't think you have to create that directive inside the vhost. A default xampp install will register phtml files for php. XAMPP passes by default files with the following extensions to PHP: .php .php5 .php4 .php3 .phtml .phpt
check this config file c:/xampp/apache/conf/extra/httpd-xammp
I have this lines
PHPINIDir "C:/xampp/php"
LoadModule php5_module "C:/xampp/apache/bin/php5apache2_2.dll"
AddType text/html .php .phps .php5 .php4 .php3 .phtml .phpt