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:3083859
Created July 10, 2012 14:59
Account creation controller
<?php
namespace Cobweb\Monitoring\Controller;
/* *
* This script belongs to the FLOW3 package "Cobweb.Monitoring". *
* *
* */
use TYPO3\FLOW3\Annotations as FLOW3;
@fsuter
fsuter / Fluid form
Created July 16, 2012 13:47
Simple FLOW3 controller
{namespace monitoring=Cobweb\Monitoring\ViewHelpers}
<f:layout name="Default" />
<f:section name="Title"><f:translate id="instance.groups" /></f:section>
<f:section name="Content">
<h2><f:translate id="create.new.instance.group" /></h2>
<f:form action="create" name="newInstanceGroup">
@fsuter
fsuter / gist:3135474
Created July 18, 2012 10:37
Domain Validator
<?php
namespace Cobweb\Monitoring\Domain\Validator;
/* *
* 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 General Public License, either version 3 of the *
* License, or (at your option) any later version. *
* *
@fsuter
fsuter / First try at policy
Created August 28, 2012 15:19
Policy file
resources:
methods:
(snip)
entities:
Cobweb_Monitoring_Domain_Model_Event:
Cobweb_Monitoring_Events_All: 'ANY'
Cobweb_Monitoring_Events_Group1: 'this.visibleGroup1 == TRUE'
Cobweb_Monitoring_Events_Group2: 'this.visibleGroup2 == TRUE'
roles:
Administrator: []
@fsuter
fsuter / gist:3552146
Created August 31, 2012 12:26
TYPO3 Sphinx customization
running install
running build
running build_py
copying src/t3sphinx/__init__.py -> build/lib/t3sphinx
copying src/t3sphinx/fieldlisttable.py -> build/lib/t3sphinx
copying src/t3sphinx/yamlsettings.py -> build/lib/t3sphinx
copying src/t3sphinx/themes/typo3sphinx/static/typo3sphinx.css -> build/lib/t3sphinx/themes/typo3sphinx/static
creating build/lib/t3sphinx/settings
copying src/t3sphinx/settings/GlobalSettings.yml -> build/lib/t3sphinx/settings
creating build/lib/t3sphinx/resources
@fsuter
fsuter / gist:3705814
Created September 12, 2012 10:31
TypoScript setup for vge_tagcloud/tt_news integration
plugin.tx_vgetagcloud_pi1 {
referenceTable = tt_news
referenceFields = keywords
tagWrap {
typolink {
additionalParams >
additionalParams.field = tag_keyword
additionalParams.rawUrlEncode = 1
additionalParams.wrap = &tx_ttnews[swords]=|
}
@fsuter
fsuter / gist:3818368
Created October 2, 2012 11:38
Account Controller
<?php
namespace Cobweb\Monitoring\Controller;
/* *
* This script belongs to the FLOW3 package "Cobweb.Monitoring". *
* *
* */
use TYPO3\FLOW3\Annotations as FLOW3;
@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. *
* *
@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 / 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';