update changes

This commit is contained in:
mohrt
2001-01-18 22:38:49 +00:00
parent 2c51bad932
commit 3ebce1106c
9 changed files with 83 additions and 61 deletions

View File

@@ -143,10 +143,17 @@ require("Smarty.class.php");
$smarty = new Smarty;
$smarty->assign("Name","Ned");
$smarty->assign(array(
<<<<<<< QUICKSTART
"FirstName" => "Fred",
"LastName" => "Flanders",
"Address" => "Springfield"
));
=======
"FirstName" => "Ned",
"LastName" => "Flanders",
"Address" => "Springfield"
));
>>>>>>> 1.2
$zipcode = "55555";
$smarty->assign("Zipcode",$zipcode);
$smarty->display("./templates/index.tpl");
@@ -187,6 +194,18 @@ Example:
--------- templates/index.tpl --------
{include file="header.tpl" title="Home Page"}
<<<<<<< QUICKSTART
{if $Name eq ""}
Hello, Noname!<br>
{elseif $Name eq "Fred"}
Hello, Frederick!<br>
{else}
Hello, {$Name}<br>
{/if}
{$FirstName}, {$LastName}<br>
{$Address}, {$Zipcode}
=======
{if $Name eq ""}
Hello, Noname!<br>
{elseif $Name eq "Ned"}
@@ -197,6 +216,7 @@ Example:
{$FirstName}, {$LastName}<br>
{$Address}, {$Zipcode}
>>>>>>> 1.2
{include file="footer.tpl"}

View File

@@ -5,6 +5,7 @@
* File: Smarty.addons.php
* Author: Monte Ohrt <monte@ispi.net>
* Andrei Zmievski <andrei@ispi.net>
* Version: 1.0
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License

View File

@@ -7,6 +7,7 @@
*
* Andrei Zmievski <andrei@ispi.net>
* parsing engine rewrite and a lot more
* Version: 1.0
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License

View File

@@ -12,10 +12,4 @@ $smarty->assign("Class",array(array("A","B","C","D"), array("E", "F", "G", "H"),
$smarty->display("./templates/index.tpl");
function insert_paginate()
{
echo "test paginate\n";
}
?>

View File

@@ -1,14 +1,17 @@
{config_load file=test.conf section="my foo"}
{config_load file=test.conf section="setup"}
{include file=header.tpl title=foo}
<PRE>
{* bold and title are read from the config file *}
{if #bold#}<b>{/if}
Title: {#title#|capitalize}
{if #bold#}</b>{/if}
the value of $SCRIPT_NAME is {$SCRIPT_NAME}
{* A simple variable test *}
{* A simple variable test. print $Name in uppercase *}
hello, my name is {$Name|upper}
My interests are:
@@ -22,16 +25,14 @@ My interests are:
none
{/section}
({$FirstName|@count})
{insert name=paginate}
<p>
testing strip tags
{strip}
<table border=0>
<tr>
<td>
<A HREF="{$url}">
<A HREF="{$SCRIPT_NAME}">
<font color="red">This is a test </font>
</A>
</td>

View File

@@ -1762,4 +1762,13 @@ is the first week that has at least 4 days in the current year, and with Monday
<link linkend="variable.modifiers">modifiers</link>.
</para>
</chapter>
<chapter id="credits">
<title>CREDITS</title>
<para>
Monte Ohrt: Original idea an initial implementation, wrote the documentation.
</para>
<para>
Andrei Zmievski: Rewrote parser from scratch, added much functionality.
</para>
</chapter>
</book>

View File

@@ -12,10 +12,4 @@ $smarty->assign("Class",array(array("A","B","C","D"), array("E", "F", "G", "H"),
$smarty->display("./templates/index.tpl");
function insert_paginate()
{
echo "test paginate\n";
}
?>

View File

@@ -7,6 +7,7 @@
*
* Andrei Zmievski <andrei@ispi.net>
* parsing engine rewrite and a lot more
* Version: 1.0
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License

View File

@@ -1,14 +1,17 @@
{config_load file=test.conf section="my foo"}
{config_load file=test.conf section="setup"}
{include file=header.tpl title=foo}
<PRE>
{* bold and title are read from the config file *}
{if #bold#}<b>{/if}
Title: {#title#|capitalize}
{if #bold#}</b>{/if}
the value of $SCRIPT_NAME is {$SCRIPT_NAME}
{* A simple variable test *}
{* A simple variable test. print $Name in uppercase *}
hello, my name is {$Name|upper}
My interests are:
@@ -22,16 +25,14 @@ My interests are:
none
{/section}
({$FirstName|@count})
{insert name=paginate}
<p>
testing strip tags
{strip}
<table border=0>
<tr>
<td>
<A HREF="{$url}">
<A HREF="{$SCRIPT_NAME}">
<font color="red">This is a test </font>
</A>
</td>