• Das Erstellen neuer Accounts wurde ausgesetzt. Bei berechtigtem Interesse bitte Kontaktaufnahme über die üblichen Wege. Beste Grüße der Admin

xxoes hat ne frage betriff templates!!!

xxoes

New member
Also ihr kennt ja sicherlich das wbb.
daraus habe ich mir einige functionen der Templates kopiert!!

so:

<table border=0 bgcolor="{tablebordercolor}" cellpadding=4 cellspacing=1 width=100%>

wie man sicherlich bemerkt wird später bei der ausgabe {tablebordercolor} mit den entsprechenden werten ersetzt!

nun möchte ich wenn z.b.:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>

<TITLE>{title}</TITLE>
<base target="_top">
<META http-equiv=content-type content=text/html;charset=iso-8859-1>
<style type="text/css">
<!--
a:link { font-family: Verdana, Arial, Helvetica, sans-serif; color: #000066; text-decoration: none}
a:hover { color: #000099; text-decoration: underline; background-color: #1199CC}
-->
</style>
</HEAD>

<BODY bgColor=#324150 text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<CENTER>
<TABLE height=100 width="100%" border=0 cellpadding="0" cellspacing="0"> <TBODY>
<TR> <TD width="100%" height=100 bgcolor="#568CAD">
{#include={main_title}#}
</TD></TR></TBODY></TABLE><br>
</CENTER>
<TABLE width="100%" border=0 cellspacing="0" cellpadding="0">
<TBODY>
<TR>
<TD vAlign=top align=left width=1>
{#include={main_menu1}#}
</TD>
<TD width="100%" valign="TOP">
{#include={main_frame}#}
</TD>
<TD vAlign=top align=left width=1>
{#include={main_menu2}#}
{#include=useronline.php#}
</TD>
</TR>
</TBODY>
</TABLE>
</BODY></HTML>


{#include="hier die datei"#} das an der stelle die angegebenen datei eingefügt wird!

hier vileicht noch der template code:
function gettemplate($template,$endung="htm") {
global $templatefolder;
if(!$templatefolder) $templatefolder = "templates";
return str_replace("\"","\\\"",implode("",file($templatefolder."/".$template.".".$endung)));
}
function dooutput($template) {
global $bgcolor, $tablebg, $tableb, $tablec, $tabled, $tablea, $font, $fontcolor, $fontcolorsec, $fontcolorthi, $fontcolorfour, $bgfixed, $bgimage;
$template = str_replace("{pagebgcolor}","$bgcolor",$template);
$template = str_replace("{tablebordercolor}","$tablebg",$template);
$template = str_replace("{tablea}","$tablea",$template);
$template = str_replace("{tableb}","$tableb",$template);
$template = str_replace("{tablec}","$tablec",$template);
$template = str_replace("{tabled}","$tabled",$template);
$template = str_replace("{font}","$font",$template);
$template = str_replace("{fontcolorfirst}","$fontcolor",$template);
$template = str_replace("{fontcolorsecond}","$fontcolorsec",$template);
$template = str_replace("{fontcolorthird}","$fontcolorthi",$template);
$template = str_replace("{fontcolorfourth}","$fontcolorfour",$template);

if($bgimage) $hgpicture = " background=\"$bgimage\"";
$template = str_replace("{hgpicture}","$hgpicture",$template);
if($bgfixed) $template = str_replace("{bgproperties}"," bgproperties=fixed",$template);
else $template = str_replace("{bgproperties}","",$template);
echo $template;
}


wenn ihr zeit und lust habt könnt ihr euch das vielicht mal ansehen!

für weitere fragen stehe ich gerne offen!0


cu xxoes und thx im forraus!
 
wbb??? wasn das?? :)

anyway: wenn ich das jetzt richtig verstehe, dann willst Du sowas wie Includes in diese Templates reinmogeln!?

Also da das Template ausgelesen und die markierten Stellen ausgetauscht werden kannst Du Includes nur realisieren, wenn Du die einzubindende Datei auch per fopen einliest und in den Code einfügst. Ein eval könnte möglichen PHP innerhalb der eingefügten Datei ausführen.

Ein andere Möglichkeit wäre es z.B. mit den Templates der PHPLib herumzuspielen. Diese sind schon darauf ausgelegt, daß ein Template das andere einbindet, um so aus vielen Bausteinen eine komplette Seite zu basteln. Hab ich aber selbst noch nicht ausprobiert.
 
hm, das wbb is auch ein forumart das is blos freeware, deswegen hab ich daher auch die templates.

die informationenn werden per $file = @file("file.html"); engelesen.

ich habe da schon ne lösung für is aber etwas umständlich.


cu xxoes
 
meine lösung ist scheiße!!!
sonst hätte ich den post wohl kaum aufgemacht!

wenns aber net anders geht dann is es halt so ;)

cu xxoes
 
Zurück
Oben