Permalink
Browse files

# [#27812] image float issues. Thanks Andrea.

  • Loading branch information...
1 parent b014e28 commit c948ea2d40ebf2c9387caf94604ecc2f1845d62b @andreatarr andreatarr committed with infograf768 Jan 22, 2012
@@ -399,7 +399,8 @@
label="COM_CONTENT_FLOAT_INTRO_LABEL"
description="COM_CONTENT_FLOAT_DESC">
<option value="right">COM_CONTENT_RIGHT</option>
- <option value="left">COM_CONTENT_LEFT</option>
+ <option value="left">COM_CONTENT_LEFT</option>
+ <option value="none">COM_CONTENT_NONE</option>
</field>
<field
name="float_fulltext"
@@ -408,6 +409,7 @@
description="COM_CONTENT_FLOAT_DESC">
<option value="right">COM_CONTENT_RIGHT</option>
<option value="left">COM_CONTENT_LEFT</option>
+ <option value="none">COM_CONTENT_NONE</option>
</field>
</fieldset>
@@ -17,6 +17,7 @@
$urls = json_decode($this->item->urls);
$canEdit = $this->item->params->get('access-edit');
$user = JFactory::getUser();
+
?>
<div class="item-page<?php echo $this->pageclass_sfx?>">
<?php if ($this->params->get('show_page_heading', 1)) : ?>
@@ -158,16 +159,12 @@
<?php if ($params->get('access-view')):?>
<?php if (isset($images->image_fulltext) and !empty($images->image_fulltext)) : ?>
-<div class="img-fulltext-<?php echo $images->float_fulltext; ?>">
+<?php $imgfloat = (empty($images->float_fulltext)) ? $params->get('float_fulltext') : $images->float_fulltext; ?>
+<div class="img-fulltext-<?php echo htmlspecialchars($imgfloat); ?>">
<img
<?php if ($images->image_fulltext_caption):
echo 'class="caption"'.' title="' .htmlspecialchars($images->image_fulltext_caption) .'"';
endif; ?>
- <?php if (empty($images->float_fulltext)):?>
- style="float:<?php echo $params->get('float_fulltext') ?>"
- <?php else: ?>
- style="float:<?php echo $images->float_fulltext ?>"
- <?php endif; ?>
src="<?php echo htmlspecialchars($images->image_fulltext); ?>" alt="<?php echo htmlspecialchars($images->image_fulltext_alt); ?>"/>
</div>
<?php endif; ?>
@@ -125,16 +125,12 @@
</dl>
<?php endif; ?>
<?php if (isset($images->image_intro) and !empty($images->image_intro)) : ?>
- <div class="img-intro-<?php echo $images->float_intro ?>">
+ <?php $imgfloat = (empty($images->float_intro)) ? $params->get('float_intro') : $images->float_intro; ?>
+ <div class="img-intro-<?php echo htmlspecialchars($imgfloat); ?>">
<img
<?php if ($images->image_intro_caption):
echo 'class="caption"'.' title="' .htmlspecialchars($images->image_intro_caption) .'"';
endif; ?>
- <?php if (!empty($images->image_intro)):?>
- style="float:<?php echo $params->get('float_intro') ?>"
- <?php else: ?>
- style="float:<?php echo $images->float_intro ?>"
- <?php endif; ?>
src="<?php echo htmlspecialchars($images->image_intro); ?>" alt="<?php echo htmlspecialchars($images->image_intro_alt); ?>"/>
</div>
<?php endif; ?>
@@ -123,17 +123,14 @@
<?php endif; ?>
<?php if (isset($images->image_intro) and !empty($images->image_intro)) : ?>
- <div class="img-intro-<?php echo $images->float_intro ?>">
+ <?php $imgfloat = (empty($images->float_intro)) ? $params->get('float_intro') : $images->float_intro; ?>
+
+ <div class="img-intro-<?php echo htmlspecialchars($imgfloat); ?>">
<img
<?php if ($images->image_intro_caption):
- echo 'class="caption"'.' title="' .$images->image_intro_caption .'"';
+ echo 'class="caption"'.' title="' .htmlspecialchars($images->image_intro_caption) .'"';
endif; ?>
- <?php if (empty($images->float_intro)):?>
- style="float:<?php echo $params->get('float_intro') ?>"
- <?php else: ?>
- style="float:<?php echo $images->float_intro ?>"
- <?php endif; ?>
- src="<?php echo $images->image_intro; ?>" alt="<?php echo $images->image_intro_alt; ?>"/>
+ src="<?php echo htmlspecialchars($images->image_intro); ?>" alt="<?php echo htmlspecialchars($images->image_intro_alt); ?>"/>
</div>
<?php endif; ?>
View
@@ -34,6 +34,7 @@ $ -> Language fix or change
$ Updating installation ini files ur-PK, cs-CZ. Adding ml-IN installation
# [#27808] float of full article image is not affected at all. Thanks Ofer
# Correcting encoding ml-IN.xml
+ # [#27812] image float issues. Thanks Andrea.
21-Jan-2012 Jean-Marie Simonet
$ Updating installation ini files tr-TR, ur-PK
@@ -159,12 +159,13 @@
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if (isset($images->image_fulltext) and !empty($images->image_fulltext)) : ?>
- <div class="img-fulltext-"<?php echo htmlspecialchars($images->float_fulltext) ?>">
+ <?php $imgfloat = (empty($images->float_fulltext)) ? $params->get('float_fulltext') : $images->float_fulltext; ?>
+
+ <div class="img-fulltext-"<?php echo htmlspecialchars($imgfloat); ?>">
<img
<?php if ($images->image_fulltext_caption):
echo 'class="caption"'.' title="' .htmlspecialchars($images->image_fulltext_caption) .'"';
endif; ?>
- style="float:<?php echo $images->float_fulltext ?>"
src="<?php echo htmlspecialchars($images->image_fulltext); ?>" alt="<?php echo htmlspecialchars($images->image_fulltext_alt); ?>"/>
</div>
<?php endif; ?>
@@ -129,12 +129,12 @@
</dl>
<?php endif; ?>
<?php if (isset($images->image_intro) and !empty($images->image_intro)) : ?>
- <div class="img-intro-"<?php echo $images->float_intro ?>">
+ <?php $imgfloat = (empty($images->float_intro)) ? $params->get('float_intro') : $images->float_intro; ?>
+ <div class="img-intro-"<?php echo htmlspecialchars($imgfloat); ?>">
<img
<?php if ($images->image_intro_caption):
echo 'class="caption"'.' title="' .htmlspecialchars($images->image_intro_caption) .'"';
endif; ?>
- style="float:<?php echo $images->float_intro ?>"
src="<?php echo htmlspecialchars($images->image_intro); ?>" alt="<?php echo htmlspecialchars($images->image_intro_alt); ?>"/>
</div>
<?php endif; ?>
@@ -134,13 +134,13 @@
<?php endif; ?>
<?php if (isset($images->image_intro) and !empty($images->image_intro)) : ?>
- <div class="img-intro-"<?php echo $images->float_intro ?>">
+ <?php $imgfloat = (empty($images->float_intro)) ? $params->get('float_intro') : $images->float_intro; ?>
+ <div class="img-intro-"<?php echo htmlspecialchars($imgfloat); ?>">
<img
<?php if ($images->image_intro_caption):
- echo 'class="caption"'.' title="' .$images->image_intro_caption .'"';
+ echo 'class="caption"'.' title="' .htmlspecialchars($images->image_intro_caption) .'"';
endif; ?>
- style="float:<?php echo $images->float_intro ?>"
- src="<?php echo $images->image_intro; ?>" alt="<?php echo $images->image_intro_alt; ?>"/>
+ src="<?php echo htmlspecialchars($images->image_intro); ?>" alt="<?php echo htmlspecialchars($images->image_intro_alt); ?>"/>
</div>
<?php endif; ?>
@@ -17,4 +17,34 @@ span.highlight {
background-color:#FFFFCC;
font-weight:bold;
padding:1px 4px;
+}
+
+.img-fulltext-float-right {
+ float: right;
+ margin-left: 10px;
+ margin-bottom: 10px;
+}
+
+.img-fulltext-float-left {
+ float: left;
+ margin-right: 10px;
+ margin-bottom: 10px;
+}
+
+.img-fulltext-float-none {
+}
+
+.img-intro-float-right {
+ float: right;
+ margin-left: 5px;
+ margin-bottom: 5px;
+}
+
+.img-intro-float-left {
+ float: left;
+ margin-right: 5px;
+ margin-bottom: 5px;
+}
+
+.img-intro-float-none {
}

0 comments on commit c948ea2

Please sign in to comment.