Skip to content

Instantly share code, notes, and snippets.

View a-r-m-i-n's full-sized avatar

Armin Vieweg a-r-m-i-n

View GitHub Profile
@a-r-m-i-n
a-r-m-i-n / RespectAccessInSelect.php
Last active August 29, 2015 14:05
Add access rights check to TCA select lists in TYPO3
<?php
namespace Company\Extension\UserFunctions;
/***************************************************************
* Copyright notice
*
* (c) 2014 Armin Rüdiger Vieweg <armin@v.ieweg.de>
*
* All rights reserved
*
@a-r-m-i-n
a-r-m-i-n / WhateverCommandController.php
Created October 28, 2014 12:38
Command Controller in Extbase for Scheduler Tasks
<?php
// Classes/Command/WhateverCommandController.php
/**
* Whatever controller
*
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
*
*/
@a-r-m-i-n
a-r-m-i-n / page.ts
Created November 5, 2014 15:47
Using Fluid-Templates in TYPO3
page = PAGE
page {
typeNum = 0
10 =< lib.templates.base
}
@a-r-m-i-n
a-r-m-i-n / BackendLayoutFileProvider.php
Created November 5, 2014 15:55
Example of how to provide a BackendLayoutFileProvider in TYPO3 6.2
<?php
namespace sunzinet\Typo3szBase\Provider;
/***************************************************************
* Copyright notice
*
* (c) 2014 Armin Rüdiger Vieweg <armin@v.ieweg.de>
*
* All rights reserved
*
@a-r-m-i-n
a-r-m-i-n / OverrideIconOverlayHook.php
Created November 25, 2014 13:51
Approach to add my own overlay icons to pages in TYPO3
<?php
namespace Sunzinet\SzPagesettings\Hooks;
/**
* Class OverrideIconOverlay
*
* @package Sunzinet\SzFalExpiredate\Hooks
*/
class OverrideIconOverlayHook {
@a-r-m-i-n
a-r-m-i-n / fieldconfiguration.xml
Created January 21, 2015 13:23
DCE field configuration for FAL inline field with
<config>
<type>inline</type>
<foreign_table>sys_file_reference</foreign_table>
<foreign_field>uid_foreign</foreign_field>
<foreign_sortby>sorting_foreign</foreign_sortby>
<foreign_table_field>tablenames</foreign_table_field>
<foreign_match_fields>
<fieldname>images</fieldname> <!-- Name of variable! -->
</foreign_match_fields>
<foreign_label>uid_local</foreign_label>
@a-r-m-i-n
a-r-m-i-n / mainMenu.ts
Last active August 29, 2015 14:14
Simple <ul> Menu using TypoScript
lib.mainMenu = HMENU
lib.mainMenu {
1 = TMENU
1 {
noBlur = 1
expAll = 1
NO = 1
NO.wrapItemAndSub = <li class="first">|</li>|*|<li>|</li>|*|<li class="last">|</li>
@a-r-m-i-n
a-r-m-i-n / YourTCA.php
Last active August 29, 2015 14:14
UserFields for TYPO3 (TCA)
<?php
if (!defined ('TYPO3_MODE')) {
die ('Access denied.');
}
$TCA['tx_ext_domain_model_whatever'] = array(
'ctrl' => $TCA['tx_ext_domain_model_whatever']['ctrl'],
'interface' => array(
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden',
),
@a-r-m-i-n
a-r-m-i-n / center.css
Created February 27, 2015 11:13
CSS3 Center (horizontally and vertically)
.center {
position: absolute;
top: 50%;
left: 50%;
margin-right: -50%;
transform: translate(-50%, -50%);
}
@a-r-m-i-n
a-r-m-i-n / templates.ts
Created April 2, 2015 14:30
Use FLUIDTEMPLATE cObject and bind page's backend layout to template file
# Initiate template (used by page)
lib.templates.base = FLUIDTEMPLATE
lib.templates.base {
partialRootPath = EXT:typo3sz_assets/Resources/Default/Private/Templates/Partials/
layoutRootPath = EXT:typo3sz_assets/Resources/Default/Private/Templates/Layouts/
variables {
logo =< lib.contents.logo
navMain =< lib.navigations.main