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
if (module_exists('content_vote')) { | |
$votes = content_vote_retrieve_vote_totals($node->nid); | |
} | |
if (module_exists('massrel_voting')) { | |
$tweets = massrel_voting_retrieve_vote_totals($node->nid); |
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
/** | |
* Implements hook_theme(). | |
*/ | |
function content_vote_theme($existing, $type, $theme, $path) { | |
return array( | |
// VOTE BUTTONS | |
'content_vote' => array( | |
'variables' => array( | |
'gameid' => NULL, |
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
/** | |
* Implements hook_theme(). | |
*/ | |
function content_vote_theme($existing, $type, $theme, $path) { | |
return array( | |
// VOTE BUTTONS | |
'content_vote' => array( | |
'variables' => array( | |
'gameid' => NULL, |
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
/** | |
* Link field has issue with rendering the <front> option. Lets give it a bit | |
* of help | |
* @param $variables preprocess variables | |
* @param $hook | |
*/ | |
function openedu_linkblock_preprocess_field(&$vars, $hook) { | |
global $language; | |
$lang = $language->language; |
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
/** | |
* Implements hook_ctools_render_alter(). | |
*/ | |
function isu_panel_layouts_ctools_render_alter(&$info, &$page, &$context) { | |
if (!empty($context['contexts'])) { | |
// I don't know why this is necessary, but just looping over the contexts | |
// array is throwing an unknown error. | |
$context_keys = array_keys($context['contexts']); |
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
CKEDITOR.on( 'dialogDefinition', function( ev ) { | |
// Take the dialog name and its definition from the event data. | |
var dialogName = ev.data.name; | |
var dialogDefinition = ev.data.definition; | |
// Check if the definition is from the dialog we're | |
// interested in (the 'link' dialog). | |
if ( dialogName == 'link' ) { |
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
/** | |
* Hook to register the CKEditor plugin - it would appear in the plugins list on the profile setting page. | |
*/ | |
function hook_ckeditor_plugin() { | |
return array( | |
'plugin_name' => array( | |
// Name of the plugin used to write it. | |
'name' => 'plugin_name', | |
// Description of the plugin - it would be displayed in the plugins management section of profile settings. | |
'desc' => t('Plugin description'), |
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
/** | |
* This pattern allows you to manually return the functions you want to be public, | |
* thus allowing for private functions. | |
*/ | |
var Mcard = (function() { | |
/** | |
* Helper to update form and results based on query as retrieved from a url | |
* change. |
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
$last_month = date("n", mktime(0, 0, 0, date("n")-1, 1, date("Y"))); | |
$last_month_year = date("Y", mktime(0, 0, 0, date("n")-1, 1, date("Y"))); | |
// Query for all revenue sources who have an active unit and don't have a | |
// sales tax report for last month. The resulting revenue sources all need | |
// new tax reports created for them for last month. | |
$query = "SELECT | |
n.nid as nid | |
FROM {node} n | |
INNER JOIN {content_field_revenue_unit_ref} r ON r.nid = n.nid |