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 | |
// geocode_update.module | |
/** | |
* Implementation of hook_cron() | |
* | |
* Loads all the locations on the site which have invalid latitude/longitude, | |
* then uses the Google geocoder to update the latitude/longitude, if possible. | |
*/ | |
function geocode_update_cron() { |
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 um_common_form_alter(&$form, $form_state, $form_id) { | |
// hide split teaser on node forms | |
if (isset($form['#node']) && $form_id == $form['#node']->type .'_node_form') { | |
$form['body_field']['teaser_include'] = array( | |
'#type' => 'value', | |
'#value' => TRUE, | |
); | |
} | |
// user login block changes | |
elseif(($form_id == 'user_login_block')) { |
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 | |
define(MODULE_DESCRIPTION, 'Provides tokens that will contain text when a taxonomy term is present. For use with taxonomy module.'); | |
/** | |
* Implements hook_help() | |
* | |
*/ | |
function taxonomy_token_help($path, $arg) { |
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_user(). | |
* Does advanced email validation. | |
*/ | |
function revolven_user($op, &$edit, &$account, $category = NULL) { | |
if($op == "validate") { | |
if($error = adv_email_validate($edit['mail'])) { | |
form_set_error('mail', $error); | |
} | |
} |
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) { |
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
<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 | |
// 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
<?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 | |
// $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. | |
* |
OlderNewer