-
AuthorPosts
-
August 21, 2007 at 3:44 pm #122220
In IE everything assigned to the left modulepossition is falling to the bottom of the page if using wide and a screen resolution of 1024×768 or smaller. If using narrow view of the site then it’s all ok.
I therefore put the width to narrow in the template configuration but it looks somewhat small if using a resolution bigger then 1024×768, why I was thinking of putting some script for reading the visitors screenresolution and then set the template variable to either wide or narrow depending on that. Although it seems a little bit problematic and I prefere to use the template as it was made in the first place. Still I need to solve theese problems somehow.
Anyone got similar problems? Anyone got a suggestion for how to solve this?
Menalto FriendMenalto
- Join date:
- May 2007
- Posts:
- 4736
- Downloads:
- 0
- Uploads:
- 43
- Thanks:
- 2
- Thanked:
- 531 times in 361 posts
August 21, 2007 at 4:06 pm #227705I dont see any errors here,can you please give me some screenshots?
August 21, 2007 at 4:41 pm #227708Here’s a screenshot of the menu. I also activated the screen options in the site tools.
I guess that the easiest way to see this error is to go to http://www.csibrazil.com, use IE and a screen resolution of 1024×768 or lower. In higher resolutions this problem doesn’t occure for some viewers/or at some pages. I have no idea of what is causing this and I have tried to solve it for several day’s now.
I also had some problem with FF 3.0a6 but that a friend helped me to solve so I deleted that part from my earlier post.
Menalto FriendMenalto
- Join date:
- May 2007
- Posts:
- 4736
- Downloads:
- 0
- Uploads:
- 43
- Thanks:
- 2
- Thanked:
- 531 times in 361 posts
August 21, 2007 at 8:15 pm #227730Ok,before you complain about templates etc not working, alot of errors, can you tell me what you have modified in the template???????????????????????????????
August 21, 2007 at 8:48 pm #227733The only thing I have changed in the template is adding a div to the left column holding the Joomfish language chooser flags. I have moved the div that contained the search box to be showned under the menu instead of over the menu.
As follows:
[PHP] <!– BEGIN: LEFT COLUMN –>
<div id=”ja-col1″ style=”background: url(<?php echo “$ja_template_path/images/headers/$ja_headerimg-bg2-$ja_width.jpg”;?>) no-repeat top left;”>
<div class=”innerpad”>
<div id=”flags”>
<center>
<?php if (mosCountModules(‘user6’)>0) mosLoadModules(‘user6’,-2); ?>
</center>
</div><br /> <!– // This linebreak is needed for Grand Paradiso – FF3 alfa –>
<?php echo mosLoadModules ( ‘left’,-2 );?> <br />
<br />
<?php if (mosCountModules(‘user4’)) {?>
<div id=”ja-search”>
<?php mosLoadModules ( ‘user4’, -2 ); ?>
</div>
<?php } ?>
</div>
</div>
<br />
<!– END: LEFT COLUMN –>[/PHP]And the CSS for the newly added <div id=”flags”> which shouldn’t mess things up as far as I can see.
#flags {
width: 160px;
bottom: 3px;
vertical-align: bottom;
margin-bottom: 0px;
}
I have added some changings to the spotlights so they now are loaded from a PHP file depending on what language is used. By that I could use different modulepossitions for the languages ie. user1_en, user1_es, user1_br etc and after making the possitions from backend I could then use different copies of the spotlight and in that way make different translations. If just copied the spotlights and tried to load them on different pages evary new copy left an empty space on the frontpage big as a spotlight. So I hade to solve it in my way instead. This should not affect the template in any way.
I haven’t changed anything in the code that was in the template for the spotlights except then just putting the loader code in an external file so I could rename the module possitions depending on what language was choosen.
I now load them as follows:
[PHP] <!– BEGIN: TOP SPOTLIGHT –>
<script type=”text/javascript”>
jaSLWI.expandH = 120;
</script>
<?php switch ($mosConfig_lang){
case”english”:
include_once( $ja_template_absolute_path.’/spottloader/en.php’ );
break;
case”swedish”:
include_once( $ja_template_absolute_path.’/spottloader/se.php’ );
break;
case”brazilian”:
include_once( $ja_template_absolute_path.’/spottloader/br.php’ );
break;
case”norwegian_nn”:
include_once( $ja_template_absolute_path.’/spottloader/no.php’ );
break;
case”norwegian”:
include_once( $ja_template_absolute_path.’/spottloader/no.php’ );
break;
case”spanish”:
include_once( $ja_template_absolute_path.’/spottloader/es.php’ );
break;
default:
include_once( $ja_template_absolute_path.’/spottloader/en.php’ );
break;
}
?>
<!– END: TOP SPOTLIGHT –>[/PHP]The spottloader.php contains the following…:
[PHP]
<?php/**
* Tweak 4 teaserboxes since JA SLWI canΒ΄t work with translations. :o(
*/
defined( ‘_VALID_MOS’ ) or die( ‘Restricted access’ );
?>
<?php
$spotlight = array (‘user1_en’,’user2_en’,’user3_en’);
$topspl = calSpotlight ($spotlight);
if( $topspl ) {
?>
<!– BEGIN: TOP SPOTLIGHT –>
<div id=”ja-topslwrap”>
<div id=”ja-topsl” class=”clearfix”>
<?php if( mosCountModules(‘user1_en’) ) {?>
<div class=”ja-box<?php echo $topspl[‘modules’][‘user1_en’]; ?>” style=”width: <?php echo $topspl[‘width’]; ?>;”>
<?php mosLoadModules(‘user1_en’, -2); ?>
</div>
<?php } ?>
<?php if( mosCountModules(‘user2_en’) ) {?>
<div class=”ja-box<?php echo $topspl[‘modules’][‘user2_en’]; ?>” style=”width: <?php echo $topspl[‘width’]; ?>;”>
<?php mosLoadModules(‘user2_en’, -2); ?>
</div>
<?php } ?>
<?php if( mosCountModules(‘user3_en’) ) {?>
<div class=”ja-box<?php echo $topspl[‘modules’][‘user3_en’]; ?>” style=”width: <?php echo $topspl[‘width’]; ?>;”>
<?php mosLoadModules(‘user3_en’, -2); ?>
</div>
<?php } ?>
</div>
<div class=”sep”></div>
</div>
<!– END: TOP SPOTLIGHT –>
<?php } ?>
[/PHP]I have also edited some in the spotlight javascript since it didn’t show transperent colors at all when used any Scandinavian based languages. I don’t know if it was a Joomla core or Joomfish thing but the dot in opacity bacame a comma which messed things up a bit.
As follows:
<script type="text/javascript">
textbg = document.getElementById("ja-slwi-textbg'.($ja_slwi_id).'");
textbg.style.opacity = "0.'.($trans).'";
textbg.style.filter = 'alpha(opacity='.$trans.')';
</script>I am not saying that the template is bad. If I had thought that I wouldn’t had choosen it in the first place. What I am only concluding is that I haven’t got this many small problems with a template before. The spotlights, the SLWI javascript code that I had to change and the dropping menu.
If one also take in count that I haden’t been writing a single line PHP before starting with this template which pretty much goes for Javascript too I had a lot of testing and figuring out before I managed to get it to work.
Still… I am certain that the error is within the template or the CSS and I am also certain that it must have been something that I have caused since it works just fine at the demo site and I haven’t seen any others here who have had the same problem. I just can’t figure out what’s wrong and hope that someone can at least give me some hints of what to look for. π
Menalto FriendMenalto
- Join date:
- May 2007
- Posts:
- 4736
- Downloads:
- 0
- Uploads:
- 43
- Thanks:
- 2
- Thanked:
- 531 times in 361 posts
August 21, 2007 at 8:55 pm #227734Thats a better post, change the left colum back to what it was original before you touched it and see if you get any errors then
August 21, 2007 at 9:01 pm #227739Ok.. I have put back the original code for the left column but it didn’t made much of a change.
I have also checked the CSS for ja-col1, innerpad and ja-search and made sure they where as the original css file but the menu still drops down to the bottom…
I have now put everything back with my changings.
Menalto FriendMenalto
- Join date:
- May 2007
- Posts:
- 4736
- Downloads:
- 0
- Uploads:
- 43
- Thanks:
- 2
- Thanked:
- 531 times in 361 posts
August 21, 2007 at 9:05 pm #227741Thats great
August 21, 2007 at 9:21 pm #227746Great? The menu still drops down to the bottom even with the original template settings… π
Menalto FriendMenalto
- Join date:
- May 2007
- Posts:
- 4736
- Downloads:
- 0
- Uploads:
- 43
- Thanks:
- 2
- Thanked:
- 531 times in 361 posts
August 21, 2007 at 9:28 pm #227747Sorry for that post:(
Download a new rochea,start from scratch, drop all your changes in the spotlight modules etc, see whats happen then?
Rename the rochea folder to rocheaoriginal,rename it in the xml file and top of the index.php.
See if you have problems then tooAugust 21, 2007 at 9:29 pm #227748I did upload a copy of the original template just renaming the catalog to rocheaorginal, the templatename in index.php and in the XML file. No other changings to the template at this stage. I actually had thought of uploading the original template to test before but didn’t realy know what to change so it worked without using the files from the catalog containing my edited template. Overwriting shouldn’t be any risk I figured out since Joomla is nice enough to warn and to provent that. Still.. The original template worked as it should. the menu and everything was just as it should be.
I then started to put in my changings one by one and check what might be causing the problem. In the template everything worked as they should and no problem occured there either so I continued with the CSS file and that’s when things started to go wrong. I haven’t figured out exactly what in the template_css.css file that was causing the problem but when overwriting my edited template’s CSS file with the original everything worked as it should.
Problem solved and I thank Menalto for the help and for telling me what to change in the template so I could upload a copy of it. I don’t know how I would had found the problem otherwhise without a lot more work, guessing and experimenting.
Now I will leave everything as it is when it comes to the template π
-
AuthorPosts
This topic contains 11 replies, has 2 voices, and was last updated by csib 17 years, 3 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum