Skip to content

Instantly share code, notes, and snippets.

View fieke's full-sized avatar

Sofie Verreyken fieke

View GitHub Profile
@fieke
fieke / only_variables_passed_by_reference_1679118_4.patch
Created January 23, 2015 09:08
Video embed field module 7.x-2.0-beta5 - Strict warning: 'Only variables should be passed by reference in template_preprocess' Bron: https://drupal.org/node/1679118
diff --git a/video_embed_field.module b/video_embed_field.module
index 54491d4..8a45ebb 100755
--- a/video_embed_field.module
+++ b/video_embed_field.module
@@ -354,7 +354,8 @@ function template_preprocess_video_embed_field_embed_code(&$variables) {
// Prepare embed code
if ($handler && isset($handler['function']) && function_exists($handler['function'])) {
- $variables['embed_code'] = drupal_render(call_user_func($handler['function'], $variables['url'], $variables['style_settings']));
+ $embed_code = call_user_func($handler['function'], $variables['url'], $variables['style_settings']);
@fieke
fieke / google_map_custom_icon.html
Created January 23, 2015 09:08
Google map with custom icon + custom balloon Google Maps Custom markers info: https://developers.google.com/maps/tutorials/customizing/custom-markers Google MAPS API: https://developers.google.com/maps/documentation/javascript/reference#InfoWindow -------> ATTENTION: do not put this code in de document load part <---------------
// add this to your html page (e.g. in a block)
<div id="map_canvas">map_canvas</div>
@fieke
fieke / .htaccess
Last active August 29, 2015 14:13
# Block SEMalt botnet .htaccess
# Block SEMalt botnet
RewriteEngine on
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} http://anticrawler\.org [NC,OR]
RewriteCond %{HTTP_REFERER}ready-to-go\.com [NC,OR]
RewriteCond %{HTTP_REFERER} seamalt\.com
RewriteRule .* - [F]
@fieke
fieke / bulk_update_author.info
Last active August 29, 2015 14:08
Bulk update change author to siteowner
name = "Bulk update author"
description = "Bulk update the author of your nodes to siteowner."
package = "the AIM"
core = 7.x
@fieke
fieke / _block.scss
Created November 27, 2013 09:34
responsive circles
.circle-text {
width:50%;
}
.circle-text:after {
content: "";
display: block;
width: 100%;
height:0;
padding-bottom: 100%;
background: #4679BD;
@fieke
fieke / .scss
Created November 22, 2013 11:01
Cross browser alpha transparent background CSS (rgba)
.div{
background:rgb(255,255,255);
background: transparent\9;
background:rgba(255,255,255,0.8);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#ccffffff,endColorstr=#ccffffff);
zoom: 1;
&:nth-child(n) {
filter: none;
}
}
@fieke
fieke / _forms.scss
Created November 22, 2013 09:28
Submit button on Iphone
input[type="submit"] {
-webkit-appearance: none;
-moz-appearance: none;
}
@fieke
fieke / responsive-tables.js
Created November 12, 2013 15:13
responsive tables
(function($) {
$('thead').each(function() {
$th = $(this).find('th')
$(this).next('tbody').find('tr').each(function(tr) {
for(var i = 0; i < $th.length; i++) {
$(this).find('th, td').eq(i).attr('data-label', $th.eq(i).text());
}
});
});
})(jQuery);
@fieke
fieke / Berekening breakpoint 2.scss
Last active December 27, 2015 11:39
Berekening breakpoint 2.scss
// susy
width: columns(4,9) + (columns(1,9)/2) + (gutter(9)/2);
margin-right: gutter(9);
// neat
width: flex-grid(4.5, 9) + flex-gutter(9);
@fieke
fieke / template.php
Created November 4, 2013 09:46
Override the value of the h1_title with the commercial title on taxonomy pages (for old sites)
function the_aim_theme_preprocess_page(&$variables, $hook) {
if(arg(0) == 'taxonomy' && arg(1) == 'term' && is_numeric(arg(2))) {
$variables['h1_title'] = drupal_get_title();
$term_info = taxonomy_term_load($variables['page']['content']['system_main']['cont']['field_overview_image_large']['#object']->tid);
if (isset($term_info) && !empty($term_info)){
$variables['h1_title'] = $term_info->the_aim_seo_pagetitle['und'][0]['safe_value'];
drupal_set_title($variables['h1_title']);
}
}
}