ci
CI中完美嵌入新浪博客编辑器
Friday, November 7th, 2008 | codeigniter | No Comments
新浪博客的html编辑器对于中文用户来说是一款非常不错的编辑器,对中文的特性有很好的支持,适合中文用户使用。
下面,Nickyhu就来介绍一下,如何在CI(codeigniter)中,方便地嵌入和使用新浪博客编辑器。
第一步:下载某牛人制作的完全版新浪博客编辑器(php版)
下载地址:http://www.zendstudio.net/post/82/2/1/
第二步:借鉴FCKeditor的嵌入
wiki地址:http://codeigniter.com/wiki/FCKeditor/
第三步:实例
Codeigniter发布1.7
Monday, November 3rd, 2008 | 建站攻略 | No Comments
codeigniter升级到1.7之后,有几点需要注意。原先的validation进行了大调整,虽然保留了旧的class,但还是建议按照新的规则来重新编写代码。session的类也有调整。
Nickyhu觉得CI正在变得强壮,从原来轻快敏捷的身段上,加入了肌肉。正在把更多细节落实。Bug也在不断修补。
下面是CI 1.7的官方更新说明:
Version 1.7
Release Date: October 23, 2008
SVN Revision: 1541
- Libraries
- Added a new Form Validation Class. It simplifies setting rules and field names, supports arrays as field names, allows groups of validation rules to be saved in a config file, and adds some helper functions for use in view files. Please note that the old Validation class is now deprecated. We will leave it in the library folder for some time so that existing applications that use it will not break, but you are encouraged to migrate to the new version.
- Updated the Sessions class so that any custom data being saved gets stored to a database rather than the session cookie (assuming you are using a database to store session data), permitting much more data to be saved.
- Added the ability to store libraries in subdirectories within either the main “libraries” or the local application “libraries” folder. Please see the Loader class for more info.
- Added the ability to assign library objects to your own variable names when you use $this->load->library(). Please see the Loader class for more info.
- Added controller class/method info to Profiler class and support for multiple database connections.
- Improved the “auto typography” feature and moved it out of the helper into its own Typography Class.
- Improved performance and accuracy of xss_clean(), including reduction of false positives on image/file tests.
- Improved Parser class to allow multiple calls to the parse() function. The output of each is appended in the output.
- Added max_filename option to set a file name length limit in the File Upload Class.
- Added set_status_header() function to Output class.
- Modified Pagination class to only output the “First” link when the link for page one would not be shown.
- Added support for mb_strlen in the Form Validation class so that multi-byte languages will calculate string lengths properly.
- Database
- Improved Active Record class to allow full path column and table names: hostname.database.table.column. Also improved the alias handling.
- Improved how table and column names are escaped and prefixed. It now honors full path names when adding prefixes and escaping.
- Added Active Record caching feature to “update” and “delete” functions.
- Added removal of non-printing control characters in escape_str() of DB drivers that do not have native PHP escaping mechanisms (mssql, oci8, odbc), to avoid potential SQL errors, and possible sources of SQL injection.
- Added port support to MySQL, MySQLi, and MS SQL database drivers.
- Added driver name variable in each DB driver, based on bug report #4436.
- Helpers
- Added several new “setting” functions to the Form helper that allow POST data to be retrieved and set into forms. These are intended to be used on their own, or with the new Form Validation Class.
- Added current_url() and uri_segments() to URL helper.
- Altered auto_link() in the URL helper so that email addresses with “+” included will be linked.
- Added meta() function to HTML helper.
- Improved accuracy of calculations in Number helper.
- Removed added newlines (”\n”) from most form and html helper functions.
- Tightened up validation in the Date helper function human_to_unix(), and eliminated the POSIX regex.
- Updated Date helper to match the world’s current time zones and offsets.
- Modified url_title() in the URL helper to remove characters and digits that are part of character entities, to allow dashes, underscores, and periods regardless of the $separator, and to allow uppercase characters.
- Added support for arbitrary attributes in anchor_popup() of the URL helper.
- Other Changes
- Added PHP Style Guide to docs.
- Added sanitization in xss_clean() for a deprecated HTML tag that could be abused in user input in Internet Explorer.
- Added a few openxml document mime types, and an additional mobile agent to mimes.php and user_agents.php respectively.
- Added a file lock check during caching, before trying to write to the file.
- Modified Cookie key cleaning to unset a few troublesome key names that can be present in certain environments, preventing CI from halting execution.
- Changed the output of the profiler to use style attribute rather than clear, and added the id “codeigniter_profiler” to the container div.
Codeigniter升级到1.7
Thursday, October 9th, 2008 | 建站攻略 | No Comments
Codeigniter Version 1.7
Release Date: In development
SVN Revision: XXXX
- Libraries
- Added a new Form Validation Class. It simplifies setting rules and field names, supports arrays as field names, allows groups of validation rules to be saved in a config file, and adds some helper functions for use in view files. Please note that the old Validation class is now deprecated. We will leave it in the library folder for some time so that existing applications that use it will not break, but you are encouraged to migrate to the new version.
- Updated the Sessions class so that any custom data being saved gets stored to a database rather than the session cookie (assuming you are using a database to store session data), permitting much more data to be saved.
- Added the ability to store libraries in subdirectories within either the main “libraries” or the local application “libraries” folder. Please see the Loader class for more info.
- Added the ability to assign library objects to your own variable names when you use $this->load->library(). Please see the Loader class for more info.
- Added controller class/method info to Profiler class.
- Improved the “auto typography” feature and moved it out of the helper into its own Typography Class.
- Added max_filename option to set a file name length limit in the File Upload Class.
- Added set_status_header() function to Output class.
- Changed the output of the profiler to use style attribute rather than clear, and added the id “codeigniter_profiler” to the container div.
- Database
- Added removal of non-printing control characters in escape_str() of DB drivers that do not have native PHP escaping mechanisms (mssql, oci8, odbc), to avoid potential SQL errors, and possible sources of SQL injection.
- Helpers
- Added several new “setting” functions to the Form helper that allow POST data to be retrieved and set into forms. These are intended to be used on their own, or with the new Form Validation Class.
- Added current_url() and uri_segments() to URL helper.
- Altered auto_link() in the URL helper so that email addresses with “+” included will be linked.
- Improved accuracy of calculations in Number helper.
- Removed added newlines (”\n”) from most form and html helper functions.
- Tightened up validation in the Date helper function human_to_unix(), and eliminated the POSIX regex.
- Updated Date helper to match the world’s current time zones and offsets.
- Other changes
- Improved performance and accuracy of xss_clean(), including reduction of false positives on image/file tests.
- Added sanitization in xss_clean() for a deprecated HTML tag that could be abused in user input in Internet Explorer.
- Added a few openxml document mime types, and an additional mobile agent to mimes.php and user_agents.php respectively.
- Added PHP Style Guide to docs.
- Added backticks around column names in MySQL when using insert_string and update_string functions, and in where() function.
- Modified Pagination library to only output the “First” link when the link for page one would not be shown.
- Added a file lock check during caching, before trying to write to the file.
- Added driver name variable in each DB driver, based on bug report #4436.
- Modified Cookie key cleaning to unset a few troublesome key names that can be present in certain environments, preventing CI from halting execution.
长话短链-新增“链接”和“图片”功能
Wednesday, September 3rd, 2008 | 好玩的网站 | No Comments
本来只可以把文字变成链接,现在可以把超长的链接和图片变成短小的链接。
使用起来很方便:
点击“链接”=>把过长的链接复制到文本框中=>点击“开始瘦身”=>获得短小的链接。
点击“图片”=>选择图片,点击上传=>获得图片的链接。
新增的这两个东东有啥用?
本地有一些“性感”的图片,不方便通过QQ或者MSN来传递,那么上传到ddurl,获得图片链接,就能轻松与好友分享图片了。
有些链接指向敏感的网页,需要让它更加隐蔽一些,使用ddurl就能轻松搞定。