Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
🐧

Urs Braem ursbraem

💭
🐧
View GitHub Profile
@ursbraem
ursbraem / FilesizeViewHelper.php
Created Mar 19, 2014
Viewhelper for showing the size of a file in TYPO3 fluid
View FilesizeViewHelper.php
<?php
/* *
* This script belongs to the FLOW3 package "Fluid". *
* *
* It is free software; you can redistribute it and/or modify it under *
* the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation, either version 3 of the License, or (at your *
* option) any later version. *
* *
* This script is distributed in the hope that it will be useful, but *
View gist:94e133084489c8bcbac3
#!/bin/sh
hosts="user@server.com user@server2.com"
name="typo3_src-6.2.12"
oldname="typo3_src-6.2.11"
url="http://www.mystorage.com/temp/"$name".tar.gz"
for h in $hosts ; do
echo $h
View gist:f6b573724c9dad9724a0
options {
// enable upload fields in Element Browser
uploadFieldsInTopOfEB = 1
createFoldersInEB =1
//Add save-and-new to all forms
saveDocNew = 1
// better Page tree
pageTree {
showNavTitle = 1
showPageIdWithTitle = 1
View Condition.php
namespace My\Site\Userfunc;
/**
* 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.
*
* For the full copyright and license information, please read the
View Events.html
{namespace n=Tx_News_ViewHelpers}
{namespace stubr=STUBR\Customvhs\ViewHelpers}
<time class="event-date" datetime="<n:format.date format="{f:translate(key:'dateTimeFormatMachine')}">{newsItem.datetime}</n:format.date>">
<f:if condition="{settings.forcelocale}==true">
<stubr:switchlocale new="de_CH.UTF-8" />
</f:if>
<n:format.date format="{f:translate(key:'dateTimeFormatHumanWeekday')}">{newsItem.datetime}</n:format.date>
<f:if condition="{settings.forcelocale}==true">
<stubr:switchlocale new="fr_CH.UTF-8" />
</f:if>
View Atom Snippet for Perch template comments
'.html':
'Perch Template Comment':
'prefix': 'cmm'
'body': '<!--* $1 *-->'
View gist:334b22b1c6b702cccaf0e9b525f62339
Uncaught TYPO3 Exception
#1297759968: Exception while property mapping at property path "":It is not allowed to map property "answers". You need to use $propertyMappingConfiguration->allowProperties('answers') to enable mapping of this property. (More information)
TYPO3\CMS\Extbase\Property\Exception thrown in file
/home/username/typo3_src-6.2.26/typo3/sysext/extbase/Classes/Property/PropertyMapper.php in line 112.
16 TYPO3\CMS\Extbase\Property\PropertyMapper::convert(array, "In2code\Powermail\Domain\Model\Mail", TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfiguration)
/home/username/typo3_src-6.2.26/typo3/sysext/extbase/Classes/Mvc/Controller/Argument.php:
00376: }
@ursbraem
ursbraem / layouts-adminlogin.php
Last active Sep 5, 2016
Static file caching for expensive perch queries
View layouts-adminlogin.php
<?php
// layout to prepend to restricted pages
$Users = new PerchUsers;
$CurrentUser = $Users->get_current_user();
if (!(is_object($CurrentUser) && $CurrentUser->logged_in())) {
// user is not logged in to Perch
exit('Please log in first.');
}
View Classes_Resource_ResourceStorageExtended.php
<?php
namespace STUBR\Template\Resource;
/**
* 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.
@ursbraem
ursbraem / AdditionalConfiguration.php
Last active Mar 14, 2018 — forked from jrenggli/AdditionalConfiguration.php
pageNotFound_handling for restricted pages in TYPO3
View AdditionalConfiguration.php
$GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling'] = 'USER_FUNCTION:EXT:usermytemplate/Classes/Utility/PageNotFoundHandling.php:user_pageNotFound->pageNotFound';
// Custom configuration for multi-language 404 page, see EXT:usermytemplate/Classes/Utility/PageNotFoundHandling.php
// ID of the page to redirect to if page was not found
$GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling_redirectPageID'] = 123;
// ID of the page to redirect to if current page is access protected
$GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling_loginPageID'] = 789;