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
/** | |
* Implements hook_css_alter(). | |
*/ | |
function wd_site_css_alter(&$css) { | |
$exclude = array( | |
'modules/aggregator/aggregator.css' => FALSE, | |
'modules/block/block.css' => FALSE, | |
'modules/book/book.css' => FALSE, | |
'modules/comment/comment.css' => FALSE, | |
'modules/dblog/dblog.css' => 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
/** | |
* Implements hook_schema(). | |
*/ | |
function spaint_promocode_schema() { | |
$schema['spaint_promocode'] = array( | |
// example (partial) specification for table "node" | |
'description' => t('The base table for nodes.'), | |
'fields' => array( | |
'id' => array( | |
'description' => t('The primary identifier for a node.'), |
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
/** | |
* Implements hook_cron(). | |
*/ | |
function spaint_cache_cron() { | |
// Set interval for run cron. Default value is 1 day. | |
$interval = variable_get('spaint_cache_cron_interval', 86400); | |
if (time() >= variable_get('spaint_cache_cron_next_execution', 0)) { | |
spaint_cache_set_data_about_user_tracks(); | |
watchdog('success', t('Cache set for user\'s count tracks is successful')); | |
spaint_cache_set_data_about_user_votes(); |
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
/** | |
* Implements hook_js(). | |
*/ | |
function spaint_cache_js() { | |
$items = array(); | |
require_once DRUPAL_ROOT . '/includes/path.inc'; | |
$items['user_data'] = array( | |
'callback' => 'user_data', |
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 spaint_cache_drush_command() { | |
$items = array(); | |
$items['spaint-cache-update'] = array( | |
'description' => dt('Update cache data about tracks and user information'), | |
); | |
return $items; | |
} |
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
/** | |
* Implements hook_ctools_plugin_directory(). | |
*/ | |
function spaint_iframe_ctools_plugin_directory($module, $plugin) { | |
if ($module == 'ctools' || $module == 'panels' || $module == 'page_manager') { | |
return 'plugins/' . $plugin; | |
} | |
// Safety: go away if CTools is not at an appropriate version. | |
if (!module_invoke('ctools', 'api_version', VUD_REQUIRED_CTOOLS_API)) { | |
return; |
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 | |
/** | |
* Callback function to supply a list of content types. | |
*/ | |
function spaint_track_page404_ctools_content_types() { | |
return array( | |
'single' => TRUE, | |
'title' => t('page404'), | |
'description' => t('page404 CTools CT'), | |
'category' => t('spaint_track'), |
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 | |
/** | |
* Callback function to supply a list of content types. | |
*/ | |
function spaint_site_changelog_ctools_content_types() { | |
return array( | |
'single' => TRUE, | |
'title' => t('Changelog'), | |
'description' => t('Changelog CTools CT'), |
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 spaint_preprocess_node(&$variables, $hook) { | |
global $theme; | |
global $language; | |
$variables['node']->field_image[LANGUAGE_NONE][0]['title'] = $variables['title_field'][$language->language][0]['value']; | |
// Initialize templates architecture. | |
if ($variables['view_mode'] == 'full' && node_is_page($variables['node'])) { | |
$variables['classes_array'][] = 'node-full'; | |
} |
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
$variables['title_image_small'] = l( | |
$title, | |
$url_track, | |
array( | |
'attributes' => array( | |
'title' => $title, | |
'rel' => 'title-gallery', | |
'class' => array( | |
'spaint-title-image', | |
'spaint-gallery' |
OlderNewer