Skip to content

Instantly share code, notes, and snippets.

Ralf Albert RalfAlbert

Block or report user

Report or block RalfAlbert

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@RalfAlbert
RalfAlbert / gist:846666
Created Feb 27, 2011
help.xml & xml.php
View gist:846666
help.xml
========
<?xml version="1.0" encoding="utf-8" ?>
<help_context>
<screen>
<object>example a</object>
<name>testname a</name>
<id>_testid_a</id>
View ExtendedHelp.php
<?php # -*- coding: utf-8 -*-
/*
Plugin Name: Extended Help
Description: Help texts for super heroes
Version: 0.1
Author: Thomas Scholz
Author URI: http://toscho.de
License: GPL
*/
@RalfAlbert
RalfAlbert / gist:865951
Created Mar 11, 2011
WordPress - cipher user_nicename when using get_author_posts_url
View gist:865951
<?php
/*
Plugin Name: Cipher Author in get_author_posts_url
Plugin URI: http://yoda.neun12.de/artikel-29/2
Description: Cipher the author nicename when using get_author_posts_url()
Version: 1.0
Author: Ralf Albert
Author URI: http://neun12.de
*/
@RalfAlbert
RalfAlbert / gist:1090596
Created Jul 18, 2011
Google+ Button Datenschutzkonform
View gist:1090596
$(document).ready( function(){
$('#gplus').click( function(){
jQuery.getScript( 'https://apis.google.com/js/plusone.js' );
$('#gplus').remove();
});
});
@RalfAlbert
RalfAlbert / gist:1090650
Created Jul 18, 2011
Google+ Button Datenschutzkonform mit iFrame
View gist:1090650
$(document).ready( function(){
$('#gplus').click( function(){
var l = window.location;
var url = encodeURIComponent( l.href );
var parent = encodeURIComponent( l.href.replace( l.pathname, '' ) );
var gframe = '<iframe src="https://plusone.google.com/u/0/_/+1/button?'
+ 'url=' + url
+ '&amp;size=standard' +
View figure.htm
<!DOCTYPE html>
<html>
<head>
<title>figure-Tag</title>
<style type="text/css">
.container, .links, .rechts { float:left; padding:5px; margin: 2px }
.container { width:600px }
.links { border:1px solid red }
.rechts { border:1px solid blue }
View class-wordpress-breadcrumb.php
<?php
/**
* Breadcrumb Navigation for WordPress.
*
* @author Dominik Schilling
* @author Ralf Albert
* @license GPLv2
* @link http://wpgrafie.de/204/
*
* @version 0.2
@RalfAlbert
RalfAlbert / codeeditor.php
Created Nov 14, 2011
WP Advanced Code Editor (new version)
View codeeditor.php
<?php
/*
Plugin Name: WP Advanced Code Editor
Plugin URI: http://www.techlyzer.com/wp-advanced-code-editor
Description: Integrates the EasyArea advanced code editor to WordPress, complete with syntax hilighting, line numbering, and full screen editing! Not compatabile with the WYSIWYG editor. Turn it off!
Author: John Kolbert
Version: 1.0
Author URI: http://www.techlyzer.com/
Copyright Notice
@RalfAlbert
RalfAlbert / testplugin.php
Created Nov 17, 2011
A very (very, very) simple unittest for WordPress
View testplugin.php
<?php
/*
Plugin Name: WordPressTests
Plugin URI:
Description: Automated testing of WordPress
Version: 0.0.1-dev01
Author: Ralf Albert
Author URI: http://yoda.neun12.de
*/
@RalfAlbert
RalfAlbert / is_serialized.php
Created Dec 3, 2011
test on serialized data
View is_serialized.php
<?php
error_reporting(E_ALL);
$data = array();
$data[] = serialize( array( 1, 2, 3, array( 'een', 'twee', 'tree' ) ) );
$data[] = 'a:4:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;a:3:{i:0;s:3:"een";i:1;s:4:"twee";i:2;s:4:"tree";}}';
$data[] = 'a:{i0;i1;i1;i2;i2;i3;i3;a:{i0;s:"een";i1;s:"twee";i2;s:"tree";}}';
$data[] = serialize( 'blah' );
$data[] = 'blah';
You can’t perform that action at this time.