Skip to content

Instantly share code, notes, and snippets.

View dimaip's full-sized avatar
👨‍💻
Making @neos UI great

Dmitri Pisarev dimaip

👨‍💻
Making @neos UI great
View GitHub Profile
@dimaip
dimaip / LayoutGalleryViewHelper.php
Created June 25, 2012 13:20
Draft of the typo3 fluid viewhelper to layout photos like in google plus gallery. Based on the for viewhelper
<?php
/* *
* This script is backported from the FLOW3 package "TYPO3.Fluid". *
* *
* 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. *
* *
* The TYPO3 project - inspiring people to share! *
@dimaip
dimaip / Column.html
Last active August 29, 2015 14:04
Zurb Foundation Grid for TYPO3Neos
{namespace ts=TYPO3\TypoScript\ViewHelpers}
<div{attributes -> f:format.raw()}>
<ts:render path="content" />
</div>
<?php
namespace TYPO3\Neos\Service;
/* *
* This script belongs to the TYPO3 Flow package "TYPO3.Neos". *
* *
* 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. *
* *
...
if($newsItem['news_files']){
foreach(explode(',',$newsItem['news_files']) as $i => $file_name){
$asset = $this->importFile('/www/sfi.ru/web/uploads/media/'.$file_name);
if($asset){
$assets[] = $asset;
}
}
$fileTemplate = new \TYPO3\TYPO3CR\Domain\Model\NodeTemplate();
<?php
namespace Sfi\Migration\Command;
/* *
* This script belongs to the TYPO3 Flow package "Sfi.Migration". *
* *
* */
use TYPO3\Flow\Annotations as Flow;
use TYPO3\Flow\Cli\CommandController;
@dimaip
dimaip / gist:7ae762c829de3855802f
Last active August 29, 2015 14:07
Drop the resources in Neos
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE typo3_flow_resource_resource;
TRUNCATE typo3_flow_resource_resourcepointer;
TRUNCATE typo3_media_domain_model_asset;
TRUNCATE typo3_media_domain_model_image;
TRUNCATE typo3_media_domain_model_tag;
TRUNCATE typo3_media_domain_model_asset_tags_join;
TRUNCATE typo3_media_domain_model_document;
SET FOREIGN_KEY_CHECKS=1;
@dimaip
dimaip / gist:417a6709345ff64561bc
Last active August 29, 2015 14:08
Alternative to content collections?
prototype(Sfi.Widgets:AutoRender) < prototype(TYPO3.TypoScript:Case) {
default{
condition = ${true}
type = ${q(node).property('_nodeType')}
}
}
prototype(Sfi.Widgets:ContentCollection) < prototype(TYPO3.TypoScript:Collection) {
collection = ${q(node).children()}
itemRenderer = Sfi.Widgets:AutoRender
{namespace neos=TYPO3\Neos\ViewHelpers}
{namespace media=TYPO3\Media\ViewHelpers}
<f:section name="tab">
<div class="QuoteAndPictureBlockAnchor">
<f:if condition="{image}">
<div class="QuoteAndPictureBlockAnchor-Image">
<media:image asset="{image}" alt="{alternativeText}" title="{title}" maximumWidth="{maximumWidth}" maximumHeight="{maximumHeight}" allowCropping="{allowCropping}" allowUpScaling="{allowUpScaling}" />
</div>
@dimaip
dimaip / gist:49b1f23b0df7198af3a8
Last active August 29, 2015 14:23
Travel expenses reimbursement sponsoring for Neos code sprint

Dear friends!

Ever since I started using Neos CMS almost one year ago, participation in Neos code sprints was one of the major sources of inspiration and a way to give back to the community. I happen to work in the most amazing place on earth, St Philaret`s Christian Orthodox Institute, and they sponsor my participation in code sprints as part of my work time. TYPO3 Association used to provide one last piece to make miracle happen: travel expenses reimbursement.

However after Neos had split from T3A things are in transition and it's not clear whether we get official reimbursement for the next code sprint or not, and the situation will not get any more clear until at least end of June.

So here's the deal:

  1. I want to participate in the Neos code sprint taking place before T3DD15.
@dimaip
dimaip / gist:d89ff6c5f3b656207f9d
Last active November 21, 2016 17:52
actionsOnNodeCreation and wizard examples
# Set document node title on creation
'TYPO3.Neos:Document':
actionsOnNodeCreation:
'setDocumentTitle':
type: 'setNodeProperties'
options:
propertyValues:
'title': '${data.title}'
enabled: '${true}' # Possibility to bypass action based on some conditions
ui: