Jump to content


MKPortal within a table


  • You cannot reply to this topic
No replies to this topic

#1 visiblesoul

  • Administrators
  • 551 posts
  • Location:Earth
  • Texas

Posted 10 September 2004 - 12:52 PM

If you would like to put MKPortal within a table so that you can adjust the width or add a graphic border around the entire portal here's one way to do it.

Open the table...

"/mkportal/templates/default/tpl_main.php" said:

function open_main($mainwidth) {
global $mklib;
return <<<EOF

<!-- apre la tabella principale del corpo della pagina -->
<body bgcolor="#EFEFEF" onload="java script:GetPos()">
<div align="center">



<!-- Supertable open -->
<table align="center" border="5" width="85%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="center">
<!-- End Supertable open -->


<table align="center" border="0" width="{$mainwidth}" id="tabmain" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="center">

EOF;
}


Close the table...

"/mkportal/templates/default/tpl_main.php" said:

function view_footer($block) {
global $mklib;
return <<<EOF

<!-- chiusura delle tabelle restanti e footer della pagina -->

</table>
</td>
</tr>
</table>
<p align="center">{$block}</p>

<!-- Supertable close -->
</td>
</tr>
</table>
<!-- End Supertable close -->


</div>
</body>
</html>
EOF;
}

I tried it and it worked on my test site.

I borrowed some dropshadow graphics from one of my sites and played with MKPortal a bit. The graphic background looked great. I used a header image to close off the top, a vertically tiled background to fill in the body of the table, and a graphic to close off the bottom. All in a fixed table. I can see already that the Topsite module is going to stretch out just about any fixed layout. The forums also presented a stretching issue when nested in the portal. If I closed the left or right boxes for the forum view in the MKPortal CP it looked good. But all hades breaks loose when you click on the arrows and open up the closed boxes. It really looks like tables need to resize to the browser window to work well with this portal.

-=DKC=-


Please note that I offer free support on this forum in my free time. Depending on how much work I have backlogged it may take me a week or more to answer questions. I am not ignoring you. I answer everyone but please be patient. Thanks.

Disclaimer: All forum posts, including code examples, on this forum are offered for free in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Use code examples at your own risk.

"If at first you don't succeed, keep on suckin' til you do succeed." -Curly Howard





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users