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 customModule_views_pre_render(&$view) { | |
| if ($view->name == 'view_name' && $view->current_display == 'display_id') { | |
| // Here you can do any php you want to get the title you need for your view. | |
| $view->build_info['title'] = "My custom title!"; | |
| } | |
| } |
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
| var w = window.open(jQuery(this).attr('href'), 'real-size-photo', 'width=500,height=500'); | |
| w.moveTo(0, 0); | |
| if (document.all) { | |
| w.resizeTo(screen.availWidth, screen.availHeight); | |
| } | |
| else { | |
| if (document.layers || document.getElementById) { | |
| if (w.outerHeight < screen.availHeight || w.outerWidth < screen.availWidth) { | |
| w.outerHeight = top.screen.availHeight; |
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 | |
| $field = field_info_field('field_name'); | |
| $allowed_values = list_allowed_values($field); |
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 | |
| /** | |
| * Basic Node Creation Example for Drupal 7 | |
| * | |
| * This example: | |
| * - Assumes a standard Drupal 7 installation | |
| * - Does not verify that the field values are correct | |
| */ | |
| $body_text = 'This is the body text I want entered with the 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 | |
| //This will generate a random password, you could set your own here | |
| $password = user_password(8); | |
| //set up the user fields | |
| $fields = array( | |
| 'name' => 'user_name', | |
| 'mail' => 'user_name@example.com', | |
| 'pass' => $password, | |
| 'status' => 1, |
NewerOlder