Toon posts:

Template errors

Pagina: 1
Acties:
  • 27 views sinds 30-01-2008

Verwijderd

Topicstarter
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!!! :?

  • whoami
  • Registratie: December 2000
  • Laatst online: 25-05 23:56
Ik kan het ook niet vinden.

https://fgheysels.github.io/


  • curry684
  • Registratie: Juni 2000
  • Laatst online: 12-05 22:23

curry684

left part of the evil twins

Geen idee wat ik hiermee moet, dit kan niemand lezen. Lees P&W FAQ - De "quickstart" eens over hoe een bruikbaar topic te maken.

Daarnaast lijkt dit wel erg veel op 'debug-my-code', en dat mag je zelf doen :) Als je specifiek een probleem hebt waar je niet uit komt willen we vast wel helpen, maar dan moet je zelf al wel wat vooronderzoek hebben verricht en [php]-tags om je code hebben staan.

Professionele website nodig?


Dit topic is gesloten.