This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function theme_preprocess_page(&$vars) { | |
//remove drupal default system CSS (IE can only take 31 CSS files) | |
$css = drupal_add_css(); | |
$rm_css = array( | |
'modules/node/node.css', | |
'modules/poll/poll.css', | |
'modules/system/defaults.css', | |
//'modules/system/system.css', | |
//'modules/system/system-menus.css', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Download drupal core | |
drush dl --drupal-project-rename=PROJECTNAME | |
cd PROJECTNAME/sites/all/ | |
mkdir modules themes modules/contrib modules/features modules/costum | |
#Basic | |
drush dl cck views filefield imagefield imageapi imagecache backup_migrate pathauto token webform webformblock advanced_help diff jquery_ui logintoboggan date content_profile account_profile calendar | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[field_geo_latlon] => Array | |
( | |
[0] => Array | |
( | |
[geo] => ij¢ 9@'©Ëí/M@ | |
[gis type] => point | |
[wkb] => ij¢ 9@'©Ëí/M@ | |
[wkt] => POINT(25.627222222222 58.374444444444) | |
[lat] => 23.234234234 | |
[lon] => 2.234234234 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
db=$1 | |
user=$2 | |
passwd=$3 | |
if [ "$db" = "" ]; then | |
echo "Usage: $0 db_name user password" | |
exit 1 | |
fi | |
clear | |
for sql_file in *.sql; do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; This file was auto-generated by drush_make | |
core = 7.x | |
api = 2 | |
projects[drupal][version] = "7.0" | |
; Profiles | |
; Please fill the following out. Type may be one of get, cvs, git, bzr or svn, | |
; and url is the url of the download. | |
projects[standard][download][type] = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Digest::MD5 'md5_hex'; | |
print_usage() unless($#ARGV==5); | |
my ($method, $uri, $user, $realm, $nonce, $response) = @ARGV; | |
my $hash_method_uri = md5_hex(join(':', $method, $uri)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function hook_views_pre_render(&$view) { | |
if ($view->name == 'ranges_by_room') { | |
//we order the view by node_node_data_field_pim_offer_title | |
//and we want the offer information only one time | |
$preview_offer = FALSE; | |
foreach ($view->result as $key => $value) { | |
if ($preview_offer == $view->result[$key]->node_node_data_field_pim_offer_nid) { | |
unset($view->result[$key]->node_node_data_field_pim_offer_node_data_field_pim_description_field_pim_description_value); | |
unset($view->result[$key]->node_node_data_field_pim_offer_node_data_field_pim_image_field_pim_image_value); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function template_preprocess_views_view_unformatted(&$vars) { | |
$view = $vars['view']; | |
$rows = $vars['rows']; | |
$vars['classes'] = array(); | |
// Set up striping values. | |
foreach ($rows as $id => $row) { | |
$row_classes = array(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Disable Google Fade-in Homepage | |
// @namespace http://googlesystem.blogspot.com | |
// @description Disable Google's new homepage | |
// @include http://www.google.*/ | |
// @include http://www.google.*/webhp* | |
// @include http://www.google.*/#* | |
// @include https://www.google.*/ | |
// @include https://www.google.*/webhp* | |
// @include https://www.google.*/#* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* overwrite theme_views_view_list | |
* | |
* Group more than one fields in a view | |
* | |
*/ | |
function template_views_view_list__VIEWNAME($view, $group, $row) { | |
//the field we want to group |
OlderNewer