Wrapper Auto-Height Problems.

This forum is for reporting bugs in Joomla!. Please don't report problems with extensions in here.
Forum rules
Forum Rules
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
MarshallX
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Tue Aug 12, 2008 7:41 pm

Re: Wrapper Auto-Height Problems.

Post by MarshallX » Thu Oct 04, 2012 7:30 pm

Any chance you can post your fix? I've tried 20 or more "fixes" and none work across all 3 browsers.

thefreer
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Fri Oct 07, 2011 4:37 pm

Re: Wrapper Auto-Height Problems.

Post by thefreer » Thu Oct 04, 2012 9:20 pm

Hi, for a wrapper as module you have to edit :

modules > mod_wrapper > tmpl > default.php

Code: Select all

<script type="text/javascript">
function iFrameHeight() {
  var f = document.getElementById('blockrandom');
  f.style.height = '100px' ;
  var d = (f.contentWindow.document || f.contentDocument) ;
  var height = Math.max(d.body.offsetHeight, d.body.scrollHeight) ;
  height += 200; // scrollbars?
  f.style.height = height + 'px' ;
  f.setAttribute("height", height) ;
}
</script>
<iframe <?php echo $load; ?>
	id="blockrandom"
	name="<?php echo $target ?>"
	src="<?php echo $url; ?>"
	width="<?php echo $width ?>"
	height="<?php echo $height ?>"
	scrolling="<?php echo $scroll ?>"
	class="wrapper<?php echo $moduleclass_sfx ?>" >
	<?php echo JText::_('MOD_WRAPPER_NO_IFRAMES'); ?>
</iframe>
Setting for module :

Auto Add > Yes
Sroll bar > No
Width > 100 %
Height > 100 (as you want)
Auto Height > Yes

Remember if you use a third party template, you have to check if there is no overide of the above file. If there is an overide, just replace it with the code above.

MarshallX
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Tue Aug 12, 2008 7:41 pm

Re: Wrapper Auto-Height Problems.

Post by MarshallX » Thu Oct 04, 2012 9:24 pm

Didn't seem to work, followed exactly as above says.

http://fugaming.net/funew/index.php?opt ... Itemid=468

Also tried adding it to the component.

thefreer
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Fri Oct 07, 2011 4:37 pm

Re: Wrapper Auto-Height Problems.

Post by thefreer » Thu Oct 04, 2012 9:29 pm

No here is the code I'm seing in your source :

Code: Select all

function pageY(elem) {
    return elem.offsetParent ? (elem.offsetTop + pageY(elem.offsetParent)) : elem.offsetTop;
}
var buffer = 0; //scroll bar buffer
function iFrameHeight()
  {
   var the_height=
   document.getElementById('blockrandom').contentWindow.
   document.body.scrollHeight;
   document.getElementById('blockrandom').height=
   the_height;
  }
}
document.getElementById('blockrandom').onload=iFrameHeight;
window.onresize = iFrameHeight;
</script>
<div class="contentpane">
<iframe onload="iFrameHeight()"	id="blockrandom"
	name="iframe"
	src="http://fugaming.net/forums/"
	width="100%"
	height="600"
	scrolling="no"
	frameborder="0"
	class="wrapper">
	This option will not work correctly. Unfortunately, your browser does not support inline frames.</iframe>
</div>
It has nothing to do with the above code.

Witch joomla do you use? And do you use wrapper as module?

MarshallX
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Tue Aug 12, 2008 7:41 pm

Re: Wrapper Auto-Height Problems.

Post by MarshallX » Thu Oct 04, 2012 9:30 pm

Joomla 2.5

I don't know whether I'm using wrapper as a module - my menu item is pointed to Iframe wrapper which is a URL to my forum.

thefreer
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Fri Oct 07, 2011 4:37 pm

Re: Wrapper Auto-Height Problems.

Post by thefreer » Thu Oct 04, 2012 9:36 pm

Try the following, asign you menu item to an article (not wrapper), then add new module wrapper and asign position and page to show, that's what I'm doing.

Anyway as I'm seing in your code, the above code doesn't render in you html file.

If you want I can have a look, just write me private message with temporary access other ways I cannot help.

MarshallX
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Tue Aug 12, 2008 7:41 pm

Re: Wrapper Auto-Height Problems.

Post by MarshallX » Thu Oct 04, 2012 9:50 pm

You are my hero - I've been banging my head against the wall all day with this.

Thank you!!

thefreer
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Fri Oct 07, 2011 4:37 pm

Re: Wrapper Auto-Height Problems.

Post by thefreer » Thu Oct 04, 2012 10:02 pm

You are welcome, I banged my head also before finding out. :-)

MarshallX
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Tue Aug 12, 2008 7:41 pm

Re: Wrapper Auto-Height Problems.

Post by MarshallX » Thu Oct 04, 2012 10:07 pm

Now if only I could find a free PHPBB and Joomla 2.5 bridge :(

thefreer
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Fri Oct 07, 2011 4:37 pm

Re: Wrapper Auto-Height Problems.

Post by thefreer » Thu Oct 04, 2012 10:10 pm

What do you mean by bridge?

MarshallX
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Tue Aug 12, 2008 7:41 pm

Re: Wrapper Auto-Height Problems.

Post by MarshallX » Thu Oct 04, 2012 10:12 pm

Use PHPBB User DB with Joomla so our users don't have to register two accounts.

And the ability to pull the last 5 posts as news posts from any PHPBB forum.

There are paid apps but they are outrageously expensive (50 each)

thefreer
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Fri Oct 07, 2011 4:37 pm

Re: Wrapper Auto-Height Problems.

Post by thefreer » Thu Oct 04, 2012 10:19 pm

There's not lot of choice, buy an extention or code it yourself. If you have some php/mysql knowledge it shouldn't be hard to automaticaly create an user in phpbb when someone register on your website. You will just need to edit some files.

Just make some research, or let someone code it for you, have a look on fiverr.com

MarshallX
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Tue Aug 12, 2008 7:41 pm

Re: Wrapper Auto-Height Problems.

Post by MarshallX » Fri Oct 05, 2012 12:40 am

Well, I found one that works. It's Jfusion.

The weirdest thing is for a couple of users the stretch doesn't work still.

yiun
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Fri Nov 26, 2010 1:13 am

Re: Wrapper Auto-Height Problems.

Post by yiun » Fri Apr 26, 2013 4:36 pm

This worked for my 2.5.10:
http://www.minitek.gr/tutorials/javascr ... eight.html

EDIT
i just needed some extra height so i changed this line

Code: Select all

document.getElementById('blockrandom').style.height = height + 'px';
to

Code: Select all

document.getElementById('blockrandom').style.height = (height+80) + 'px';


Locked

Return to “Joomla! 1.5 Bug Reporting”