Skip to content

Instantly share code, notes, and snippets.

View fsuter's full-sized avatar

François Suter fsuter

View GitHub Profile
@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
@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',
),
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 / 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.
*
@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 / 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: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 / gist:5803411
Last active November 22, 2022 10:18
The code samples below demonstrate how to register a custom soft reference parser for TYPO3 CMS. This consists of 3 steps: 1) register the soft reference parser key globally 2) add the soft reference parser key to the appropriate fields in the TCA 3) code the soft reference parser The example is taken from extension "templatedisplay".
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['softRefParser'][$_EXTKEY] = 'Tesseract\Templatedisplay\Service\SoftReferenceParser';
@fsuter
fsuter / Compiled template.php
Last active December 14, 2015 00:09
Fluid view helpers and multiple partials invocation
$output26 = '';
$output26 .= '
<ol>
<li>
';
// Rendering ViewHelper Tx_Fluid_ViewHelpers_RenderViewHelper
$arguments27 = array();
$arguments27['partial'] = 'DmdeMobile/TrainingDetail';
// Rendering Array
@fsuter
fsuter / JavascriptLabelsViewHelper.php
Created November 13, 2012 10:32
Loading localized labels for JavaScript with TYPO3 Flow/Fluid
<?php
namespace Cobweb\Monitoring\ViewHelpers;
/* *
* This script belongs to the FLOW3 package "Cobweb.Monitoring". *
* *
* It is free software; you can redistribute it and/or modify it under *
* the terms of the GNU Lesser General Public License, either version 3 *
* of the License, or (at your option) any later version. *
* *