sharepoint:Adding Icons for Unknown File Types like

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中如果有装文档库组件的话,文档库中的新的文件类型的图标,采用第一种方法是无效的. 对文档库组件中新的文件图标显示问题还未解决.以后找到的话再补上了.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值