To add a document type and type icon, do the following:
1. In the Program Files/Common Files/Microsoft Shared/web server
extensions/50/Templates/1033/xml directory, open DOCICON.XML.
2. In the middle of the file, find the ByExtension section.
3. For the sake of example, we will add a wav file type and an icon to
represent what kind of file it is. Add a line like the following:
<Mapping Key="wav" Value="icwav.gif"/>
4. In the Program Files/Common Files/Microsoft Shared/web server
extensions/50/Templates/1033/Images directory, add an appropriate icon and call
it "icwav.gif".
5. Restart Microsoft Internet Information Services (IIS).
6. Create a new subweb.
All sites created from now on will display icwav.gif in document libraries for
files that have the .wav extension.
Also, to enable the new icon in the search query results do the following (This is not enabled with the above settings and is nowhere to be found in the sdk)
同样,用以下方法可以实现在搜索结果中加入新文件类型的图标(以上方法对搜索结果无效,该方法可以在SDK中找到)
1. Open the search.htx file under /../wwwroot/_layout/search.htx with
notepad
2. Scroll to the following lines:
function showGif(url, fName)
{
var L_DocImageAlt_Text = "Icon";
sExtension = fName.substring(fName.length-4,fName.length);
switch (sExtension.toLowerCase()) {
3. Create a new entry just below those lines like in the following example:
case ".<file extension eg. .pdf>":
gifPath="<Filename>.gif";
break;
4. Save the search.htx file
------------------------------------------------------
以上第一个方法实验过,是有效的,但对于第二个还需验证一下.我记得如果SHAREPOINT中如果有装文档库组件的话,文档库中的新的文件类型的图标,采用第一种方法是无效的. 对文档库组件中新的文件图标显示问题还未解决.以后找到的话再补上了.