Skip to content

Instantly share code, notes, and snippets.

View fsuter's full-sized avatar

François Suter fsuter

View GitHub Profile
@fsuter
fsuter / gist:5858132
Last active December 18, 2015 22:59
Upgrading a RTE-enabled field from a custom table with a RTE to FAL. Note that this is keyed to a particular upload path (old and new). Change the class constants to your needs.
<?php
/***************************************************************
* Copyright notice
*
* (c) 2013 Francois Suter <[email protected]>
* All rights reserved
*
* This script is part of the Typo3 project. The Typo3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@fsuter
fsuter / Custom processing.php
Last active December 20, 2015 04:19
Example files for importing WordPress entries into TYPO3 (in a custom table) using extension external_import.
<?php
/***************************************************************
* Copyright notice
*
* (c) 2010 Francois Suter (Cobweb) <[email protected]>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@fsuter
fsuter / gist:11254636
Created April 24, 2014 13:30
TCA declaration of FAL-based image with a single image
'image' => array(
'exclude' => 0,
'label' => 'LLL:EXT:lima/Resources/Private/Language/locallang_db.xml:fe_users.image',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'image',
array(
'appearance' => array(
'createNewRelationLinkTitle' => 'LLL:EXT:cms/locallang_ttc.xlf:images.addFileReference'
),
// Override sys_file_reference types to show no additional input fields in FAL relation
@fsuter
fsuter / ToolbarItem.php
Created September 1, 2015 07:07
ToolbarItem class for the "flush language cache" TYPO3 CMS extension
<?php
namespace Cobweb\FlushLanguageCache\Toolbar;
/**
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 209, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 317, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 725, in install
requirement.uninstall(auto_confirm=True)
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 752, in uninstall
paths_to_remove.remove(auto_confirm)
@fsuter
fsuter / RealURL configuration
Last active February 12, 2016 16:29
RealURL 2.0 cleaned up configuration
<?php
/**
* RealURL configuration for the default host
*/
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['_DEFAULT'] = array(
// General configuration
'init' => array(
'appendMissingSlash' => 'ifNotFile',
),
@fsuter
fsuter / ddev-debug-test.txt
Created May 9, 2024 17:13
DDEV debug output
======== Output file will be in /var/folders/bs/6mh2f17x4pg1q2fcln_xzv_c0000gn/T/ddev-debug-test.txt ========
======== Existing project config ========
ddev installation alternate locations:
/opt/homebrew/bin/ddev
/usr/local/bin/ddev