Pomocy! Edytowałem szablon, i się zbugowało..

Inne  Założony przez  SzYm3k.

wersja skryptu MyBB: 1.8.6
adres forum: Nicetime-rp.xaa.pl
na czym polega problem (screen, opis, komunikaty, nazwa stylu/theme/szablonu):



Więc tak, edytowałem szablon (stary szablon):

<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
<script type="text/javascript">
jQuery(document).ready(function($) {
    var secondButton, button, buttonShow, buttonHide;
    buttonHide = "{$lang->statusupdate_hidecomments}";
    buttonShow = "{$lang->statusupdate_showcomments}";
    button = $(".showcomment");
    secondButton = $(".addcomment");
    button.html(buttonShow);
    button.click(function(e) {
        e.preventDefault();
        if (!$(this).nextAll(".showcomment_row").is(":animated")) {
            $(this).nextAll(".showcomment_row").slideToggle("slow", function() {
                if($(this).is(":visible")) {
                    $(this).prevAll(".showcomment:first").html(buttonHide);
                } else {
                    $(this).prevAll(".showcomment:first").html(buttonShow);
                }
            });
        }
    });
    secondButton.click(function(e) {
        e.preventDefault();
        if (!$(this).nextAll(".addcomment_row").is(":animated")) {
            $(this).nextAll(".addcomment_row").slideToggle("slow");
        }
    });
});
</script>
<style type="text/css">
 .newsbar {
     background: #0000cc;
     border-top: 2px solid #ff3300;
     border-bottom: 2px solid #ff3300;
     text-align: center;
     margin: 10px auto;
     padding: 5px 20px;
     font-weight: bold;
 }
 </style>
<script type="text/javascript">
<!--
lang.no_new_posts = "{$lang->no_new_posts}";
lang.click_mark_read = "{$lang->click_mark_read}";
// -->
</script>
</head>
<body>  
{$header}   
<p class="newsbar">Nasz Team Speak- 185.62.189.224 (Strefa RP)    Nasz serwer- 46.29.17.244:3560 Regulamin Shouta -<a href="http://nicetime-rp.xaa.pl/showthread.php?tid=116&pid=427#pid427">KLIK</a>  </p> 
{$dvz_shoutbox}
<table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr><td class="thead">Nuta na dziś!- </td></tr>
<tr><td class="trow1"><iframe width="100" height="100" src="https://www.youtube.com/embed/wo_3j36xYpE" frameborder="0" allowfullscreen></iframe><iframe width="100" height="100" src="https://www.youtube.com/embed/2WfQ0KHOLg8" frameborder="0" allowfullscreen></iframe><iframe width="100" height="100" src="https://www.youtube.com/embed/SH6ZUOTtrAA" frameborder="0" allowfullscreen></iframe><iframe width="100" height="100" src="https://www.youtube.com/embed/nz8Uq3yAJII" frameborder="0" allowfullscreen></iframe></iframe><iframe width="100" height="100" src="https://www.youtube.com/embed/2cHlV0J5Bpo" frameborder="0" allowfullscreen></iframe><iframe width="100" height="100" src="https://www.youtube.com/embed/Ap9LN1kFb98" frameborder="0" allowfullscreen></iframe><iframe width="100" height="100" src="https://www.youtube.com/embed/S0J07N7smd8" frameborder="0" allowfullscreen><iframe width="100" height="100" src="https://www.youtube.com/embed/-6-VhfzNI4M" frameborder="0" allowfullscreen></iframe><iframe width="100" height="100" src="https://www.youtube.com/embed/bUscKq-LzCk" frameborder="0" allowfullscreen><iframe width="100" height="100" src="https://www.youtube.com/embed/6H1iW9z60fQ" frameborder="0" allowfullscreen></iframe></td></tr>
</table> 
<tr>
<td valign="top" style="padding-right: 20px" >
{$forums}
</td>
<td valign="top" width="170">
<table border="0" cellspacing="0" cellpadding="4" class="tborder">
<tr>
<td class="thead"><strong>Inne</strong></td>
</tr>
<tr>
<td class="trow1">{$statusupdate}
{$forumteamonline}</td>
</tr>
</table><br />
</td>
</tr>
</table>
<br class="clear" /> 
{$boardstats}
{$footer}
</body>
</html>

Bo forum wyglądało tragicznie, i zrobiłem nowy:

 
<html>
<head>
{$header} 
<table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
{$dvz_shoutbox}
<title>{$mybb->settings['bbname']}</title>
<script type="text/javascript">
jQuery(document).ready(function($) {
    var secondButton, button, buttonShow, buttonHide;
    buttonHide = "{$lang->statusupdate_hidecomments}";
    buttonShow = "{$lang->statusupdate_showcomments}";
    button = $(".showcomment");
    secondButton = $(".addcomment");
    button.html(buttonShow);
    button.click(function(e) {
        e.preventDefault();
        if (!$(this).nextAll(".showcomment_row").is(":animated")) {
            $(this).nextAll(".showcomment_row").slideToggle("slow", function() {
                if($(this).is(":visible")) {
                    $(this).prevAll(".showcomment:first").html(buttonHide);
                } else {
                    $(this).prevAll(".showcomment:first").html(buttonShow);
                }
            });
        }
    });
    secondButton.click(function(e) {
        e.preventDefault();
        if (!$(this).nextAll(".addcomment_row").is(":animated")) {
            $(this).nextAll(".addcomment_row").slideToggle("slow");
        }
    });
});
</script>
<style type="text/css">
 .newsbar {
     background: #336633;
     border-top: 2px solid #ff3300;
     border-bottom: 2px solid #ff3300;
     text-align: center;
     margin: 10px auto;
     padding: 5px 20px;
     font-weight: bold;
 }
 </style>
<script type="text/javascript">
<!--
lang.no_new_posts = "{$lang->no_new_posts}";
lang.click_mark_read = "{$lang->click_mark_read}";
// -->
</script>
</head>
<body>    
<tr>
<td valign="top" style="padding-right: 20px" >
{$forums}
{$headerinclude}

</td>
<td valign="top" width="170">
<table border="0" cellspacing="0" cellpadding="4" class="tborder">
<tr>
<td class="thead"><strong>Poboczne</strong></td>
</tr>
<tr>
<td class="trow1">
<p class="newsbar">Nasz Team Speak- 185.62.189.224 (Strefa RP)    Nasz serwer- 46.29.17.244:3560 Regulamin Shouta -<a href="http://nicetime-rp.xaa.pl/showthread.php?tid=116&pid=427#pid427">KLIK</a>  </p>
{$statusupdate}
{$forumteamonline}
<table border="0" cellspacing="0" cellpadding="4" class="tborder">
<tr>
<td class="thead"><strong>Popularne nutki:</strong></td>
</tr>
<tr>
<td class="trow1"><iframe width="60" height="60" src="https://www.youtube.com/embed/bM7SZ5SBzyY" frameborder="0" allowfullscreen></iframe>
<iframe width="60" height="60" src="https://www.youtube.com/embed/FjNdYp2gXRY" frameborder="0" allowfullscreen></iframe></td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="4" class="tborder">
<tr>
<td class="thead"><strong>Popularni użytkownicy:</strong></td>
</tr>
<tr>
<td class="trow1"><a href="http://nicetime-rp.xaa.pl/member.php?action=profile&uid=8">SzYm3k</a>__<a href="http://nicetime-rp.xaa.pl/member.php?action=profile&uid=3">MrocznyX</a>___<a href="http://nicetime-rp.xaa.pl/member.php?action=profile&uid=6">Doktor Jack</a>___<a href="http://nicetime-rp.xaa.pl/member.php?action=profile&uid=31">Miusia</a></td>
</tr>
</table><br /><br />
<table border="0" cellspacing="0" cellpadding="4" class="tborder">
<tr>
<td class="thead"><strong>Popularne wątki:</strong></td>
</tr>
<tr>
<td class="trow1"></td>
</tr>
</table><a href="http://nicetime-rp.xaa.pl/showthread.php?tid=122&pid=446#pid446">Zawieszenie Los Santos Medical Center</a>___<a href="http://nicetime-rp.xaa.pl/showthread.php?tid=118">Regulamin Serwera</a>___<a href="http://nicetime-rp.xaa.pl/showthread.php?tid=12">X czy Y?</a>___<a href="http://nicetime-rp.xaa.pl/showthread.php?tid=132&pid=466#pid466">Jak się nazywasz OOC?</a><br />
<table border="0" cellspacing="0" cellpadding="4" class="tborder">
<tr>
<td class="thead"><strong>Popularne dźwięki</strong></td>
</tr>
<tr>
<td class="trow1"><iframe width="60" height="60" src="https://www.youtube.com/embed/blet5_ervQM" frameborder="0" allowfullscreen></iframe><iframe width="60" height="60" src="https://www.youtube.com/embed/oWmLWYPFYt8" frameborder="0" allowfullscreen></iframe>
</td>
</tr>
</table><br />  </td>
</tr>
</table><br />
</td>
</tr>
</table>
<br class="clear" /> 
{$boardstats}
{$footer}
</body>
</html>

I wygląda fajnie! Zobacz sam http://nicetime-rp.xaa.pl/index.php . Jednak jest pare bugów, między innymi ShoutBox- Kiedy piszesz coś i dajesz ENTER, to odświeża stronę a nic się nie wyświetla... oraz Statusy!- Kiedy chcesz dodać komentarz... to nie działa nic!!
Zacznij od naprawy błędów jakie wykazuje konsola
   
Dokładniej? Jak? Dopiero się uczę :)
Skoro edytowałeś szablon to pewnie znaczników niepodomykałeś
Masz https://validator.w3.org/check?uri=http%...ne&group=0
i naprawiasz błędy po kolei.
Oczywiście wszystkiego nie naprawisz :P
Jak czytasz mój post to sprawdź czy go nie zedytowałem bo niezdecydowany jestem.
Spróbuję, jutro się odezwę!
Stary wygląda tragiczniej niż wyglądał. Znaczniki <table> nie zamknięte w sekcji <head>? Zmienna od shoutboxa też w headzie? Coś mi tutaj nie gra..
Dałem wam szablon jaki teraz jest... Sprawdź
Tak jak mówię, te błędy wynikają z niepodomykanych znaczników. Jak pozamykasz wszystko to będzie śmigać.
Jak czytasz mój post to sprawdź czy go nie zedytowałem bo niezdecydowany jestem.
Luzik, jutro to zrobię, i ci powiem

Już nie potrzebuję pomocy, zrobiłem nowy szablon.. I faktycznie.. Teraz działa! dziękuje temat rozwiązany



Użytkownicy przeglądający ten wątek:

1 gości