<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    <pre>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">
...
</pre>
    <pre>-- 
Kind Regards,
Mario.

-------------------
Mario Jäger

Alkacon Software GmbH  - The OpenCms Experts
<a class="moz-txt-link-freetext" href="http://www.alkacon.com">http://www.alkacon.com</a> - <a class="moz-txt-link-freetext" href="http://www.opencms.org">http://www.opencms.org</a></pre>
    <br>
    -------- Original-Nachricht --------
    <table class="moz-email-headers-table" border="0" cellpadding="0"
      cellspacing="0">
      <tbody>
        <tr>
          <th align="RIGHT" valign="BASELINE" nowrap="nowrap">Betreff: </th>
          <td>Re: [opencms-dev] Adding a new file type in opencms</td>
        </tr>
        <tr>
          <th align="RIGHT" valign="BASELINE" nowrap="nowrap">Datum: </th>
          <td>Thu, 21 Oct 2010 08:50:39 +0200</td>
        </tr>
        <tr>
          <th align="RIGHT" valign="BASELINE" nowrap="nowrap">Von: </th>
          <td>Mario Jäger <a class="moz-txt-link-rfc2396E" href="mailto:m.jaeger@alkacon.com"><m.jaeger@alkacon.com></a></td>
        </tr>
        <tr>
          <th align="RIGHT" valign="BASELINE" nowrap="nowrap">Antwort
            an: </th>
          <td>The OpenCms mailing list <a class="moz-txt-link-rfc2396E" href="mailto:opencms-dev@opencms.org"><opencms-dev@opencms.org></a></td>
        </tr>
        <tr>
          <th align="RIGHT" valign="BASELINE" nowrap="nowrap">An: </th>
          <td>The OpenCms mailing list <a class="moz-txt-link-rfc2396E" href="mailto:opencms-dev@opencms.org"><opencms-dev@opencms.org></a></td>
        </tr>
      </tbody>
    </table>
    <br>
    <br>
    <pre>
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
<a class="moz-txt-link-freetext" href="http://www.alkacon.com">http://www.alkacon.com</a> - <a class="moz-txt-link-freetext" href="http://www.opencms.org">http://www.opencms.org</a>


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 :
>
> <a class="moz-txt-link-freetext" href="http://opencms-wiki.org/Custom_File_and_Folder_Types">http://opencms-wiki.org/Custom_File_and_Folder_Types</a>
>
> 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><a class="moz-txt-link-rfc2396E" href="mailto:![CDATA[alain.tomasian@naos.com]]"><![CDATA[alain.tomasian@naos.com]]></a></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 - <a class="moz-txt-link-freetext" href="http://www.naos.com">http://www.naos.com</a>
> __________________________________________
> Découvrez notre solution de communication
>       par email : <a class="moz-txt-link-freetext" href="http://www.enews.fr">http://www.enews.fr</a>
> __________________________________________
>
>
>
> _______________________________________________
> 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
> <a class="moz-txt-link-freetext" href="http://lists.opencms.org/mailman/listinfo/opencms-dev">http://lists.opencms.org/mailman/listinfo/opencms-dev</a>

_______________________________________________
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
<a class="moz-txt-link-freetext" href="http://lists.opencms.org/mailman/listinfo/opencms-dev">http://lists.opencms.org/mailman/listinfo/opencms-dev</a>
</pre>
  </body>
</html>