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 | |
| /** | |
| * User: jralava | |
| * Date: 8/26/2017 | |
| * Time: 8:39 PM | |
| */ | |
| $value1 = 'toto'; | |
| $value2 = 'toot'; |
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 of hook_form_alter() | |
| * | |
| * Filtrer la supression d'un contenu, supression de son propre contenu | |
| */ | |
| function your_module_form_alter(&$form,&$form_state, $form_id) { | |
| global $user; | |
| $user_id = $user->uid; | |
| @$field_uid = strip_tags($form['#node']->field_user_dash_my_doc['und'][0]['uid']); |
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 DDtoDMS($dd) | |
| { | |
| $d = intval(abs($dd)); | |
| $m = intval(($dd - $d) * 60); | |
| $s = intval(($dd - $d - $m/60) * 3600); | |
| return array("deg"=>intval($d),"min"=>intval($m),"sec"=>intval($s)); | |
| } | |
| function DMStoDD($deg,$min,$sec,$cardinaux,$coordonnee) |
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 | |
| /* | |
| * Returns the list of nodes of a given content type as a parameter | |
| * $type: String, id du type de contenu | |
| * return array(), | |
| */ | |
| function utils_load_all_node($type,$autoloadNode = TRUE){ | |
| $query = new EntityFieldQuery(); | |
| $result = $query->entityCondition('entity_type', 'node') | |
| ->entityCondition('bundle', $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
| <?php | |
| //return a taxonomy list of a VID | |
| function litse_taxonomy_term_by_taxonomy_machine_name($machine_name){ | |
| if ($vocabulary = taxonomy_vocabulary_machine_name_load($machine_name)) { | |
| $table_name= array(); | |
| $tree = taxonomy_get_tree($vocabulary->vid); | |
| foreach ($tree as $terms) { | |
| $tid = $terms->tid; | |
| if($tid!=-1){ | |
| $term = taxonomy_term_load($tid); |
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 utils_getCurrentNode(){ | |
| $node = null; | |
| if (arg(0) == 'node' && is_numeric(arg(1))) { | |
| $nid = arg(1); | |
| if ($nid) { | |
| $node = node_load($nid); | |
| } | |
| } | |
| return $node; |
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 my_module_node_insert($node) { | |
| updateHubSocial($node); | |
| } | |
| function my_module_node_update($node) { | |
| updateHubSocial($node); | |
| } | |
| function updateHubSocial($node) { |
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 my_ws_module_services_resource() { | |
| $api = array( | |
| 'my-section' => array( | |
| 'actions' => array( | |
| 'articles' => array( | |
| 'help' => 'Text info.', | |
| 'callback' => 'my_ws_module_services_resource_retrieve', | |
| 'args' => array( | |
| array( |
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
| drush en module_name -y | |
| drush fr module_name --force | |
| drush cc all |
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
| drush dl module_name | |
| drush en module_name -y | |
| drush cc all |
OlderNewer