[opencms-dev] Adding a new file type in opencms

Alain TOMASIAN alain.tomasian at naos.com
Thu Oct 14 11:37:00 CEST 2010


Hi,

I use OpenCMS 7.5.2 with tomcat 6.0.18.

I would like extend the opencms file type (like pdf file or flash file,...). I
found on the wiki site this page :

http://opencms-wiki.org/Custom_File_and_Folder_Types

I tried ti create a new module to do this. Here is the module description in
the opemcms-modules.xml file :

<module>
 <name>com.naos.opencms.files.extension</name>
 <nicename><![CDATA[NAOS Files extension]]></nicename>
 <group>NAOS</group>
 <class/>
 <description><![CDATA[NAOS Files extension]]></description>
 <version>1.15</version>
 <authorname><![CDATA[Alain TOMASIAN]]></authorname>
 <authoremail><![CDATA[alain.tomasian at naos.com]]></authoremail>
 <datecreated/>
 <userinstalled/>
 <dateinstalled/>
 <dependencies/>
 <exportpoints>
  <exportpoint uri="/system/modules/com.naos.opencms.files.extension/classes/"
destination="WEB-INF/classes/"/>
 </exportpoints>
 <resources>
  <resource uri="/system/modules/com.naos.opencms.files.extension/"/>
  <resource uri="/system/workplace/resources/filetypes/flash.gif"/>
 </resources>
 <parameters/>
 <resourcetypes>
 <type class="org.opencms.file.types.CmsResourceTypeUnknown" name="flash"
id="200">
   <mappings>
	<mapping suffix=".swf"/>
   </mappings>
 </type>
 </resourcetypes>
 <explorertypes>
	<explorertype name="flash" key="fileicon.flash" icon="flash.gif"
reference="unknow">
	<newresource uri="" order="200" autosetnavigation="false" autosettitle="false"/>
	<accesscontrol>
		<accessentry principal="GROUP.Administrators" permissions="+r+v+w+c"/>
		<accessentry principal="GROUP.Users" permissions="+r+v+w+c"/>
		<accessentry principal="GROUP.Projectmanagers" permissions="+r+v+w+c"/>
	</accesscontrol>
  </explorertype>
 </explorertypes>
</module>

But it does'nt work...

No special action is needed for the new file type, just like the binary file.

Is there someone who can help me ?

Thanks a lot,

Alain.
__________________________________________
 Alain TOMASIAN - NAOS Technologies
 33, avenue Philippe Auguste - 75011 PARIS
 +33 1 402 402 86 - http://www.naos.com
__________________________________________
Découvrez notre solution de communication
     par email : http://www.enews.fr
__________________________________________





More information about the opencms-dev mailing list