This documentation is archived and is not being maintained.

Example 1 - Adding a new field type for Flash movies

SharePoint Team Services 1.1

To add a new field type for Flash movies, do the following:

  1. Go to Program Files\Common Files\Microsoft Shared\web server extensions\50\Templates\1033\xml and open FLDTYPES.XML.
  2. Add a new Row element to FLDTYPES.XML by copying an existing Row section from another field type (for example, the one that defines the Text type).
  3. Change the TypeName field to be appropriate for displaying Flash animations by modifying the first Field element in the section, such as follows:
    <Field Name="TypeName" DisplayName="TypeName">Flash</Field>
  4. Change the DisplayPattern field to be appropriate for displaying Flash animations by modifying the contents of the RenderPattern section used to define the display pattern. Add a Flash object to the definition as follows:
    <RenderPattern Name="DisplayPattern" DisplayName="DisplayPattern">
      <HTML><![CDATA[ <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
        codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH=600 HEIGHT=450>
        <PARAM NAME=movie VALUE="]]>
      </HTML>
      <Column HTMLEncode="TRUE" AutoNewLine="TRUE"/>
      <HTML><![CDATA["> <PARAM NAME=quality VALUE=high>
        <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="]]>
      </HTML>
      <Column HTMLEncode="TRUE" AutoNewLine="TRUE"/>
      <HTML><![CDATA[" quality=high bgcolor=#FFFFFF WIDTH=600 HEIGHT=450 TYPE="application/x-shockwave-flash" 
        PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
        </OBJECT>]]>
      </HTML>
    </RenderPattern>
  5. Create a new template by copying the CustList folder and naming the new folder appropriately (for this example, Movies).
  6. Update the new directory's SCHEMA.XML file to have a field that uses the new Flash animation type. In the empty Fields element after the opening <MetaData> tag, add an appropriate Field element as follows:
    <Field Type="Flash" Name="FlashMv" DisplayName="URL" Required="TRUE"></Field>
  7. Add the new template to ONET.XML so that the new type shows up on the SharePoint Team Services Create page. In the ListTemplates section, add a template definition like the following:
    <ListTemplate Name="Movies" DisplayName="Movies" Type="132" BaseType="0" Default="FALSE" OnQuickLaunch="FALSE" 
      SecurityBits="111" Description="Create a new Flash movies list." Image="_layouts/images/ittask.gif"></ListTemplate>

    Note   The value of the Type attribute must be a number that is not being used elsewhere in the ListTemplates section and that is less than 1000. The Name attribute must be set to the exact name of the new custom list folder.

  8. On the SharePoint team Web site's Create page, create a new list based on the template, adding the appropriate URL for the Flash movie on the New Item form.

See Also

Introduction — What Is CAML?

Location of CAML


Show: