xaoc Posted September 22, 2004 Report Share Posted September 22, 2004 Excuse for my English. Today has made for itself " templates upgrade tool ".For comparison of variables such as " {$TemplateVars} ". While only for local. I shall soon make the advanced version. Will consist of two files: form.html and script.php Start a file form.html. Files should is in one catalogue. Templates Compare(upgrade?) Tool V0.01 form.html : <html><head><title></title></head> <form name="form1" action="script.php" method="post"> <input type="file" name="file1"><input type="file" name="file2"> <div align="center"><br></div> <input type="submit" value="go!"> </form> </body></html> script.php : <html><head><title></title></head><body> <?php $a1 = array(); $a2 = array(); foreach(file($_POST["file1"]) as $value) { preg_match_all("/(\{\\$.*\})/sU",$value,$array); foreach($array[1] as $v1) $a1[] = $v1; } foreach(file($_POST["file2"]) as $value) { preg_match_all("/(\{\\$.*\})/sU",$value,$array); foreach($array[1] as $v1) $a2[] = $v1; } $a1 = array_unique($a1); $a2 = array_unique($a2); sort($a1); sort($a2); ?> <table border="1" width="100%" id="table1"> <tr> <td><?php foreach($a1 as $v2) echo $v2 . '<br>'; ?></td> <td><?php foreach($a2 as $v2)echo $v2.'<br>'; ?></td> </tr> <tr> <td><br><b><font color=#FF0000>No more use in <br><small><?php echo str_replace('\\\\','\\',$_POST["file1"]) ?>:</small></font></b><br><br><?php foreach(array_diff($a1,$a2) as $b) echo $b . '<br>'; ?></td> <td><b><font color=#0000FF>New in <br><small><?php echo str_replace('\\\\','\\',$_POST["file2"]) ?> :</small></font></b><br><br><?php foreach(array_diff($a2,$a1) as $b) echo $b . '<br>'; ?></td> </tr> </table> </body></html> Link to comment Share on other sites More sharing options...
mzanier Posted September 22, 2004 Report Share Posted September 22, 2004 nice one. ill pinn it. Link to comment Share on other sites More sharing options...
webkasper Posted September 22, 2004 Report Share Posted September 22, 2004 :grml: :pint: ... ?hem, kann mir einer mal auf die Spr?nge helfen, ich check dat nicht ganz, jetzt nicht das es an dem englisch liegen w?rde, oder doch ? ... oder sollte ich weniger saufen beim basteln ??? :grml: Na, wie dem auch sei, wers gecheckt hat, kanns ja mal hier auf verst?ndliche Art und weise posten, hilft bestimmt nicht nur mir weiter ;-) der webkasper Link to comment Share on other sites More sharing options...
mzanier Posted September 22, 2004 Report Share Posted September 22, 2004 du hast template A aus version 3.0 und template A aus version 3.0.9 =) startest das formular, und es zeigt die an welche tags in 3.0.9 hinzugekommen sind und du nun in deinem tpl einf?gen musst/kannst. Link to comment Share on other sites More sharing options...
webkasper Posted September 22, 2004 Report Share Posted September 22, 2004 merci cheffe :i: ... jo, ist schon klar das mit den Templates aus 3.0 und 3.09 :grml: aber wohin schmei? ich die beiden Dateien (form.html / script.php), ist des wurscht oder wie ? der web(sauf)kasper Link to comment Share on other sites More sharing options...
mzanier Posted September 22, 2004 Report Share Posted September 22, 2004 irgendwohin in ein verzeichnis Link to comment Share on other sites More sharing options...
xaoc Posted September 23, 2004 Author Report Share Posted September 23, 2004 new v0.02 Has added new possibility - shows number (or numbers) to a line. For example: {$BANNER} (209) {$tpl_path} (6,19) Download here: Windows: http://www2.polon.uw.edu.pl/kolopol/Smarty...010-Windows.exe Multi-platform: http://www2.polon.uw.edu.pl/kolopol/SmartyTool_010.jar Button "Save" not work Link to comment Share on other sites More sharing options...
Negativi Posted April 9, 2008 Report Share Posted April 9, 2008 Nice one.. thank you Link to comment Share on other sites More sharing options...
Recommended Posts