For adding a new datatype to pimcore via a plugin, you need following files:

- Server-side backend logic: Object_Class_Data_CustomDatatype (CustomDatatype\lib\Object\Class\Data\CustomDatatype.php)
- Java script class to define the configuration of the custom datatype in the class definition: pimcore.object.classes.data.customDatatype (CustomDatatype\static\js\CustomDatatype\data\customDatatype.js)
- Java script class to define the visualization of the custom datatype in the object editor: pimcore.object.tags.customDatatype (CustomDatatype\static\js\CustomDatatype\tags\customDatatype.js)
Don't forget to define the java script files to be loaded in the plugin.xml
<pluginJsPaths>
<path>/CustomDatatype/static/js/CustomDatatype/data/customDatatype.js</path>
<path>/CustomDatatype/static/js/CustomDatatype/tags/customDatatype.js</path>
</pluginJsPaths>
You can download the whole Plugin from http://www.pimcore.org/svn/labs/trunk/CustomDatatype