You are here

README.txt in Image Field Caption 7

Same filename and directory in other branches
  1. 8 README.txt
  2. 7.2 README.txt
|=====================|
| Image Field Caption |
|=====================|

  Provides a caption text area for image fields.

|==============|
| Installation |
|==============|

  1. Download the module
  2. Upload module to the sites/all/modules folder
  3. Enable the module
  4. Flush all of Drupal's caches

|=======|
| Usage |
|=======|

  1. Add a new image field to a content type, or use an existing image field
  2. Add or edit a node with an image field
  3. Go to the image field on the node form
  4. Enter text into the caption text area
  5. Save the node
  6. View the node to see your image field caption

|===============|
| Configuration |
|===============|

  Visit: Configuration -> Media -> Image Field Caption
  
  Or go to: admin/config/media/image-field-caption

|===============|
| Caption Theme |
|===============|

  By default, an image field's caption will be rendered below the image. To
  customize the image caption display, copy the image_field_caption.tpl.php file
  to your theme's directory and adjust the html for your needs. Flush Drupal's
  theme registry cache to have it recognize your theme's new file:

  sites/all/themes/MY_THEME/image_field_caption.tpl.php
  
|=============|
| Caption CSS |
|=============|

  To make changes to the caption css, use this CSS selector:

  blockquote.image_field_caption { /* add custom css here */ }

|=================================================|
| Programmatically Rendering Images with Captions |
|=================================================|

  // Original Image.
  $image = theme('image', array(
    'path' => 'public://my_image.jpg',
    'alt' => 'My Image Alt Text',
    'title' => 'My Image Title Text',
    'caption' => 'My Image Caption Text',
  ));

  // Thumbnail Mmage.
  $image = theme('image_style', array(
    'path' => 'public://my_image.jpg',
    'style_name' => 'thumbnail',
    'alt' => 'My Image Alt Text',
    'title' => 'My Image Title Text',
    'caption' => 'My Image Caption Text',
  ));

|==================|
| Colorbox Support |
|==================|

  To enable the use of Image Field Caption with the Colorbox module:
  
    1. Go to the 'Manage display' page for your content type, for example:
         Structure -> Content types -> Article -> Manage display
    2. Change the 'Format' to 'Colorbox' for your image field
    3. Click the gear icon to adjust the 'Format settings' for Colorbox
    4. Under 'Caption', select 'Custom (with tokens)'
    5. In the 'Custom caption' field, enter this token: [file:caption]
    6. Click the 'Update' button, then the 'Save' button

|==================|
| More Information |
|==================|

  http://www.drupal.org/project/image_field_caption
  http://www.tylerfrankenstein.com/image_field_caption

File

README.txt
View source
  1. |=====================|
  2. | Image Field Caption |
  3. |=====================|
  4. Provides a caption text area for image fields.
  5. |==============|
  6. | Installation |
  7. |==============|
  8. 1. Download the module
  9. 2. Upload module to the sites/all/modules folder
  10. 3. Enable the module
  11. 4. Flush all of Drupal's caches
  12. |=======|
  13. | Usage |
  14. |=======|
  15. 1. Add a new image field to a content type, or use an existing image field
  16. 2. Add or edit a node with an image field
  17. 3. Go to the image field on the node form
  18. 4. Enter text into the caption text area
  19. 5. Save the node
  20. 6. View the node to see your image field caption
  21. |===============|
  22. | Configuration |
  23. |===============|
  24. Visit: Configuration -> Media -> Image Field Caption
  25. Or go to: admin/config/media/image-field-caption
  26. |===============|
  27. | Caption Theme |
  28. |===============|
  29. By default, an image field's caption will be rendered below the image. To
  30. customize the image caption display, copy the image_field_caption.tpl.php file
  31. to your theme's directory and adjust the html for your needs. Flush Drupal's
  32. theme registry cache to have it recognize your theme's new file:
  33. sites/all/themes/MY_THEME/image_field_caption.tpl.php
  34. |=============|
  35. | Caption CSS |
  36. |=============|
  37. To make changes to the caption css, use this CSS selector:
  38. blockquote.image_field_caption { /* add custom css here */ }
  39. |=================================================|
  40. | Programmatically Rendering Images with Captions |
  41. |=================================================|
  42. // Original Image.
  43. $image = theme('image', array(
  44. 'path' => 'public://my_image.jpg',
  45. 'alt' => 'My Image Alt Text',
  46. 'title' => 'My Image Title Text',
  47. 'caption' => 'My Image Caption Text',
  48. ));
  49. // Thumbnail Mmage.
  50. $image = theme('image_style', array(
  51. 'path' => 'public://my_image.jpg',
  52. 'style_name' => 'thumbnail',
  53. 'alt' => 'My Image Alt Text',
  54. 'title' => 'My Image Title Text',
  55. 'caption' => 'My Image Caption Text',
  56. ));
  57. |==================|
  58. | Colorbox Support |
  59. |==================|
  60. To enable the use of Image Field Caption with the Colorbox module:
  61. 1. Go to the 'Manage display' page for your content type, for example:
  62. Structure -> Content types -> Article -> Manage display
  63. 2. Change the 'Format' to 'Colorbox' for your image field
  64. 3. Click the gear icon to adjust the 'Format settings' for Colorbox
  65. 4. Under 'Caption', select 'Custom (with tokens)'
  66. 5. In the 'Custom caption' field, enter this token: [file:caption]
  67. 6. Click the 'Update' button, then the 'Save' button
  68. |==================|
  69. | More Information |
  70. |==================|
  71. http://www.drupal.org/project/image_field_caption
  72. http://www.tylerfrankenstein.com/image_field_caption