Skip to content

Instantly share code, notes, and snippets.

View ursbraem's full-sized avatar
💭
🐧

Urs Braem ursbraem

💭
🐧
View GitHub Profile
@ursbraem
ursbraem / gulpfile.js
Created January 29, 2020 21:39
gulpfile for less and js
//*********** IMPORTS *****************
var gulp = require('gulp');
var less = require('gulp-less');
//var autoprefixer = require('gulp-autoprefixer');
var gutil = require('gulp-util');
var rename = require("gulp-rename");
var map = require("map-stream");
var concat = require("gulp-concat");
var watch = require("gulp-watch");
var minifyJS = require('gulp-uglify');
@ursbraem
ursbraem / RegisterMaskcontentIndexer.php
Last active March 12, 2019 19:50
Mask indexer for ke_search
<?php
namespace STUBR\StubrIndexer;
/*
* 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 March 14, 2018 20:29 — forked from jrenggli/AdditionalConfiguration.php
pageNotFound_handling for restricted pages in TYPO3
$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;
<?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 / layouts-adminlogin.php
Last active September 5, 2016 16:02
Static file caching for expensive perch queries
<?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.');
}
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: }
'.html':
'Perch Template Comment':
'prefix': 'cmm'
'body': '<!--* $1 *-->'
{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>
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
@ursbraem
ursbraem / gist:f6b573724c9dad9724a0
Last active February 16, 2016 18:24
Tsconfig-all
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