From 65a0d8e09d7972b0c1ffab2473214ca8f6de7ba7 Mon Sep 17 00:00:00 2001 From: arty Date: Fri, 4 Dec 2015 09:30:37 +0000 Subject: [PATCH] imageblock fix --- sites/all/modules/imageblock/imageblock-content.tpl.php | 8 +++++++- sites/all/modules/imageblock/imageblock.module | 13 +++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/sites/all/modules/imageblock/imageblock-content.tpl.php b/sites/all/modules/imageblock/imageblock-content.tpl.php index fbad767..059851e 100644 --- a/sites/all/modules/imageblock/imageblock-content.tpl.php +++ b/sites/all/modules/imageblock/imageblock-content.tpl.php @@ -13,7 +13,8 @@ * @see template_preprocess_imageblock_content() */ ?> - +data);?> +
@@ -24,3 +25,8 @@ + +
+ +
+ \ No newline at end of file diff --git a/sites/all/modules/imageblock/imageblock.module b/sites/all/modules/imageblock/imageblock.module index 1f97706..3c4910e 100644 --- a/sites/all/modules/imageblock/imageblock.module +++ b/sites/all/modules/imageblock/imageblock.module @@ -112,6 +112,9 @@ function imageblock_block_save($delta = '', $edit = array()) { if (!empty($edit['imageblock_link_target'])) { $data['imageblock_link_target'] = $edit['imageblock_link_target']; } + if (!empty($edit['imageblock_image_position'])) { + $data['imageblock_image_position'] = $edit['imageblock_image_position']; + } $old_file = imageblock_get_file($delta); if (!empty($edit['imageblock_file'])) { @@ -252,6 +255,16 @@ function imageblock_configure_form(&$form, $block = NULL) { '#default_value' => isset($data['imageblock_link_target']) ? $data['imageblock_link_target'] : '_self', '#weight' => isset($form['body_field']['#weight']) ? $form['body_field']['#weight'] - 0.2 : 0, ); + $form['imageblock_image_position'] = array( + '#type' => 'select', + '#title' => t('Image position'), + '#description' => t('Select image postition - before or after body'), + '#options' => array( + 'before' => 'before', + 'after' => 'after', + ), + '#default_value' => isset($data['imageblock_image_position']) ? $data['imageblock_image_position'] : 'before', + ); if (module_exists('image')) { $options = array(); -- 2.1.0