Witam. Ostatnio kupiłem sobie skrypt PHP. Niestety chciałem go zmodyfikować do mojej templatki, ale za Chiny nie umiem zacząć.
Szablon zaczyna się <? a kończy tak ?>
Moja templatka jest ogólnie w html a w miejscach gdzie chcę dać znaczniki z PHP zawsze wstawiałem pomiędzy <?PHP ?>. Teraz jest moje pytanie. Czy mógłby mi ktoś pomóc wyjąć odpowiednie części oryginalnego szablonu i zmodyfikować tak
aby można je było wstawić pomiędzy <?PHP ?> ?
Kod szablonu
<?
function subheader($u_m_opis, $u_m_sk, $u_title, $l_charset)
{
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
<head>
<meta name="Description" content="'.$u_m_opis.'" />
<meta name="Keywords" content="'.$u_m_sk.'" />
<meta http-equiv="Content-Type" content="text/html; charset='.$l_charset.'" />
<meta name="Distribution" content="Global" />
<meta name="Robots" content="index,follow" />
<link rel="stylesheet" href="theme/green/images/style.css" type="text/css" />
<link rel="stylesheet" href="theme/green/styles.css" type="text/css" />
<title>'.$u_title.'</title>
</head>
<body>
';
}
[b]function top()[/b]
{
<table align="center" cellspacing="0">
<tr>
<td width="820" height="120" background="theme/green/images/logo.jpg">
</td>
</tr>
</table>
</center>';
}
[b]function body()[/b]
{
echo'<center><table width="820" cellspacing="0" align="center" class="mm"> <tr>
<td align="left" valign="top">';
}
[b]function bodyc()[/b]
{
</td>
<td align="center" valign="top">
';
}
[b]function bodye()[/b]
{
</td>
</tr>
</table>
</center>
';
}
[b]function menum($name)[/b]
{
<br>
<table border='0' class='forumline' cellspacing='0' width='160' cellpadding='0' ><tr>
<td class='panel' width='160'>
".$name."
</td></tr>
<tr><td class='side-body' width='160'>
";
}
[b]
function menume()[/b]
{
</td></tr></table>
';
}
[b]function menud($name)[/b]
{
<table border='0' class='forumline' cellspacing='0' width='460' cellpadding='0' ><tr>
<td class='panel' width='460'>
".$name."
</td></tr>
<tr><td class='side-body' width='460'>
";
}
[b]function menude()[/b]
{
</td></tr></table>
';
}
[b]function menuf()[/b]
{
<table border='0' class='forumline' cellspacing='0' width='460' cellpadding='0' >
<tr><td class='side-body' width='460'>
";
}
[b]function menufe()[/b]
{
</td></tr></table>
';
}
[b]function footer($footer)[/b]
{
<center><table border='0' class='forumline' cellspacing='0' width='820' cellpadding='0' ><tr>
<td class='panel' width='820'>
<center>".$footer."</center>
</td></tr></table></center>";
}
?>
U góry pogrubiłem części o które mi chodzi.
Pozdrawiam.
Ten post edytował tomcikp 22.03.2008, 09:48:26