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
/* Class */ | |
public with sharing class CityvisionContactAssigner { | |
static final Id OWNER_NYOUNG; | |
static final Id OWNER_AWEBB; | |
static { | |
List<User> users = [SELECT Id, Alias FROM User WHERE Alias = 'nyoung' OR Alias = 'awebb' OR Alias = 'MOmori' OR Alias = 'ASears']; | |
for(User u : users) { | |
// Switch which user to use based on whether we are in production environment, since partner users don't carry across to sandboxes. | |
if((CityvisionConstants.onProduction == true && u.Alias == 'nyoung') |
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
@isTest | |
private class TestCityvisionScheduledTasks { | |
// just tests whether the scheduled classes run. | |
static testMethod void testRunsScheduled() { | |
CityvisionScheduledLeadScorer cvSLS = new CityvisionScheduledLeadScorer(); | |
String sch = '0 0 23 * * ?'; | |
Test.startTest(); | |
Id jobId = System.schedule('City Vision Lead Scoring', sch, cvSLS); | |
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 | |
// $Id$ | |
/** | |
* @file | |
* On behalf implementation of Feeds mapping API for location_cck.module (Location CCK). | |
*/ | |
/** | |
* Implementation of hook_feeds_node_processor_targets_alter(). |
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 | |
// convenience theming function for taxonomy lists -- ead 6.10.10 | |
function taxonomy_node_list_terms_by_vocabulary($nid, $voc_id, $link = FALSE, $ul = FALSE) { | |
/* loads a "dummy" node in order to use taxonomy_node_get_terms_by_vocabulary() | |
to get an array of taxonomy terms */ | |
$node = new stdClass(); | |
$node->vid = db_result(db_query("SELECT MAX(vid) FROM {node_revisions} WHERE nid = %d", $nid)); | |
$terms = taxonomy_node_get_terms_by_vocabulary($node, $voc_id); | |
if(!isset($terms) || !is_array($terms) || empty($terms)) { return ''; } | |
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 | |
// $Id: user-profile.tpl.php,v 1.2.2.1 2008/10/15 13:52:04 dries Exp $ | |
/** | |
* @file user-profile.tpl.php | |
* Default theme implementation to present all user profile data. | |
* | |
* This template is used when viewing a registered member's profile page, | |
* e.g., example.com/user/123. 123 being the users ID. | |
* |
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_url_outbound_alter() - from URL Alter module | |
*/ | |
function YOURMODULE_url_outbound_alter(&$path, &$options, $original_path) { | |
// Rewrite paths for rices4peru.com | |
if ($_SERVER['HTTP_HOST'] == "www.rices4peru.com") { | |
$options['absolute'] = 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 | |
// following is excerpted from um_common.module: | |
// service area vid | |
define("SERVICE_AREA_VID", 32); | |
/** | |
* Implements hook_menu() | |
* Creates Gmap rendering callbacks for popups. |
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
<ol> | |
<?php | |
foreach(module_implements("block") as $module) { | |
print "<li>" . $module . "</li>"; | |
} | |
?> | |
</ol> |
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 | |
// $Id: gmap_plugin_style_gmap.inc,v 1.7 2009/02/05 21:51:53 bdragon Exp $ | |
/** | |
* @file | |
* GMap style plugin. | |
*/ | |
/** | |
* Style plugin to render a map. |
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 find_element($form, $element_type) { | |
if (isset($form['#type']) && $form['#type'] == $element_type) { | |
return $form; | |
} | |
else { | |
foreach (element_children($form) as $name) { | |
if (is_array($form[$name])) { | |
$element = find_element($form[$name], $element_type); | |
if ($element !== FALSE) { |