惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LangChain Blog
TaoSecurity Blog
TaoSecurity Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
SecWiki News
SecWiki News
L
LINUX DO - 最新话题
Google Online Security Blog
Google Online Security Blog
V2EX - 技术
V2EX - 技术
Help Net Security
Help Net Security
Security Latest
Security Latest
T
Troy Hunt's Blog
腾讯CDC
WordPress大学
WordPress大学
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
H
Hacker News: Front Page
博客园 - 叶小钗
酷 壳 – CoolShell
酷 壳 – CoolShell
雷峰网
雷峰网
T
Threatpost
博客园 - Franky
MongoDB | Blog
MongoDB | Blog
Microsoft Security Blog
Microsoft Security Blog
V
Vulnerabilities – Threatpost
S
Secure Thoughts
M
MIT News - Artificial intelligence
量子位
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
G
Google Developers Blog
Jina AI
Jina AI
PCI Perspectives
PCI Perspectives
C
Cisco Blogs
罗磊的独立博客
Y
Y Combinator Blog
The GitHub Blog
The GitHub Blog
Last Week in AI
Last Week in AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
C
Cybersecurity and Infrastructure Security Agency CISA
有赞技术团队
有赞技术团队
Application and Cybersecurity Blog
Application and Cybersecurity Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
H
Help Net Security
The Hacker News
The Hacker News
Cyberwarzone
Cyberwarzone
N
News and Events Feed by Topic
aimingoo的专栏
aimingoo的专栏
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
J
Java Code Geeks
N
News and Events Feed by Topic
S
Securelist

博客园 - Sunmoonfire

SharePoint 2013无代码实现列表视图的时间段动态筛选 SharePoint 2013:自定义ECB菜单项的添加 SharePoint Foundation 2013 with SP1 在SharePoint列表中使用自增栏 SharePoint 2010自定义母版页小技巧——JavaScript和CSS引用 通过PowerShell实现SharePoint列表增删改 在SharePoint 2010页面中嵌入SWF文件 在LINQ to SharePoint中使用创建时间,创建者,修改时间,修改者 SharePoint 2010之LINQ与SPMetal 修改SharePoint页面上的控件数量的限制 SharePoint 2010:部署.resx(资源)文件到App_GlobalResources的简单方法 在SharePoint 2010中使用jQuery 在SharePoint 2010环境下区分w3wp进程 打SharePoint 2010 SP1后访问用户配置文件同步服务应用程序出错的解决办法 使用[本人]创建视图筛选时的一个问题和解答 "缺少服务器端相关性"的内容定位 SharePoint 2010开发工具图解系列:Visual Studio 2010创建事件接收器 SharePoint 2010开发工具图解系列:Visual Studio 2010创建列表 SharePoint 2010开发工具图解系列:Visual Studio 2010 SharePoint Tool入门
修改SharePoint列表项显示“新”图标的天数
Sunmoonfire · 2012-08-28 · via 博客园 - Sunmoonfire

当我们在SharePoint中新增一个列表项时,在该列表项的标题后面会显示一个“新”字图标。

默认情况下,是2天内的项会显示“新”。我们可以通过stsadm命令行工具来修改:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN>stsa
dm -o setproperty -propertyname days-to-show-new-icon -propertyvalue 30 -url htt
p://moss.contoso.com

在上面的例子中,我的Web应用程序地址是http://moss.contoso.com。通过修改这个Web应用程序属性包中的days-to-show-new-icon属性,就可以控制显示“新”图标的天数。这里改成30。

当然,知道存放位置了,我们也可以通过对象模型来修改:

SPWebApplication oWebApp = SPWebService.ContentService.WebApplications["SharePoint - 80"];
int iDays = oWebApp.DaysToShowNewIndicator;
Console.WriteLine(“原来是-->”+iDays);
oWebApp.DaysToShowNewIndicator = 30;
oWebApp.Update();
iDays = oWebApp.DaysToShowNewIndicator;
Console.WriteLine(“改成-->”+iDays);

其中“SharePoint - 80"是我们创建Web应用程序时填写的名称。这段代码完成的功能和上面的命令行脚本一样。

参考资料

Powershell Script for Changing NEW icon dayslife in SharePoint 2010
How to get the current value for the days-to-show-new-icon property (C#)