From 3457166aa3043fc4ccc7d20ce9d947134745b5bf Mon Sep 17 00:00:00 2001 From: thewilkybarkid <chriswilkinson84@gmail.com> Date: Thu, 8 Aug 2013 10:02:24 +0100 Subject: [PATCH] Add image styles --- cambridge_lite.install | 86 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/cambridge_lite.install b/cambridge_lite.install index 53466cc..ba0d21f 100644 --- a/cambridge_lite.install +++ b/cambridge_lite.install @@ -71,6 +71,92 @@ function cambridge_lite_install() { $full_html_format = (object) $full_html_format; filter_format_save($full_html_format); + // Add image styles + + $carousel = image_style_save(array('name' => 'carousel', 'label' => 'Carousel')); + + image_effect_save( + array( + 'name' => 'image_scale', + 'data' => array( + 'width' => 885, + 'height' => NULL, + 'upscale' => TRUE, + ), + 'isid' => $carousel['isid'], + 'weight' => 1, + ) + ); + + image_effect_save( + array( + 'name' => 'image_crop', + 'data' => array( + 'width' => 885, + 'height' => 432, + 'anchor' => 'center-center', + ), + 'isid' => $carousel['isid'], + 'weight' => 2, + ) + ); + + $leading = image_style_save(array('name' => 'leading', 'label' => 'Leading')); + + image_effect_save( + array( + 'name' => 'image_scale', + 'data' => array( + 'width' => 590, + 'height' => NULL, + 'upscale' => TRUE, + ), + 'isid' => $leading['isid'], + 'weight' => 1, + ) + ); + + image_effect_save( + array( + 'name' => 'image_crop', + 'data' => array( + 'width' => 590, + 'height' => 288, + 'anchor' => 'center-center', + ), + 'isid' => $leading['isid'], + 'weight' => 2, + ) + ); + + $inline = image_style_save(array('name' => 'inline', 'label' => 'Inline/teaser')); + + image_effect_save( + array( + 'name' => 'image_scale', + 'data' => array( + 'width' => 250, + 'height' => NULL, + 'upscale' => TRUE, + ), + 'isid' => $inline['isid'], + 'weight' => 1, + ) + ); + + image_effect_save( + array( + 'name' => 'image_crop', + 'data' => array( + 'width' => 250, + 'height' => 250, + 'anchor' => 'center-center', + ), + 'isid' => $inline['isid'], + 'weight' => 2, + ) + ); + // Add content types. $types = array( -- GitLab