Skip to content

Instantly share code, notes, and snippets.

@vdchristelle
vdchristelle / striping.js
Created October 28, 2013 15:48
Add striping (odd even classes) in jQuery - stripe
/*
* Add striping
*
*/
function stripe(el){
var count = 0;
$(el).each(function(){
count++;
var classEven = '';
var classOdd = '';
@driesd
driesd / bulk_author_change.php
Last active December 26, 2015 12:59
Node operation to change the content author to siteowner
<?php
/**
* Implementation of hook_help().
*/
function bulk_author_change_help($path, $arg) {
switch ($path) {
case 'admin/help#bulk_author_change':
$output = '<h3>' . t('Add extra bulk operation for content') . '</h3>';
$output .= '<p>Unpublished node created by admin are not accessable for siteowners.<br />Therefore we must change the author of the nodes to siteowner. This module adds the extra bulk update action...</p>';
@driesd
driesd / custom_block_back_to_overview.php
Created October 7, 2013 07:38
Provides a custom 'Back to overview' button - Block
<?php
/**
* Implementation of hook_block_info().
*/
function custom_block_back_to_overview_block_info() {
$blocks = array();
$blocks['back-to-overview'] = array(
'info' => t('CB - Back to overview'),
@fieke
fieke / custom.module
Created September 18, 2013 06:58
Add icon to default taxonomy menu block
/**
* Implements hook_taxonomy_menu_block_tree_alter
*/
function custom_taxonomy_menu_block_tree_alter(&$tree, $config) {
switch($config) {
// add icon image to cache of TMB
case '2':
foreach($tree as $tid => $term) {
@vdchristelle
vdchristelle / page.tpl.php
Last active December 22, 2015 10:48
Ability to set linebreak in $h1_title Titel splitsen
<h1><?php print str_replace('[', '<span>', str_replace(']', '</span>', $h1_title)); ?></h1>
of <h1><?php print str_replace(array('[', ']'), array('<span>', '</span>'), $h1_title); ?></h1>
@driesd
driesd / custom_tokens.info
Created September 3, 2013 07:36
Provides a custom token in Drupal
name = "Custom tokens"
description = "Custom module to provide custom tokens"
package = "Custom"
core = 7.x