Skip to content

Instantly share code, notes, and snippets.

View skerbis's full-sized avatar
👋
Huhu

Thomas Skerbis skerbis

👋
Huhu
View GitHub Profile
@skerbis
skerbis / redaxo-yform-dataset-example,php
Last active November 23, 2016 15:16
REDAXO :: yform :: fertiges Formular inkl. Daten zur Bearbeitung holen oder ein neues erstellen
<?php
// Für REDAXO CMS
// Erforderliches Addon: yform
//
//
// Datensatz aus Tabelle mit ID 2
$dataset = rex_yform_manager_dataset::get(2,Tabelle);
// oder:
// Neuen leeren Datensatz erstellen
// $dataset = rex_yform_manager_dataset::create(Tabelle);
@skerbis
skerbis / redaxo-google-map-readme.txt
Last active January 12, 2017 14:55
REX 5 :: Google Maps
Benötigt: Jquery
Installation:
Modul anlegen
CSS und Javascript im Frontend einbinden einbinden.
Unter KLXMSTYLE ist ein individueller Kartenstil hinterlegt.
Einen eigenen könnt Ihr unter http://googlemapscolorizr.stadtwerk.org selbst erstellen.
@skerbis
skerbis / Redaxo YORM Datensatz erstellen.php
Created January 16, 2017 11:57
REDAXO yForm - YORM:: Erstellen eines Datensatzes mittels Yorm
<?php
// Neuen Datensatz initialisieren
$post = rex_yform_manager_dataset::create('rex_blog_post');
// z.B.: Feld title befüllen
$post->title = 'REDAXO-Tag in Wackershofen (am Grundbach)';
// z.B.: Feld Text befüllen ...
post->text = '...';
// Speichern des Datensatzes
if ($post->save())
@skerbis
skerbis / Markup.html
Created January 16, 2017 13:51 — forked from elricco/Markup.html
Transfomr Bookatable Booking Table
<div class="reservierung-kalender" id="bookingTableWrapper">
<!-- Start Bookatable Code -->
<script type="text/javascript" src="https://bda.bookatable.com/deploy/lbui.direct.min.js"></script>
<script type="text/javascript">
LBDirect_Embed({
connectionid : "BOOKATABLE-CONNECTION-ID",
language: "de-DE",
});
jQuery(function () {
setTimeout(transformLBD, 10);
@skerbis
skerbis / getaslice_ausgabe.php
Last active April 3, 2020 13:35
redaxo 5 - get a slice
<?php
if( "REX_VALUE[2]" != "" )
{
// Im Backend den Link zur Quelle anzeigen
if(rex::isBackend())
{
$master = rex_article::get(REX_LINK[id=1 output=id]);
@skerbis
skerbis / .htaccess
Created January 16, 2018 21:49 — forked from IngoWinter/.htaccess
auth media für ycom
RewriteRule ^/?media/(.*)$ /index.php?ycom_file=$1 [L]
# RewriteRule ^/?media/(.*\.(pdf|doc|zip))$ /index.php?ycom_file=$1 [L]
@skerbis
skerbis / navigation_iterator.php
Created May 27, 2018 18:16 — forked from staabm/navigation_iterator.php
redaxo navigation iterator
<?php
/**
* Klasse zum Erstellen von Navigationen, v0.1.
*
* @package redaxo\structure
*/
/*
* Beispiel-Konfiguration einer Haupt-Navigation:
@skerbis
skerbis / download-unzip.php
Last active August 21, 2018 16:00 — forked from sedflix/download-unzip.php
Download and unzip file with PHP
<?php
$ch = curl_init();
$source = "https://yourDomain.tld/file.zip";
curl_setopt($ch, CURLOPT_URL, $source);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec ($ch);
curl_close ($ch);
// Save file
@skerbis
skerbis / Snom.scpt
Created October 5, 2018 07:25 — forked from jfqd/Snom.scpt
This script enables the macOS Contact-Application to dial a phone-number via a SNOM hardware phone by clicking on the phone label
-- This script enables the macOS Contact-Application to dial a phone-number
-- via a SNOM hardware phone by clicking on the phone label.
--
-- (C) 2008 David Kreitschmann, K3com Kommunikationstechnik http://www.k3com.de
-- (C) 2017 Modification for SNOM 715 by Stefan Husch, https://qutic.com
--
-- Copy this script to ~/Library/Application\ Scripts/com.apple.AddressBook
-- on your macOS 10.11+ and change the phoneURL to your needs.
--
-- A chmod 0600 ~/Library/Application\ Scripts/com.apple.AddressBook/Snom.scpt
<?php
// Function zur Generierung eines Navigationsarrays
// Benötigt für den Aufruf werden nur $start,$depth und $ignoreoffline
// Alle weiteren Angaben dienen der internen Verarbeitung
// Alle weiteren Informationen aus rex_structure fintet man in catObject
// DEMO siehe unten
if (!function_exists('structureArray')) {
function structureArray($start = 0, $depth = 0, $ignoreoffline = true, $depth_saved = 0, $level = 0, $id = 0)
{
$result = array();