Hoi.,
Ik was ff bezig om een andere template engine voor me forum te gebruiken. Ik heb dus de FORUMLIJST..
en deze PHP.
Je verwacht natuurlijk dat het er zo uit komt te zien:
Doe ik nu iets fout of is dit gewoon een dikke bug ?
Ik hoop dat iemand mij kan helpen.
Sorry voor het layout verneuken!
Ik was ff bezig om een andere template engine voor me forum te gebruiken. Ik heb dus de FORUMLIJST..
Nu gebruik ik dus XTemplate Engine en heb ik deze template gemaakt.Categorie
Forum
Forum
Categorie
Forum
Forum
code:
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
27
28
29
30
31
32
33
34
35
| <!-- BEGIN: main -->
<html>
<body>
<table cellspacing='1' cellpadding='3' width='770' height=''>
<!-- BEGIN: index_block1 -->
<tr>
<td width='20' bgcolor='E3E9F3' background='' valign='top'></td>
<td width='280' bgcolor='E3E9F3' background='' class='mini'>Forum</td>
<td width='75' bgcolor='D1DAE8' background='' class='mini'>Topics</td>
<td width='75' bgcolor='E3E9F3' background='' class='mini'>Reakties</td>
<td width='120' bgcolor='D1DAE8' background='' class='mini'>Lastpost</td>
<td width='200' bgcolor='E3E9F3' background='' class='mini'>Moderator</td>
</tr>
<!-- BEGIN: index_block2 -->
<tr>
<td width='100%' colspan='6' bgcolor='A4B3CB' background=''><b>{index_block2_titel}</b></td>
</tr>
<!-- BEGIN: index_block3 -->
<tr>
<td width='20' bgcolor='E3E9F3' background='' valign='top'>[img]'images/forumindex.gif'></td>
<td[/img]<b><a href='topiclist.php?ID={index_block3_id}'>{index_block3_titel}</a></b><br>
<font size='1'>{index_block3_notitie}</font></td>
<td width='75' bgcolor='D1DAE8' background='' valign='top' align='center'>{index_block3_topics}</td>
<td width='75' bgcolor='E3E9F3' background='' valign='top' align='center'>{index_block3_replies}</td>
<td width='120' bgcolor='D1DAE8' background='' valign='top'><font size='1'>{index_block3_lastpost}</font></td>
<td width='200' bgcolor='E3E9F3' background='' valign='top'>{index_block3_author}</td>
</tr>
<!-- END: index_block3 -->
<!-- END: index_block2 -->
<!-- END: index_block1 -->
</table>
</body>
</html>
<!-- END: main --> |
en deze PHP.
PHP:
1
| <?include ("inc/class.xtemplate.php");$Template = new XTemplate ("tpl/template.tpl"); $Template->insert_loop("main.index_block1.index_block2",array( index_block2_titel => "cat1" )); $Template->insert_loop("main.index_block1.index_block2.index_block3",array( index_block3_titel => "cat1.sub1" )); $Template->insert_loop("main.index_block1.index_block2.index_block3",array( index_block3_titel => "cat1.sub2" )); $Template->insert_loop("main.index_block1.index_block2.index_block3",array( index_block3_titel => "cat1.sub3" )); $Template->insert_loop("main.index_block1.index_block2.index_block3",array( index_block3_titel => "cat1.sub4" )); $Template->insert_loop("main.index_block1.index_block2",array( index_block2_titel => "cat2" )); $Template->insert_loop("main.index_block1.index_block2.index_block3",array( index_block3_titel => "cat2.sub1" )); $Template->insert_loop("main.index_block1.index_block2.index_block3",array( index_block3_titel => "cat2.sub2" )); $Template->insert_loop("main.index_block1.index_block2.index_block3",array( index_block3_titel => "cat2.sub3" )); $Template->insert_loop("main.index_block1.index_block2.index_block3",array( index_block3_titel => "cat2.sub4" )); $Template->parse("main.index_block1.index_block2"); $Template->parse("main.index_block1"); $Template->parse("main"); $Template->out("main");?> |
Je verwacht natuurlijk dat het er zo uit komt te zien:
Maar het ziet er zo uit:cat1
cat1.sub1
cat1.sub2
cat1.sub3
cat1.sub4
cat2
cat2.sub1
cat2.sub2
cat2.sub3
cat2.sub4
Hij gaat dus fout met die CATEGORIE TITEL!! (Cat1, Cat2).cat1
cat2
cat1.sub1
cat1.sub2
cat1.sub3
cat1.sub4
cat2
cat2.sub1
cat2.sub2
cat2.sub3
cat2.sub4
Doe ik nu iets fout of is dit gewoon een dikke bug ?
Ik hoop dat iemand mij kan helpen.
Sorry voor het layout verneuken!