This file contains hidden or 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 | |
/** | |
* Implementation of hook_block_info(). | |
*/ | |
function custom_block_back_to_overview_block_info() { | |
$blocks = array(); | |
$blocks['back-to-overview'] = array( | |
'info' => t('CB - Back to overview'), |
This file contains hidden or 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
//ADDS FILESIZE TO A FILE FIELD | |
function the_aim_theme_file_link($variables) { | |
$file = $variables['file']; | |
$icon_directory = $variables['icon_directory']; | |
$url = file_create_url($file->uri); | |
$icon = theme('file_icon', array('file' => $file, 'icon_directory' => $icon_directory)); | |
// Set options as per anchor format described at | |
// http://microformats.org/wiki/file-format-examples |
This file contains hidden or 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
$('form').attr('novalidate', true); |
This file contains hidden or 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(); | |
}); |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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); | |
} | |
} |