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
| /** | |
| * @file | |
| * Macros for getting sentiment scores and categories for NLP. | |
| */ | |
| // Google API Key for making a call to the NLP API. | |
| var GoogleAPIKey = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; | |
| /** | |
| * Sheets custom function for getting text out of a range, concatenating the text, |
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 | |
| /** | |
| * Implements TEMPLATE_preprocess_page(). | |
| */ | |
| function THEMENAME_preprocess_page(&$vars, $hook) { | |
| $template_files = array(); | |
| foreach ($vars['template_files'] as $file) { | |
| $template_files[] = $file; | |
| if ($file == 'page-node') { | |
| $template_files[] = 'page-'. $vars['node']->type; |
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
| _gaq.push(['_trackEvent', Category, Action, Label, Value]); |
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 | |
| /** | |
| * Implements hook_menu(). | |
| */ | |
| function MYMODULE_menu() { | |
| $items = array(); | |
| $items['admin/content/frontpage'] = array( | |
| 'title' => 'Front page content', |
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 | |
| $plugin = array( | |
| 'title' => t('Placecage'), | |
| 'class' => 'PlacecageProvider', | |
| ); |
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
| _gaq.push(['_trackEvent', Category, Action, Label, Value]); |
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 | |
| /** | |
| * Pull a list of years from the database. | |
| */ | |
| function _mymodule_get_years() { | |
| $year = Array(); | |
| // SELECT DISTINCT Year FROM <code>table</code> ORDER BY Year | |
| $result = db_query( 'SELECT DISTINCT Year ' . |
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 | |
| /** | |
| * Implements hook_field_widget_form_alter(). | |
| */ | |
| function multi_widget_remove_tabledrag_field_widget_form_alter(&$element, &$form_state, $context) { | |
| if (isset($element['#field_name'])) { | |
| switch ($element['#field_name']) { | |
| case 'field_long_test': | |
| $element['#nodrag'] = 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
| <?php | |
| $aliases['dev'] = array( | |
| 'uri' => 'local.dev', | |
| 'root' => '/path/to/site', | |
| 'path-aliases' => array( | |
| '%files' => 'sites/default/files', | |
| ), | |
| ); |
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 | |
| /** | |
| * Implements hook_entity_info_alter(). | |
| */ | |
| function MYMODULE_entity_info_alter(&$entity_info) { | |
| // Nodes. | |
| $entity_info['node']['view modes']['grid'] = array( | |
| 'label' => t('Grid'), | |
| 'custom settings' => TRUE, |