Skip to content

Instantly share code, notes, and snippets.

@tfeuerst
tfeuerst / downloadAction.php
Created February 3, 2021 09:52 — forked from markhowellsmead/downloadAction.php
TYPO3 ExtBase: Force download of a file from a controller action. Example will force download a file from a folder defined in the TypoScript settings for the extension
/**
* @param string $fileName
* @return void
*/
public function downloadAction($fileName) {
$file = $this->settings['uploadFolder'] . 'uploadedPhotos/' . $fileName;
if(is_file($file)) {
@tfeuerst
tfeuerst / swiperinit.html
Created March 2, 2022 07:16 — forked from pavelblednov/swiperinit.html
Swiper Initialization with data attributes
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Swiper demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<!-- Link Swiper's CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.5.0/css/swiper.min.css">
<?php
declare(strict_types=1);
namespace Vendor\Sitepackage\DataProcessing;
use Doctrine\DBAL\Connection;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Database\Query\Restriction\FrontendWorkspaceRestriction;
use TYPO3\CMS\Core\Domain\Repository\PageRepository;
@tfeuerst
tfeuerst / Backend.js
Created November 16, 2022 08:13 — forked from vkemeter/Backend.js
Add Custom TCA Field (for Simple Informations in the Backend e.g.)
// location: EXT:theme/Resources/Public/JavaScript/Backend.js
// depending on https://gist.github.com/vkemeter/92e0c11eba014399e68cbd1fa95f7738#file-complexinformation-php-L56
define([
'jquery',
'TYPO3/CMS/Backend/Modal',
'TYPO3/CMS/Backend/ActionButton/ImmediateAction',
'TYPO3/CMS/Backend/Notification',
'TYPO3/CMS/Core/Event/RegularEvent'
], function ($, Modal, ImmediateAction, Notification, RegularEvent) {
@tfeuerst
tfeuerst / .Renovate configuration example.md
Created November 18, 2024 09:04 — forked from tehplague/.Renovate configuration example.md
Renovate example configuration for TYPO3

Example Configuration for Renovate in TYPO3 Projects (as shown at #T3CRR24)

This Gist provides an example configuration for Renovate, designed to automate updates in TYPO3 projects.
Note: This configuration is a starting point and should be adjusted to fit your specific requirements. The update behavior, in particular, likely has room for improvement depending on your workflow.

Key Assumptions

  1. Git Hosting: The example assumes the use of either GitLab or GitHub for managing TYPO3 projects.
  2. Shared Configuration: A shared GitLab project (gitlab/renovate-config) is used to store general configuration files (.json). This setup allows reusing shared rules across all TYPO3 projects.
  3. Project-Specific Configuration: The renovate.json file must reside in the TYPO3 project repository you wish to update. This file references the shared configuration and defines project-specific overrides.