Height of the Flash movie. Optional parameters can be added easily by modifying the attached source code.
The Flash Movie Field is based on a new Field Type
SPFieldFlashMovie. It has the following properties or column values:
Url - URL to Flash (.swf) movie or YouTube video, e.g. /media/map.swf, http://www.youtube.com/v/dMH0bHeiRNg&hl=en&fs=1.
Width - Width of Flash movie or YouTube video in pixels. For YouTube video, width includes embedded player.
Height - Height of Flash movie or YouTube video in pixels. For YouTube video, height includes embedded player.
Rendering is provided by a custom Field Control
FlashMovieField with an associating Rendering Template QuestechFlashMovieFieldTemplate. All UI strings are localized and stored in resource files.
Field Type for custom Flash Movie field. Inherits from
A class of column values for
SPFieldFlashMovie. Inherits from
Project resource file for localized UI strings.
WSS provisioning resource file and application run-time resource file for localized UI strings. This sets the display name for the custom field and the label strings for properties
Height during authoring. Deploys to ..\12\Resources\.
Form edit view of
Field Type Definition for Field Type
Field Control for
SPFieldFlashMovie. Uses swfobject 2.1 to render Flash movies and YouTube videos.
Utility file for common methods and properties.
QuestechFlashMovieColumns is required for the deployment. It is responsible for deploying the custom Field Type Definition in fldtypes_SPFieldFlashMovie.xml.
The sample Visual Studio 2008 solution includes all the support files you need to build and deploy the custom field, minus strong name key files (*.snk). It contains three projects: Deployment, Features, and SharePoint. The SharePoint project contains source code for the custom field. The Features project contains features to support the deployment. The Deployment project contains a pre-build script to aggregate all the files needed for deployment. It contains a Solution directory where a WSP file is generated and deployed by a post-build script.
This structure of Visual Studio solution and projects is designed to be scalable to full blown MOSS/WSS development and deployment. You could add additional projects like SharePoint.Publishing for MOSS Publishing development. Within your SharePoint or SharePoint.Publishing projects, you could have custom components like user controls, web controls, web parts, etc.
To deploy the custom field, follow the procedures below:
stsadm, install solution file QuestechFlashMovie.wsp in \Deployments\Solution\
stsadm -o addsolution -filename QuestechFlashMovie.wsp
- Open SharePoint 3.0 Central Administration, go to Operations/Global Configuration/Solution Management. Deploy QuestechFlashMovie.wsp to select web application(s).
- Go to the top site in the selected web application(s). Activate Site Collection feature Questech Systems Flash Movie Columns.
The custom Flash Movie Field should now be ready for use. You can go to the Site Columns gallery to verify. To use the custom field in your MOSS page layout, you would first need to add the custom site column to a content type by going to the Site content types gallery. In the gallery listing, select a content type and click Add from existing site columns.
In your page layout ASPX file, modify the code as follows:
<%@ Register Tagprefix="QuestechWebControls"
Culture=neutral, PublicKeyToken=f268fd4f0f42524c" %>
- Create custom field type in WSS V3 - Jim Yang
- SharePoint Resources, Types, Use and Deployment - Mikhail Dikov
- Features for SharePoint - MSDN Magazine
- SharePoint 2007 Features - Creating Site Columns and Content types - Share This Point
- Solution Deployment with SharePoint 2007 - MSDN Magazine
- V1.2 - 2009.05.22
- Converted Visual Studio solution projects to version 2008
- New SharePoint Solution QuestechFlashMovie.wsp and assembly QuestechSystems.SharePoint.FlashMovie.dll. This allows my other sample solutions in CodeProject to co-exist with this custom field.
- Renamed feature from
- Removed feature
- V1.1 - 2008.08.12
- Added support of YouTube videos
- Modified form view layout
swfobject to V2.1
- V1.0 - 2008.04.26 - Base