Witam na stronie MrKarpiuk'a
Mini Stats ala IP.Board - Wersja do druku

+- Witam na stronie MrKarpiuk'a (https://mrkarpiuk.xaa.pl)
+-- Dział: MrKarpiuk - Tworzenie z pasją (https://mrkarpiuk.xaa.pl/forumdisplay.php?fid=66)
+--- Dział: Poradniki (https://mrkarpiuk.xaa.pl/forumdisplay.php?fid=79)
+---- Dział: MyBB (https://mrkarpiuk.xaa.pl/forumdisplay.php?fid=80)
+---- Wątek: Mini Stats ala IP.Board (/showthread.php?tid=5786)



Mini Stats ala IP.Board - MrKarpiuk - 06.07.2013

Instalacja

Udaj się do ACP --> Style i szablony --> Szablony --> Paczki szablonów --> Twój styl --> Wyświetl Szablony --> Strona główna --> index_boardstats

Znajdź :

Kod PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<thead>
<tr>
<td class="thead">
<div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['boardstats']}.gif" id="boardstats_img" class="expander" alt="[-]" title="[-]" /></div>
<div><strong>{$lang->boardstats}</strong></div>
</td>
</tr>
</thead>
<tbody style="{$collapsed['boardstats_e']}" id="boardstats_e">
{$whosonline}
{$birthdays}
{$forumstats}
<tr>
    <td class="tfoot" style="text-align: right">
        <span class="smalltext">
            {$logoutlink}
            <a href="misc.php?action=markread{$post_code_string}">{$lang->markread}</a> |
            <a href="showteam.php">{$lang->forumteam}</a> |
            <a href="stats.php">{$lang->forumstats}</a>
        </span>
    </td>
</tr>
</tbody>
</table>
<br />


Zamień na :

Kod PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{$forumstats}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<thead>
<tr>
<td class="thead">
<div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['boardstats']}.gif" id="boardstats_img" class="expander" alt="[-]" title="[-]" /></div>
<div><strong>{$lang->boardstats}</strong></div>
</td>
</tr>
</thead>
<tbody style="{$collapsed['boardstats_e']}" id="boardstats_e">
{$whosonline}
{$birthdays}
<tr>
    <td class="tfoot" style="text-align: right">
        <span class="smalltext">
            {$logoutlink}
            <a href="misc.php?action=markread{$post_code_string}">{$lang->markread}</a> |
            <a href="showteam.php">{$lang->forumteam}</a> |
            <a href="stats.php">{$lang->forumstats}</a>
        </span>
    </td>
</tr>
</tbody>
</table>
<br />


ACP --> Style i szablony->Szablony --> Paczki szablonów --> Twój styl --> Wyświetl Szablony --> Strona Główna --> index_stats

Kod PHP:
1
2
3
4
5
6
7
8
9
10
<tr><td class="tcat"><span class="smalltext"><strong>{$lang->boardstats}</strong></span></td></tr>
<tr>
<td class="trow1"><span class="smalltext">
{$lang->stats_posts_threads}<br />
{$lang->stats_numusers}<br />
{$lang->stats_newestuser}<br />
{$lang->stats_mostonline}
</span>
</td>
</tr>


Zamień na :

Kod PHP:
1
2
3
4
5
6
7
8
<div style="text-align: center;">
<span class="statround">{$stats['numthreads']}</span> Wszystkich Tematow
<span class="statround">{$stats['numposts']}</span> Napisanych Postow
<span class="statround">{$stats['numusers']}</span> Wszystkich Uzytkownikow
<span class="statround">$newestmember</span> Najnowszy Uzytkownik
<span title="{$recorddate}, {$recordtime}"><span class="statround">{$mostonline['numusers']}</span> Najwiecej Online</span>
</div>
<br />


Następnie dodaj w stylu global.css

Kod PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
.statround {
    background: #98c22a;
    color: #ffffff;
    padding: 4px 10px;
    margin-left: 20px;
    border-radius: 4px;
}

.statround a:link,
.statround a:visited {
    color: #ffffff;
}

.statround a:hover,
.statround a:active {
    color: #444444;
}


Jak by nie działo poprawnie lub były by jakieś problemy proszę zamień treść z index_boardstats na :

Kod PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<thead>
<tr>
<td class="thead">
<div><strong>{$lang->boardstats}</strong></div>
</td>
</tr>
</thead>
{$whosonline}
{$birthdays}
</tbody>
</table>
<br />
{$forumstats} 


Zamiana background zielonego na jaki Tylko chcesz zamieniasz w global.css :

Cytat:.statround {
background: #98c22a;
color: #ffffff;
padding: 4px 10px;
margin-left: 20px;
border-radius: 4px;
}

Efekt końcowy

[Obrazek: uExCl.png]


Tutorial spolszczony i zedytowany przez MrKarpiuk'a
Orginalny Tutorial pochodzi z strony Nie masz uprawnień, aby zobaczyć linki. Zarejestruj sie lub Zaloguj

Publikowany dla :
- Nie masz uprawnień, aby zobaczyć linki. Zarejestruj sie lub Zaloguj

Zakaz kopiowania bez zezwolenia autora.