Witam .
Postanowiłem sobie ostatnio wyśrodkować stronkę oparta o PHP-Fusion v7.
Edytowałem theme.php:
<?php
if (!defined("IN_FUSION")) { die("Access Denied"); }
// theme settings
define("THEME_BULLET", "<img src='".THEME."images/bullet.gif' alt='' style='border:0' />");
require_once INCLUDES."theme_functions_include.php";
$body_text = "#000000";
$body_bg = "#c2c9c9";
function render_page($license=false) {
global $theme_width,$settings,$locale;
echo "<table align='center' width='900' cellspacing='0' cellpadding='0' id='main' align='center'>
<tr>
<td>
<table width='900' cellspacing='0' cellpadding='0' align='center'>
<tr>
<td class='full-header' style='padding:5px;'>
<table width='100%' cellspacing='0' cellpadding='0' align='center'>
<tr>
<td>".showbanners()."</td>
</tr>
</table>
</td>
</tr>
</table>
<table width='1100' cellspacing='0' cellpadding='0' align='center'>
<tr>
<td class='bar-left'><img src='".THEME."images/blank.gif' width='7' height='28' alt='' style='display:block' /></td>
<td class='bar-main'>".showsublinks(" <span class='bullet'>·</span> ","white")."</td>
<td align='right' class='bar-main'>".showsubdate()."</td>
<td class='bar-right'><img src='".THEME."images/blank.gif' width='9' height='28' alt='' style='display:block' /></td>
</tr>
</table>
<table width='1100' cellspacing='0' cellpadding='0' align='center'>
<tr>\n";
if (LEFT) { echo "<td class='side-border-left' valign='top'>".LEFT."</td>"; }
echo "<td class='main-bg' valign='top'>".U_CENTER.CONTENT.L_CENTER."</td>";
if (RIGHT) { echo "<td class='side-border-right' valign='top'>".RIGHT."</td>"; }
echo "
</tr>
</table>
<table cellpadding='0' cellspacing='0' width='100%' align='center'>
<tr>
<td class='white-header'>
".stripslashes($settings['footer'])."
</td>
</tr>
</table>
<table cellpadding='0' cellspacing='0' width='100%' align='center'>
<tr>
<td class='full-header'><br />";
if ($license == false) {
}
echo showcounter()."
</td>
</tr>
</table>
</td>
</tr>
</table>\n";
}
function render_news($subject, $news, $info) {
global $locale;
echo "
<table width='100%' cellpadding='0' cellspacing='0' align='center'>
<tr>
<td class='b-top-left'><img src='".THEME."images/blank.gif' width='7' height='27' alt='' style='display:block' /></td>
<td class='b-top-main'>$subject</td>
<td class='b-top-right'><img src='".THEME."images/blank.gif' width='9' height='27' alt='' style='display:block' /></td>
</tr>
</table>
<table width='100%' cellpadding='0' cellspacing='0' align='center'>
<tr>
<td class='b-left'><img src='".THEME."images/blank.gif' width='7' height='1' alt='' style='display:block' /></td>
<td class='main-body'>
$news
<div style='margin-top:5px;'>
<table width='100%' cellpadding='0' cellspacing='0' align='center'>
<tr>
<td class='news-footer'>".
newsposter($info, THEME_BULLET).newsopts($info, THEME_BULLET).itemoptions("N",$info['news_id'])."
</td>
</tr>
</table>
</div>
</td>
<td class='b-right'><img src='".THEME."images/blank.gif' width='7' height='1' alt='' style='display:block' /></td>
</tr>
<tr>
<td class='b-bottom-left'><img src='".THEME."images/blank.gif' width='7' height='10' alt='' style='display:block' /></td>
<td class='b-bottom-main'><img src='".THEME."images/blank.gif' width='1' height='10' alt='' style='display:block' /></td>
<td class='b-bottom-right'><img src='".THEME."images/blank.gif' width='9' height='10' alt='' style='display:block' /></td>
</tr>
</table>
<br />\n";
}
function render_article($subject, $article, $info) {
global $locale;
echo "
<table width='100%' cellpadding='0' cellspacing='0' align='center'>
<tr>
<td class='b-top-left'><img src='".THEME."images/blank.gif' width='7' height='27' alt='' style='display:block' /></td>
<td class='b-top-main'>$subject</td>
<td class='b-top-right'><img src='".THEME."images/blank.gif' width='9' height='27' alt='' style='display:block' /></td>
</tr>
</table>
<table width='100%' cellpadding='0' cellspacing='0' align='center'>
<tr>
<td class='b-left'><img src='".THEME."images/blank.gif' width='7' height='1' alt='' style='display:block' /></td>
<td class='main-body'>
".($info['article_breaks'] == "y" ? nl2br($article) : $article)."
<div style='margin-top:5px;'>
<table width='100%' cellpadding='0' cellspacing='0' align='center'>
<tr>
<td class='news-footer'>".
articleposter($info, THEME_BULLET).articleopts($info, THEME_BULLET).itemoptions("A",$info['article_id'])."
</td>
</tr>
</table>
</div>
</td>
<td class='b-right'><img src='".THEME."images/blank.gif' width='7' height='1' alt='' style='display:block' /></td>
</tr>
<tr>
<td class='b-bottom-left'><img src='".THEME."images/blank.gif' width='7' height='10' alt='' style='display:block' /></td>
<td class='b-bottom-main'><img src='".THEME."images/blank.gif' width='1' height='10' alt='' style='display:block' /></td>
<td class='b-bottom-right'><img src='".THEME."images/blank.gif' width='9' height='10' alt='' style='display:block' /></td>
</tr>
</table>\n";
}
function opentable($title) {
echo "
<table width='100%' cellpadding='0' cellspacing='0' align='center'>
<tr>
<td class='b-top-left'><img src='".THEME."images/blank.gif' width='7' height='27' alt='' style='display:block' /></td>
<td class='b-top-main'>$title</td>
<td class='b-top-right'><img src='".THEME."images/blank.gif' width='9' height='27' alt='' style='display:block' /></td>
</tr>
</table>
<table width='100%' cellpadding='0' cellspacing='0' class='tablebreak' align='center'>
<tr>
<td class='b-left'><img src='".THEME."images/blank.gif' width='7' height='1' alt='' style='display:block' /></td>
<td class='main-body'>\n";
}
function closetable() {
echo "
</td>
<td class='b-right'><img src='".THEME."images/blank.gif' width='7' height='1' alt='' style='display:block' /></td>
</tr>
<tr>
<td class='b-bottom-left'><img src='".THEME."images/blank.gif' width='7' height='10' alt='' style='display:block' /></td>
<td class='b-bottom-main'><img src='".THEME."images/blank.gif' width='1' height='10' alt='' style='display:block' /></td>
<td class='b-bottom-right'><img src='".THEME."images/blank.gif' width='9' height='10' alt='' style='display:block' /></td>
</tr>
</table>\n";
}
function openside($title, $collapse = false, $state = "on") {
global $panel_collapse; $panel_collapse = $collapse;
$boxname = str_replace(" ", "", $title);
echo "<table width='100%' cellpadding='0' cellspacing='0' align='center'>
<tr>
<td class='b-top-left'><img src='".THEME."images/blank.gif' width='7' height='27' alt='' style='display:block' /></td>
<td class='b-top-main'>$title</td>
".($collapse ? "<td class='b-top-main' align='right'>".panelbutton($state, $boxname)."</td>" : "")."
<td class='b-top-right'><img src='".THEME."images/blank.gif' width='9' height='27' alt='' style='display:block' /></td>
</tr>
</table>
<table width='100%' cellpadding='0' cellspacing='0' class='tablebreak' align='center'>
<tr>
<td class='b-left'><img src='".THEME."images/blank.gif' width='7' height='1' alt='' style='display:block' /></td>
<td class='side-body'>";
if ($collapse == true) { echo panelstate($state, $boxname); }
}
function closeside() {
global $panel_collapse;
if ($panel_collapse == true) { echo "</div>\n"; }
echo "
</td>
<td class='b-right'><img src='".THEME."images/blank.gif' width='7' height='1' alt='' style='display:block' /></td>
</tr>
<tr>
<td class='b-bottom-left'><img src='".THEME."images/blank.gif' width='7' height='10' alt='' style='display:block' /></td>
<td class='b-bottom-main'><img src='".THEME."images/blank.gif' width='1' height='10' alt='' style='display:block' /></td>
<td class='b-bottom-right'><img src='".THEME."images/blank.gif' width='9' height='10' alt='' style='display:block' /></td>
</tr>
</table>\n";
}
?>
I niby wszystko wyglądało ok ( pracowałem na laptopie 15 cali) - do czasu jak nie wyświetliłem stronki w domu na ekranie 22 cale. Cała strona znajduje się po lewej stronie ekranu. Pojedyńcze części strony wycentrowały się prawidłowo lecz cała strona chyba posiada jakieś "ukryte" ustawienie... Nie|wiem jak to ugryźć.
PW od moderatora:
- Zmiana nazwy tematu - Pieka 29.09 - 09:01
- Brak Stopki! - Pieka 29.09 - 14:48
MariuszL dodał/a następującą grafikę:
Edytowane przez Pieka dnia 29.09.2009 22:30:37
|