Witam niedawno postanowiłem wstawić poziome menu na strone typu nasza-klasa zdobyłem kod na menu w ajaxie i mi nie działa:
<script type='text/javascript' src='menu/prototype.lite.js'></script>
<script type='text/javascript' src='menu/moo.fx.js'></script>
<script type='text/javascript' src='menu/moo.fx.pack.js'></script>
<script type='text/javascript'>
function init(){
var stretchers = document.getElementsByClassName('box');
var toggles = document.getElementsByClassName('tab');
var myAccordion = new fx.Accordion(
toggles, stretchers, {opacity: false, height: true, duration: 600}
);
//hash functions
var found = false;
toggles.each(function(h3, i){
var div = Element.find(h3, 'nextSibling');
if (window.location.href.indexOf(h3.title) > 0) {
myAccordion.showThisHideOpen(div);
found = true;
}
});
if (!found) myAccordion.showThisHideOpen(stretchers[0]);
}
</script>
</head>
<body>
<div id='wrapper'>
<div id='content'>
<h3 class='tab'><div class='tabtxt'><a href='news.php'>Strona Główna</a></div></h3>
<div class='tab'><h3 class='tabtxt' title='profil'><a href='#2'>Profil</a></h3></div>
<div class='tab'><h3 class='tabtxt' title='forum'><a href='forum/'>Forum</a></h3></div>
<div class='tab'><h3 class='tabtxt' title='Przydatne'><a href='#3'>Przydatne</a></h3></div>
<div class='tab'><h3 class='tabtxt' title='Rozrywka'><a href='#4'>Rozrywka</a></h3></div>
<div class='boxholder'>
<div class='box'>
</div>
<div class='box'>
<p></p>
</div>
<div class='box'>
</div>
<div class='box'>
<p><a href='plan-lekcji.php'>Plan Lekcji</a> <a href='zastepstwa.php'>Zastępstwa</a> <a href='slowniczek.php'>Słownik</a></p>
</div>
<div class='box'>
<p><a href='user/gallery/album.php'>Galeria</a> <a href='gry.php'>Gry</a> <a href='viewpage.php?page_id=1'>Zapodaj muze</a></p>
</div>
</div>
</div>
</div>
<script type='text/javascript'>
Element.cleanWhitespace('content');
init();
</script>
Kliknij i zaczekaj na załadowanie kodu ...
Gdzie musze dodac ten kod zeby mi poprawnie działał?
Mój theme.php:
<?
if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
require_once INCLUDES."theme_functions_include.php";
// theme settings
$body_text = "#000000";
$body_bg = "#ffffff";
$theme_width = "848";
$theme_width_l = "160";
$theme_width_r = "160";
function render_header($header_content) {
global $theme_width;
echo "<table align=center class='mainsite-border' align='left' width='848' cellspacing='0' cellpadding='0'>
<tr><td class='outer-border'>
<table align='center' width='100%' cellspacing='0' cellpadding='0'>
<tr><td class='inner-border'>
<table align='center' width='100%' cellspacing='0' cellpadding='0'>
<tr align=left><td>";
include_once "header.php";
echo "<table width='100%' cellspacing='0' cellpadding='0'>\n<tr>\n";
}
function render_footer($license=false) {
global $theme_width,$settings;
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td>";
include_once "foot.php";
echo "</td>
</tr>
</table>
</td>
</tr>
</table>\n";
}
function render_news($subject, $news, $info) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='capmain'>$subject</td>
</tr>
<tr>
<td class='main-body'>
$news
</td>
</tr>
<tr>
<td align='center' class='news-footer'>\n";
echo openform("N",$info['news_id']).newsposter($info," ").newsopts($info," ").closeform("N",$info['news_id']);
echo "</td>
</tr>
</table>
</td>
</tr>
</table>\n";
}
function opentable($title) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='capmain'>$title</td>
</tr>
<tr>
<td class='main-body'>\n";
}
function closetable() {
echo "</td>
</tr>
</table>
</td>
</tr>
</table>\n";
}
function openczacior() {
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"490\">
<tr>
<td style=\"background-image: url('".THEME."images/czacior1.jpg'); border: 0; height: 43; padding-bottom: 6; padding-left: 25; padding-right: 10; padding-top: 5; width: 490\"><b>$title</b></td>
</tr>
<tr>
<td style=\"background-image: url('".THEME."images/czacior2.jpg'); border: 0; height: 227; padding-bottom: 5; padding-left: 10; padding-right: 10; padding-top: 5; width: 490\">\n";
}
function closeczacior() {
echo "</td>
</tr>
</table>\n";
}
function opencytat() {
echo "<center><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"460\">
<tr>
<td style=\"background-image: url('".THEME."images/cytat1.jpg'); border: 0; height: 41; padding-bottom: 6; padding-left: 25; padding-right: 10; padding-top: 5; width: 460\"><b>$title</b></td>
</tr>
<tr>
<td style=\"background-image: url('".THEME."images/cytat2.jpg'); border: 0; height: 1; padding-bottom: 5; padding-left: 10; padding-right: 10; padding-top: 5; width: 490\"></center>\n";
}
function closecytat() {
echo "</td>
</tr>
<td style=\"background-image: url('".THEME."images/cytat3.jpg'); border: 0; height: 32; padding-bottom: 6; padding-left: 25; padding-right: 10; padding-top: 5; width: 460\"><b>$title</b></td>
</table>\n";
}
function openblog($title) {
echo "<center><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"660\">
<tr>
<td style=\"background-image: url('".THEME."images/blogn.jpg'); border: 0; height: 47; padding-bottom: 6; padding-left: 300; padding-right: 10; padding-top: 5; width: 660\"><b>$title</b></td>
</tr>
<tr>
<td style=\"background-image: url('".THEME."images/blogt.jpg'); border: 0; height: 1; padding-bottom: 5; padding-left: 10; padding-right: 10; padding-top: 5; width: 660\"></center>\n";
}
function closeblog() {
echo "</td>
</tr>
<td style=\"background-image: url('".THEME."images/blogs.jpg'); border: 0; height: 46; padding-bottom: 6; padding-left: 25; padding-right: 10; padding-top: 5; width: 660\"><b>$title</b></td>
</table>\n";
}
function openblog1($title) {
echo "<center><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"660\">
<tr>
<td style=\"background-image: url('".THEME."images/blogn.jpg'); border: 0; height: 47; padding-bottom: 6; padding-left: 300; padding-right: 10; padding-top: 5; width: 660\"><b>$title</b></td>
</tr>
<td>
".($info['article_breaks'] == "y" ? nl2br($blog) : $blog)."
</td>
<tr>
<td style=\"background-image: url('".THEME."images/blogt.jpg'); border: 0; height: 1; padding-bottom: 5; padding-left: 10; padding-right: 10; padding-top: 5; width: 660\"></center>\n";
}
function closeblog1() {
echo "</td>
</tr>
<td style=\"background-image: url('".THEME."images/blogs.jpg'); border: 0; height: 46; padding-bottom: 6; padding-left: 25; padding-right: 10; padding-top: 5; width: 660\"><b>$title</b></td>
</table>\n";
}
function opengry() {
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"488\">
<tr>
<td style=\"background-image: url('".THEME."images/gry.jpg'); border: 0; height: 40; padding-bottom: 6; padding-left: 25; padding-right: 10; padding-top: 5; width: 488\"></td>
</tr>
<tr>
<td class='main-body'>\n";
}
function closegry() {
echo "</td>
</tr>
</table>\n";
}
function render_blog($subject, $article, $info) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>
<td style=\"background-image: url('".THEME."images/blogn.jpg'); border: 0; height: 47; padding-bottom: 6; padding-left: 300; padding-right: 10; padding-top: 5; width: 660\"><b>$title</b></td>
<tr>
<td>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
</tr>
<tr>
".($info['article_breaks'] == "y" ? nl2br($article) : $article)."
</td>
</tr>
<tr>
<td style=\"background-image: url('".THEME."images/blogs.jpg'); border: 0; height: 46; padding-bottom: 6; padding-left: 25; padding-right: 10; padding-top: 5; width: 660\"><b>$title</b></td>\n";
echo openform("A",$info['article_id']).articleposter($info," ·").articleopts($info,"·").closeform("A",$info['article_id']);
echo "</td>
</tr>
</table>
</td>
</tr>
</table>\n";
}
function openoption($title) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td style=\"background-image: url('".THEME."images/ust1.jpg'); border: 0; height: 37; padding-bottom: 6; padding-left: 25; padding-right: 10; padding-top: 5; width: 160\"><b>$title</b></td>
</tr>
<tr>
<td style=\"background-image: url('".THEME."images/ust2.jpg'); border: 0; height: 100; padding-bottom: 5; padding-left: 10; padding-right: 10; padding-top: 5; width: 160\">\n";
}
function closeoption() {
echo "</td>
</tr>
<tr>
<td><img src=\"".THEME."images/ust3.jpg\" width=\"160\" height=\"20\" border=\"0\" alt=\"[Rozmiar: 580 bajtów]\"></td>
</tr>
</table>\n";
tablebreak();
}
function openprofil() {
echo "<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='main-body'></td>
</tr>
<tr>
<td class='main-body'>\n";
}
function closeprofil() {
echo "</td>
</tr>
</table>
</td>
</tr>
</table>\n";
}
function opentable2() {
echo "<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class=''>$title</td>
</tr>
<tr>
<td class='main-body'>\n";
}
function closetable2() {
echo "</td>
</tr>
</table>
</td>
</tr>
</table>\n";
}
function openside($title) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td>
<table cellspacing=0 celpadding=0 border=0>
<tr>
<td height=23 width=160 class='scapmain' align=center>$title</td>
</tr>
</table>
</tr>
<tr>
<td class='side-body'>\n";
}
function closeside() {
echo "</td>
</tr>
</table>
</td>
</tr>
</table>\n";
tablebreak();
}
function openpamietaj() {
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"160\">
<tr>
<td style=\"background-image: url('".THEME."images/pamietaj.jpg'); border: 0; height: 23; padding-bottom: 5; padding-left: 15; padding-right: 5; padding-top: 5; width: 160\"></td>
</tr>
<tr>
<td style=\"background-image: url('".THEME."images/pamietajt.jpg'); border: 0; height: 200; padding-bottom: 2; padding-left: 5; padding-right: 5; padding-top: 2; width: 160\">\n";
}
function closepamietaj() {
echo "</td>
</tr>
<tr>
<td><img src=\"".THEME."images/pamietajs.jpg\" width=\"160\" height=\"23\" border=\"0\" alt=\"[Rozmiar: 580 bajtów]\"></td>
</tr>
</table>\n";
tablebreak();
}
function openankieta($title) {
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"160\">
<tr>
<td class='panele' style=\"background-image: url('".THEME."images/ankieta1.jpg'); border: 0; height: 23; padding-bottom: 5; padding-left: 15; padding-right: 5; padding-top: 5; width: 160\">$title</td>
</tr>
<tr>
<td style=\"background-image: url('".THEME."images/ankieta2.jpg'); border: 0; height: 1; padding-bottom: 2; padding-left: 5; padding-right: 5; padding-top: 2; width: 160\">\n";
}
function closeankieta() {
echo "</td>
</tr>
<tr>
<td><img src=\"".THEME."images/ankieta3.jpg\" width=\"160\" height=\"15\" border=\"0\" alt=\"[Rozmiar: 580 bajtów]\"></td>
</tr>
</table>\n";
tablebreak();
}
function openos($title) {
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"160\">
<tr>
<td class='panele' style=\"background-image: url('".THEME."images/os1.jpg'); border: 0; height: 23; padding-bottom: 5; padding-left: 15; padding-right: 5; padding-top: 5; width: 160\">$title</td>
</tr>
<tr>
<td style=\"background-image: url('".THEME."images/os2.jpg'); border: 0; height: 1; padding-bottom: 2; padding-left: 5; padding-right: 5; padding-top: 2; width: 160\">\n";
}
function closeos() {
echo "</td>
</tr>
<tr>
<td><img src=\"".THEME."images/os3.jpg\" width=\"160\" height=\"15\" border=\"0\" alt=\"[Rozmiar: 580 bajtów]\"></td>
</tr>
</table>\n";
tablebreak();
}
function openfopcje($title) {
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"160\">
<tr>
<td class='panele' style=\"background-image: url('".THEME."images/forump1.jpg'); border: 0; height: 23; padding-bottom: 5; padding-left: 15; padding-right: 5; padding-top: 5; width: 160\">$title</td>
</tr>
<tr>
<td style=\"background-image: url('".THEME."images/forump2.jpg'); border: 0; height: 1; padding-bottom: 2; padding-left: 5; padding-right: 5; padding-top: 2; width: 160\">\n";
}
function closefopcje() {
echo "</td>
</tr>
<tr>
<td><img src=\"".THEME."images/forump3.jpg\" width=\"160\" height=\"15\" border=\"0\" alt=\"[Rozmiar: 580 bajtów]\"></td>
</tr>
</table>\n";
tablebreak();
}
function opendenis($title) {
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"160\">
<tr>
<td class='panele' style=\"background-image: url('".THEME."images/d1.jpg'); border: 0; height: 23; padding-bottom: 5; padding-left: 15; padding-right: 5; padding-top: 5; width: 160\">$title</td>
</tr>
<tr>
<td style=\"background-image: url('".THEME."images/d2.jpg'); border: 0; height: 1; padding-bottom: 2; padding-left: 5; padding-right: 5; padding-top: 2; width: 160\">\n";
}
function closedenis() {
echo "</td>
</tr>
<tr>
<td><img src=\"".THEME."images/d3.jpg\" width=\"160\" height=\"15\" border=\"0\" alt=\"[Rozmiar: 580 bajtów]\"></td>
</tr>
</table>\n";
tablebreak();
}
function openmenu($title) {
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"160\">
<tr>
<td class='panele' style=\"background-image: url('".THEME."images/m1.jpg'); border: 0; height: 23; padding-bottom: 5; padding-left: 15; padding-right: 5; padding-top: 5; width: 160\">$title</td>
</tr>
<tr>
<td style=\"background-image: url('".THEME."images/m2.jpg'); border: 0; height: 1; padding-bottom: 2; padding-left: 5; padding-right: 5; padding-top: 2; width: 160\">\n";
}
function closemenu() {
echo "</td>
</tr>
<tr>
<td><img src=\"".THEME."images/m3.jpg\" width=\"160\" height=\"15\" border=\"0\" alt=\"[Rozmiar: 580 bajtów]\"></td>
</tr>
</table>\n";
tablebreak();
}
function opensidex($title,$state="on") {
$boxname = str_replace(" ", "", $title);
echo "<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='scapmain'>$title</td>
<td class='scapmain' align='right'>".panelbutton($state,$boxname)."</td>
</tr>
<tr>
<td colspan='2' class='side-body'>
<div id='box_$boxname'".($state=="off"?" style='display:none'":"").">\n";
}
function closesidex() {
echo "</div>
</td>
</tr>
</table>
</td>
</tr>
</table>\n";
tablebreak();
}
function tablebreak() {
echo "<table width='100%' cellspacing='0' cellpadding='0'>
<tr><td height='10'></td></tr>
</table>\n";
}
?>
Kliknij i zaczekaj na załadowanie kodu ...
PW od moderatora:
- Zmiana nazwy tematu - Pieka 25.11 - 16:19
- Ogólna Uwaga - Pieka 25.11 - 16:20
Edytowane przez Pieka dnia 25.11.2008 18:16:43
|