|
|||
|
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 : Code:
<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> Code:
<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>
|
|
||||
|
nice one. ill pinn it.
__________________
xt:Commerce Helpdesk xt:Commerce Blog xt:Commerce Warenwirtschaft ### ![]() Offene Stellen bei xt:Commerce! xt:Commerce stellt ein ### |
|
||||
|
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.
__________________
xt:Commerce Helpdesk xt:Commerce Blog xt:Commerce Warenwirtschaft ### ![]() Offene Stellen bei xt:Commerce! xt:Commerce stellt ein ### |
|
||||
|
irgendwohin in ein verzeichnis
__________________
xt:Commerce Helpdesk xt:Commerce Blog xt:Commerce Warenwirtschaft ### ![]() Offene Stellen bei xt:Commerce! xt:Commerce stellt ein ### |
|
|||
|
new v0.02
Has added new possibility - shows number (or numbers) to a line. For example: Code:
{$BANNER} (209)
{$tpl_path} (6,19)
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 |
![]() |
| Lesezeichen |
| Stichworte |
| smarty, tool, v010 |
| Themen-Optionen | |
| Ansicht | |
|
|