Skip to content

Instantly share code, notes, and snippets.

Avatar
🌋
Works on tools that help humans in crisis situations.

Niklas Jordan NiklasJordan

🌋
Works on tools that help humans in crisis situations.
View GitHub Profile
View kirby_loop.php
<?php snippet('header') ?>
<?php foreach($page->children()->flip() as $article): ?>
<?php if($article->template() == 'link'): ?>
<!-- link html -->
<?php elseif($article->template() == 'article'): ?>
@NiklasJordan
NiklasJordan / gist:6210300
Created Aug 12, 2013
Analytics-Codes zur besseren Analyse der Bounce-Rate erweitern. In die Absprungrate zählen dann nur noch User die weniger als 5 Sekunden auf der Seite bleiben. Installation: Die Zeile einfach unter den letzten _gaq.push-Eintrag einfügen. Thats it...
View gist:6210300
setTimeout('_gaq.push([\'_trackEvent\', \'NoBounce\', \'Over 5 seconds\'])',5000);
View from.php
<?php
// get a page
$editpage = $pages->get("/editme/");
$ignorefields = array("isOld","language_published");
$form = $modules->get("InputfieldForm");
$form->method = 'post';
$form->action = './';
View nav_buf_jquery.html
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#nav li#sub ul").css({"display":"none"});
$("#nav li#sub").mouseover(function() {
$("#nav li#sub ul").stop(true, true).fadeIn("300");
View dabblet.css
.zweispaltig {
column-count: 2;
column-gap: 20px;
}
View verlinkung.html
<div class="grid_4">
<div id="port_bild">
<a href="thomas_sankara.html" name="seite2">
<img src="img/portfolio/thomas_sankara/thomas_sankara_thumb.jpg" style="border:1px solid #666;">
<span><p>Thomas Sankara Portrait<br>- Artwork</p></span>
</a>
</div>
</div>
View kirby_loop.php
<?php snippet('header') ?>
<?php foreach($page->children()->flip() as $article): ?>
<?php if($article->template() == 'link'): ?>
<!-- link html -->
<?php elseif($article->template() == 'article'): ?>
@NiklasJordan
NiklasJordan / Gistson.php
Created Jun 17, 2011 — forked from phatduckk/Gistson.php
Embed a Gist in Wordpress
View Gistson.php
<?php
/*
Plugin Name: Gistson - Embedded Gist WP Plugin
Plugin URI: http://arin.me/blog/tag/gistson
Description: Use a shortcode [gist id="12345"] to embed A Gist from http://gist.github.com into your blog
Version: 0.1
Author: Arin Sarkissian
Author URI: http://arin.me
Copyright 2009 Arin Sarkissian
@NiklasJordan
NiklasJordan / gist:1012421
Created Jun 7, 2011
Seiten dynamisch generieren
View gist:1012421
<?php include("datei.php"); ?>
@NiklasJordan
NiklasJordan / gist:1012418
Created Jun 7, 2011
Breadcrumb-Navigation
View gist:1012418
<?php
$an="Sie befinden sind hier: ";
$home="http://www.drweb.de/"; // Hier Ihre Domain
$pie=explode("/","$_SERVER[PHP_SELF]");
$tr=" > "; // Alternativ: ':', '/'
$b=count($pie);
echo $an."<a href=\"".$home."\">Startseite</a>";
// Alternativ: 'Home', 'Start'
for($a=1;$a<$b-1;$a ){
$ta=$ta.$pie[$a]."/";