Skip to content

Instantly share code, notes, and snippets.

View functions.php
<?PHP
function HelloWorld() {
echo "Hello World";
}
HelloWorld();
?>
@01-Scripts
01-Scripts / 01gallery.php
Last active Jul 13, 2016
Bildtitel unter dem Thumbnails anzeigen zulassen.
View 01gallery.php
// 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 Aug 18, 2015
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.
View hook.php
<?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 Aug 8, 2015
Iframe-Höhe automatisch an Inhalt anpassen
View content.php
<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 Aug 4, 2014
Just use the following secimg.php instead of the original one to get a captcha only with numbers.
View secimg.php
<?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 Aug 29, 2015
Neuer CSS-Code bei Update des 01-Artikelsystems auf Version 3.2.0
View new_css-code.css
// 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 Jun 7, 2013
Reconnect commits that were imported into Mantis using the Source integration plugin but weren't linked to the correct issues.
View mantis_reconnect.php
<?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 Oct 7, 2012
Angepasster Artikelteaser
View artikelteaser.php
<?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
*/
View include_archiv.php
<?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 Sep 25, 2012
Unterschiedliche Ziel-Adressen in Abhängigkeit der Kategorie
View teaser_individual.php
<?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
*/
You can’t perform that action at this time.