Skip to content

Instantly share code, notes, and snippets.

View derhasi's full-sized avatar
💚
Life is green!

Johannes Haseitl derhasi

💚
Life is green!
  • Nuremberg, Germany
  • 05:40 (UTC +02:00)
View GitHub Profile
; $Id$
name = ""Z Formular Theme"
description = "form adjustments, e.g. for comments"
core = 6.x
package = ZZZ
; $Id$
name = "redirectgoto"
description = "goto redirect callback"
core = 6.x
package = ZZZ
@derhasi
derhasi / template.php
Created January 25, 2011 09:17
Theme override for field acces field select widget to add an additional class.
<?php
/**
* Override theme_faf_select().
*/
function mytheme_faf_select($element) {
$children = $element['#children'];
// Adds a faf-field class to the first appearance of the form-item class.
$children = preg_replace('&class="[^"]*(form-item)[^"]*"&is', 'class="\1 faf-select"', $children, 1);
return $children;
#header-menu ul > li.expanded > ul {
margin-left: 12px;
margin-top: 0;
padding-top: 5px;
}
@derhasi
derhasi / date_formats.features.inc
Created September 7, 2011 15:30
various exportables
<?php
/**
* Features hooks for date_format.
*/
/**
* Implements hook_features_export_options().
<?php
/**
* Implements hook_token_info()
*/
function mymodule_token_info() {
return array(
'tokens' => array(
@derhasi
derhasi / template.php
Created December 20, 2011 13:52
Drupal: Override views table header labels to accept html output.
<?php
/**
* Preprocess views-view-table.tpl.php.
*
* Recreates column labels to accept html tags and do not check_plain.
* @see template_preprocess_views_view_table().
*/
function mytheme_preprocess_views_view_table(&$vars) {
$view = $vars['view'];
@derhasi
derhasi / zppurl.module
Created June 26, 2012 13:27
A purl implementation for Drupal.
<?php
/**
* Implements hook_purl_provider().
*/
function zppurl_purl_provider() {
return array(
'zp_meisterschaft' => array(
'name' => t('Meisterschaft provider'),
'description' => t('Retrieves ID for the current meisterschaft.'),
@derhasi
derhasi / filerenamer.sh
Created July 15, 2012 11:56
Rename file and folder to a given filename.txt's content
#!/bin/sh
# Verbose helper method.
# @1 bool verbose switch
# @2 string text
# @3 string log file
myverboseoutput() {
if [ $1 = TRUE ]
then echo $2;
fi
say Its a party in my tummy -v Alex;
say Its a party in my tummy -v Bruce;
say tummy tummy -v Kathy;
say Party in my tummy -v Bruce;
say yummy yummy yummy -v Kathy;