fields

Code to change image style to the image style set in another field.

  1. function mymodule_field_display_alter(&$display, $context) {
  2.   // If the field is an image, then change the display settings depending on the value of the image size choice.
  3.   if ($display['type'] =

Views 2 get all field names

  1. // Put this inside a views-view-fields--VIEWNAME.tpl.php file to show the names of all the fields. Remember to set your view's row style to fields.
  2. $field_keys = array();

Readonly module

  1. <?php
  2. // $Id$
  3. function readonly_menu() {
  4.   $items = array();
  5.   $items['admin/settings/readonly'] = array(
  6.     'title' => t('Read Only'),
  7.     'description' => t('Which profile fields'),
Syndicate content