-
AuthorPosts
-
cgc0202 Friend
cgc0202
- Join date:
- August 2007
- Posts:
- 2244
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 206
- Thanked:
- 262 times in 1 posts
March 10, 2009 at 7:14 pm #138973EDIT: How can this thread be marked SOLVED (not just answered)? Thanks to Menalto and Scotty.
****************
Hello,I created a new LEFT COLUMN position to the left of the “PRIMARY COLUMN” and it seems to work. There are not three columns in the Teline II template body as shown here:
Sandbox
http://joomlart.bayanihan-saranay.org/jte15x099/One main issue, even when there is no content (in the LEFT COLUMN), , it does not collapse.like the other positions I created before.
You can check this by clicking any article. The content in the LEFT COLUMN disappears, but not the space, as it should, if it is collapsible.
Question What script is needed to make it collapsible?
Cornelio
Notes: Most of the other modules that have no bearing on the layout were ‘UNPUBLISHED to remove complications.
Here are some specifics. Any suggestions on how best to add a new LEFT COLUMN position that is more stable (i.e., the layout will not unravel) will be much appreciated also. Thanks. — CGC
The script added to the index.php
<[PHP]!– BEGIN: *** left column position module site *** –>
<div id=”iblab-lefcolwrap”>
<div class=”iblab-lefcol”>
<jdoc:include type=”modules” name=”iblab-lefcol” style=”xhtml” /></div>
</div><!– END: left column position module site –>[/PHP]
Key CSS modifications or new ones in the template.css
/* LEFT COLUMN
——————————————————— */
#iblab-lefcolwrap
{
clear: both;
display:block;
float: left;
overflow: hidden;
padding: 0px 0px 0px 2px;
width: 12%;} /* Note: New */
.iblab-lefcol, .iblab-lefcol a
{
text-align: left;
font-size: 90%;
font-color: 000000:
} /* Note: New *//* PRIMARY COLUMN
——————————————————— */
#ja-content
{
display: block;
width: 69%;
float: left;} /* Note: Width changed also float: left; */
#ja-content div.ja-innerpad
{
width: 85%;
float: right;
padding: 0px 5px 0px 10px;} /* Note: Width changed also float: right; */
/* COLUMNS
——————————————————— */
#ja-colwrap
{
float: right;
overflow: hidden;
width: 29.9%;} /* Note: Width changed */
scotty Friendscotty
- Join date:
- March 2008
- Posts:
- 2339
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 76
- Thanked:
- 827 times in 595 posts
March 10, 2009 at 7:23 pm #295272Try this…
[php]<!– BEGIN: *** left column position module site *** –>
<?php if ($this->countModules(‘iblab-lefcol’)) { ?>
<div id=”iblab-lefcolwrap”>
<div class=”iblab-lefcol”>
<jdoc:include type=”modules” name=”iblab-lefcol” style=”xhtml” /></div>
</div>
<?php } ?>
<!– END: left column position module site –>
[/php]cgc0202 Friendcgc0202
- Join date:
- August 2007
- Posts:
- 2244
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 206
- Thanked:
- 262 times in 1 posts
March 10, 2009 at 8:27 pm #295276<em>@scotty 116875 wrote:</em><blockquote>Try this…
[php]<!– BEGIN: *** left column position module site *** –>
<?php if ($this->countModules(‘iblab-lefcol’)) { ?>
<div id=”iblab-lefcolwrap”>
<div class=”iblab-lefcol”>
<jdoc:include type=”modules” name=”iblab-lefcol” style=”xhtml” /></div>
</div>
<?php } ?>
<!– END: left column position module site –>
[/php]</blockquote>Thanks for responding Scotty,
I added the script. However, so far, it is still not collapsing — the width assigned to the LEFT COLUMN is still rerained –even if the left column is empty.
I saw similar similar scripts, like the mino “left” and “right” columns positions (the scripts are shown below) — almost similar to what you suggested. Obviously, the scriot below work. So, there are some more scripts missing.
[PHP]<div id=”ja-cols” class=”clearfix”>
<?php if ($ja_left) { ?>
<div id=”ja-col1″>
<div class=”ja-innerpad”>
<jdoc:include type=”modules” name=”left” style=”xhtml” />
</div>
</div>
<?php } ?><?php if ($ja_right) { ?>
<div id=”ja-col2″>
<div class=”ja-innerpad”>
<jdoc:include type=”modules” name=”right” style=”xhtml” />
</div>
</div>
<?php } ?>
</div></div><br />
<!– END: COLUMNS –>
<?php } ?>[/PHP]Cornelio
Here’s the entire index.php, in case anyone wants to jump in.
[PHP]<?php
/*————————————————————————
# JA Teline II for Joomla 1.5 – Version 1.6 – Licence Owner JA81276
# ————————————————————————
# Copyright (C) 2004-2008 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
# @license – Copyrighted Commercial Software
# Author: J.O.O.M Solutions Co., Ltd
# Websites: http://www.joomlart.com – http://www.joomlancers.com
# This file may not be redistributed in whole or significant part.
# Revised CGC treasures-of-the-internet.org 20080925
————————————————————————-*/// no direct access
defined( ‘_JEXEC’ ) or die( ‘Restricted access’ );include_once (dirname(__FILE__).DS.’ja_vars_1.5.php’);
?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”<?php echo $this->language; ?>” lang=”<?php echo $this->language; ?>”>
<head>
<jdoc:include type=”head” />
<?php JHTML::_(‘behavior.mootools’); ?><link rel=”stylesheet” href=”<?php echo $tmpTools->baseurl(); ?>templates/system/css/system.css” type=”text/css” />
<link rel=”stylesheet” href=”<?php echo $tmpTools->baseurl(); ?>templates/system/css/general.css” type=”text/css” />
<link rel=”stylesheet” href=”<?php echo $tmpTools->templateurl(); ?>/css/editor.css” type=”text/css” /><link rel=”stylesheet” href=”<?php echo $tmpTools->templateurl(); ?>/highslide/highslide.css” type=”text/css” />
<link rel=”stylesheet” href=”<?php echo $tmpTools->templateurl(); ?>/css/template.css” type=”text/css” />
<link rel=”stylesheet” href=”<?php echo $tmpTools->templateurl(); ?>/css/typo.css” type=”text/css” />
<link rel=”stylesheet” href=”<?php echo $tmpTools->templateurl(); ?>/css/ja.news.css” type=”text/css” />
<link href=”<?php echo $tmpTools->templateurl(); ?>/mootabs/mootabs1.2.css” rel=”stylesheet” type=”text/css” />
<script language=”javascript” type=”text/javascript” src=”<?php echo $tmpTools->templateurl(); ?>/js/ja.script.js”></script><script language=”javascript” type=”text/javascript” src=”<?php echo $tmpTools->templateurl(); ?>/highslide/swfobject.js”></script>
<script language=”javascript” type=”text/javascript” src=”<?php echo $tmpTools->templateurl(); ?>/highslide/highslide-full.js”></script><!– Menu head –>
<?php $jamenu->genMenuHead(); ?><link href=”<?php echo $tmpTools->templateurl(); ?>/css/colors/theme<?php echo $tmpTools->getThemeForSection(); ?>.css” rel=”stylesheet” type=”text/css” />
<!–>
<style type=”text/css”>
.clearfix {height: 1%;}
img {border: none;}
</style>
<!–><!–>
<style type=”text/css”>
.clearfix {display: inline-block;}
</style>
<!–><?php if ($tmpTools->isIE6()) { ?>
<!–>
<script type=”text/javascript”>
var siteurl = ‘<?php echo $tmpTools->baseurl();?>’;
</script>
<!–>
<?php } ?><script type=”text/javascript”>
hs.graphicsDir = ‘<?php echo $tmpTools->templateurl(); ?>/highslide/graphics/’;
hs.showCredits = true; // you can set this to false if you want
hs.creditsText = ‘Powered by JA Highslide’;
hs.creditsHref = ‘http://joomlart.com/’;
hs.creditsTitle =’Go to the Highslide JA homepage’;
</script></head>
<!– BEGIN: TOP Section –>
<?php include(“top.php”); ?>
<!– END: TOP Section –>
<!– END: HEADER –>
<!– BEGIN: MAIN NAVIGATION –>
<div id=”ja-mainnavwrap”>
<div id=”ja-mainnav” class=”clearfix”>
<?php $jamenu->genMenu (0); ?>
</div>
</div>
<?php if ($hasSubnav) { ?>
<div id=”ja-subnavwrap”>
<div id=”ja-subnav” class=”clearfix”>
<?php $jamenu->genMenu (1,1); ?>
</div>
</div>
<?php } ?>
<!– END: MAIN NAVIGATION –><div id=”ja-containerwrap<?php echo $divid; ?>” class=”clearfix”>
<div id=”ja-container”>
<div id=”ja-container-inner” class=”clearfix”>
<!– BEGIN: CONTENT –>
<div id=”ja-content”><!– BEGIN: *** left column position module site *** –>
<?php if ($this->countModules(‘iblab-lefcol’)) { ?>
<div id=”iblab-lefcolwrap”>
<div class=”iblab-lefcol”><jdoc:include type=”modules” name=”iblab-lefcol” style=”xhtml” />
</div>
</div>
<?php } ?><!– END: left column position module site –>
<div class=”ja-innerpad clearfix”>
<jdoc:include type=”message” />
<?php if(!$tmpTools->isFrontPage()) : ?>
<div id=”ja-pathway”>
<jdoc:include type=”module” name=”breadcrumbs” />
</div>
<?php endif ; ?><div id=”ja-current-content”>
<?php if(!$tmpTools->isFrontPage()) : ?>
<jdoc:include type=”component” />
<?php endif; ?><!– BEGIN: JAZIN –>
<?php if($tmpTools->isFrontPage()) : ?>
<div id=”jazin-fp”>
<jdoc:include type=”modules” name=”ja-news” style=”raw” />
</div>
<?php endif; ?>
<!– END: JAZIN –></div>
<?php
$spotlight = array (‘user8′,’user9’);
$botsl = $tmpTools->calSpotlight ($spotlight,$tmpTools->isOP()?100:99.9);
if( $botsl ) {
?>
<!– BEGIN: BOTTOM SPOTLIGHT –>
<div id=”ja-botsl” class=”clearfix”><?php if( $this->countModules(‘user8’) ) {?>
<div class=”ja-box<?php echo $botsl[‘user8’][‘class’]; ?>” style=”width: <?php echo $botsl[‘user8’][‘width’]; ?>;”>
<jdoc:include type=”modules” name=”user8″ style=”xhtml” />
</div>
<?php } ?><?php if( $this->countModules(‘user9’) ) {?>
<div class=”ja-box<?php echo $botsl[‘user9’][‘class’]; ?>” style=”width: <?php echo $botsl[‘user9’][‘width’]; ?>;”>
<jdoc:include type=”modules” name=”user9″ style=”xhtml” />
</div>
<?php } ?></div>
<!– END: BOTTOM SPOTLIGHT –>
<?php } ?><?php if($this->countModules(‘banner’)) : ?>
<!– BEGIN: BANNER –>
<div id=”ja-banner”>
<jdoc:include type=”modules” name=”banner” />
</div>
<!– END: BANNER –>
<?php endif; ?></div>
</div>
<!– END: CONTENT –><?php if ($ja_left || $ja_right || $ja_masscol) { ?>
<!– BEGIN: COLUMNS –>
<div id=”ja-colwrap”><?php if ($ja_masscol) { ?>
<!– BEGIN: MASSCOL –>
<div id=”ja-colmass” class=”clearfix”>
<div class=”ja-innerpad”><jdoc:include type=”modules” name=”user5″ style=”xhtml” />
<?php if ($this->countModules(‘user6’)) : ?>
<script language=”javascript” type=”text/javascript” src=”<?php echo $tmpTools->templateurl(); ?>/mootabs/mootabs1.2.js”></script>
<script type=”text/javascript”>
window.addEvent(‘load’, initmootabs);
function initmootabs() {
myTabs1 = new jamootabs(‘ja-tabs’, {
<?php echo $ja_mootabs_options; ?>
});
}
</script>
<div id=”ja-tabswrap”>
<div id=”ja-tabs” class=”clearfix”>
<div class=”ja-tab-panels”>
<jdoc:include type=”modules” name=”user6″ style=”xhtml” />
</div>
</div>
</div>
<?php endif; ?><jdoc:include type=”modules” name=”user7″ style=”xhtml” />
</div>
</div>
<!– END: MASSCOL –>
<?php } ?><div id=”ja-cols” class=”clearfix”>
<?php if ($ja_left) { ?>
<div id=”ja-col1″>
<div class=”ja-innerpad”>
<jdoc:include type=”modules” name=”left” style=”xhtml” />
</div>
</div>
<?php } ?><?php if ($ja_right) { ?>
<div id=”ja-col2″>
<div class=”ja-innerpad”>
<jdoc:include type=”modules” name=”right” style=”xhtml” />
</div>
</div>
<?php } ?>
</div></div><br />
<!– END: COLUMNS –>
<?php } ?></div></div></div>
<!– BEGIN: Bottom Section –>
<?php include(“bottom.php”); ?>
<!– END: Bottom Section –></body>
</html>
[/PHP]scotty Friendscotty
- Join date:
- March 2008
- Posts:
- 2339
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 76
- Thanked:
- 827 times in 595 posts
March 10, 2009 at 8:31 pm #295277cgc0202;116879the width assigned to the LEFT COLUMN is still rerained –even if the left column is empty.
Is this because you have floated the other DIV right and reduced the width of it? In other words the LEFT col is not rendered but appears as if it is because of the styling on the rest of the page.
scotty Friendscotty
- Join date:
- March 2008
- Posts:
- 2339
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 76
- Thanked:
- 827 times in 595 posts
March 10, 2009 at 8:37 pm #295278OK I’ve tested my script an it does work. If no modules are published to the iblab-lefcol position then the position is not rendered.
So the problem is styling.
I’m working on that…..
scotty Friendscotty
- Join date:
- March 2008
- Posts:
- 2339
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 76
- Thanked:
- 827 times in 595 posts
March 10, 2009 at 9:52 pm #295292I think you need to write in some PHP that dynamically determines the width. This would be common for horizontal module positions where you could have 2 or 3 positions beside each other. Like User 8 & 9 positions in Teline.
[php]<?php
$spotlight = array (‘user8′,’user9’);
$botsl = $tmpTools->calSpotlight ($spotlight,$tmpTools->isOP()?100:99.9);
if( $botsl ) {
?>
<!– BEGIN: BOTTOM SPOTLIGHT –>
<div id=”ja-botsl” class=”clearfix”><?php if( $this->countModules(‘user8’) ) {?>
<div class=”ja-box<?php echo $botsl[‘user8’][‘class’]; ?>” style=”width: <?php echo $botsl[‘user8’][‘width’]; ?>;”>
<jdoc:include type=”modules” name=”user8″ style=”xhtml” />
</div>
<?php } ?><?php if( $this->countModules(‘user9’) ) {?>
<div class=”ja-box<?php echo $botsl[‘user9’][‘class’]; ?>” style=”width: <?php echo $botsl[‘user9’][‘width’]; ?>;”>
<jdoc:include type=”modules” name=”user9″ style=”xhtml” />
</div>
<?php } ?></div>
<!– END: BOTTOM SPOTLIGHT –>
<?php } ?>[/php]The array at the start and the <?php echo $botsl[‘user8’][‘width’]; ?> calculates the width. I’m afraid adapting this for your purposes is still beyond my PHP abilities.There is some good info here on collapsable positions…. http://docs.joomla.org/Collapsing_columns
cgc0202 Friendcgc0202
- Join date:
- August 2007
- Posts:
- 2244
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 206
- Thanked:
- 262 times in 1 posts
March 10, 2009 at 11:34 pm #295319You are correct Scotty,
There is a script that is needed to detect that if there is an emoty position, the script would instruct the remaining positions to ignore the “fixed” width and occupy the empty space. That is the script that I do not know myself.
In the Teline II layout Body
The two major left and right are “ja-content” (align left) and “ja-colwrap” (align right) wrapped as one by ja-container:
[PHP]<div id=”ja-container”>
<div id='”ja-content”>
</div>
<div id='”ja-colwrap”>:
</div>
</div>
[/PHP]Within ja-content, the two major sub-columns are the “iblab-lefcol” (align left) and “‘ja-innerpad” (align right)
[PHP]<div id=”ja-content”>
<div id='”iblab-lefcol”>
</div>
<div id=’ja-innerpad”>:
</div>
</div>
[/PHP]Some scrip(s) or even perhaps CSS tags are missing. I do not know it myself. I hope someone with more expertise in CSS, php and layouting help.
Cornelio
<em>@scotty 116898 wrote:</em><blockquote>I think you need to write in some PHP that dynamically determines the width. This would be common for horizontal module positions where you could have 2 or 3 positions beside each other. Like User 8 & 9 positions in Teline.
[php]<?php
$spotlight = array (‘user8′,’user9’);
$botsl = $tmpTools->calSpotlight ($spotlight,$tmpTools->isOP()?100:99.9);
if( $botsl ) {
?>
<!– BEGIN: BOTTOM SPOTLIGHT –>
<div id=”ja-botsl” class=”clearfix”><?php if( $this->countModules(‘user8’) ) {?>
<div class=”ja-box<?php echo $botsl[‘user8’][‘class’]; ?>” style=”width: <?php echo $botsl[‘user8’][‘width’]; ?>;”>
<jdoc:include type=”modules” name=”user8″ style=”xhtml” />
</div>
<?php } ?><?php if( $this->countModules(‘user9’) ) {?>
<div class=”ja-box<?php echo $botsl[‘user9’][‘class’]; ?>” style=”width: <?php echo $botsl[‘user9’][‘width’]; ?>;”>
<jdoc:include type=”modules” name=”user9″ style=”xhtml” />
</div>
<?php } ?></div>
<!– END: BOTTOM SPOTLIGHT –>
<?php } ?>[/php]The array at the start and the <?php echo $botsl[‘user8’][‘width’]; ?> calculates the width. I’m afraid adapting this for your purposes is still beyond my PHP abilities.There is some good info here on collapsable positions…. http://docs.joomla.org/Collapsing_columns</blockquote>
scotty Friendscotty
- Join date:
- March 2008
- Posts:
- 2339
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 76
- Thanked:
- 827 times in 595 posts
March 12, 2009 at 12:38 am #295491There is a script that is needed to detect that if there is an emoty position, the script would instruct the remaining positions to ignore the “fixed” width and occupy the empty space. That is the script that I do not know myself.
I’ve got this to work. But I’ve some tidying up to do before I post it.
Basically what I did was write a conditional statement like…
<php If module in left>
<mod position>
<php endif><php If module in left>
<content id="content-80%-float right">
<php else>
<content id="content-100%>
<php endif>
Then write two alternative IDs in the CSS for each condition.The problem is it messes up the content in the ja-col (Left and right cols) because it gets squashed when there is a 3rd column. So what I have to do is make ja-col a fixed with so it;s the same whether there is a 3rd column or not and make the main content area the ‘fluid’ part.
You will still have to be careful though that content in the main content area is suitable to be wide and/or narrow. Otherwise you could publish something that looks great in full width but when you enable the new left column it will become distorted.
I’ll post it sometime tomorrow night (GMT).
cgc0202 Friendcgc0202
- Join date:
- August 2007
- Posts:
- 2244
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 206
- Thanked:
- 262 times in 1 posts
March 12, 2009 at 6:48 am #295544Thanks scotty for your continued interest to help solve this. I sure wish Joomlart takes a more active role. They have been completely silent.
<em>@scotty 117139 wrote:</em><blockquote>I’ve got this to work. But I’ve some tidying up to do before I post it.
Basically what I did was write a conditional statement like…
<php If module in left>
<mod position>
<php endif><php If module in left>
<content id="content-80%-float right">
<php else>
<content id="content-100%>
<php endif>
Then write two alternative IDs in the CSS for each condition.
</blockquote>I was doing that. I introduced a new CSS tag
#iblab-cols
{
clear: both;
width: 70%;
float: left;}
other than the others I cited above. Technically, the width of “#iblab-cols” should be 100%, but as I will explain in my response to your other concern below, if “ja-cols=30%” (as defined in the Joomlart CSS) the full width of the content to the left of the “ja-cols” is around “70%”
<em>@scotty 117139 wrote:</em><blockquote>
The problem is it messes up the content in the ja-col (Left and right cols) because it gets squashed when there is a 3rd column. So what I have to do is make ja-col a fixed with so it;s the same whether there is a 3rd column or not and make the main content area the ‘fluid’ part.
</blockquote>
This is something I know how to solve. As I responded in #7, the way around avoiding a third (middle) column is to use ‘nested divs” layout — with just two columns (one float left and one float right) at each level.
The First (main) Level of Nested Divs in the Body
iblab-cols <== “float left” as specified in the CSS (I set at 70%)
ja-cols <== “float right” as specified in the CSS (I set at 28.9%)The Second Level of Nested Divs in the “iblab-cols” of the Body
This will be contained in the iblab-cols left column in the First Level.iblab-leftcol <== “float left” as specified in the CSS (I set at 12%)
ja-content <== “float right” as specified in the CSS (I set at 87%)The “nested divs” layout strategy is more easy to track in terms of the “divs” opening and closing tags, and the CSS much easier to setup than introducing a “middle column”. Also, I think it is more stable.
<em>@scotty 117139 wrote:</em><blockquote>
You will still have to be careful though that content in the main content area is suitable to be wide and/or narrow. Otherwise you could publish something that looks great in full width but when you enable the new left column it will become distorted.
</blockquote>Yeah, this is the tricky part. The way I configured it, the “Home page would be more or less just the one that will have the “iblab-leftcol”. All articles revert back to the two main columns. Basically, if this layout is adopted, the main consideration from those that I am doing that could mess the layout would be the images in the frontpage module. But the JA News Frontpage and JA News, I found out already takes care of this — by the set width limits in the modules Admin page.
Actually, if I am not too anal about the aesthetics of the layout, the three fixed columns for the “iblab-leftcol”, “ja-content” and “ja-cols” should be fine.
Cornelio
Menalto FriendMenalto
- Join date:
- May 2007
- Posts:
- 4736
- Downloads:
- 0
- Uploads:
- 43
- Thanks:
- 2
- Thanked:
- 531 times in 361 posts
March 12, 2009 at 8:50 am #295556Try with this index.php file
<?php
/*------------------------------------------------------------------------
# JA Teline II for Joomla 1.5 - Version 1.6 - Licence Owner JA81276
# ------------------------------------------------------------------------
# Copyright (C) 2004-2008 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
# @license - Copyrighted Commercial Software
# Author: J.O.O.M Solutions Co., Ltd
# Websites: http://www.joomlart.com - http://www.joomlancers.com
# This file may not be redistributed in whole or significant part.
# Revised CGC treasures-of-the-internet.org 20080925
-------------------------------------------------------------------------*/// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );include_once (dirname(__FILE__).DS.'ja_vars_1.5.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>">
<head>
<jdoc:include type="head" />
<?php JHTML::_('behavior.mootools'); ?><link rel="stylesheet" href="<?php echo $tmpTools->baseurl(); ?>templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $tmpTools->baseurl(); ?>templates/system/css/general.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $tmpTools->templateurl(); ?>/css/editor.css" type="text/css" /><link rel="stylesheet" href="<?php echo $tmpTools->templateurl(); ?>/highslide/highslide.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $tmpTools->templateurl(); ?>/css/template.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $tmpTools->templateurl(); ?>/css/typo.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $tmpTools->templateurl(); ?>/css/ja.news.css" type="text/css" />
<link href="<?php echo $tmpTools->templateurl(); ?>/mootabs/mootabs1.2.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="<?php echo $tmpTools->templateurl(); ?>/js/ja.script.js"></script><script language="javascript" type="text/javascript" src="<?php echo $tmpTools->templateurl(); ?>/highslide/swfobject.js"></script>
<script language="javascript" type="text/javascript" src="<?php echo $tmpTools->templateurl(); ?>/highslide/highslide-full.js"></script><!-- Menu head -->
<?php $jamenu->genMenuHead(); ?><link href="<?php echo $tmpTools->templateurl(); ?>/css/colors/theme<?php echo $tmpTools->getThemeForSection(); ?>.css" rel="stylesheet" type="text/css" />
<?php if ($this->countModules('iblab-lefcol')) : ?>
<style type="text/css">
#ja-content div.ja-innerpad {
float:right;
overflow:hidden;
padding:0 5px 0 10px;
width:85%;
}
</style>
<?php else: ?>
<style type="text/css">
#ja-content div.ja-innerpad {
float:right;
overflow:hidden;
padding:0 5px 0 10px;
width:98%;
}
</style>
<?php endif; ?>
<!-->
<style type="text/css">
.clearfix {height: 1%;}
img {border: none;}
</style>
<!--><!-->
<style type="text/css">
.clearfix {display: inline-block;}
</style>
<!--><?php if ($tmpTools->isIE6()) { ?>
<!-->
<script type="text/javascript">
var siteurl = '<?php echo $tmpTools->baseurl();?>';
</script>
<!-->
<?php } ?><script type="text/javascript">
hs.graphicsDir = '<?php echo $tmpTools->templateurl(); ?>/highslide/graphics/';
hs.showCredits = true; // you can set this to false if you want
hs.creditsText = 'Powered by JA Highslide';
hs.creditsHref = 'http://joomlart.com/';
hs.creditsTitle ='Go to the Highslide JA homepage';
</script></head>
<!-- BEGIN: TOP Section -->
<?php include("top.php"); ?>
<!-- END: TOP Section -->
<!-- END: HEADER -->
<!-- BEGIN: MAIN NAVIGATION -->
<div id="ja-mainnavwrap">
<div id="ja-mainnav" class="clearfix">
<?php $jamenu->genMenu (0); ?>
</div>
</div>
<?php if ($hasSubnav) { ?>
<div id="ja-subnavwrap">
<div id="ja-subnav" class="clearfix">
<?php $jamenu->genMenu (1,1); ?>
</div>
</div>
<?php } ?>
<!-- END: MAIN NAVIGATION --><div id="ja-containerwrap<?php echo $divid; ?>" class="clearfix">
<div id="ja-container">
<div id="ja-container-inner" class="clearfix">
<!-- BEGIN: CONTENT -->
<div id="ja-content"><!-- BEGIN: *** left column position module site *** -->
<?php if ($this->countModules('iblab-lefcol')) : ?>
<div id="iblab-lefcolwrap">
<div class="iblab-lefcol"><jdoc:include type="modules" name="iblab-lefcol" style="xhtml" />
</div>
</div>
<?php endif; ?><!-- END: left column position module site -->
<div class="ja-innerpad clearfix">
<jdoc:include type="message" />
<?php if(!$tmpTools->isFrontPage()) : ?>
<div id="ja-pathway">
<jdoc:include type="module" name="breadcrumbs" />
</div>
<?php endif ; ?><div id="ja-current-content">
<?php if(!$tmpTools->isFrontPage()) : ?>
<jdoc:include type="component" />
<?php endif; ?><!-- BEGIN: JAZIN -->
<?php if($tmpTools->isFrontPage()) : ?>
<div id="jazin-fp">
<jdoc:include type="modules" name="ja-news" style="raw" />
</div>
<?php endif; ?>
<!-- END: JAZIN --></div>
<?php
$spotlight = array ('user8','user9');
$botsl = $tmpTools->calSpotlight ($spotlight,$tmpTools->isOP()?100:99.9);
if( $botsl ) {
?>
<!-- BEGIN: BOTTOM SPOTLIGHT -->
<div id="ja-botsl" class="clearfix"><?php if( $this->countModules('user8') ) {?>
<div class="ja-box<?php echo $botsl['user8']['class']; ?>" style="width: <?php echo $botsl['user8']['width']; ?>;">
<jdoc:include type="modules" name="user8" style="xhtml" />
</div>
<?php } ?><?php if( $this->countModules('user9') ) {?>
<div class="ja-box<?php echo $botsl['user9']['class']; ?>" style="width: <?php echo $botsl['user9']['width']; ?>;">
<jdoc:include type="modules" name="user9" style="xhtml" />
</div>
<?php } ?></div>
<!-- END: BOTTOM SPOTLIGHT -->
<?php } ?><?php if($this->countModules('banner')) : ?>
<!-- BEGIN: BANNER -->
<div id="ja-banner">
<jdoc:include type="modules" name="banner" />
</div>
<!-- END: BANNER -->
<?php endif; ?></div>
</div>
<!-- END: CONTENT --><?php if ($ja_left || $ja_right || $ja_masscol) { ?>
<!-- BEGIN: COLUMNS -->
<div id="ja-colwrap"><?php if ($ja_masscol) { ?>
<!-- BEGIN: MASSCOL -->
<div id="ja-colmass" class="clearfix">
<div class="ja-innerpad"><jdoc:include type="modules" name="user5" style="xhtml" />
<?php if ($this->countModules('user6')) : ?>
<script language="javascript" type="text/javascript" src="<?php echo $tmpTools->templateurl(); ?>/mootabs/mootabs1.2.js"></script>
<script type="text/javascript">
window.addEvent('load', initmootabs);
function initmootabs() {
myTabs1 = new jamootabs('ja-tabs', {
<?php echo $ja_mootabs_options; ?>
});
}
</script>
<div id="ja-tabswrap">
<div id="ja-tabs" class="clearfix">
<div class="ja-tab-panels">
<jdoc:include type="modules" name="user6" style="xhtml" />
</div>
</div>
</div>
<?php endif; ?><jdoc:include type="modules" name="user7" style="xhtml" />
</div>
</div>
<!-- END: MASSCOL -->
<?php } ?><div id="ja-cols" class="clearfix">
<?php if ($ja_left) { ?>
<div id="ja-col1">
<div class="ja-innerpad">
<jdoc:include type="modules" name="left" style="xhtml" />
</div>
</div>
<?php } ?><?php if ($ja_right) { ?>
<div id="ja-col2">
<div class="ja-innerpad">
<jdoc:include type="modules" name="right" style="xhtml" />
</div>
</div>
<?php } ?>
</div></div><br />
<!-- END: COLUMNS -->
<?php } ?></div></div></div>
<!-- BEGIN: Bottom Section -->
<?php include("bottom.php"); ?>
<!-- END: Bottom Section --></body>
</html>
Tested and working fine here on a default J installation.
Menalto FriendMenalto
- Join date:
- May 2007
- Posts:
- 4736
- Downloads:
- 0
- Uploads:
- 43
- Thanks:
- 2
- Thanked:
- 531 times in 361 posts
March 12, 2009 at 8:59 am #295559Forgot to mention, you can delete this from the css file if you want:
#ja-content div.ja-innerpad
{
float: right;
overflow: hidden;
padding: 0px 5px 0px 10px;
width: 85%;}
scotty Friendscotty
- Join date:
- March 2008
- Posts:
- 2339
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 76
- Thanked:
- 827 times in 595 posts
March 12, 2009 at 9:21 am #295563Thanks Menalto, I think it’s a different way of doing the same thing?
So we know now how to render the HTML for a left column ONLY if there is a module published there. We also know how to set a different CSS ONLY if there is a module in the left column.
So the only problem now is the actual CSS for each scenario.
1 user says Thank You to scotty for this useful post
ShannonN FriendShannonN
- Join date:
- July 2006
- Posts:
- 1947
- Downloads:
- 0
- Uploads:
- 9
- Thanks:
- 16
- Thanked:
- 172 times in 49 posts
March 12, 2009 at 9:53 am #295566cgc0202;117199Thanks scotty for your continued interest to help solve this. I sure wish Joomlart takes a more active role. They have been completely silent.
CornelioHey! guys have you only just noticed JA couldn’t care less about Teline II? or other templates that have been out for a long time?:D
Maybe they’re too busy developing the Magento stuff for the very elite few at this point to give a rats about the long term template club supporters. OOps wash my mouth with soap 😉 I’ll have you know who making comments about my attitude 😮 Whooo ooo:p
cgc0202 Friendcgc0202
- Join date:
- August 2007
- Posts:
- 2244
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 206
- Thanked:
- 262 times in 1 posts
March 12, 2009 at 10:40 am #295576Thanks very much Menalto,
I just woke up and saw your post. And tried it — IT WORKED!
SIGNIFICANCE: This feature, to a true left column has been asked quite a few times in the forum but to my knowledge never answered or solved. The thread goes further. Instead of just a left column position, the new left column position was also collapsible, in case there is no entry in the position — consistent with the collapsibility feature of other position modules in Teline II.
For the benefit of those who may not be familiar with what has been done, and the final working “collapsible LEFT COLUMN” (truly on the left side — to contrast with the other “left” column in the default template), let me compare the evolution of the scripts
Addition of a new LEFT COLUMN suggested by Cornelio
Working layout but no conditional script to allow automatic collapse when module position is empty
[PHP]
<!– BEGIN: *** left column position module site *** –><div id=”iblab-lefcolwrap”>
<div class=”iblab-lefcol”>
<jdoc:include type=”modules” name=”iblab-lefcol” style=”xhtml” /></div>
</div><!– END: left column position module site –> [/PHP]
Suggested revision by Scotty
Layout correct also, like the original, but still does not collapse.
Note: The added script to the original (above) are in BOLD[PHP]<!– BEGIN: *** left column position module site *** –>
<?php if ($this->countModules(‘iblab-lefcol’)) { ?>
<div id=”iblab-lefcolwrap”>
<div class=”iblab-lefcol”>
<jdoc:include type=”modules” name=”iblab-lefcol” style=”xhtml” /></div>
</div>
<?php } ?>
<!– END: left column position module site –> [/PHP]Suggested revision by Menalto
Working version: the orignial LEFT COLUMN module position now collapses. QED!
Note: The revision of the conditional script suggested by Scotty (above) is in BOLD
[PHP]<!– BEGIN: *** left column position module site *** –><?php if ($this->countModules(‘iblab-lefcol’)) : ?>
<div id=”iblab-lefcolwrap”>
<div class=”iblab-lefcol”><jdoc:include type=”modules” name=”iblab-lefcol” style=”xhtml” />
</div>
</div>
<?php endif; ?><!– END: left column position module site –>[/PHP]
Is the above summary analysis correct? Was the error in the Scotty proposed script just the incorrect closing script — <?php } ?> changed to <?php endif; ?> — for the conditional statement?
Did I miss any other changes in the complete index.php
I would like to thank Scotty also for helping in the evolution of the script that evolved eventualy to a working collapsible LEFT COLUMN position,
Cornelio
<em>@Menalto 117212 wrote:</em><blockquote>Try with this index.php file
<?php
/*------------------------------------------------------------------------
# JA Teline II for Joomla 1.5 - Version 1.6 - Licence Owner JA81276
# ------------------------------------------------------------------------
# Copyright (C) 2004-2008 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
# @license - Copyrighted Commercial Software
# Author: J.O.O.M Solutions Co., Ltd
# Websites: http://www.joomlart.com - http://www.joomlancers.com
# This file may not be redistributed in whole or significant part.
# Revised CGC treasures-of-the-internet.org 20080925
-------------------------------------------------------------------------*/// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );include_once (dirname(__FILE__).DS.'ja_vars_1.5.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>">
<head>
<jdoc:include type="head" />
<?php JHTML::_('behavior.mootools'); ?><link rel="stylesheet" href="<?php echo $tmpTools->baseurl(); ?>templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $tmpTools->baseurl(); ?>templates/system/css/general.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $tmpTools->templateurl(); ?>/css/editor.css" type="text/css" /><link rel="stylesheet" href="<?php echo $tmpTools->templateurl(); ?>/highslide/highslide.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $tmpTools->templateurl(); ?>/css/template.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $tmpTools->templateurl(); ?>/css/typo.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $tmpTools->templateurl(); ?>/css/ja.news.css" type="text/css" />
<link href="<?php echo $tmpTools->templateurl(); ?>/mootabs/mootabs1.2.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="<?php echo $tmpTools->templateurl(); ?>/js/ja.script.js"></script><script language="javascript" type="text/javascript" src="<?php echo $tmpTools->templateurl(); ?>/highslide/swfobject.js"></script>
<script language="javascript" type="text/javascript" src="<?php echo $tmpTools->templateurl(); ?>/highslide/highslide-full.js"></script><!-- Menu head -->
<?php $jamenu->genMenuHead(); ?><link href="<?php echo $tmpTools->templateurl(); ?>/css/colors/theme<?php echo $tmpTools->getThemeForSection(); ?>.css" rel="stylesheet" type="text/css" />
<?php if ($this->countModules('iblab-lefcol')) : ?>
<style type="text/css">
#ja-content div.ja-innerpad {
float:right;
overflow:hidden;
padding:0 5px 0 10px;
width:85%;
}
</style>
<?php else: ?>
<style type="text/css">
#ja-content div.ja-innerpad {
float:right;
overflow:hidden;
padding:0 5px 0 10px;
width:98%;
}
</style>
<?php endif; ?>
<!-->
<style type="text/css">
.clearfix {height: 1%;}
img {border: none;}
</style>
<!--><!-->
<style type="text/css">
.clearfix {display: inline-block;}
</style>
<!--><?php if ($tmpTools->isIE6()) { ?>
<!-->
<script type="text/javascript">
var siteurl = '<?php echo $tmpTools->baseurl();?>';
</script>
<!-->
<?php } ?><script type="text/javascript">
hs.graphicsDir = '<?php echo $tmpTools->templateurl(); ?>/highslide/graphics/';
hs.showCredits = true; // you can set this to false if you want
hs.creditsText = 'Powered by JA Highslide';
hs.creditsHref = 'http://joomlart.com/';
hs.creditsTitle ='Go to the Highslide JA homepage';
</script></head>
<!-- BEGIN: TOP Section -->
<?php include("top.php"); ?>
<!-- END: TOP Section -->
<!-- END: HEADER -->
<!-- BEGIN: MAIN NAVIGATION -->
<div id="ja-mainnavwrap">
<div id="ja-mainnav" class="clearfix">
<?php $jamenu->genMenu (0); ?>
</div>
</div>
<?php if ($hasSubnav) { ?>
<div id="ja-subnavwrap">
<div id="ja-subnav" class="clearfix">
<?php $jamenu->genMenu (1,1); ?>
</div>
</div>
<?php } ?>
<!-- END: MAIN NAVIGATION --><div id="ja-containerwrap<?php echo $divid; ?>" class="clearfix">
<div id="ja-container">
<div id="ja-container-inner" class="clearfix">
<!-- BEGIN: CONTENT -->
<div id="ja-content"><!-- BEGIN: *** left column position module site *** -->
<?php if ($this->countModules('iblab-lefcol')) : ?>
<div id="iblab-lefcolwrap">
<div class="iblab-lefcol"><jdoc:include type="modules" name="iblab-lefcol" style="xhtml" />
</div>
</div>
<?php endif; ?><!-- END: left column position module site -->
<div class="ja-innerpad clearfix">
<jdoc:include type="message" />
<?php if(!$tmpTools->isFrontPage()) : ?>
<div id="ja-pathway">
<jdoc:include type="module" name="breadcrumbs" />
</div>
<?php endif ; ?><div id="ja-current-content">
<?php if(!$tmpTools->isFrontPage()) : ?>
<jdoc:include type="component" />
<?php endif; ?><!-- BEGIN: JAZIN -->
<?php if($tmpTools->isFrontPage()) : ?>
<div id="jazin-fp">
<jdoc:include type="modules" name="ja-news" style="raw" />
</div>
<?php endif; ?>
<!-- END: JAZIN --></div>
<?php
$spotlight = array ('user8','user9');
$botsl = $tmpTools->calSpotlight ($spotlight,$tmpTools->isOP()?100:99.9);
if( $botsl ) {
?>
<!-- BEGIN: BOTTOM SPOTLIGHT -->
<div id="ja-botsl" class="clearfix"><?php if( $this->countModules('user8') ) {?>
<div class="ja-box<?php echo $botsl['user8']['class']; ?>" style="width: <?php echo $botsl['user8']['width']; ?>;">
<jdoc:include type="modules" name="user8" style="xhtml" />
</div>
<?php } ?><?php if( $this->countModules('user9') ) {?>
<div class="ja-box<?php echo $botsl['user9']['class']; ?>" style="width: <?php echo $botsl['user9']['width']; ?>;">
<jdoc:include type="modules" name="user9" style="xhtml" />
</div>
<?php } ?></div>
<!-- END: BOTTOM SPOTLIGHT -->
<?php } ?><?php if($this->countModules('banner')) : ?>
<!-- BEGIN: BANNER -->
<div id="ja-banner">
<jdoc:include type="modules" name="banner" />
</div>
<!-- END: BANNER -->
<?php endif; ?></div>
</div>
<!-- END: CONTENT --><?php if ($ja_left || $ja_right || $ja_masscol) { ?>
<!-- BEGIN: COLUMNS -->
<div id="ja-colwrap"><?php if ($ja_masscol) { ?>
<!-- BEGIN: MASSCOL -->
<div id="ja-colmass" class="clearfix">
<div class="ja-innerpad"><jdoc:include type="modules" name="user5" style="xhtml" />
<?php if ($this->countModules('user6')) : ?>
<script language="javascript" type="text/javascript" src="<?php echo $tmpTools->templateurl(); ?>/mootabs/mootabs1.2.js"></script>
<script type="text/javascript">
window.addEvent('load', initmootabs);
function initmootabs() {
myTabs1 = new jamootabs('ja-tabs', {
<?php echo $ja_mootabs_options; ?>
});
}
</script>
<div id="ja-tabswrap">
<div id="ja-tabs" class="clearfix">
<div class="ja-tab-panels">
<jdoc:include type="modules" name="user6" style="xhtml" />
</div>
</div>
</div>
<?php endif; ?><jdoc:include type="modules" name="user7" style="xhtml" />
</div>
</div>
<!-- END: MASSCOL -->
<?php } ?><div id="ja-cols" class="clearfix">
<?php if ($ja_left) { ?>
<div id="ja-col1">
<div class="ja-innerpad">
<jdoc:include type="modules" name="left" style="xhtml" />
</div>
</div>
<?php } ?><?php if ($ja_right) { ?>
<div id="ja-col2">
<div class="ja-innerpad">
<jdoc:include type="modules" name="right" style="xhtml" />
</div>
</div>
<?php } ?>
</div></div><br />
<!-- END: COLUMNS -->
<?php } ?></div></div></div>
<!-- BEGIN: Bottom Section -->
<?php include("bottom.php"); ?>
<!-- END: Bottom Section --></body>
</html>
Tested and working fine here on a default J installation.</blockquote>
Menalto FriendMenalto
- Join date:
- May 2007
- Posts:
- 4736
- Downloads:
- 0
- Uploads:
- 43
- Thanks:
- 2
- Thanked:
- 531 times in 361 posts
March 12, 2009 at 10:44 am #295579You can do this in many different ways, but the thing i did was the easy way, and easy for other to test it out for them self.
Above the <head> tag i added this here:
[PHP]<?php if ($this->countModules(‘iblab-lefcol’)) : ?>
<style type=”text/css”>
#ja-content div.ja-innerpad {
float:right;
overflow:hidden;
padding:0 5px 0 10px;
width:85%;
}
</style>
<?php else: ?>
<style type=”text/css”>
#ja-content div.ja-innerpad {
float:right;
overflow:hidden;
padding:0 5px 0 10px;
width:98%;
}
</style>
<?php endif; ?>
[/PHP]
Which means IF a module is published in iblab-lefcol position([PHP]<?php if ($this->countModules(‘iblab-lefcol’)) : ?>[/PHP]) it will output the css:
<style type="text/css">
#ja-content div.ja-innerpad {
float:right;
overflow:hidden;
padding:0 5px 0 10px;
width:85%;
}
</style>
And if no position is published in iblab-leftcol([PHP]<?php else: ?>[/PHP]) it will output the css:
<style type="text/css">
#ja-content div.ja-innerpad {
float:right;
overflow:hidden;
padding:0 5px 0 10px;
width:98%;
}
</style>And ofcourse, your module code in the index.php file is here:
<!-- BEGIN: *** left column position module site *** --><?php if ($this->countModules('iblab-lefcol')) : ?>
<div id="iblab-lefcolwrap">
<div class="iblab-lefcol"><jdoc:include type="modules" name="iblab-lefcol" style="xhtml" />
</div>
</div>
<?php endif; ?><!-- END: left column position module site -->
You could also open the file ja_vars_1.5.php and modify this code here:
[PHP]# Auto Collapse Divs Functions ##########
$ja_left = $this->countModules( ‘left’ );
$ja_right = $this->countModules( ‘right’ );
$ja_masscol = $this->countModules(‘user5’) || $this->countModules(‘user6’);
if ( $ja_left && $ja_right ) {
//2 columns on the right
$divid = ”;
} elseif ( ($ja_left || $ja_right) && !$ja_masscol ) {
//One column without masscol
$divid = ‘-c’;
} elseif (($ja_left || $ja_right) && $ja_masscol) {
//One column with masscol
$divid = ‘-cm’;
} elseif ($ja_masscol) {
//masscol only
$divid = ‘-m’;
} else {
//No column in right
$divid = ‘-f’;
}[/PHP]
And change the respective css for it.
But to perform the last option will require quite some changes to the template,if you want it done this way let me know? -
AuthorPosts
This topic contains 27 replies, has 6 voices, and was last updated by csolar 15 years, 2 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum