Skip to content

Instantly share code, notes, and snippets.

View mneuhaus's full-sized avatar

Marc Neuhaus mneuhaus

View GitHub Profile
<?php
namespace Famelo\Template\ViewHelpers;
/* *
* This script is part of the TYPO3 project - inspiring people to share! *
* *
* TYPO3 is free software; you can redistribute it and/or modify it under *
* the terms of the GNU General Public License version 2 as published by *
* the Free Software Foundation. *
* *
Verifying that +mneuhaus is my blockchain ID. https://onename.com/mneuhaus
<?php
class Parser {
/**
* @var integer
*/
protected $point = 0;
/**
* @var
@mneuhaus
mneuhaus / Contact.html
Created December 11, 2015 09:21
Complete Contact form in Fluidcontent
{namespace v=FluidTYPO3\Vhs\ViewHelpers}
{namespace flux=FluidTYPO3\Flux\ViewHelpers}
{namespace t=Famelo\Template\ViewHelpers}
<f:layout name="{v:extension.loaded(extensionName: 'fluidcontent_core', then: 'ContentCore', else: 'Content')}" />
<f:section name="Configuration">
<flux:form id="contact" options="{group: 'forms'}" label="Contact">
<flux:field.text name="introduction" label="Einleitung" rows="3" />
<flux:field.input name="recipient" label="Empfänger" required="1" />
<flux:field.input name="subject" label="E-Mail Betreff" required="1" />
@mneuhaus
mneuhaus / FlexformCommandController.php
Created December 10, 2015 20:08
Command controller to move values inside a flexform array into another sheet. this is sometimes needed, if you move your fields in the backend into other sheets, etc. which causes an issue because the data is still in the old sheet and gets outputted in the frontend, but isn't accessible anymore in the backend. beware, this might break your cont…
<?php
namespace Famelo\Template\Command;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools;
/* *
* This script is part of the TYPO3 project - inspiring people to share! *
* *
* TYPO3 is free software; you can redistribute it and/or modify it under *
* the terms of the GNU General Public License version 2 as published by *
@mneuhaus
mneuhaus / contact.html
Last active December 10, 2015 12:17
Fluidforms idea
{namespace v=FluidTYPO3\Vhs\ViewHelpers}
{namespace flux=FluidTYPO3\Flux\ViewHelpers}
<f:layout name="{v:extension.loaded(extensionName: 'fluidcontent_core', then: 'ContentCore', else: 'Content')}" />
<f:section name="Configuration">
<flux:form id="contact" options="{group: 'forms'}" label="Contact">
<flux:field.input name="subject" label="Subject" required="1" />
<flux:field.input name="recipient" label="Recipient" required="1" />
<ff:validate name="name" as="Required" />
@mneuhaus
mneuhaus / gist:bbd7a76d1a3070a6467a
Created December 3, 2015 13:12
import tt_content and pages form another database
/* @var TYPO3\CMS\Core\Database\DatabaseConnection $db */;
$db = $GLOBALS['TYPO3_DB'];
$db->debugOutput = true;
$db->exec_DELETEquery('pages', 'pid = 125');
$db->exec_DELETEquery('tt_content', 'rowDescription = "import-tagged"');
$maxPageUid = $db->exec_SELECTgetSingleRow('MAX(uid) as max', 'pages', '1=1')['max'];
$maxFiletUid = $db->exec_SELECTgetSingleRow('MAX(uid) as max', 'sys_file', '1=1')['max'];
{
"name": "typo3/cms",
"description": "TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.",
"keywords": ["typo3", "cms", "content management system", "extbase"],
"homepage": "https://typo3.org/",
"type": "typo3-cms-core",
"license": "GPL-2.0+",
"authors": [
{
"name": "TYPO3 CMS Core Team",
@mneuhaus
mneuhaus / reference.html
Created October 29, 2015 13:33
Image Reference Overlfay
<div class="reference-image">
<img src="Resources/References-1170/atreus_casestudy_v15-variante.png" />
</div>
@mneuhaus
mneuhaus / deploy.php
Created October 21, 2015 07:20
Basic test for deploying a flow application through deployer
<?php
// All Deployer recipes are based on `recipe/common.php`.
require 'recipe/common.php';
// require 'rsync.php'; // optionally used from https://github.com/deployphp/recipes
require 'flow.php';
env('php_binary', 'php_cli');
set('shared_dirs', [