Skip to content

Instantly share code, notes, and snippets.

View fieke's full-sized avatar

Sofie Verreyken fieke

View GitHub Profile
@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 / 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 / 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']);