Skip to content

Instantly share code, notes, and snippets.

@kathangeorg
kathangeorg / ts.ts
Created May 2, 2012 14:08
Typo3 TypoScript Variablen wie page : uid auslesen
temp.typo3Variable = COA
temp.typo3Variable {
5 = TEXT
5 {
# Datum
insertData = 1
data = date : d-m-y
wrap = <p> Das Datum heute: | </p>
}
@magnetikonline
magnetikonline / README.md
Last active March 14, 2024 22:48
IE 7/8/9/10/11 Virtual machines from Microsoft - Linux w/VirtualBox installation notes.
@mustardBees
mustardBees / disable-auto-update-emails.php
Created October 30, 2013 14:57
Disable all WordPress auto update email notifications
<?php
/*
Plugin Name: Disable all WordPress auto update email notifications
Plugin URI: http://www.iweb.co.uk/
Description: Disable all WordPress auto update email notifications following an automatic update.
Version: 1.0
Author: iWeb
Author URI: http://www.iweb.co.uk/
*/
add_filter( 'auto_core_update_send_email', '__return_false' );
@kraftb
kraftb / gist:96e060bcf1c58f647594
Created June 17, 2014 14:48
HOWTO: Extend TYPO3/extbase Model with new fields
1. Create ext_tables.sql and add new fields as usual
2. Create Configuration/TCA/Overrides/tablename.php and extend TCA therein (before: ext_tables.php)
3. Add the following lines to your ext_localconf.php. Where the first argument of "registerImplementation" is the model class you would like to extend and the second argument is your own implementation.
$extbaseObjectContainer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\Container\\Container');
$extbaseObjectContainer->registerImplementation('Tx_News_Domain_Model_NewsDefault', 'thinkopen_at\T3ff\Domain\Model\NewsT3ff');
4. Create your own implementation of the mode class and add the new properties + getters/setters for them
@cliffordp
cliffordp / functions.php
Last active September 23, 2023 06:22
Automatically login a single WordPress user upon arrival to a specific page.
<?php
/**
* Automatically login a single WordPress user upon arrival to a specific page.
*
* Redirect to home page once logged in and prevent viewing of the login page.
* Compatible with WordPress 3.9.1+
* Updated 2014-07-18 to resolve WP_DEBUG notice: "get_userdatabylogin is deprecated since version 3.3! Use get_user_by('login') instead."
* Updated 2019-07-09 to reformat code, pass 2nd parameter to `do_action()`, and hook into priority 1.
*
@a-r-m-i-n
a-r-m-i-n / FluidTemplate.html
Last active July 30, 2020 14:02
How to render responsive images in fluid templates (dce example)
{namespace dce=ArminVieweg\Dce\ViewHelpers}
<f:layout name="Default" />
<f:section name="main">
<f:for each="{dce:fal(field:'images', contentObject:contentObject)}" as="image">
<!-- This is the normal unresponsive way -->
<f:image image="{image}" />
<!-- Here we referer to typoscript to render the responsive image -->
<f:cObject typoscriptObjectPath="lib.responsiveImage" data="{image.uid}"></f:cObject>
</f:for>
@briezler
briezler / WebDirectoryBackup.sh
Last active May 16, 2016 23:17
Webdirectory Backup including database
#/bin/bash
# SET Variables
NOW="$(date +"%d-%m-%Y_%H-%M-%S")"
ROOT_PATH="/home/www/p177910/html"
DIRECTORY_TO_SAVE="$ROOT_PATH/typo3"
BACKUP_TO_DIRECTORY="$ROOT_PATH/backup"
LOGFILE="$ROOT_PATH/backup/log/yourlogfile.log"
USER=who
DB_USER=""
@iamandrewluca
iamandrewluca / MyModel.php
Last active June 17, 2022 12:34
typo3 extbase categories
<?php
/**
* categories
*
* \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Category>
* @lazy
*/
protected $categories;
/**
* MyModel constructor.
@peterdalle
peterdalle / robots.txt
Created December 3, 2016 15:18
Robots.txt that makes sure Facebook and Twitter can crawl images on your site.
# Disallow everything.
User-agent: *
Disallow: /
# Certain social media sites are whitelisted to allow crawlers to access page markup when links to /images are shared.
User-agent: Twitterbot
Allow: /images
User-agent: facebookexternalhit
Allow: /images
@shakee93
shakee93 / .htaccess
Created January 31, 2017 17:45
Laravel Apache hide .env and several security settings via .htaccess
# Disable Directory listing
Options -Indexes
# block files which needs to be hidden // in here specify .example extension of the file
<Files ~ "\.(env|json|config.js|md|gitignore|gitattributes|lock)$">
Order allow,deny
Deny from all
</Files>
# in here specify full file name sperator '|'