Skip to content

Instantly share code, notes, and snippets.

View paolomainardi's full-sized avatar

Paolo Mainardi paolomainardi

View GitHub Profile
function ildn_base_preprocess_block(&$vars, $hook) {
foreach ($vars['template_files'] as $template_file) {
$vars['template_files'][] = 'block/'.$template_file;
}
}
/**
* Implementation of HOOK_theme().
*/
function ildn_base_theme(&$existing, $type, $theme, $path) {
$hooks = zen_theme($existing, $type, $theme, $path);
/* Override theme path for block templates */
$existing['block']['theme paths'][] = drupal_get_path('theme', 'ildn_base').'/templates/block';
return $hooks;
}
function d_geo_theme($existing) {
return array(
'views_views_json_style_simple__layer_explorer_library__page_2' => array (
'arguments' => array('view' => NULL, 'options' => NULL, 'rows' => NULL, 'title' => NULL),
'template' => 'views-views-json-style-simple--layer-explorer-library--page-2',
'original hook' => 'views_views_json_style',
'path' => drupal_get_path('module', 'drupal_geoext') . '/theme',
'preprocess functions' => array(
'template_preprocess',
.block-toggle .content ul.content-links, .block-toggle .content ul.links{
background-color: #5EA3D0;
z-index: -10;
}
body #column-right, .one-sidebar #column-right {
background: #f7f9fc url(../images/sidebar_bg.png) no-repeat right top;
z-index: -20;
}
/**
* Helper function for cloning and drupal_render()'ing elements.
*/
function aquaknow_render_clone($elements) {
static $instance;
if (!isset($instance)) {
$instance = 1;
}
foreach (element_children($elements) as $key) {
if (isset($elements[$key]['#id'])) {
82c82
< CONFIG["LIBRUBY_DLDFLAGS"] = "-undefineddynamic_lookup -multiply_definedsuppress -install_name $(libdir)/$(LIBRUBY_SO) -current_version $(MAJOR).$(MINOR).$(TEENY) -compatibility_version $(ruby_version) $(XLDFLAGS)"
---
> CONFIG["LIBRUBY_DLDFLAGS"] = "-undefineddynamic_lookup -multiply_defined suppress -install_name $(libdir)/$(LIBRUBY_SO) -current_version $(MAJOR).$(MINOR).$(TEENY) -compatibility_version $(ruby_version) $(XLDFLAGS)"
125c125
< CONFIG["DLDFLAGS"] = "-undefineddynamic_lookup -multiply_definedsuppress"
---
> CONFIG["DLDFLAGS"] = "-undefineddynamic_lookup -multiply_defined suppress"
<?php
require_once 'goutte.phar';
use Goutte\Client;
$client = new Client();
$crawler = $client->request('GET', 'http://dbunico20.beniculturali.it/DBUnicoManagerWeb/dbunicomanager/searchPlace?modulo=luoghi&tipologiaLuogo=1');
$crawler->filter('mibac metainfo workflow')->each(function ($node) {
print $node->text();
});
diff --git a/elite.make b/elite.make
index 0a6fdee..75070c9 100644
--- a/elite.make
+++ b/elite.make
@@ -436,6 +436,7 @@ projects[domain_bonus][subdir] = "contrib"
projects[domain_bonus][version] = "1.0-alpha1"
projects[domain_bonus][type] = "module"
projects[domain_bonus][patch][] = "http://files.agavee.com/patches/remove_object_log_dependence.patch"
+projects[domain_bonus][patch][] = "https://drupal.org/files/issues/domain_bonus-UBERNAME_fix-2329747-2.patch"
@paolomainardi
paolomainardi / pre-commit
Last active August 29, 2015 14:06
dfq-pre-commit
#!/usr/bin/php
<?php
/**
* @file
* place this file in your $GIT_DIR/hooks directory and call it pre-commit
* anyother scripts you want to execture on commit can then also be placed
* in $GIT_DIR/hooks with the correct naming convention.. ie:
* pre-commit_[whatevernameyouwant] make that file executable and this script
* finds it and runs it.
*/
@paolomainardi
paolomainardi / pre-commit_dcq
Last active August 29, 2015 14:06
pre-commit_dcq
#!/usr/bin/php
<?php
/**
* @file
* A Git pre-commit hook script to check files for PHP syntax errors and Drupal
* coding standards violations. Requires phpcs and Coder Sniffer:
*
* @see https://drupal.org/node/1419988
*/