Witam! Zapewne wielu was chciało by mieć forum wewnątrz joomli (w ramce) ale wrapper z autowysokoscią nie działa... rozwiązanie jest proste wystarczy zmodyfikować troche forum a do joomli w odpowiednik miejscu wstawić kod HTML jak to zrobić:
1. Otwieramy templates\subSilver\overall_header.tpl (forum) Znajdujemy <head> po dodajemy:
Kod HTML:
<script type="text/javascript" src="autoiframe.js"></script>
Zapisujemy zamykamy.
2. Otwieramy templates\subSilver\overall_footer.tpl (forum) Znajdujemy <!-- END pagina_pages --> przed dodajemy:
Kod HTML:
<script type="text/javascript">
// <![CDATA[
autoiframe(null, 200);
// ]]>
</script>
Zapisujemy zamykamy.
3. Tworzymy nowy plik o nazwie autoiframe.js w jego treści wpisujemy
Kod HTML:
/**
 * @author Sławomir Kokłowski {@link http://www.kurshtml.boo.pl}
 * @copyright NIE usuwaj tego komentarza! (Do NOT remove this comment!)
 */
// Domyślny identyfikator IFRAME:
var autoiframe_id = 'autoiframe';
// Domyślny dolny margines:
var autoiframe_margin = 50;
var autoiframe_timer = null;
function autoiframe(id, margin)
{
 if (parent != self && document.body && document.body.offsetHeight && document.body.scrollHeight)
 {
  clearTimeout(autoiframe_timer)
  if (typeof id != 'undefined' && id) autoiframe_id = id;
  parent.document.getElementById(autoiframe_id).height = 1;
  autoiframe_timer = setTimeout("parent.document.getElementById(autoiframe_id).height = Math.max(document.body.offsetHeight, document.body.scrollHeight) + " + (typeof margin == 'undefined' || isNaN(parseInt(margin)) ? autoiframe_margin : parseInt(margin)), 1);
 }
}
if (window.addEventListener) window.addEventListener('load', function() { autoiframe(); }, false);
else if (window.attachEvent) window.attachEvent('onload', function() { autoiframe(); });
Zapisujemy w głownym katalogu forum i zamykamy.
4. Teraz tylko w miejscu gdzie chcemy forum wpisujemy
Kod HTML:
<iframe src="ADRES_PLIKU_INDEX.PHP_FORUM" name="forum" id="autoiframe" width="100%" height="560" frameborder="0">...</iframe>
Skrypt pochodzi z www.kurshtml.boo.pl