Möchte man eine Contao Erweiterung in mehreren Projekten einsetzen und/oder der Allgemeinheit zur Verfügung stellen, legt man dazu am besten ein Bundle an und veröffentlicht es auf Packagist. Dann lässt sich die Erweiterung einfach über Composer oder den Contao Manager installieren. Dieses Tutorial beschreibt wie das unter Verwendung des Skeleton Bundles funktioniert. Dabei wird ein Bundle erstellt, das ein Inhaltselement erzeugt, das "Hello World" ausgibt. Folgendes werden wir machen.
diff --git a/public/system/modules/core/drivers/DC_Table.php b/public/system/modules/core/drivers/DC_Table.php | |
index 5f099f9..520d326 100644 | |
--- a/public/system/modules/core/drivers/DC_Table.php | |
+++ b/public/system/modules/core/drivers/DC_Table.php | |
@@ -5459,7 +5459,7 @@ class DC_Table extends \DataContainer implements \listable, \editable | |
$arrProcedure[] = "id IN(" . implode(',', array_map('\intval', $GLOBALS['TL_DCA'][$table]['list']['sorting']['root'])) . ")"; | |
} | |
- $objFields = $this->Database->prepare("SELECT DISTINCT " . $what . " FROM " . $this->strTable . ((is_array($arrProcedure) && strlen($arrProcedure[0])) ? ' WHERE ' . implode(' AND ', $arrProcedure) : '')) | |
+ $objFields = $this->Database->prepare("SELECT DISTINCT " . \Database::quoteIdentifier($what) . " FROM " . $this->strTable . ((is_array($arrProcedure) && strlen($arrProcedure[0])) ? ' WHERE ' . implode(' AND ', $arrProcedure) : '')) |
Mit der folgenden Anleitung wird ein lokales Contao 4 Bundle angelegt, das ein Inhaltselement mit der Ausgabe "Hello World" erzeugt.
Das Bundle wird nicht über Composer installiert, sondern einfach in die Anwendung gelegt. Es wird nicht das AppBundle verwendet, sondern ein eigener Vendor und Bundle Name.
Der Vendor Name für das Beispiel ist "Acme" der Bundle Name "TestBundle". Diese Strings müssen bei einem eigenen Bundle entsprechend ersetzt werden.
No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.
Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.
- A Russian translation of this article can be found here, contributed by Timur Demin.
- A Turkish translation can be found here, contributed by agyild.
- There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
MIT License
Copyright (c) [year] [fullname]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
var Animator = (function() { | |
var container, | |
canvas, ctx, | |
w, h, | |
offsetLeft, offsetTop, | |
lastX, lastY; | |
var init = function(el, options) { | |
container = el; | |