add smarty.now variable to template

This commit is contained in:
mohrt
2001-08-09 19:56:10 +00:00
parent c3d556c3ed
commit 7808495f59
4 changed files with 8 additions and 0 deletions

View File

@@ -643,6 +643,8 @@ class Smarty
} }
$smarty['request'] = array_merge($smarty['request'], $smarty['session']); $smarty['request'] = array_merge($smarty['request'], $smarty['session']);
$smarty['now'] = time();
$this->assign('smarty', $smarty); $this->assign('smarty', $smarty);
} }

View File

@@ -9,6 +9,8 @@
Title: {#title#|capitalize} Title: {#title#|capitalize}
{if #bold#}</b>{/if} {if #bold#}</b>{/if}
The current date and time is {$smarty.now|date_format:"%Y-%m-%d %H:%M:%S"}
Tooltip example: Move your mouse over the <A HREF="" {popup sticky=true caption="Smarty pop-up text" delay=400 text="This is an example of a tooltip. Tooltips are handy for context sensitive information, and extremely easy to add to your templates with Smarty and the integration of <a href='http://www.bosrup.com/web/overlib/'>overLIB</a> by Erik Bosrup"} onclick="return false;">Help</A> link to see an example of a tooltip using Smarty's popup function. Tooltip example: Move your mouse over the <A HREF="" {popup sticky=true caption="Smarty pop-up text" delay=400 text="This is an example of a tooltip. Tooltips are handy for context sensitive information, and extremely easy to add to your templates with Smarty and the integration of <a href='http://www.bosrup.com/web/overlib/'>overLIB</a> by Erik Bosrup"} onclick="return false;">Help</A> link to see an example of a tooltip using Smarty's popup function.
The value of global assigned variable $SCRIPT_NAME is {$SCRIPT_NAME} The value of global assigned variable $SCRIPT_NAME is {$SCRIPT_NAME}

View File

@@ -643,6 +643,8 @@ class Smarty
} }
$smarty['request'] = array_merge($smarty['request'], $smarty['session']); $smarty['request'] = array_merge($smarty['request'], $smarty['session']);
$smarty['now'] = time();
$this->assign('smarty', $smarty); $this->assign('smarty', $smarty);
} }

View File

@@ -9,6 +9,8 @@
Title: {#title#|capitalize} Title: {#title#|capitalize}
{if #bold#}</b>{/if} {if #bold#}</b>{/if}
The current date and time is {$smarty.now|date_format:"%Y-%m-%d %H:%M:%S"}
Tooltip example: Move your mouse over the <A HREF="" {popup sticky=true caption="Smarty pop-up text" delay=400 text="This is an example of a tooltip. Tooltips are handy for context sensitive information, and extremely easy to add to your templates with Smarty and the integration of <a href='http://www.bosrup.com/web/overlib/'>overLIB</a> by Erik Bosrup"} onclick="return false;">Help</A> link to see an example of a tooltip using Smarty's popup function. Tooltip example: Move your mouse over the <A HREF="" {popup sticky=true caption="Smarty pop-up text" delay=400 text="This is an example of a tooltip. Tooltips are handy for context sensitive information, and extremely easy to add to your templates with Smarty and the integration of <a href='http://www.bosrup.com/web/overlib/'>overLIB</a> by Erik Bosrup"} onclick="return false;">Help</A> link to see an example of a tooltip using Smarty's popup function.
The value of global assigned variable $SCRIPT_NAME is {$SCRIPT_NAME} The value of global assigned variable $SCRIPT_NAME is {$SCRIPT_NAME}