alvi
20-09-2008, 23:20
Witam.
Właśnie zrobiłem sobie możliwość wczytywania plików do artykułów. Głównie będę ładował do artykułów tabele, te tabele mają już określone szerokości i w miarę coraz większej ilości danych tabele te będą coraz szersze. Znalazłem szablon colortheme, który spokojnie rozkłada stronę na całej szerokości ale dla mnie to za mało. Potrzebowałbym żeby w miarę zwiększenia się szerokości wczytywanej tabeli strona też powiększała swoją szerokość poza ekran w prawą stronę.
Poniżej przedstawiam index tempelatki i css.
1. index.php tempelatki
<?php defined( "_VALID_MOS" ) or die( "Direct Access to this location is not allowed." );$iso = split( '=', _ISO );echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>';?>
<?php
if(file_exists($mosConfig_absolute_path.'/templates/colortheme/language/'.$mosConfig_lang.'.php')) require_once($mosConfig_absolute_path.'/templates/colortheme/language/'.$mosConfig_lang.'.php');
else require_once($mosConfig_absolute_path.'/templates/colortheme/language/english.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php mosShowHead(); ?>
<meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" />
<?php if ( $my->id ) { initEditor(); } ?>
<link href="<?php echo $GLOBALS['mosConfig_live_site']; ?>/templates/colortheme/css/template_css.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<div id="logo"><img src="<?php echo $GLOBALS['mosConfig_live_site']; ?>/templates/colortheme/images/jb.png" alt="" border="0"/>
</div><div id="banner2"><?php mosLoadModules ( 'banner', -3 ); ?></div>
</div>
<div style="clear:both"></div>
<div id="buttons_outer">
<div id="buttons_inner">
<div id="buttons">
<?php mosLoadModules ( 'user3', -3); ?>
</div>
</div>
</div>
<div style="clear:both"></div>
<?php if (mosCountModules ( 'user1') && (mosCountModules('user2') && (mosCountModules('top')))) { ?>
<div id="description">
<?php mosLoadModules ( 'user1', -3 ); ?>
</div>
<div id="info">
<?php mosLoadModules ( 'user2', -3 ); ?>
</div>
<div id="top">
<?php mosLoadModules ( 'top', -3 ); ?>
</div>
<?php }
else {?>
<?php if (mosCountModules ( 'top') && (mosCountModules('user2'))) { ?>
<div id="info2">
<?php mosLoadModules ( 'user2', -3 ); ?>
</div>
<div id="top2">
<?php mosLoadModules ( 'top', -3 ); ?>
</div>
<?php }
else {?>
<?php if (mosCountModules ( 'user1') && (mosCountModules('top'))) { ?>
<div id="description2">
<?php mosLoadModules ( 'user1', -3 ); ?>
</div>
<div id="top2">
<?php mosLoadModules ( 'top', -3 ); ?>
</div>
<?php }
else {?>
<?php if (mosCountModules ( 'user1') && (mosCountModules('user2'))) { ?>
<div id="description2">
<?php mosLoadModules ( 'user1', -3 ); ?>
</div>
<div id="info2">
<?php mosLoadModules ( 'user2', -3 ); ?>
</div>
<?php }
else {?>
<?php if (mosCountModules ( 'user1')) { ?>
<div id="description3">
<?php mosLoadModules ( 'user1', -3 ); ?>
</div>
<?php }
else {?>
<?php if (mosCountModules ( 'user2')) { ?>
<div id="info3">
<?php mosLoadModules ( 'user2', -3 ); ?>
</div>
<?php }
else {?>
<?php if (mosCountModules ( 'top')) { ?>
<div id="top3">
<?php mosLoadModules ( 'top', -3 ); ?>
</div>
<?php }?>
<?php }?>
<?php }?>
<?php }?>
<?php }?>
<?php }?>
<?php }?>
<div style="clear:both"/>
<table class="themaintable" width="100%">
<tr><td width="100%" colspan="5" style="background: url(<?php echo $GLOBALS['mosConfig_live_site']; ?>/templates/colortheme/images/hseparator.png) repeat-x; height:3px;width:100%;text-align:left;" ></td></tr>
<tr><td width="180px" valign="top">
<div id="leftmenu">
<?php mosLoadModules ( 'left' ); ?>
</div>
<div id="leftmenu2">
</div>
</td>
<td width="5px" style="background: url(<?php echo $GLOBALS['mosConfig_live_site']; ?>/templates/colortheme/images/vseparator.png) repeat-y; width:5px;height:100%;text-align:left;"></td>
<td width="100%" valign="top">
<div id="pathw">
<?php include_once ("pathway.php"); ?>
</div>
<?php if (mosCountModules ( 'top')) { ?>
<div id="advert2">
<?php mosLoadModules ( 'advert2', -3 ); ?>
</div>
<?php }?>
<div id="mainbody">
<?php include_once("mainbody.php"); ?>
<?php if (mosCountModules ( 'top')) { ?>
<div id="advert1">
<?php mosLoadModules ( 'advert1', -3 ); ?>
</div>
<?php }?>
</div>
</td><td width="5px" style="background: url(<?php echo $GLOBALS['mosConfig_live_site']; ?>/templates/colortheme/images/vseparator.png) repeat-y; width:5px;height:100%;text-align:left;"></td>
<?php if (mosCountModules ( "right")) { ?>
<td width="180px" valign="top">
<div id="rightmenu">
<?php mosLoadModules ( 'right' ); ?>
</div></td></tr></table>
<?php }else{ ?>
</tr></table>
<?php } ?>
<table width="100%" align="left">
<tr><td width="100%" style="background: url(<?php echo $GLOBALS['mosConfig_live_site']; ?>/templates/colortheme/images/hseparator.png) repeat-x; height:5px;width:100%;text-align:left;" ></td></tr>
<tr><td width="100%" style="background: transparent; height:5px;width:100%;text-align:center;" >
<?php echo _JB_FOOTER; ?>
</td></tr>
<tr><td width="100%" style="background: url(<?php echo $GLOBALS['mosConfig_live_site']; ?>/templates/colortheme/images/hseparator.png) repeat-x; height:5px;width:100%;text-align:left;" ></td></tr></table>
</body>
</html>
2. CSS w pliku do ściągnięcia
Pozdrawiam i z góry dzięki.
Właśnie zrobiłem sobie możliwość wczytywania plików do artykułów. Głównie będę ładował do artykułów tabele, te tabele mają już określone szerokości i w miarę coraz większej ilości danych tabele te będą coraz szersze. Znalazłem szablon colortheme, który spokojnie rozkłada stronę na całej szerokości ale dla mnie to za mało. Potrzebowałbym żeby w miarę zwiększenia się szerokości wczytywanej tabeli strona też powiększała swoją szerokość poza ekran w prawą stronę.
Poniżej przedstawiam index tempelatki i css.
1. index.php tempelatki
<?php defined( "_VALID_MOS" ) or die( "Direct Access to this location is not allowed." );$iso = split( '=', _ISO );echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>';?>
<?php
if(file_exists($mosConfig_absolute_path.'/templates/colortheme/language/'.$mosConfig_lang.'.php')) require_once($mosConfig_absolute_path.'/templates/colortheme/language/'.$mosConfig_lang.'.php');
else require_once($mosConfig_absolute_path.'/templates/colortheme/language/english.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php mosShowHead(); ?>
<meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" />
<?php if ( $my->id ) { initEditor(); } ?>
<link href="<?php echo $GLOBALS['mosConfig_live_site']; ?>/templates/colortheme/css/template_css.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<div id="logo"><img src="<?php echo $GLOBALS['mosConfig_live_site']; ?>/templates/colortheme/images/jb.png" alt="" border="0"/>
</div><div id="banner2"><?php mosLoadModules ( 'banner', -3 ); ?></div>
</div>
<div style="clear:both"></div>
<div id="buttons_outer">
<div id="buttons_inner">
<div id="buttons">
<?php mosLoadModules ( 'user3', -3); ?>
</div>
</div>
</div>
<div style="clear:both"></div>
<?php if (mosCountModules ( 'user1') && (mosCountModules('user2') && (mosCountModules('top')))) { ?>
<div id="description">
<?php mosLoadModules ( 'user1', -3 ); ?>
</div>
<div id="info">
<?php mosLoadModules ( 'user2', -3 ); ?>
</div>
<div id="top">
<?php mosLoadModules ( 'top', -3 ); ?>
</div>
<?php }
else {?>
<?php if (mosCountModules ( 'top') && (mosCountModules('user2'))) { ?>
<div id="info2">
<?php mosLoadModules ( 'user2', -3 ); ?>
</div>
<div id="top2">
<?php mosLoadModules ( 'top', -3 ); ?>
</div>
<?php }
else {?>
<?php if (mosCountModules ( 'user1') && (mosCountModules('top'))) { ?>
<div id="description2">
<?php mosLoadModules ( 'user1', -3 ); ?>
</div>
<div id="top2">
<?php mosLoadModules ( 'top', -3 ); ?>
</div>
<?php }
else {?>
<?php if (mosCountModules ( 'user1') && (mosCountModules('user2'))) { ?>
<div id="description2">
<?php mosLoadModules ( 'user1', -3 ); ?>
</div>
<div id="info2">
<?php mosLoadModules ( 'user2', -3 ); ?>
</div>
<?php }
else {?>
<?php if (mosCountModules ( 'user1')) { ?>
<div id="description3">
<?php mosLoadModules ( 'user1', -3 ); ?>
</div>
<?php }
else {?>
<?php if (mosCountModules ( 'user2')) { ?>
<div id="info3">
<?php mosLoadModules ( 'user2', -3 ); ?>
</div>
<?php }
else {?>
<?php if (mosCountModules ( 'top')) { ?>
<div id="top3">
<?php mosLoadModules ( 'top', -3 ); ?>
</div>
<?php }?>
<?php }?>
<?php }?>
<?php }?>
<?php }?>
<?php }?>
<?php }?>
<div style="clear:both"/>
<table class="themaintable" width="100%">
<tr><td width="100%" colspan="5" style="background: url(<?php echo $GLOBALS['mosConfig_live_site']; ?>/templates/colortheme/images/hseparator.png) repeat-x; height:3px;width:100%;text-align:left;" ></td></tr>
<tr><td width="180px" valign="top">
<div id="leftmenu">
<?php mosLoadModules ( 'left' ); ?>
</div>
<div id="leftmenu2">
</div>
</td>
<td width="5px" style="background: url(<?php echo $GLOBALS['mosConfig_live_site']; ?>/templates/colortheme/images/vseparator.png) repeat-y; width:5px;height:100%;text-align:left;"></td>
<td width="100%" valign="top">
<div id="pathw">
<?php include_once ("pathway.php"); ?>
</div>
<?php if (mosCountModules ( 'top')) { ?>
<div id="advert2">
<?php mosLoadModules ( 'advert2', -3 ); ?>
</div>
<?php }?>
<div id="mainbody">
<?php include_once("mainbody.php"); ?>
<?php if (mosCountModules ( 'top')) { ?>
<div id="advert1">
<?php mosLoadModules ( 'advert1', -3 ); ?>
</div>
<?php }?>
</div>
</td><td width="5px" style="background: url(<?php echo $GLOBALS['mosConfig_live_site']; ?>/templates/colortheme/images/vseparator.png) repeat-y; width:5px;height:100%;text-align:left;"></td>
<?php if (mosCountModules ( "right")) { ?>
<td width="180px" valign="top">
<div id="rightmenu">
<?php mosLoadModules ( 'right' ); ?>
</div></td></tr></table>
<?php }else{ ?>
</tr></table>
<?php } ?>
<table width="100%" align="left">
<tr><td width="100%" style="background: url(<?php echo $GLOBALS['mosConfig_live_site']; ?>/templates/colortheme/images/hseparator.png) repeat-x; height:5px;width:100%;text-align:left;" ></td></tr>
<tr><td width="100%" style="background: transparent; height:5px;width:100%;text-align:center;" >
<?php echo _JB_FOOTER; ?>
</td></tr>
<tr><td width="100%" style="background: url(<?php echo $GLOBALS['mosConfig_live_site']; ?>/templates/colortheme/images/hseparator.png) repeat-x; height:5px;width:100%;text-align:left;" ></td></tr></table>
</body>
</html>
2. CSS w pliku do ściągnięcia
Pozdrawiam i z góry dzięki.