image

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'] =

Print Image URL

  1. /**
  2.  *
  3.  * I'm trying render just the URL of an image from a field on a node in D7.
  4.  *
  5.  * The field is named "field_leaderboard_img" and the image style is "leaderboard"
  6.  *
  7.  */
  8.  
  9. <?php print ima

Show all IMAGE fields used in a content type to select - not working

  1.   if (module_exists('content')) {
  2.     $fields = content_types($type->type);
  3.     $fields = (array)$fields['fields'];
  4.  
  5.     $options = array('' => t('None'));
  6.     foreach ($fields as $field_name =>

Fix for Image to imagefield converter

  1. php
  2. /**
  3. * @file
  4. * Migrate all image.module nodes to imagefields in Drupal 6.
  5. *
  6. * PREREQUISITES
  7. * -------------
  8. * - You must create a single imagefield field to which all your images will be mig

Fix for Error on update to Image module 2.x

  1. Drupal database update
  2. user warning: Duplicate entry '181-preview' for key 1 query: INSERT INTO image SELECT DISTINCT f.nid, f.fid, f.filename FROM files f INNER JOIN node n ON f.nid = n.nid WHERE n.

Image to imagefield converter

  1. php
  2. /**
  3. * @file
  4. * Migrate all image.module nodes to imagefields in Drupal 6.
  5. *
  6. * PREREQUISITES
  7. * -------------
  8. * - You must create a single imagefield field to which all your images will be mig

Fix for Overview of new CCK Gallery module

  1. Dependencies:
  2.  
  3. CCK
  4. Nodereference
  5. Imagefield
  6. Filefield
  7. Content Copy
  8. Views
  9. Content Access
  10. ACL
  11. ImageCache
  12. Image API
  13.  
  14. On install:
  15.  
  16. Set up default CCK content type for Image (imagefield and

Error on update to Image module 2.x

  1. Drupal database update

Overview of new CCK Gallery module

  1. Dependencies:
  2.  
  3. CCK
  4. Nodereference
  5. Imagefield
  6. Filefield
  7. Content Copy
  8. Views
  9. Content Access
  10. ACL
  11. ImageCache
  12. Image API
  13.  
  14. On install:
Syndicate content