Oct 22

Template Lite HTML模板引擎 不指定

shuguang , 06:20 , 模板引擎 , 评论(0) , 引用(0) , 阅读(13345) , Via 本站原创 | |
程序名称:Template Lite
开发者/组织名称:Template Lite
运行环境:php+mysql,php+文本
官方网站:http://templatelite.sourceforge.net/
下载地址:http://sourceforge.net/project/showfiles.php?group_id=163694
文章来源:http://www.osphp.com.cn
程序介绍:
Template Lite是一个非常快而且很小HTML模板引擎。该引擎支持Smarty模板引擎所具有的大部分功能和过滤器。


I have seen some mention on a couple of forums that Template Lite doesn't support PHP 5. I would like to put this to rest. Template Lite is written under PHP 5 and is currently being written under PHP 5.2.1 with E_STRICT enabled. Template Lite works without error under all versions of PHP 5 from 5.1.3 and higher. Before PHP 5.1.3 VAR would give a warning notice under E_STRICT. Template Lite works under PHP 5 without any errors but does not use any PHP 5 specific attributes. //开源OSPhP.COM.CN

The next version of Template Lite will include a new plugin for creating both Horizontal and Vertical Menus. There are many configuration options for how the menu can look. You can even use a seperate CSS file.

Configuration options for html_css_menu:

* - menu_list = array containing main menu items
* - menu_list_sub = array containing first level of sub menus (optional)
* - menu_list_sub_sub = array containing the second level of sub menus (optional)
* - menu_id = Use a menu id (alphnumeric) if you want to use multiple menus on the same page. (optional)
* - main_bg_color = background color of main menu (optional)
* - border_color = border color around menu selections (optional)
* - text_color = text color for all menu selections (optional)
* - sub_bg_color = background color for all sub menus (optional)
* - hover_bg_color = background color when hovering over a menu selection (optional)
* - hover_text_color = text color when hovering over a menu selection (optional)
//OsPHP.COM.CN

* - newsub_bg_color = background color for selection to indicate it has sub menus (optional)
* - sub_down_arrow = path to down arrow image (optional)
* - sub_right_arrow = path to right arrow image (optional)
* - sub_width = fixed width for all sub menus (optional)
* - horizontal_width = fixed width for the main horizontal menu. The default width is 'auto' (optional)
* - vertical_width = fixed width for all main vertical menu including sub menus (optional)
* - enable_vertical = 1 to enable a vertical menu, 0 to enable horizontal menu (default) (optional)
* - menu_css_file = optional CSS file for more heavily modifying the look of the CSS menu (optional)
* - zindex = Use the zindex to position the menu above other page elements. Default: 2000 (optional)

Example Code:

{html_css_menu menu_list=$data enable_vertical=1}
{html_css_menu menu_list=$menu_list menu_list_sub=$menu_list_sub menu_list_sub_sub=$menu_list_sub_sub}

You can also have many different menus, both horizontal and vertical, on the same page. //OSPHP.COM.Cn开源

If you would like to see the menus in action you can see a test page here. Scroll to the bottom of the page to see the menus in action.

  The release of Template Lite 2.10 - January 4, 2007
I have added support for the use of template resources. The syntax for register_resource is the same as Smarty with one difference. Template Lite doesn't support the use of a class name when registering the resource. It only supports the standard 4 element array and not the optional 5 element array. You cannot use resources, other than file: or absolute paths when using output caching. This will be enabled in a future release.

Also, the use of absolute pathing was partially working in the last release and is now fully functional.

A number of core template.class.php functions were moved to internal files and will only be loaded when needed. This reduction in memory made room for the resource code.

I have also added a new resize_image plugin. This plugin is very powerful in allowing templates to create and cache thumbnails of images on the website or from other URLs. The plugin supports both the GD library and Imagemagik. //开源OSPhP.COM.CN

For more information on other fixes please check the changelog.

  The release of Template Lite 2.00 - December 17, 2006
This release has a large number of changes to the core code to make the system more modular. Many compiler functions are now modules that are loaded only if needed by a template. This greatly reduces the over all overhead by a considerable amount if you create a standard template (174k used by the compiler).

I have added support for the use of PHP functions as variable modifiers. This mimics how Smarty uses modifiers for compatibility. We have been using plugin files for this on past versions of Template Lite. This has allowed us to remove the following plugins from Template Lite (array_reverse, count, nl2br, number_format, strip_tags, ucfirst, ucwords, urlencode and wordwrap).

One of the most often asked for features that has been missing from Template Lite is the use of IS argument in the IF tag. I have added full support for IS in this release. //OSPHP.com.CN

And the last change is a HUGE one for me as it is something I have thought was ALWAYS needed in Smarty but no one ever addressed it.

When you have upgraded Template Lite to the latest version I have always recommended clearing the compiled template directory. This is to prevent incompatible code in the compiled file from causing problems. Coding in the compiled template file has changed a number of times over the past few versions of Template Lite and every time it has caused errors to popup because the compiled template file contains incompatible code.

I have added version date checking to Template Lite. It was a fairly simple addition that adds no real processing overhead. Each release of Template Lite has a version creation date and this is compared to the file creation date of a complied template file. If the file creation date is OLDER than the Template Lite version date the template is re-compiled. You no longer need to delete everything in the compiled template directory when you upgrade Template Lite. It basically works the same way as the check for if the original template file has been updated. This makes things so much easier and safer all around.
//OSPHP.COM.Cn开源


For more information please check the changelog.

  Two missing modifiers in the documentation - October 9, 2006
I somehow missed adding the COUNT and URLENCODE variable modifiers to the Template Lite documentation. I have added them to the online documentation and the updated documentation will be included in the next release.

  Our New Website Design - October 3, 2006
I am proud to announce our new web site redesign. This template is far easier to read than the previous template. The previous template really wasn't designed to allow dynamic news content and that really restricted the site.

I have rewritten the backend and frontend software for the site so everything is now dynamic content. This will make it easier to add new sites to the Sites Using Template Lite list. Plus the addition of having real news content for detailing each release.

The latest release of Template Lite is version 1.90. Be sure to check out the change log for more information.

//OsPHP.COM.CN



The next few months are going to be an exciting time for Template Lite as new plugins and new features will be arriving. So be sure to check the site regularly or sign up for E-Mail notifications for new releases at Sourceforge or Freshmeat.

收藏本文到网摘: 添加到“Google书签” 添加到“Yahoo收藏” 添加到“QQ书签” 搜狐网摘 添加到“百度搜藏” 添加到“新浪ViVi收藏夹” 添加到“Del.icio.us” 添加到“365天天网摘” 添加到“天极网摘” 我摘·网摘·网络书签 添加到“POCO网摘” YouNote网摘 添加到“和讯网摘” 添加到“Bolaa博客收录中心” 添加到“igooi网摘” 添加到“天下图摘”
  • 中查看更多“Template Lite HTML模板引擎”相关内容
  • 中查看更多“Template Lite HTML模板引擎”相关内容
  • 中查看更多“Template Lite HTML模板引擎”相关内容
  • 中查看更多“Template Lite HTML模板引擎”相关内容
  • 中查看更多“Template Lite HTML模板引擎”相关内容
  • 中查看更多“Template Lite HTML模板引擎”相关内容
  • 中查看更多“Template Lite HTML模板引擎”相关内容
  • 中查看更多“Template Lite HTML模板引擎”相关内容

  • 最后编辑: shuguang 编辑于2007/12/05 14:11
    发表评论

    昵称

    网址

    电邮

    打开HTML 打开UBB 打开表情 隐藏 记住我 [登录系统] [注册]