update overlib to 3.50, adjust addon code so that the overlib.js file isn't modified

This commit is contained in:
mohrt
2001-08-31 14:25:56 +00:00
parent fde4fb602f
commit 14cee2d567
5 changed files with 1232 additions and 803 deletions

View File

@@ -700,7 +700,9 @@ function smarty_func_assign_debug_info($args, &$smarty_obj) {
function smarty_func_overlib_init($args, &$smarty_obj) {
// be sure to place overlib.js where Smarty can locate it.
// overlib.js came with the distribution of Smarty.
echo '<DIV ID="overDiv" STYLE="position:absolute; visibility:hidden; z-index:1000;"></DIV>'."\n".'<SCRIPT LANGUAGE=javascript>'."\n".'<!--'."\n";
readfile(SMARTY_DIR."overlib.js",1);
echo '// -->'."\n".'</SCRIPT>'."\n";
return;
}

View File

@@ -602,7 +602,11 @@ class Smarty
\*======================================================================*/
function _generate_debug_output() {
// we must force compile the debug template in case the environment
// changed between separate applications.
ob_start();
$force_compile_orig = $this->force_compile;
$this->force_compile = true;
if($this->_process_template($this->debug_tpl, $compile_path))
{
if ($this->show_info_include) {
@@ -614,6 +618,7 @@ function _generate_debug_output() {
}
}
$results = ob_get_contents();
$this->force_compile = $force_compile_orig;
ob_end_clean();
return $results;
}

View File

@@ -56,8 +56,8 @@
pull variables from them into the templates. The list goes on.
</para>
<para>
We started out writing out a spec for a template engine about a year
ago. After finishing the spec, we began to work on a template engine
We started out writing out a spec for a template engine back in late
1999. After finishing the spec, we began to work on a template engine
written in C that would hopefully be accepted for inclusion with PHP.
Not only did we run into many complicated technical barriers, but there
was also much heated debate about exactly what a template engine should
@@ -1530,14 +1530,15 @@ email: zaphod@slartibartfast.com&lt;br&gt;
</para>
</sect2>
<sect2>
<title>Request Variables</title>
<title>{$smarty} reserved variable</title>
<para>
You can access request variables in Smarty via the special variable
{$smarty}. You can access get, post, cookies, server, env and
session variables with the syntax in the following examples.
You can access reserved variables in Smarty via the special
variable {$smarty}. You can access request variables such as get,
post, cookies, server, env and session variables with the syntax in
the following examples.
</para>
<para>
Request variable access was added to Smarty 1.4.4.
The special variable {$smarty} was added to Smarty 1.4.4.
</para>
<example>
@@ -1565,6 +1566,20 @@ email: zaphod@slartibartfast.com&lt;br&gt;
{* display the variable "username" from merged get/post/cookies/server/env *}
{$smarty.request.username}
</programlisting>
</example>
<para>
The current date can be displayed with {$smarty.now}. This is a unix
timestamp of the current date/time.
</para>
<example>
<title>displaying current date</title>
<programlisting>
{* use the date_formate modifier to format the date *}
{$smarty.now|date_format:"%Y-%m-%d %H:%M:%S"}
</programlisting>
</example>
</sect2>

View File

@@ -602,7 +602,11 @@ class Smarty
\*======================================================================*/
function _generate_debug_output() {
// we must force compile the debug template in case the environment
// changed between separate applications.
ob_start();
$force_compile_orig = $this->force_compile;
$this->force_compile = true;
if($this->_process_template($this->debug_tpl, $compile_path))
{
if ($this->show_info_include) {
@@ -614,6 +618,7 @@ function _generate_debug_output() {
}
}
$results = ob_get_contents();
$this->force_compile = $force_compile_orig;
ob_end_clean();
return $results;
}

1994
overlib.js

File diff suppressed because it is too large Load Diff