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
//GETS ANY QUERYSTRING PARAMETER BY NAME | |
function getParameterByName(name) { | |
var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search); | |
return match && decodeURIComponent(match[1].replace(/\+/g, ' ')); | |
} |
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 | |
//DISABLE BLOCK CACHE | |
function mytheme_block_info_alter(&$blocks, $theme, $code_blocks) { | |
$blocks['addtoany']['addtoany_button']['cache'] = DRUPAL_NO_CACHE; | |
} |
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 | |
//CUSTOM BLOCK RENDERING | |
function mytheme_block_render($module, $block_id) { | |
$block = block_load($module, $block_id); | |
$block_content = _block_render_blocks(array($block)); | |
$build = _block_get_renderable_array($block_content); | |
$block_rendered = drupal_render($build); | |
print $block_rendered; | |
} |
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 | |
//NEEDED TO MAKE FIELD PROCESSING POSSIBLE PER FIELD | |
function mytheme_process_field(&$variables) { | |
$function = 'mytheme_process_field__'. $variables['element']['#field_name']; | |
if(function_exists($function)) { | |
$variables = $function($variables); | |
} | |
} |
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 __format_file_fize_size( $size, $display_bytes=false ) { | |
if( $size < 1024 ) | |
$filesize = $size . ' bytes'; | |
elseif( $size >= 1024 && $size < 1048576 ) | |
$filesize = round( $size/1024, 2 ) . ' KB'; | |
elseif( $size >= 1048576 ) | |
$filesize = round( $size/1048576, 2 ) . ' MB'; |
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
name = "Custom tokens" | |
description = "Custom module to provide custom tokens" | |
package = "Custom" | |
core = 7.x |
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
function custom_tax_remove_desc_form_taxonomy_form_term_alter(&$form, &$form_state, $form_id) { | |
$form['description']['#access'] = FALSE; | |
} |
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
name = "Commerce - EURO symbol fix" | |
description = "Places the EURO symbol in front of the price value" | |
core=7.x | |
package = "Commerce" | |
files[] = commerce_euro.module |
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
name = The AIM - Views term language | |
description = Fix / Add the language filter to taxonomy term views | |
core = 7.x | |
package = "Custom" | |
dependencies[] = "views" | |
dependencies[] = "views_ui" | |
dependencies[] = "i18n_taxonomy" |
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
$('body').delegate('input', 'click', function () { | |
$(this).select(); | |
}); |
OlderNewer