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

Alain TOMASIAN alain.tomasian at naos.com
Fri Nov 12 10:29:08 CET 2010


Hi Mario,

Thank you, it works now.

Best regards,

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
__________________________________________


>
>
> Hi Alain,
>
> You write, that your resource type "flash" shall be handled like the resource
> type "binary". In this case, you have to set the "reference" attribute in
> the<explorertype>  node to "binary":
>
> ...
> <explorertype name="flash" key="fileicon.flash" icon="flash.gif"
> reference="binary">
> ...
>
> --
> Kind Regards,
> Mario.
>
> -------------------
> Mario Jäger
>
> Alkacon Software GmbH  - The OpenCms Experts
> http://www.alkacon.com - http://www.opencms.org
>
>
> -------- Original-Nachricht --------
> Betreff: 	Re: [opencms-dev] Adding a new file type in opencms
> Datum: 	Thu, 21 Oct 2010 08:50:39 +0200
> Von: 	Mario Jäger <m.jaeger at alkacon.com>
> Antwort an: 	The OpenCms mailing list <opencms-dev at opencms.org>
> An: 	The OpenCms mailing list <opencms-dev at opencms.org>
>
>
>
> Hi Alain,
>
> You have to set the "reference" attribute in the<explorertype>   node to
> "unknown_file" instead of "unknow". And you have to set the "uri" attribute in
> the<newresource>   node to "newresource.jsp?newresourcetype=flash":
>
> ...
> <explorertype name="flash" key="fileicon.flash" icon="flash.gif"
> reference="unknown_file">
>     <newresource uri="newresource.jsp?newresourcetype=flash" order="200"
> autosetnavigation="false" autosettitle="false"/>
> ...
>
>
> It should work then.
>
> --
> Kind Regards,
> Mario.
>
> -------------------
> Mario Jäger
>
> Alkacon Software GmbH  - The OpenCms Experts
> http://www.alkacon.com - http://www.opencms.org
>
>
> Am 14.10.2010 11:37, schrieb Alain TOMASIAN:
>>  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
>>  __________________________________________
>>
>>
>>
>>  _______________________________________________
>>  This mail is sent to you from the opencms-dev mailing list
>>  To change your list options, or to unsubscribe from the list, please visit
>>  http://lists.opencms.org/mailman/listinfo/opencms-dev
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev





More information about the opencms-dev mailing list