Skip to content

Instantly share code, notes, and snippets.

@01-Scripts
01-Scripts / functions.php
Last active May 3, 2020 14:18
Welcome file
<?PHP
function HelloWorld() {
echo "Hello World";
}
HelloWorld();
?>
@01-Scripts
01-Scripts / 01gallery.php
Last active July 13, 2016 20:32
Bildtitel unter dem Thumbnails anzeigen zulassen.
// Vorher (Zeile 471):
echo "<li".$class."><a ".$href." title=\"".$lightbox_title." - ".$echo_text."\">"._01gallery_getThumb($galverz,stripslashes($pics['filename']),"_tb")."</a></li>\n";
// Nachher
echo "<li".$class."><a ".$href." title=\"".$lightbox_title."\">"._01gallery_getThumb($galverz,stripslashes($pics['filename']),"_tb")."</a></li>\n";
@01-Scripts
01-Scripts / hook.php
Created August 18, 2015 19:34
Add Post Deploy-Hook as HTTP POST Notification for deployhq.com deploys. Put the following file in the root directory of your project or adjust the path in line 24.
<?PHP
$publicKey = "-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDXJcP2N6NtcN26Q8nVaidXOA0w
RxWK2HQTblIaQdGRDjqTvhrSlFuV5N4jz7w/w8uskP20G7ZQ+CkHwIXrWk76KZJn
pdoOHPO6AqRmEFgV5Q6Y1CR77mvnT9O21hTnfzfyyiAdQC2oO8M9/jeLRPTAqmkG
xdQa8iepUz4BwrrHmwIDAQAB
-----END PUBLIC KEY-----";
// Verify integrity of Payload
$result = openssl_verify($_POST['payload'], base64_decode($_POST['signature']), $publicKey);
@01-Scripts
01-Scripts / content.php
Created August 8, 2015 15:41
Iframe-Höhe automatisch an Inhalt anpassen
<script type="text/javascript">
var giframe;
var gURL;
function periodicResize(iframe){
giframe = iframe;
setInterval(resizeIframe, 500);
}
function resizeIframe() {
if(giframe.contentWindow.document.body != null && giframe.contentWindow.document.body.scrollHeight > 0){
if(giframe.contentWindow.document.URL != gURL)
@01-Scripts
01-Scripts / secimg.php
Created August 4, 2014 19:09
Just use the following secimg.php instead of the original one to get a captcha only with numbers.
<?PHP
session_start();
$secCode = rand(100000,999999);
$_SESSION['antispam_'.$_GET['formid']] = md5($secCode);
// get from: http://www.01-scripts.de/01scripts/01pics/sec.jpg
$im = imagecreatefromjpeg("sec.jpg");
// get from: http://www.01-scripts.de/01scripts/01pics/verdanab.ttf
@01-Scripts
01-Scripts / new_css-code.css
Last active August 29, 2015 14:01
Neuer CSS-Code bei Update des 01-Artikelsystems auf Version 3.2.0
// Folgende zusaetzliche CSS-Eigenschaften muessen ggf. in eine externe CSS-Datei eingefuegt werden:
/* SLIMBOX */
#lbOverlay {
position: fixed;
z-index: 9999;
left: 0;
top: 0;
width: 100%;
@01-Scripts
01-Scripts / mantis_reconnect.php
Created June 7, 2013 18:03
Reconnect commits that were imported into Mantis using the Source integration plugin but weren't linked to the correct issues.
<?PHP
// MySQL-Einstellungen:
$host = "localhost"; //Host/Server ihrer Mysql-Datenbank
$database = "test"; //Datenbankname
$user = "user"; //Usernamen für Mysql-Datenbank
$passw = ""; //Passwort zur Mysql-Datenbank
$table = "mantis_plugin_source_changeset_table";
@01-Scripts
01-Scripts / artikelteaser.php
Created October 7, 2012 17:39
Angepasster Artikelteaser
<?PHP
/*
01-Artikelsystem V3 - Copyright 2006-2008 by Michael Lorer - 01-Scripts.de
Lizenz: Creative-Commons: Namensnennung-Keine kommerzielle Nutzung-Weitergabe unter gleichen Bedingungen 3.0 Deutschland
Weitere Lizenzinformationen unter: http://www.01-scripts.de/lizenz.php
Modul: 01article
Dateiinfo: Teaser-Ausgabe
*/
@01-Scripts
01-Scripts / include_archiv.php
Created September 25, 2012 19:20
Archiv includen
<?PHP
$subfolder = "01scripts/"; // Unterverzeichnis
$modul = "01article"; // Modul- und Verzeichnisname (=ID-Name)
// ggf. ändern
$show['artid'] = "archiv";
include($subfolder."01module/".$modul."/01article.php");
?>
@01-Scripts
01-Scripts / teaser_individual.php
Created September 25, 2012 19:10
Unterschiedliche Ziel-Adressen in Abhängigkeit der Kategorie
<?PHP
/*
01-Artikelsystem V3 - Copyright 2006-2012 by Michael Lorer - 01-Scripts.de
Lizenz: Creative-Commons: Namensnennung-Keine kommerzielle Nutzung-Weitergabe unter gleichen Bedingungen 3.0 Deutschland
Weitere Lizenzinformationen unter: http://www.01-scripts.de/lizenz.php
Modul: 01article
Dateiinfo: Teaser-Ausgabe
*/