hallo allen,
Ik ben bezig met het in elkaar zetten van een simpel forum met behulp van templates en php. Ik heb een pagina voor de php met de volgende code:
$this->DB->Query("SELECT id, naam, titel, datum, inhoud, opleiding FROM alumni_forum WHERE id=".$_GET["idAction"], __LINE__, __FILE__);
While($this->DB->NextRecord($this->DB->Data("id")))
{
$this->TPL->SetVar("Onderwerp", $this->DB->Data("titel"));
$this->TPL->SetVar("Auteur", $this->DB->Data("naam"));
$this->TPL->SetVar("datum", $this->DB->Data("datum"));
$this->TPL->SetVar("Bericht", $this->DB->Data("inhoud"));
$this->TPL->SetVar("lijn", "<tr><td height=\"30\"><hr /></td><td height=\"30\"><hr /></td></tr>");
$this->TPL->SetVar("lijn1", "<hr />");
$this->TPL->SetBlock("getpost","Reply","bericht");
$this->DC->Query("SELECT id, naam, titel, datum, inhoud, opleiding FROM alumni_forum WHERE replyto=".$this->DB->Data("id"),__LINE__,__FILE__);
While($this->DC->NextRecord($this->DC->Data("id")))
{
$this->TPL->SetVar("Rdatum", $this->DC->Data("datum"));
$this->TPL->SetVar("RAuteur", $this->DC->Data("naam"));
$this->TPL->SetVar("RBericht", $this->DC->Data("inhoud"));
$this->TPL->SubBlock("bericht","Reply",true);
}
En in de template staat:
<!-- BEGIN Reply -->
<tr>
<td></td>
<td style="font-size:10px; font-family:Arial, Helvetica, sans-serif; font-weight:bold;" align="left" width="500">{Rdatum}{lijn1}</td>
</tr>
<tr>
<td style="font-size:12px; font-family:Arial, Helvetica, sans-serif; font-weight:bold;">{RAuteur}</td>
<td width="500" align="left">{RBericht}</td>
</tr>
<!-- BEGIN Reply -->
nu worden de gegevens wel goed ingevuld maar krijg ik de volgende melding in de browser:
[Template error]
LoadFile(Reply): Reply is not a valid handle.
[Template error]
Substitute(Reply): Unable to load Reply.
ik kan nergens vinden wat er fout kan zijn
. ik heb in de andere pagina's een andere template waarbij ik ook gebruik maak van de functies setblok en subblock. kan iemand mij helpen!!!
Ik ben bezig met het in elkaar zetten van een simpel forum met behulp van templates en php. Ik heb een pagina voor de php met de volgende code:
$this->DB->Query("SELECT id, naam, titel, datum, inhoud, opleiding FROM alumni_forum WHERE id=".$_GET["idAction"], __LINE__, __FILE__);
While($this->DB->NextRecord($this->DB->Data("id")))
{
$this->TPL->SetVar("Onderwerp", $this->DB->Data("titel"));
$this->TPL->SetVar("Auteur", $this->DB->Data("naam"));
$this->TPL->SetVar("datum", $this->DB->Data("datum"));
$this->TPL->SetVar("Bericht", $this->DB->Data("inhoud"));
$this->TPL->SetVar("lijn", "<tr><td height=\"30\"><hr /></td><td height=\"30\"><hr /></td></tr>");
$this->TPL->SetVar("lijn1", "<hr />");
$this->TPL->SetBlock("getpost","Reply","bericht");
$this->DC->Query("SELECT id, naam, titel, datum, inhoud, opleiding FROM alumni_forum WHERE replyto=".$this->DB->Data("id"),__LINE__,__FILE__);
While($this->DC->NextRecord($this->DC->Data("id")))
{
$this->TPL->SetVar("Rdatum", $this->DC->Data("datum"));
$this->TPL->SetVar("RAuteur", $this->DC->Data("naam"));
$this->TPL->SetVar("RBericht", $this->DC->Data("inhoud"));
$this->TPL->SubBlock("bericht","Reply",true);
}
En in de template staat:
<!-- BEGIN Reply -->
<tr>
<td></td>
<td style="font-size:10px; font-family:Arial, Helvetica, sans-serif; font-weight:bold;" align="left" width="500">{Rdatum}{lijn1}</td>
</tr>
<tr>
<td style="font-size:12px; font-family:Arial, Helvetica, sans-serif; font-weight:bold;">{RAuteur}</td>
<td width="500" align="left">{RBericht}</td>
</tr>
<!-- BEGIN Reply -->
nu worden de gegevens wel goed ingevuld maar krijg ik de volgende melding in de browser:
[Template error]
LoadFile(Reply): Reply is not a valid handle.
[Template error]
Substitute(Reply): Unable to load Reply.
ik kan nergens vinden wat er fout kan zijn