Wyśrodkowanie skórki phos w php-fusion 7


(Portal24dk) #1

Witam

Czy może mi ktoś pomóc z wyśrodkowaniem strony adres mojej strony to

<?php

/*.phos Theme for PHP-Fusion v7......*|

|*.Author: Max "Matonor" Toball......*|

|*.Released under the Affero GPLv3...*/


//Theme Settings

define("THEME_WIDTH", "85%"); //theme width. Make sure to adapt the margin-left in the first div (-width/2).

define("THEME_BULLET", "·"); //bullet image

$enable_colour_switcher = true; //true=enable colour switcher | false=disable colour switcher

$enable_fontsize_switcher = true; //true=enable fontsize switcher | false=disable fontsize switcher

$enable_column_switcher = true; //true=enable column switcher | false=disable column switcher

//Theme Settings /


if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }

require_once INCLUDES."theme_functions_include.php";

require_once THEMES."templates/switcher.php";


$colour_switcher = new Switcher("select", "colour", "gif", "blue", "switcherbutton");

if(!$enable_colour_switcher){

	$colour_switcher->disable();

}


$column_switcher = new Switcher("select", "columns", "gif", "both", "switcherbutton");

if(!$enable_column_switcher){

	$column_switcher->disable();

}


$fontsize_switcher = new Switcher("increment", "fontsize", "gif", 1, "switcherbutton", "", true, array("step" => 0.1, "max" => 1.5));

if(!$enable_fontsize_switcher){

	$fontsize_switcher->disable();

}


redirect_img_dir(THEME."forum", THEME."forum/".$colour_switcher->selected);

set_image("pollbar", THEME."images/panelcap_bg.jpg");


function get_head_tags(){

	global $colour_switcher, $fontsize_switcher, $column_switcher;

	echo $colour_switcher->makeHeadTag();

	echo $column_switcher->makeHeadTag();

	echo "";

	echo "";

}


function render_page($license=false) {


global $aidlink, $locale, $settings, $colour_switcher, $fontsize_switcher, $column_switcher, $main_style;



	echo "
  • ".$locale['global_210']."

  • \n"; if(iMEMBER){ echo "\t\t\t\t\t\t\t

  • ".$locale['global_120']."
  • | ".$locale['global_121']." ".(iADMIN ? "
  • | ".$locale['global_123']."" : "")."
  • | ".$locale['global_124']."\n"; }else{ echo "\t\t\t\t\t\t\t
  • ".$locale['global_104']." ".($settings['enable_registration'] ? "
  • | ".$locale['global_107']."\n" : ""); } echo "\t\t\t\t\t\t

".showbanners()."

". preg_replace("^(li)( class='(first-link)')*(>

".$colour_switcher->makeForm("flright")." ".$column_switcher->makeForm("flright")." ".$fontsize_switcher->makeForm("flright")."

".(LEFT ? "
".LEFT."
" : "")." ".(RIGHT ? "
".RIGHT."
" : "")."

". U_CENTER. CONTENT. L_CENTER."

".(!$license ? "
".showcopyright()." \n Theme designed by Max Toball
" : "")."
".stripslashes($settings['footer'])."
\n"; echo "\t

".sprintf($locale['global_172'], substr((get_microtime() - START_TIME),0,4))."

".showcounter()."

"; } function render_news($subject, $news, $info) { global $locale; opentable($subject); echo "
".$news."

".newsposter($info," ·").newsopts($info,"·").itemoptions("N",$info['news_id']). "
\n"; closetable(); } function render_article($subject, $article, $info) { global $locale; opentable($subject); echo "
".($info['article_breaks'] == "y" ? nl2br($article) : $article)."

".articleposter($info," ·").articleopts($info,"·").itemoptions("A",$info['article_id']). "
\n"; closetable(); } function opentable($title) { echo "\n

$title

\n"; } function closetable() { echo "

\n"; } $panel_collapse = true; function openside($title, $collapse = false, $state = "on") { static $box_id = 0; $box_id++; global $panel_collapse, $p_data; $panel_collapse = $collapse; if($p_data['panel_filename'] == "css_navigation_panel"){ $panel_collapse = false; echo "

"; }else{ echo "

".($collapse ? panelbutton($state,$box_id) : "")."$title

\n\t".($collapse ? panelstate($state, $box_id) : ""); } } function closeside() { global $panel_collapse, $p_data; echo ($panel_collapse ? "\t
" : "")."\n

\n"; if($p_data['panel_filename'] == "css_navigation_panel"){ echo "

"; } } ?>


(Mariuszs) #2

Plik szablonu będzie taki:

<?php

/*.phos Theme for PHP-Fusion v7......*|

|*.Author: Max "Matonor" Toball......*|

|*.Released under the Affero GPLv3...*/


//Theme Settings

define("THEME_WIDTH", "85%"); //theme width. Make sure to adapt the margin-left in the first div (-width/2).

define("THEME_BULLET", "·"); //bullet image

$enable_colour_switcher = true; //true=enable colour switcher | false=disable colour switcher

$enable_fontsize_switcher = true; //true=enable fontsize switcher | false=disable fontsize switcher

$enable_column_switcher = true; //true=enable column switcher | false=disable column switcher

//Theme Settings /


if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }

require_once INCLUDES."theme_functions_include.php";

require_once THEMES."templates/switcher.php";


$colour_switcher = new Switcher("select", "colour", "gif", "blue", "switcherbutton");

if(!$enable_colour_switcher){

   $colour_switcher->disable();

}


$column_switcher = new Switcher("select", "columns", "gif", "both", "switcherbutton");

if(!$enable_column_switcher){

   $column_switcher->disable();

}


$fontsize_switcher = new Switcher("increment", "fontsize", "gif", 1, "switcherbutton", "", true, array("step" => 0.1, "max" => 1.5));

if(!$enable_fontsize_switcher){

   $fontsize_switcher->disable();

}


redirect_img_dir(THEME."forum", THEME."forum/".$colour_switcher->selected);

set_image("pollbar", THEME."images/panelcap_bg.jpg");


function get_head_tags(){

   global $colour_switcher, $fontsize_switcher, $column_switcher;

   echo $colour_switcher->makeHeadTag();

   echo $column_switcher->makeHeadTag();

   echo "";

   echo "";

}


function render_page($license=false) {


global $aidlink, $locale, $settings, $colour_switcher, $fontsize_switcher, $column_switcher, $main_style;



   echo "
  • ".$locale['global_210']."

  • \n"; if(iMEMBER){ echo "\t\t\t\t\t\t\t

  • ".$locale['global_120']."
  • | ".$locale['global_121']." ".(iADMIN ? "
  • | ".$locale['global_123']."" : "")."
  • | ".$locale['global_124']."\n"; }else{ echo "\t\t\t\t\t\t\t
  • ".$locale['global_104']." ".($settings['enable_registration'] ? "
  • | ".$locale['global_107']."\n" : ""); } echo "\t\t\t\t\t\t

".showbanners()."

". preg_replace("^(li)( class='(first-link)')*(>

".$colour_switcher->makeForm("flright")." ".$column_switcher->makeForm("flright")." ".$fontsize_switcher->makeForm("flright")."

".(LEFT ? "
".LEFT."
" : "")." ".(RIGHT ? "
".RIGHT."
" : "")."

". U_CENTER. CONTENT. L_CENTER."

".(!$license ? "
".showcopyright()." \n Theme designed by Max Toball
" : "")."
".stripslashes($settings['footer'])."
\n"; echo "\t

".sprintf($locale['global_172'], substr((get_microtime() - START_TIME),0,4))."

".showcounter()."

"; } function render_news($subject, $news, $info) { global $locale; opentable($subject); echo "
".$news."

".newsposter($info," ·").newsopts($info,"·").itemoptions("N",$info['news_id']). "
\n"; closetable(); } function render_article($subject, $article, $info) { global $locale; opentable($subject); echo "
".($info['article_breaks'] == "y" ? nl2br($article) : $article)."

".articleposter($info," ·").articleopts($info,"·").itemoptions("A",$info['article_id']). "
\n"; closetable(); } function opentable($title) { echo "\n

$title

\n"; } function closetable() { echo "

\n"; } $panel_collapse = true; function openside($title, $collapse = false, $state = "on") { static $box_id = 0; $box_id++; global $panel_collapse, $p_data; $panel_collapse = $collapse; if($p_data['panel_filename'] == "css_navigation_panel"){ $panel_collapse = false; echo "

"; }else{ echo "

".($collapse ? panelbutton($state,$box_id) : "")."$title

\n\t".($collapse ? panelstate($state, $box_id) : ""); } } function closeside() { global $panel_collapse, $p_data; echo ($panel_collapse ? "\t
" : "")."\n

\n"; if($p_data['panel_filename'] == "css_navigation_panel"){ echo "

"; } } ?>
Natomiast w arkuszu styles.css (linia 140) wyczyść atrybuty dla #main. Czyli będzie tak:

#main {}

(Portal24dk) #3

Dobrze a możesz mi napisać co zmieniłeś w pliku szablonu


(Mariuszs) #4

Musiałem zmienić linijkę:

Ponieważ ramka jest stylizowana wewnątrz pliku, a nie w CSS. Dokładnie zamieniłem: left: 50%; margin-left: -47.5%; na margin: 0 auto; .

echo "

(Portal24dk) #5

Bardzo dziękuje za pomoc

Działa OK