Rudy is me

A weblog (mostly) about PHP and TYPO3 development

Shortcut to get the current Unix timestamp in PhpStorm

Because it's convention to use the current timestamp as the code for any Exception thrown in TYPO3, I need the current timestamp regularly when making or altering a TYPO3 extension. I used to go to a site like unixtimestamp.com to get the current timestamp, but it is possible to create a shortcut to get the current timestamp in PhpStorm using Live Templates.

Installing packages to ddev VMs

Standard ddev VMs have everything you need for most websites, but sometimes you might need an extra PHP module or command line tool. Ddev has made it easy to add additional packages to the VM.

Introducing TYPO3 extension: matomoapi

For the weblog I wanted to add a "Popular posts" block to show the most visited posts of the last 30 days. I didn't find an existing extension to achieve this, so I made my own: matomoapi. It uses the Open Source statistics platform Matomo, which has an API to get the data I wanted.

Linking to records

In TYPO3 you can link to pages, files, folders, external URLs, e-mail addresses and telephone numbers by default. But what if you want to link to a different record, like news. You could use an external URL link, but with a few lines of page TS config and TypoScript you can add a tab to the link window to link directly to a record.

A better PHP/TYPO3 development environment - Part 2: ddev

In the second part of this series I will discuss ddev. When you have multiple projects, requiring different versions of PHP and different settings, it can be difficult to do it all on a single development environment. Differences in versions and settings between the development and servers can also cause problems. Virtualization using Docker can fix this, but setting up images and maintaining them can be a lot of work. Ddev does this for you.

Rearrange new content element wizard tabs and items

TYPO3 comes with a lot of default content elements types. When creating a content element using the Page module you can choose which type to add using the new content element wizard. The content element types are arranged in tabs. You can rearrange the content types and tabs using Page TS config.

Adding CSS or JavaScript using a Fluid template

Often you want to add CSS or JavaScript for just one page template, a single action of a plugin or only if a particular content type is added to a page. If the page, plugin or content type uses Fluid as a template, this can easily be done.

A better PHP/TYPO3 development environment - Part 1: Zsh

In the first part of this series of articles I will discuss Zsh. As a serious TYPO3 (or any kind of PHP) developer you will spend at least some time on a Linux/Unix/MacOS command line, issuing Composer, git and sass commands, executing TYPO3 CLI scripts, etc. An efficient command line can therefore safe you a lot of typing and time.