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

推荐订阅源

S
Security Affairs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Jina AI
Jina AI
P
Palo Alto Networks Blog
GbyAI
GbyAI
大猫的无限游戏
大猫的无限游戏
A
Arctic Wolf
Hugging Face - Blog
Hugging Face - Blog
小众软件
小众软件
Y
Y Combinator Blog
T
The Blog of Author Tim Ferriss
Blog — PlanetScale
Blog — PlanetScale
S
Schneier on Security
V
Vulnerabilities – Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
雷峰网
雷峰网
T
Tenable Blog
人人都是产品经理
人人都是产品经理
T
Tor Project blog
C
Cyber Attacks, Cyber Crime and Cyber Security
AWS News Blog
AWS News Blog
Microsoft Security Blog
Microsoft Security Blog
J
Java Code Geeks
Scott Helme
Scott Helme
SecWiki News
SecWiki News
C
CERT Recently Published Vulnerability Notes
Recorded Future
Recorded Future
I
InfoQ
Security Archives - TechRepublic
Security Archives - TechRepublic
Help Net Security
Help Net Security
Cloudbric
Cloudbric
C
Check Point Blog
Engineering at Meta
Engineering at Meta
TaoSecurity Blog
TaoSecurity Blog
B
Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园_首页
N
News and Events Feed by Topic
云风的 BLOG
云风的 BLOG
MyScale Blog
MyScale Blog
腾讯CDC
量子位
Application and Cybersecurity Blog
Application and Cybersecurity Blog
K
Kaspersky official blog
Vercel News
Vercel News
F
Full Disclosure
T
Troy Hunt's Blog
Forbes - Security
Forbes - Security
S
Security @ Cisco Blogs

博客园 - 一瞬间

表格隔行换色与鼠标经过变色 - 一瞬间 - 博客园 如何使SharePoint文档库能为PDF文件显示正确的图标 在WSS搜索结果页面中高亮显示搜索关键字 SharePoint 2007 URL地址快速一览表 如何在MOSS2007删除或隐藏列表的下拉工具栏中的栏目 基于ASP.NET Ajax技术的WebPart开发(转) 利用DelegateControl包装自定义的用户控件(转) 利用Javascript获取上传文件、图片 - 一瞬间 - 博客园 推荐一下一个Sharepoint的Solution——Sharepoint SmartTools Javascript 中的事件绑定 & FireFox中的透明度 Asp.net常用的一些代码(转载+融合) - 一瞬间 - 博客园 Display data from multiple sources in a single Data View(转office.Microsoft) Sharepoint备用连接 浅谈Silverlight2.0 beta1(5)DataGrid@Silverlight (一) 浅谈Silverlight2.0 beta1(4) Silverlight Deep Zoom 浅谈Silverlight2.0 beta1(3) Silverlight中的UserControl与CustomControl 浅谈Silverlight2.0 beta1(2) 控件属性中的Style与DataTemplate Silverlight中的DOM Access——使用Window.Eval()(翻译) Silverlight2.0中的计时器类DispatcherTimer——不再使用Storyboard计时器
创建WSS站点时自动应用主题
一瞬间 · 2008-07-18 · via 博客园 - 一瞬间

wss站点定义不支持默认主题的设定。但是我们还是有办法实现该功能。

管理员通常有3种选择,每一种都不推荐。

  1. 在站点创建后由用户手工设置一个主题(很不好!)
  2. 为公司中的站点设置统一的一个主题,保存成模板然后分发。(复杂化,同时将站点和文件系统中的模板分离,使得在将来难于改变)
  3. 改变默认的css文件或不用之(极不好。主题是用来干什么的???同样不支持不同主题的多模板)

问题的解决办法是在站点定义中增加一个链接到一个自定义页,该页将在站点创建后运行应用指定主题的代码。

第一步-更改站点定义

  1. 创建您需要的站点定义
  2. 进“xml”目录,编辑“onet.xml”文件
  3. 在最下面找到“Configurations”标签,对每一个您需要变更的configuration,在“Configuration”标签中添加下面的内容(在“THEMENAMEHERE”的位置写下您的主题名。注意大小写)

第二步-创建ThemeSetter.aspx

  1. 打开"c:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\LAYOUTS\2052"
  2. 新建一个文本文件,重命名为"ThemeSetter.aspx"
  3. 编辑该文件,粘贴下面的代码。

第三步-重新启动IIS

(在运行栏中执行“iisreset”),使得变更生效。

现在,使用您创建的站点定义创建的站点将自动的应用指定主题。

本文翻译msd2d上的文章而来,原文在此。http://msd2d.com/newsletter_tip.aspx?section=sharepoint&id=493c0348-5b00-4ef5-9410-018eebe84d67

<html dir="ltr">
<%@ Page Language="C#" ValidateRequest="False" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%

SPWeb myNewWeb 
= SPControl.GetContextWeb(Context);
myNewWeb.AllowUnsafeUpdates 
= true;
myNewWeb.ApplyTheme(this.Page.Request[
"Theme"].ToString());
myNewWeb.Update();
Response.Redirect(myNewWeb.Url);

%>
</html></body></html></body></html></body></html></body></html>