Home  Extras  MODx Add-Ons  UTF8 Field Length Protection

UTF8 Field Length Protection



Forums Support Thread Votes: 10
Tags: Forms, Internationalization, plugin, manager, editing
Submitted: Jan 6, 2009
Released: Jan 6, 2009
Downloads: 93
License: GPL - GNU Public


UTF8 Field Length Protection 1.0 | Author: PMS

Works with the following Version(s):

Warns if too many characters are entered into a manager field by changing the background colour of the field to red.

Use to prevent bad truncation of strings when using using multibyte characters on UTF-8 encoded websites.


Download


Description

* For UTF8 encoded websites.
* Changes the background colour of a field to red to warn if the number of characters entered would make the UTF8 byte stream exceed the maximum length allowed by the MODx mysql database definition.
* Assumes that the original field background colour is white.
* Fields checked: pagetitle, longtitle, description, alias, link_attributes, menutitle
* See the forum thread: http://modxcms.com/forums/index.php/topic,31507

Instructions

1. Create a new plugin.
Plugin name: UTF8 Field Length Protection
Description: <strong>1.0</strong> Warns if a manager field contains too many characters
2. Copy and paste the attached text file into the plugin code area.
3. On the System Events tab, check the OnDocFormRender event.




Sub-Packages



Previous Releases



Comments

Please login to comment.

Close ]


 
 
 

Contact Us | Team Blog | FAQ | Site Credits

© 2005-2009 the MODx CMS project. All rights reserved. Privacy Policy | Terms of Service