I. Ce este necesar pentru a aplica acest tutorial?
- Acest tutorial poate fi aplicat pe forumurile voastre doar daca aveti versiunea phpBB2 sau PunBB;
- Trebuie sa fiti fondatorul forumului, adica cel care a creat forumul pentru a avea acces la template-uri;
- Trebuie sa aveti cunostinte minime in coding si in utilizarea template-urilor;
II. Ce trebuie să faceţi?
Pentru phpBB2:
Panou de administrare => Afisare => Pagina de start => Structura si ierahie => Nivel de compresie al indexului:
Separati categoriile sau indexurile : Mediu
Panou de administrare => Afisare => Template-uri => General => index_box.
Apăsaţi pe butonul editeaza(acea cheiţă) pentru a face modificarile adecvate:
Inlocuiti codul ce urmeaza:
- Cod:
-
<tr>
<th colspan="{catrow.tablehead.INC_SPAN}" nowrap="nowrap" width="100%" class="secondarytitle"> {catrow.tablehead.L_FORUM} </th>
<th nowrap="nowrap" width="50">{L_TOPICS}</th>
<th nowrap="nowrap" width="50">{L_POSTS}</th>
<th nowrap="nowrap" width="150"><div style="width:150px;">{L_LASTPOST}</div></th>
</tr>
Cu urmatorul:
- Cod:
-
<tr>
<th colspan="{catrow.tablehead.INC_SPAN}" nowrap="nowrap" width="100%" class="secondarytitle"> {catrow.tablehead.L_FORUM} </th>
<th nowrap="nowrap" width="50">{L_TOPICS}</th>
<th nowrap="nowrap" width="50">{L_POSTS}</th>
<th nowrap="nowrap" width="150" class="new column">Coloana noua</th>
<th nowrap="nowrap" width="150"><div style="width:150px;">{L_LASTPOST}</div></th>
</tr>
Astfel, noi am adaugat noua coloana gasita sub forma de codul:
- Cod:
-
<th nowrap="nowrap" width="150" class="new column">Coloana noua</th>
Puteti modifica oricand latimea coloanei create doar modificand:
- Cod:
-
width="150"
Adica, 150 cu valoarea dorita.
Asta nu e tot! Trebuie sa cream si continutul coloanei. Pentru asta vom inlocui:
- Cod:
-
<td class="row3" align="center" valign="middle" height="50">
<span class="gensmall">{catrow.forumrow.TOPICS}</span>
</td>
<td class="row2" align="center" valign="middle" height="50">
<span class="gensmall">{catrow.forumrow.POSTS}</span>
</td>
<td class="row3 over" align="center" valign="middle" height="50">
<span class="gensmall">{catrow.forumrow.LAST_POST}</span>
</td>
Cu urmatorul:
- Cod:
-
<td class="row3" align="center" valign="middle" height="50">
<span class="gensmall">{catrow.forumrow.TOPICS}</span>
</td>
<td class="row2" align="center" valign="middle" height="50">
<span class="gensmall">{catrow.forumrow.POSTS}</span>
</td>
<td class="row3 over new content" align="center" valign="middle" height="50">
<span class="gensmall">Continut</span>
</td>
<td class="row3 over" align="center" valign="middle" height="50">
<span class="gensmall">{catrow.forumrow.LAST_POST}</span>
</td>
Codul continutului fiind:
- Cod:
-
<td class="row3 over new content" align="center" valign="middle" height="50">
<span class="gensmall">Continut</span>
</td>
utem oricand modifica continutul coloanei cu orice, mai ales cu o variabila.
Salvam template-ul!
Pentru PunBB:
Panou de administrare => Afisare => Pagina de start => Structura si ierahie => Nivel de compresie al indexului:
Separati categoriile sau indexurile : Mediu
Panou de administrare => Afisare => Template-uri => General => index_box.
Apăsăm pe editeză template-ul(acea cheiţă) pentru a face modificările necesare:
Inlocuiti codul ce urmeaza:
- Cod:
-
<tr>
<th class="tcl">{L_FORUM}</th>
<th class="tc2">{L_TOPICS}</th>
<th class="tc3">{L_POSTS}</th>
<th class="tcr">{L_LASTPOST}</th>
</tr>
Cu:
- Cod:
-
<tr>
<th class="tcl">{L_FORUM}</th>
<th class="tc2">{L_TOPICS}</th>
<th class="tc3">{L_POSTS}</th>
<th class="tc3 new column">Coloana noua</th>
<th class="tcr">{L_LASTPOST}</th>
</tr>
Astfel, noi am adaugat noua coloana gasita sub forma de acest cod:
- Cod:
-
<th class="tc3 new column">Coloana noua</th>
Acum, trebuie sa creeam continutul coloanei, pentru asta vom inlocui:
- Cod:
-
<td class="tc2">{catrow.forumrow.TOPICS}</td>
<td class="tc3">{catrow.forumrow.POSTS}</td>
<td class="tcr">
Cu:
- Cod:
-
<td class="tc2">{catrow.forumrow.TOPICS}</td>
<td class="tc3">{catrow.forumrow.POSTS}</td>
<td class="tc3 new content">Continut</td>
<td class="tcr">
Dupa cum ati observat codul pentru continut este:
- Cod:
-
<td class="tc3 new content">Continut</td>
Reamintesc, puteti inlocui continutul cu o variabila, precum cea pentru afisarea moderatorilor forumului si altele.
Atentie: Puteti oricand personaliza noua coloana pentru ambele versiuni. Modificarile se efectueaza prin foaia de stil CSS...
Cod pentru coloana:
- Cod:
-
.new.column{
proprietati CSS;
}
Cod pentru continutul coloanei:
- Cod:
-
.new.content{
proprietati CSS;
}