PHP Classes
elePHPant
Icontem

tmpwiz: Template processing based on string replacement

Recommend this page to a friend!
  Info   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2005-07-28 (10 years ago) RSS 2.0 feedNot enough user ratingsTotal: 262 All time: 7,255 This week: 1,069Up
Version License Categories
tmpwiz 1.0Free for non-comm...Templates
Description Author

This class implements an template processing engine based on replacing the placeholder string values.

It can load templates from files and replaces locate and replace placeholders defined by given marks with parameter replacement strings.

The processed templates can returned as a text string or displayed as the output of the current script.

The documentation is in German.

Picture of Kay-Uwe
Name: Kay-Uwe <contact>
Classes: 1 package by
Country: Germany Germany
Age: 28
All time rank: 3653207 in Germany Germany
Week rank: 1343 Up59 in Germany Germany Up

Details
Verwendung der Klasse tmpwiz()

1.Erstellen eines Objekts
  $obj_name=new tmpwiz();
  
2.Laden einer Templatedatei
  $obj_name->load_tmp();
  
3.(ggf.) Ersetzen von Strings
 3.1Ersetzen mit Arrays
    $array['{ersetze_das_mit}']="dem hier";
	$array['{und_das_mit}']="etwas anderem";
    $obj_name->replace_a($array);
 3.2Ersetzen einzelner Strings
    $what="{ersetze_das_mit}";
	$with="dem hier";
    $obj_name->replace_a($what,$with);
    
4.Ausgabe des Template
  Der im folgenen Verwendeten Parameter sin optional (freiwillig)
  wird kein Parameter angegeben wir echo verwendet.
 4.1Ausgabe per echo (direkt)
    $obj_name->print_tmp("echo");
 4.2Ausgabe in Variable(als return Wert)
    $inhalt=$obj_name->print_tmp("vari");
    
5.Ausgabe der letzten Fehlermeldung
  Der im folgenen Verwendeten Parameter sin optional (freiwillig)
  wird kein Parameter angegeben wir echo verwendet.
 5.1Ausgabe per echo (direkt)
    $obj_name->get_err("echo");
 5.2Ausgabe in Variable(als return Wert)
    $fehlermeldung=$obj_name->get_err("vari");



 2oo5 by Dodge <dodge@justmail.de>
  Files folder image Files  
File Role Description
Accessible without login Plain text file body.htm Data template file
Plain text file class.tmpwiz.php Class Main Class file
Accessible without login Plain text file example.php Example example file
Accessible without login Plain text file foot.htm Data template file
Accessible without login Plain text file head.htm Data template file
Accessible without login Plain text file readme.txt Doc. german readme

 Version Control Unique User Downloads Download Rankings  
 0%
Total:262
This week:0
All time:7,255
This week:1,069Up