- Posts: 50
- Thank you received: 1
BoxHeights.equalise(,'c4'); error on Template
-
russellmoran
Inactive member - Topic Author
- Member
Less
More
13 years 6 months ago #8735
by russellmoran
BoxHeights.equalise(,'c4'); error on Template was created by russellmoran
I have the following error using PHP 5.3 in Joomla 1.6.3 on Rochen hosted server. I believe I have it narrowed down to this code:
I have a problem with Javascript and am not 100% positive but was told because of the extra "," in this code it may be causing problems???
I also have a problem on my site where my left menu is above my inset and right menu. Maybe it's all related? (Just a shot in the dark).
www.WTreF.com is my site so you can see problem.
Code:
window.onload = function() {
BoxHeights.equalise(,'c4');
}
I have a problem with Javascript and am not 100% positive but was told because of the extra "," in this code it may be causing problems???
I also have a problem on my site where my left menu is above my inset and right menu. Maybe it's all related? (Just a shot in the dark).
www.WTreF.com is my site so you can see problem.
Please Log in to join the conversation.
-
russellmoran
Inactive member - Topic Author
- Member
Less
More
- Posts: 50
- Thank you received: 1
13 years 6 months ago #8736
by russellmoran
Replied by russellmoran on topic Re: BoxHeights.equalise(,'c4'); error on Template
I was told this by a friend as well...(if it doesn't help, no problem)...
Oh.. one other thing I just noticed.. the BoxHeights thing is trying to do something to 'c4'. Searching the HTML on your page, I see 'c4' in one other spot, which is the ID of the module group that JFBCFriends and Random Quotes are set to appear in. Not sure if this will help you when looking at the template, or if you're aware of anything in the template (or elsewhere) that would possibly try to resize those modules, but again, it may give you an 'ah ha' moment
Oh.. one other thing I just noticed.. the BoxHeights thing is trying to do something to 'c4'. Searching the HTML on your page, I see 'c4' in one other spot, which is the ID of the module group that JFBCFriends and Random Quotes are set to appear in. Not sure if this will help you when looking at the template, or if you're aware of anything in the template (or elsewhere) that would possibly try to resize those modules, but again, it may give you an 'ah ha' moment
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
13 years 6 months ago #8740
by ivan.milic
Replied by ivan.milic on topic Re: BoxHeights.equalise(,'c4'); error on Template
Hi,
open index.php of template and find this:
<script type="text/javascript">
window.onload = function() {
BoxHeights.equalise(<?php if($showuser[5]) { ?>'c1',<?php } if($showuser[6]) { ?>'c2',<?php } if($showuser[7]) { ?>'c3',<?php } if($showuser[8]) { ?>'c4'<?php } ?>);
BoxHeights.equalise('column_left','content_wrap','column_right');
}
</script>
then replace:
'c1', : 'c1,'
'c2', : 'c2,'
'c3', : 'c3,'
it should look as this:
<script type="text/javascript">
window.onload = function() {
BoxHeights.equalise(<?php if($showuser[5]) { ?>'c1,'<?php } if($showuser[6]) { ?>'c2,'<?php } if($showuser[7]) { ?>'c3,'<?php } if($showuser[8]) { ?>'c4'<?php } ?>);
BoxHeights.equalise('column_left','content_wrap','column_right');
}
</script>
open index.php of template and find this:
<script type="text/javascript">
window.onload = function() {
BoxHeights.equalise(<?php if($showuser[5]) { ?>'c1',<?php } if($showuser[6]) { ?>'c2',<?php } if($showuser[7]) { ?>'c3',<?php } if($showuser[8]) { ?>'c4'<?php } ?>);
BoxHeights.equalise('column_left','content_wrap','column_right');
}
</script>
then replace:
'c1', : 'c1,'
'c2', : 'c2,'
'c3', : 'c3,'
it should look as this:
<script type="text/javascript">
window.onload = function() {
BoxHeights.equalise(<?php if($showuser[5]) { ?>'c1,'<?php } if($showuser[6]) { ?>'c2,'<?php } if($showuser[7]) { ?>'c3,'<?php } if($showuser[8]) { ?>'c4'<?php } ?>);
BoxHeights.equalise('column_left','content_wrap','column_right');
}
</script>
Please Log in to join the conversation.
-
russellmoran
Inactive member - Topic Author
- Member
Less
More
- Posts: 50
- Thank you received: 1
13 years 6 months ago #8741
by russellmoran
Replied by russellmoran on topic Re: BoxHeights.equalise(,'c4'); error on Template
I completely understand what you told me to do. You wanted me to put the "," (comma) inside the ' '. The problem is mine doesn't look like what you showed me. Here is what mine looks like:
Please let me know what to do.
Code:
<script type="text/javascript">
window.onload = function() {
<?php if($bottommodules) { ?>
BoxHeights.equalise(<?php if($showuser[5]) { ?>'c1'<?php } if($showuser[6]) { ?>,'c2'<?php } if($showuser[7]) { ?>,'c3'<?php } if($showuser[8]) { ?>,'c4'<?php } ?>);
<?php } ?>
<?php if($uppermodules) { ?>
BoxHeights.equalise(<?php if($showadvert[1]) { ?>'c5'<?php } if($showadvert[2]) { ?>,'c6'<?php } if($showadvert[3]) { ?>,'c7'<?php } if($showadvert[4]) { ?>,'c8'<?php } ?>);
<?php } ?>
}
</script>
Please let me know what to do.
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
13 years 6 months ago #8748
by ivan.milic
Replied by ivan.milic on topic Re: BoxHeights.equalise(,'c4'); error on Template
Here:
<script type="text/javascript">
<?php
$cUserArray = Array();
$cAdvArray = Array();
if($showuser[5]) $cUserArray[1] = "'c1'";
if($showuser[6]) $cUserArray[2] = "'c2'";
if($showuser[7]) $cUserArray[3] = "'c3'";
if($showuser[8]) $cUserArray[4] = "'c4'";
if($showadvert[1]) $cAdvArray[1] = "'c5'";
if($showadvert[2]) $cAdvArray[2] = "'c6'";
if($showadvert[3]) $cAdvArray[3] = "'c7'";
if($showadvert[4]) $cAdvArray[4] = "'c8'";
?>
window.onload = function() {
<?php if($bottommodules) { ?>
BoxHeights.equalise(<?php echo join(",",$cUserArray); ?>);
<?php } ?>
<?php if($uppermodules) { ?>
BoxHeights.equalise(<?php echo join(",",$cAdvArray); ?>);
<?php } ?>
}
</script>
<script type="text/javascript">
<?php
$cUserArray = Array();
$cAdvArray = Array();
if($showuser[5]) $cUserArray[1] = "'c1'";
if($showuser[6]) $cUserArray[2] = "'c2'";
if($showuser[7]) $cUserArray[3] = "'c3'";
if($showuser[8]) $cUserArray[4] = "'c4'";
if($showadvert[1]) $cAdvArray[1] = "'c5'";
if($showadvert[2]) $cAdvArray[2] = "'c6'";
if($showadvert[3]) $cAdvArray[3] = "'c7'";
if($showadvert[4]) $cAdvArray[4] = "'c8'";
?>
window.onload = function() {
<?php if($bottommodules) { ?>
BoxHeights.equalise(<?php echo join(",",$cUserArray); ?>);
<?php } ?>
<?php if($uppermodules) { ?>
BoxHeights.equalise(<?php echo join(",",$cAdvArray); ?>);
<?php } ?>
}
</script>
Please Log in to join the conversation.
-
russellmoran
Inactive member - Topic Author
- Member
Less
More
- Posts: 50
- Thank you received: 1
13 years 6 months ago #8759
by russellmoran
Replied by russellmoran on topic Re: BoxHeights.equalise(,'c4'); error on Template
It won't allow me to select this code. I am using IE8 Windows 7 and it won't allow copy/paste of this. Can't even select it...
...can you repost using another method? Also, I want to verify, do I need to replace the above script I posted?
...can you repost using another method? Also, I want to verify, do I need to replace the above script I posted?
Please Log in to join the conversation.
Time to create page: 0.095 seconds