This is the code in index.php calling the positions:
Code:
<?php
$spotlight = array ('user1','user2','top','user5');
$botsl = $tmpTools->calSpotlight ($spotlight,99,22);
if( $botsl ) :
?>
<!-- BEGIN: CONTENT BOTTOM -->
<div id="ja-botslwrap">
<div id="ja-botsl" class="clearfix">
<?php if( $this->countModules('user1') ): ?>
<div class="ja-box<?php echo $botsl['user1']['class']; ?>" style="width: <?php echo $botsl['user1']['width']; ?>;">
<jdoc:include type="modules" name="user1" style="xhtml" />
</div>
<?php endif; ?>
<?php if( $this->countModules('user2') ): ?>
<div class="ja-box<?php echo $botsl['user2']['class']; ?>" style="width: <?php echo $botsl['user2']['width']; ?>;">
<jdoc:include type="modules" name="user2" style="xhtml" />
</div>
<?php endif; ?>
<?php if( $this->countModules('top') ): ?>
<div class="ja-box<?php echo $botsl['top']['class']; ?>" style="width: <?php echo $botsl['top']['width']; ?>;">
<jdoc:include type="modules" name="top" style="xhtml" />
</div>
<?php endif; ?>
<?php if( $this->countModules('user5') ): ?>
<div class="ja-box<?php echo $botsl['user5']['class']; ?>" style="width: <?php echo $botsl['user5']['width']; ?>;">
<jdoc:include type="modules" name="user5" style="xhtml" />
</div>
<?php endif; ?>
</div>
</div>
<!-- END: CONTENT BOTTOM -->
<?php endif; ?>
These are all ja-box-something classes defined in template_css.css:
Code:
.ja-box-full, .ja-box-left, .ja-box-center, .ja-box-right {
float: left;
overflow: hidden;
}
.ja-box-left div.moduletable,
.ja-box-full div.moduletable {
padding-right: 30px;
background: none;
}
.ja-box-right div.moduletable {
padding-left: 30px;
/*background: url(../images/vdot2.gif) repeat-y left;*/
}
.ja-box-center div.moduletable {
padding: 0 30px;
/*background: url(../images/vdot2.gif) repeat-y left;*/
}
Finally, this is the code in ja_templatetools.php:
Code:
function calSpotlight ($spotlight, $totalwidth=100, $firstwidth=0) {
/********************************************
$spotlight = array ('position1', 'position2',...)
*********************************************/
$modules = array();
$modules_s = array();
foreach ($spotlight as $position) {
if( $this->_tpl->countModules ($position) ){
$modules_s[] = $position;
}
$modules[$position] = array('class'=>'-full', 'width'=>$totalwidth);
}
if (!count($modules_s)) return null;
if ($firstwidth) {
if (count($modules_s) > 1) {
$width = round(($totalwidth-$firstwidth)/(count($modules_s)-1),1) . "%";
$firstwidth = $firstwidth . "%";
}else{
$firstwidth = $totalwidth . "%";
}
}else{
$width = round($totalwidth/(count($modules_s)),1) . "%";
$firstwidth = $width;
}
if (count ($modules_s) > 1){
$modules[$modules_s[0]]['class'] = "-left";
$modules[$modules_s[0]]['width'] = $firstwidth;
$modules[$modules_s[count ($modules_s) - 1]]['class'] = "-right";
$modules[$modules_s[count ($modules_s) - 1]]['width'] = $width;
for ($i=1; $i<count ($modules_s) - 1; $i++){
$modules[$modules_s[$i]]['class'] = "-center";
$modules[$modules_s[$i]]['width'] = $width;
}
}
return $modules;
}
So, in summary, it's not a CSS thing, it's something in this code.
Any ideas?
Bookmarks