Skip to content

Instantly share code, notes, and snippets.

@driesd
driesd / only_variables_passed_by_reference_1679118_4.patch
Created April 21, 2014 15:13
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']);
@driesd
driesd / google_map_custom_icon.html
Created April 21, 2014 15:13
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>
@driesd
driesd / new_gist_file_0
Created April 21, 2014 15:13
Adding node type and node id to the link field in WYSIWYG.
//----------------------------------------
//------------- CKEDITOR -----------------
//----------------------------------------
/*
* alter cklink to add language
*/
function YOUR_MODULE_ckeditor_link_autocomplete_alter(&$results, &$string){
if ($string !== '') {
$types = ckeditor_link_get_types();
$results = array();