MOSS界面設計
Microsoft Office SharePoint Server 2007的文件目錄結構?(oxXúY?forums.mosstec.cn/?{?§?x??
安裝了MOSS2007後,全部與SharePoint相關的文件都放在本地目錄C:\Program Files\Common Files\Microsoft Shared\web server extensions\12下面。
下面介紹一些主要的文件目錄。
一、 ISAPI目錄?(oxXúY?forums.mosstec.cn/?{?§?x??
此目錄下面存放的是SharePoint自帶的Web Services,咱們也能夠自定義Web Services封裝在SharePoint裏面。自定義Web Services方法見:Writing Custom Web Services for SharePoint Products and Technologies。
二、 Resources目錄?(oxXúY?forums.mosstec.cn/?{?§?x??
SharePoint 有兩個資源文件夾,目錄分別爲C:\Program Files\Common Files\MicrosoftShared\web server extensions\12\CONFIG\Resources和C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\Resources,本地化工做主要是編寫Resourses裏的文件,網站若是顯示的一些標題或描述不符合咱們的要求,那麼能夠經過修改資源文件裏的?(oxXúY?forums.mosstec.cn/?{?§?x??
<Data Name="修改元素">?(oxXúY?forums.mosstec.cn/?{?§?x??
<Value>網站顯示的內容</Value>?(oxXúY?forums.mosstec.cn/?{?§?x??
</Data>?(oxXúY?forums.mosstec.cn/?{?§?x??
要引用資源文件裏面的內容,通常經過$Resources:開頭。?(oxXúY?forums.mosstec.cn/?{?§?x??
例如:<%$Resources:sps,LayoutPageZone_TopZone%>?(oxXúY?forums.mosstec.cn/?{?§?x??
其中:sps表示資源文件名,與sps.zh-CN.resx相對應。LayoutPageZone_TopZone表示sps.zh-CN.resx文件中的?(oxXúY?forums.mosstec.cn/?{?§?x??
<Data Name="LayoutPageZone_TopZone">?(oxXúY?forums.mosstec.cn/?{?§?x??
<Value>頂部區域</Value>?(oxXúY?forums.mosstec.cn/?{?§?x??
</Data>?(oxXúY?forums.mosstec.cn/?{?§?x??
節點。?(oxXúY?forums.mosstec.cn/?{?§?x??
注:通常不推薦修改全部C:\Program Files\Common Files\Microsoft Shared\web server extensions\12目錄下的文件,由於這樣將給版本升級帶來問題。要加入咱們自定義的內容經過增長文件到相應的目錄下便可。好比這裏咱們能夠增長一個資源文件,把咱們要修改的元素放在裏面。
三、 TEMPLATE目錄?(oxXúY?forums.mosstec.cn/?{?§?x??
這是一個最主要的目錄。子目錄介紹以下:?(oxXúY?forums.mosstec.cn/?{?§?x??
(1)、SiteTemplates目錄?(oxXúY?forums.mosstec.cn/?{?§?x??
放置各類網站定義模板。每一個網站定義模板都會有一個ONET.XML文件,它位於 C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\SiteTemplates\Site_Definition_Name\XML folder ?(oxXúY?forums.mosstec.cn/?{?§?x??
ONET.XML有五個節: ?(oxXúY?forums.mosstec.cn/?{?§?x??
一、NavBars:指定主頁的頂部導航和左部導航?(oxXúY?forums.mosstec.cn/?{?§?x??
二、ListTemplates:指定該站點可建立的各類列表(自定義列表、文檔庫、圖片庫等) ?(oxXúY?forums.mosstec.cn/?{?§?x??
三、DocumentTemplates:指定在建立文檔庫時能夠建立的文檔模板(Microsoft Office Word 文檔、Microsoft Office FrontPage 網頁、Microsoft Office Excel 電子表格等) ?(oxXúY?forums.mosstec.cn/?{?§?x??
四、Configurations:指定站點在建立時默認生成的各類列表和模塊?(oxXúY?forums.mosstec.cn/?{?§?x??
五、Modules:指定站點中默認包含的Web部件庫 ?(oxXúY?forums.mosstec.cn/?{?§?x??
注意:修改ONET.XML後須要從新啓動IIS,纔可生效?(oxXúY?forums.mosstec.cn/?{?§?x??
?(oxXúY?forums.mosstec.cn/?{?§?x??
實例:基於已有模板建立站點模板。?(oxXúY?forums.mosstec.cn/?{?§?x??
步驟:?(oxXúY?forums.mosstec.cn/?{?§?x??
一、打開C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\SiteTemplates目錄?(oxXúY?forums.mosstec.cn/?{?§?x??
二、複製粘貼一個SPS文件夾,更名爲GASSPS?(oxXúY?forums.mosstec.cn/?{?§?x??
三、找到C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\2052\XML目錄?(oxXúY?forums.mosstec.cn/?{?§?x??
四、在目錄中建立一個名爲WEBTEMPGASSPS.XML的文件,把下列XML粘貼到文件中?(oxXúY?forums.mosstec.cn/?{?§?x??
<?xml version="1.0" encoding="utf-8"?>?(oxXúY?forums.mosstec.cn/?{?§?x??
<!-- _lcid="2052" _version="12.0.4518" _dal="1" -->?(oxXúY?forums.mosstec.cn/?{?§?x??
<!-- _LocalBinding -->?(oxXúY?forums.mosstec.cn/?{?§?x??
<Templates xmlns:ows="Microsoft SharePoint">?(oxXúY?forums.mosstec.cn/?{?§?x??
<Template Name="GASSPS" ID="10001">?(oxXúY?forums.mosstec.cn/?{?§?x??
<Configuration ID="0" Title="浙江自然氣模板" Hidden="FALSE" ImageUrl="" ?(oxXúY?forums.mosstec.cn/?{?§?x??
Description="此模板用於初始化浙江自然氣網站。" >?(oxXúY?forums.mosstec.cn/?{?§?x??
</Configuration>?(oxXúY?forums.mosstec.cn/?{?§?x??
</Template>?(oxXúY?forums.mosstec.cn/?{?§?x??
</Templates>?(oxXúY?forums.mosstec.cn/?{?§?x??
五、重啓IIS(iisreset)?(oxXúY?forums.mosstec.cn/?{?§?x??
六、打開建立站點頁面,在「選擇模板」節中多了一個「自定義」選項,下面就有咱們剛添加的「浙江自然氣模板」。?(oxXúY?forums.mosstec.cn/?{?§?x??
?(oxXúY?forums.mosstec.cn/?{?§?x??
(2)、THEMES目錄?(oxXúY?forums.mosstec.cn/?{?§?x??
放置各類網站主題。?(oxXúY?forums.mosstec.cn/?{?§?x??
?(oxXúY?forums.mosstec.cn/?{?§?x??
實例:建立自定義的主題?(oxXúY?forums.mosstec.cn/?{?§?x??
步驟:?(oxXúY?forums.mosstec.cn/?{?§?x??
一、先找到 Theme 文件夾位置 C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\THEMES ?(oxXúY?forums.mosstec.cn/?{?§?x??
二、複製一個 Theme 的文件夾如 CLASSIC 更改爲本身要的名字如 GASTHEME ?(oxXúY?forums.mosstec.cn/?{?§?x??
三、在文件夾中,將CLASSIC.INF 改爲與本身文件夾相同的名字如 GASTHEME.INF ?(oxXúY?forums.mosstec.cn/?{?§?x??
四、打開 GASTHEME.INF 將 title 改爲與本身文件夾和文件名相同的名字如GASTHEME ?(oxXúY?forums.mosstec.cn/?{?§?x??
五、找到 C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\2052\SPTHEMES.XML 文件,複製並粘貼一個<Templates>元素,修改裏面的內容以下:?(oxXúY?forums.mosstec.cn/?{?§?x??
<Templates>?(oxXúY?forums.mosstec.cn/?{?§?x??
<TemplateID>GASTHEME</TemplateID>?(oxXúY?forums.mosstec.cn/?{?§?x??
<DisplayName>自然氣主題</DisplayName>?(oxXúY?forums.mosstec.cn/?{?§?x??
<Description>自然氣主題將被應用</Description>?(oxXúY?forums.mosstec.cn/?{?§?x??
<Thumbnail>p_w_picpaths/thwheat.gif</Thumbnail>?(oxXúY?forums.mosstec.cn/?{?§?x??
<Preview>p_w_picpaths/thwheat.gif</Preview>?(oxXúY?forums.mosstec.cn/?{?§?x??
</Templates>?(oxXúY?forums.mosstec.cn/?{?§?x??
上面兩個圖片是參考Wheat主題的圖片,也能夠改爲本身的圖片,圖片存放位置 C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\IMAGES文件夾下 ?(oxXúY?forums.mosstec.cn/?{?§?x??
六、打開「網站設置」中「網站主題」,就能夠找到咱們剛剛添加的GASTHEME主題了。
(3)、LAYOUTS目錄?(oxXúY?forums.mosstec.cn/?{?§?x??
網站全部的頁面功能(網址後面有 _layouts的頁面)都集中於此目錄下面(除了模板中的Default.aspx以及某類型List相關頁面)。能夠添加本身的功能頁面,方法:
(4)、ADMIN目錄?(oxXúY?forums.mosstec.cn/?{?§?x??
管理中心的頁面功能集中此目錄下面。
(5)、CONTROLTEMPLATES目錄?(oxXúY?forums.mosstec.cn/?{?§?x??
放置各類服務器控件。
(6)、IMAGES目錄?(oxXúY?forums.mosstec.cn/?{?§?x??
放置網站用到的主要圖片,如網站Logo等。
(7)、FEATURES目錄?(oxXúY?forums.mosstec.cn/?{?§?x??
放置各類Feature,在MOSS 2007中feature功能之強大超乎想象,能夠說對一個已有的網站功能性的加強最後多數都要經過feature來實現。包括母版頁、內容頁以及文檔庫等都是經過Feature來實現的。
實例1:使用Feature自定義母版頁。?(oxXúY?forums.mosstec.cn/?{?§?x??
步驟:?(oxXúY?forums.mosstec.cn/?{?§?x??
一、 打開Feature目錄C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES?(oxXúY?forums.mosstec.cn/?{?§?x??
二、 新建一個GASMASTERPAGES文件夾?(oxXúY?forums.mosstec.cn/?{?§?x??
三、 在GASMASTERPAGES文件夾下,新建Feature.xml文件,將下列內容粘貼到文件中?(oxXúY?forums.mosstec.cn/?{?§?x??
<!-- _lcid="1033" _version="12.0.4518" _dal="1" -->?(oxXúY?forums.mosstec.cn/?{?§?x??
<!-- _LocalBinding -->?(oxXúY?forums.mosstec.cn/?{?§?x??
<Feature Id="cbdddc58-c0e1-4d64-99bc-071379a910f3"?(oxXúY?forums.mosstec.cn/?{?§?x??
Title="Gas Master"?(oxXúY?forums.mosstec.cn/?{?§?x??
Description=""?(oxXúY?forums.mosstec.cn/?{?§?x??
Version="12.0.0.0"?(oxXúY?forums.mosstec.cn/?{?§?x??
Scope="Site"?(oxXúY?forums.mosstec.cn/?{?§?x??
Hidden="False"?(oxXúY?forums.mosstec.cn/?{?§?x??
DefaultResourceFile="core"?(oxXúY?forums.mosstec.cn/?{?§?x??
xmlns="
?(oxXúY?forums.mosstec.cn/?{?§?x'>http://schemas.microsoft.com/sharepoint/">?(oxXúY?forums.mosstec.cn/?{?§?x??
<ElementManifests>?(oxXúY?forums.mosstec.cn/?{?§?x??
<ElementManifest Location="ProvisionedFiles.xml"/>?(oxXúY?forums.mosstec.cn/?{?§?x??
</ElementManifests>?(oxXúY?forums.mosstec.cn/?{?§?x??
</Feature>?(oxXúY?forums.mosstec.cn/?{?§?x??
在這個XML文件中,如下關於Featrue的metadata 包含在Featrue 元素中。(更詳細的信息請參閱Feature.xml Files)?(oxXúY?forums.mosstec.cn/?{?§?x??
ID: 一個GUID,用於惟一標識這個Feature,能夠經過VS生成?(oxXúY?forums.mosstec.cn/?{?§?x??
Title:Feature 的名字,能夠在網站內關於Site Featrues的頁面中看到。?(oxXúY?forums.mosstec.cn/?{?§?x??
Description:對description的描述。?(oxXúY?forums.mosstec.cn/?{?§?x??
Version:Feature的版本;?(oxXúY?forums.mosstec.cn/?{?§?x??
Scope:其值能夠是Web或Site,它指明瞭這個Feature是應用於整個的Site Collection仍是僅僅用於單獨的一個子站點。?(oxXúY?forums.mosstec.cn/?{?§?x??
Hidden:值能夠是True或False.該設置指定了這個Feature是否在Site Feature頁面上顯示。?(oxXúY?forums.mosstec.cn/?{?§?x??
DefaultResourceFile: 資源文件名字,Feature依賴它提供其它附加的配置信息。?(oxXúY?forums.mosstec.cn/?{?§?x??
Feature.xml文件中的<ElementManifests>元素,這個元素包含了另外一個XML文件的位置,而這個文件包含的<Elemnets>的內容是Feature要實現的。?(oxXúY?forums.mosstec.cn/?{?§?x??
<ElementManifest>元素指明瞭要使用一個名爲ProvisionedFiles.xml的文件,如下是該文件的<Elements>元素內容。?(oxXúY?forums.mosstec.cn/?{?§?x??
四、 在GASMASTERPAGES文件夾下,新建ProvisionedFiles.xml文件,將下列內容粘貼到文件中?(oxXúY?forums.mosstec.cn/?{?§?x??
<!-- _lcid="1033" _version="12.0.4518" _dal="1" -->?(oxXúY?forums.mosstec.cn/?{?§?x??
<!-- _LocalBinding -->?(oxXúY?forums.mosstec.cn/?{?§?x??
<Elements xmlns="
?(oxXúY?forums.mosstec.cn/?{?§?x'>http://schemas.microsoft.com/sharepoint/">?(oxXúY?forums.mosstec.cn/?{?§?x??
<Module Name="OSGMasterPages" Url="_catalogs/masterpage" Path="MasterPages" RootWebOnly="TRUE">?(oxXúY?forums.mosstec.cn/?{?§?x??
<File Url="Gasmaster.master" Type="GhostableInLibrary">?(oxXúY?forums.mosstec.cn/?{?§?x??
<Property Name="ContentType" Value="" />?(oxXúY?forums.mosstec.cn/?{?§?x??
<Property Name="PublishingPreviewImage" Value="~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/Gas.png, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/Gas.png" />?(oxXúY?forums.mosstec.cn/?{?§?x??
<Property Name="MasterPageDescription" Value="" />?(oxXúY?forums.mosstec.cn/?{?§?x??
</File>?(oxXúY?forums.mosstec.cn/?{?§?x??
</Module>?(oxXúY?forums.mosstec.cn/?{?§?x??
<Module Name="PublishingLayoutsPreviewImages" Url="_catalogs/masterpage" IncludeFolders="??-??" Path="" RootWebOnly="TRUE">?(oxXúY?forums.mosstec.cn/?{?§?x??
<File Url="Gas.png" Name="Preview Images/Gas.png" Type="GhostableInLibrary">?(oxXúY?forums.mosstec.cn/?{?§?x??
</File>?(oxXúY?forums.mosstec.cn/?{?§?x??
</Module>?(oxXúY?forums.mosstec.cn/?{?§?x??
</Elements>?(oxXúY?forums.mosstec.cn/?{?§?x??
五、 新建MasterPages和zh-cn文件夾,在MasterPages文件夾中新建Gasmaster.master文件,在zh-cn文件夾中放入一張模板頁的圖片Gas.png?(oxXúY?forums.mosstec.cn/?{?§?x??
六、 重啓IIS(iisreset)?(oxXúY?forums.mosstec.cn/?{?§?x??
七、 在SharePoint服務器上運行CMD.exe, ?(oxXúY?forums.mosstec.cn/?{?§?x??
輸入命令切換目錄:cd C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN?(oxXúY?forums.mosstec.cn/?{?§?x??
安裝Feature輸入命令:stsadm -o installfeature -filename GASMASTERPAGES?(oxXúY?forums.mosstec.cn/?{?§?x??
激活Feature輸入命令:stsadm -o activatefeature -filename GASMASTERPAGES\feature.xml -url
http://portal:8000?(oxXúY?forums.mosstec.cn/?{?§?x??
八、 打開「網站設置」中「母版頁」,就能夠看到咱們剛剛添加的Gasmaster.master母版。?(oxXúY?forums.mosstec.cn/?{?§?x??
參考鏈接:Create a Feature: Add Custom Master Pages to your Site Collections?(oxXúY?forums.mosstec.cn/?{?§?x??
?(oxXúY?forums.mosstec.cn/?{?§?x??
實例2:使用Feature定義站點中的菜單項?(oxXúY?forums.mosstec.cn/?{?§?x??
包括其中第一個CustomAction在「網站設置」頁面中的「外觀」標題下建立了一個自定義連接.第二個CustomAction在頁面的「網站操做」菜單下增長了一個用戶自定義菜單項.第三個CustomAction在文檔庫的「新建」下拉菜單下建立了一個自定義菜單項.第四個CustomAction在文檔庫的「操做」下拉菜單下建立了一個自定義菜單項。?(oxXúY?forums.mosstec.cn/?{?§?x??
步驟:?(oxXúY?forums.mosstec.cn/?{?§?x??
一、建立一個Feature.xml文件?(oxXúY?forums.mosstec.cn/?{?§?x??
在Features目錄下建立一個目錄例如MyMenu,在其中建立一個Feature.xml文件,文件內容以下:?(oxXúY?forums.mosstec.cn/?{?§?x??
<?xml version="1.0" encoding="utf-8" ?> ?(oxXúY?forums.mosstec.cn/?{?§?x??
<!-- _lcid="1033" _version="12.0.4017" _dal="1" --> ?(oxXúY?forums.mosstec.cn/?{?§?x??
<!-- _LocalBinding -->?(oxXúY?forums.mosstec.cn/?{?§?x??
<Feature Id="6098EC11-8128-409A-8D2C-414E93F67DD4" ?(oxXúY?forums.mosstec.cn/?{?§?x??
Title="$Resources:GasMenu,MenuTitle;" ?(oxXúY?forums.mosstec.cn/?{?§?x??
Description="$Resources:GasMenu,MenuDescription;" ?(oxXúY?forums.mosstec.cn/?{?§?x??
Version="12.0.0.0" ?(oxXúY?forums.mosstec.cn/?{?§?x??
Scope="Web" ?(oxXúY?forums.mosstec.cn/?{?§?x??
Hidden="FALSE" ?(oxXúY?forums.mosstec.cn/?{?§?x??
DefaultResourceFile="customDocumentLibrary" ?(oxXúY?forums.mosstec.cn/?{?§?x??
xmlns="
?(oxXúY?forums.mosstec.cn/?{?§?x'>http://schemas.microsoft.com/sharepoint/">?(oxXúY?forums.mosstec.cn/?{?§?x??
<ElementManifests>?(oxXúY?forums.mosstec.cn/?{?§?x??
<ElementManifest Location="LightUp.xml" /> ?(oxXúY?forums.mosstec.cn/?{?§?x??
</ElementManifests>?(oxXúY?forums.mosstec.cn/?{?§?x??
</Feature>?(oxXúY?forums.mosstec.cn/?{?§?x??
二、在C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\Resources文件夾中新建GasMenu.zh-CN.resx文件,輸入如下內容?(oxXúY?forums.mosstec.cn/?{?§?x??
<?xml version="1.0" encoding="utf-8"?>?(oxXúY?forums.mosstec.cn/?{?§?x??
<!-- _lcid="2052" _version="12.0.4518.1016" _dal="1" -->?(oxXúY?forums.mosstec.cn/?{?§?x??
<!-- _LocalBinding -->?(oxXúY?forums.mosstec.cn/?{?§?x??
<root>?(oxXúY?forums.mosstec.cn/?{?§?x??
<Data Name="MenuTitle">?(oxXúY?forums.mosstec.cn/?{?§?x??
<Value>自然氣菜單項</Value>?(oxXúY?forums.mosstec.cn/?{?§?x??
</Data>?(oxXúY?forums.mosstec.cn/?{?§?x??
<Data Name="MenuDescription">?(oxXúY?forums.mosstec.cn/?{?§?x??
<Value> 添加了四個菜單項,分別爲在「網站設置」頁面中的「外觀」標題下建立了一個自定義連接、在頁面的「網站操做」菜單下增長了一個用戶自定義菜單項、在文檔庫的「新建」下拉菜單下建立了一個自定義菜單項和在文檔庫的「操做」下拉菜單下建立了一個自定義菜單項。</Value>?(oxXúY?forums.mosstec.cn/?{?§?x??
</Data>?(oxXúY?forums.mosstec.cn/?{?§?x??
</root>?(oxXúY?forums.mosstec.cn/?{?§?x??
三、建立Feature的描述文件LightUp.xml?(oxXúY?forums.mosstec.cn/?{?§?x??
文檔的內容以下:?(oxXúY?forums.mosstec.cn/?{?§?x??
<?xml version="1.0" encoding="utf-8" ?> ?(oxXúY?forums.mosstec.cn/?{?§?x??
<Elements xmlns="
?(oxXúY?forums.mosstec.cn/?{?§?x'>http://schemas.microsoft.com/sharepoint/">?(oxXúY?forums.mosstec.cn/?{?§?x??
<!-- create command link site setting page -->?(oxXúY?forums.mosstec.cn/?{?§?x??
<CustomAction Id="SiteSettings" GroupId="Customization" ?(oxXúY?forums.mosstec.cn/?{?§?x??
Location="Microsoft.SharePoint.SiteSettings"?(oxXúY?forums.mosstec.cn/?{?§?x??
Sequence="106"?(oxXúY?forums.mosstec.cn/?{?§?x??
Title="Custom Site Setting Command">?(oxXúY?forums.mosstec.cn/?{?§?x??
<UrlAction Url=""/>?(oxXúY?forums.mosstec.cn/?{?§?x??
</CustomAction>?(oxXúY?forums.mosstec.cn/?{?§?x??
<!-- Add command to site action dropdow -->?(oxXúY?forums.mosstec.cn/?{?§?x??
<CustomAction Id="SiteActionsToolbar"?(oxXúY?forums.mosstec.cn/?{?§?x??
GroupId="SiteActions"?(oxXúY?forums.mosstec.cn/?{?§?x??
Location="Microsoft.SharePoint.StandardMenu"?(oxXúY?forums.mosstec.cn/?{?§?x??
Sequence="1000"?(oxXúY?forums.mosstec.cn/?{?§?x??
Title="Custom Action"?(oxXúY?forums.mosstec.cn/?{?§?x??
Description="custom site action"?(oxXúY?forums.mosstec.cn/?{?§?x??
ImageUrl="/_layouts/p_w_picpaths/ACG16.GIF">?(oxXúY?forums.mosstec.cn/?{?§?x??
<UrlAction Url=""/>?(oxXúY?forums.mosstec.cn/?{?§?x??
</CustomAction>?(oxXúY?forums.mosstec.cn/?{?§?x??
<!-- Document Library Toolbar New Menu DropDown -->?(oxXúY?forums.mosstec.cn/?{?§?x??
<CustomAction Id="DocLibNewToolbar"?(oxXúY?forums.mosstec.cn/?{?§?x??
Registrati?(oxXúY?forums.mosstec.cn/?{?§?x??
RegistrationId="101"?(oxXúY?forums.mosstec.cn/?{?§?x??
GroupId="NewMenu"?(oxXúY?forums.mosstec.cn/?{?§?x??
Rights="ManagePermissions"?(oxXúY?forums.mosstec.cn/?{?§?x??
Location="Microsoft.SharePoint.StandardMenu"?(oxXúY?forums.mosstec.cn/?{?§?x??
Sequence="1000"?(oxXúY?forums.mosstec.cn/?{?§?x??
Title="Custom New Command"?(oxXúY?forums.mosstec.cn/?{?§?x??
Description="custom new command "?(oxXúY?forums.mosstec.cn/?{?§?x??
ImageUrl="/_layouts/p_w_picpaths/ACG16.GIF">?(oxXúY?forums.mosstec.cn/?{?§?x??
<UrlAction Url=""/>?(oxXúY?forums.mosstec.cn/?{?§?x??
</CustomAction>?(oxXúY?forums.mosstec.cn/?{?§?x??
<!-- Document library Toolbar Actions Menu Dropdown -->?(oxXúY?forums.mosstec.cn/?{?§?x??
<CustomAction Id="DocLibActionsToolbar"?(oxXúY?forums.mosstec.cn/?{?§?x??
Registrati?(oxXúY?forums.mosstec.cn/?{?§?x??
RegistrationId="101"?(oxXúY?forums.mosstec.cn/?{?§?x??
GroupId="ActionsMenu"?(oxXúY?forums.mosstec.cn/?{?§?x??
Rights="ManagePermissions"?(oxXúY?forums.mosstec.cn/?{?§?x??
Location="Microsoft.SharePoint.StandardMenu"?(oxXúY?forums.mosstec.cn/?{?§?x??
Sequence="1000"?(oxXúY?forums.mosstec.cn/?{?§?x??
Title="Command on Document Library"?(oxXúY?forums.mosstec.cn/?{?§?x??
Description=" command on document library"?(oxXúY?forums.mosstec.cn/?{?§?x??
ImageUrl="/_layouts/p_w_picpaths/ACG16.GIF">?(oxXúY?forums.mosstec.cn/?{?§?x??
<UrlAction Url=""/>?(oxXúY?forums.mosstec.cn/?{?§?x??
</CustomAction>?(oxXúY?forums.mosstec.cn/?{?§?x??
</Elements>?(oxXúY?forums.mosstec.cn/?{?§?x??
四、重啓IIS(iisreset)?(oxXúY?forums.mosstec.cn/?{?§?x??
五、在SharePoint服務器上運行CMD.exe, ?(oxXúY?forums.mosstec.cn/?{?§?x??
輸入命令切換目錄:cd C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN?(oxXúY?forums.mosstec.cn/?{?§?x??
安裝Feature輸入命令:stsadm -o installfeature -filename MyMenu?(oxXúY?forums.mosstec.cn/?{?§?x??
激活Feature輸入命令:stsadm -o activatefeature -filename MyMenu\feature.xml -url
http://portal:8000?(oxXúY?forums.mosstec.cn/?{?§?x??
疑問:在Feature.xml中,雖然把編碼方式改成encoding="GB2312",可是使用漢字都不能識別出來,但是在LightUp.xml文件中雖然編?(oxXúY?forums.mosstec.cn/?{?§?x??
方式爲encoding="UTF-8",可是使用漢字都能識別出來,感受很奇怪。
實例3:使用Feature建立用戶控件。?(oxXúY?forums.mosstec.cn/?{?§?x??
請看KaneBoy的 DelegateControl:SharePoint Server 2007內置的一個「用戶控件包裝器」?(oxXúY?forums.mosstec.cn/?{?§?x??
?(oxXúY?forums.mosstec.cn/?{?§?x??
實例4:使用Feature建立自定義的文檔庫。?(oxXúY?forums.mosstec.cn/?{?§?x??
請看宋振乾的 如何在MOSS2007中建立一個定製的 Document Library Feature
?(oxXúY?forums.mosstec.cn/?{?§?x??
Microsoft Office SharePoint Server 2007(簡稱MOSS2007)的母版頁?(oxXúY?forums.mosstec.cn/?{?§?x??
MOSS2007 中全部的頁面都是由母版頁(Master Pages)和內容頁(Content Pages)組成, MOSS 2007中的Master Page和在ASP.net中使用的Master Page是同樣的.它們定義了網站頁面的基本佈局. Page layout的概念相似於ASP.net 2.0中的Content Page,它指向一個Master Page而且實現Content Placeholders 的內容.下面是一篇介紹ASP.NET 2.0中母版頁組成結構的很好的入門文章。?(oxXúY?forums.mosstec.cn/?{?§?x??
Master Your Site Design with Visual Inheritance and Page Templates?(oxXúY?forums.mosstec.cn/?{?§?x??
母版頁容許多級嵌套,全部在sharepoint中的站點默認都使用default.master這個母版頁。這個文件位於?(oxXúY?forums.mosstec.cn/?{?§?x??
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\GLOBAL這個目錄下。default.master母版頁是全局母版頁,任何對該頁面的修改將影響全部的sharepoint站點,並且會影響管理中心站點。?(oxXúY?forums.mosstec.cn/?{?§?x??
sharepoint的母版頁中定義了許多佔位符(content placeholder)。這些佔位符定義了頁面的不一樣區域,開發人員能夠定製佔位符最?(oxXúY?forums.mosstec.cn/?{?§?x??
顯示給用戶的內容。SharePoint中定義的佔位符中多數並不容許用戶重寫其內容。多數的sharepoint頁面都包括了 PlaceHolderMain這個佔位符,它控制了頁面的主要內容部分,典型狀況下,該佔位符將包括多個web部件區域,用來拖webpart進去。但對於開發人員來講,能夠用來放置想要放的任何東西。?(oxXúY?forums.mosstec.cn/?{?§?x??
下面列出了sharepoint的母版頁中定義的全部佔位符:(詳細位置請對照default.master)?(oxXúY?forums.mosstec.cn/?{?§?x??
一、<asp:ContentPlaceHolder ID="PlaceHolderGlobalNavigationSiteMap" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
放置鏈接到頂級站點的超鏈接?(oxXúY?forums.mosstec.cn/?{?§?x??
二、<asp:ContentPlaceHolder ID="PlaceHolderGlobalNavigation" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
放置頂部一行內容。?(oxXúY?forums.mosstec.cn/?{?§?x??
三、<asp:ContentPlaceHolder ID="PlaceHolderSiteName" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
放置站點名稱?(oxXúY?forums.mosstec.cn/?{?§?x??
四、<asp:ContentPlaceHolder ID="PlaceHolderSearchArea" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
放置搜索框?(oxXúY?forums.mosstec.cn/?{?§?x??
五、<asp:ContentPlaceHolder ID="PlaceHolderHorizontalNav" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
放置水平導航欄?(oxXúY?forums.mosstec.cn/?{?§?x??
六、<asp:ContentPlaceHolder ID="PlaceHolderTopNavBar" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
放置水平導航欄一行內容。?(oxXúY?forums.mosstec.cn/?{?§?x??
七、<asp:ContentPlaceHolder ID="WSSDesignConsole" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
頁面編輯控件,當頁面進入編輯頁面模式時使用(當咱們點 Site Actions, Edit Page後)?(oxXúY?forums.mosstec.cn/?{?§?x??
八、<asp:ContentPlaceHolder ID="SPNavigation" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
在 Windows SharePoint Services中默認爲空,用於附加的頁面編輯控件?(oxXúY?forums.mosstec.cn/?{?§?x??
九、<asp:ContentPlaceHolder ID="PlaceHolderPageImage" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
左側的圖片?(oxXúY?forums.mosstec.cn/?{?§?x??
十、<asp:ContentPlaceHolder ID="PlaceHolderTitleLeftBorder" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
Title區左側邊框?(oxXúY?forums.mosstec.cn/?{?§?x??
十一、<asp:ContentPlaceHolder ID="PlaceHolderTitleBreadcrumb" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
TitleBreadcrumb頁面導航區?(oxXúY?forums.mosstec.cn/?{?§?x??
十二、<asp:ContentPlaceHolder ID="PlaceHolderPageTitleInTitleArea" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
Breadcrumb區下面的標題?(oxXúY?forums.mosstec.cn/?{?§?x??
1三、<asp:ContentPlaceHolder ID="PlaceHolderMiniConsole" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
一個放置頁面級命令的地方,好比在WIKI站點裏的Edit Page, History, Incoming Links?(oxXúY?forums.mosstec.cn/?{?§?x??
1四、<asp:ContentPlaceHolder ID="PlaceHolderTitleRightMargin" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
Title區右側空白?(oxXúY?forums.mosstec.cn/?{?§?x??
1五、<asp:ContentPlaceHolder ID="PlaceHolderTitleAreaSeparator" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
TitleAreaSeparator區?(oxXúY?forums.mosstec.cn/?{?§?x??
1六、<asp:ContentPlaceHolder ID="PlaceHolderLeftNavBarDataSource" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
左側導航區數據源?(oxXúY?forums.mosstec.cn/?{?§?x??
1七、<asp:ContentPlaceHolder ID="PlaceHolderCalendarNavigator" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
在頁面中有日曆時爲其顯示一個日期選擇框?(oxXúY?forums.mosstec.cn/?{?§?x??
1八、<asp:ContentPlaceHolder ID="PlaceHolderLeftNavBarTop" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
左側導航區上面的導航區?(oxXúY?forums.mosstec.cn/?{?§?x??
1九、<asp:ContentPlaceHolder ID="PlaceHolderLeftNavBar" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
左側導航區?(oxXúY?forums.mosstec.cn/?{?§?x??
20、<asp:ContentPlaceHolder ID="PlaceHolderLeftActions" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
左側導航區下面的動做區?(oxXúY?forums.mosstec.cn/?{?§?x??
2一、<asp:ContentPlaceHolder ID="PlaceHolderNavSpacer" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
左側導航區的寬度?(oxXúY?forums.mosstec.cn/?{?§?x??
2二、<asp:ContentPlaceHolder ID="PlaceHolderLeftNavBarBorder" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
左側導航區的邊框元素?(oxXúY?forums.mosstec.cn/?{?§?x??
2三、<asp:ContentPlaceHolder ID="PlaceHolderBodyLeftBorder" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
頁面body的邊框元素?(oxXúY?forums.mosstec.cn/?{?§?x??
2四、<asp:ContentPlaceHolder id="PlaceHolderPageDescription" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
頁面描述區?(oxXúY?forums.mosstec.cn/?{?§?x??
2五、<asp:ContentPlaceHolder id="PlaceHolderMain" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
頁面主體?(oxXúY?forums.mosstec.cn/?{?§?x??
2六、<asp:ContentPlaceHolder ID="PlaceHolderBodyRightMargin" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
頁面body的右邊空白?(oxXúY?forums.mosstec.cn/?{?§?x??
2七、<asp:ContentPlaceHolder ID="PlaceHolderFormDigest" runat="server"/>?(oxXúY?forums.mosstec.cn/?{?§?x??
這是頁面中必備的 "form digest"安全組件。?(oxXúY?forums.mosstec.cn/?{?§?x??
2八、<asp:ContentPlaceHolder ID="PlaceHolderUtilityContent" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
頁面底部須要的一塊特殊內容?(oxXúY?forums.mosstec.cn/?{?§?x??
2九、<asp:ContentPlaceHolder ID="PlaceHolderBodyAreaClass" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
附加在頁面頂部的body中的樣式?(oxXúY?forums.mosstec.cn/?{?§?x??
30、<asp:ContentPlaceHolder ID="PlaceHolderTitleAreaClass" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
TitleArea附加的樣式?(oxXúY?forums.mosstec.cn/?{?§?x??
3一、<asp:ContentPlaceHolder id="PlaceHolderAdditionalPageHead" runat="server" />?(oxXúY?forums.mosstec.cn/?{?§?x??
提供給內容頁添加全部能夠放在<head>區域的內容,如CSS、JS等。?(oxXúY?forums.mosstec.cn/?{?§?x??
?(oxXúY?forums.mosstec.cn/?{?§?x??
Microsoft Office SharePoint Server 2007的CSS應用?(oxXúY?forums.mosstec.cn/?{?§?x??
?(oxXúY?forums.mosstec.cn/?{?§?x??
CSS在SharePoint頁面中的應用順序?(oxXúY?forums.mosstec.cn/?{?§?x??
一、 CORE.CSS?(oxXúY?forums.mosstec.cn/?{?§?x??
二、 ?(oxXúY?forums.mosstec.cn/?{?§?x??
http://www.heathersolomon.com/blog/archive/2006/10/27/sp07cssoptions.aspx?(oxXúY?forums.mosstec.cn/?{?§?x?? 對頁面修改能夠經過SharePoint Designer(簡稱SPD)打開整個站點進行修改,也可使用其餘一些文本編輯器直接對物理文件進行?(oxXúY?forums.mosstec.cn/?{?§?x?? 改。?(oxXúY?forums.mosstec.cn/?{?§?x?? 當咱們打開一個Sharepoint頁面時,Sharepoint將首先判斷此頁面(母版頁和內容頁)是否被破壞告終構(被SPD或其餘工具修改過?(oxXúY?forums.mosstec.cn/?{?§?x?? 被修改了部分將保存在Sharepoint的數據庫中),若是是就從數據庫中找到該頁面的將其顯示出來,若是沒有,則從Sharepoint服務?(oxXúY?forums.mosstec.cn/?{?§?x?? 的C:\Program Files\Common Files\Microsoft Shared\web server extensions\12目錄中找到相應物理文件來顯示頁面,?(oxXúY?forums.mosstec.cn/?{?§?x?? ?(oxXúY?forums.mosstec.cn/?{?§?x?? default.master及defaultlayout.aspx介紹?(oxXúY?forums.mosstec.cn/?{?§?x?? ?(oxXúY?forums.mosstec.cn/?{?§?x?? 附:其餘相關內容鏈接。?(oxXúY?forums.mosstec.cn/?{?§?x?? 建立一個精簡的母版頁?(oxXúY?forums.mosstec.cn/?{?§?x?? 關於MOSS 2007的Content Types?(oxXúY?forums.mosstec.cn/?{?§?x?? 關於MOSS 2007 and WSS 3.0 Master Page?(oxXúY?forums.mosstec.cn/?{?§?x?? 如何在MOSS 2007 中將一個Document Library 增長到站點定義中?(oxXúY?forums.mosstec.cn/?{?§?x?? MOSS項目開發步驟?(oxXúY?forums.mosstec.cn/?{?§?x?? 站點定義和站點模板 ?(oxXúY?forums.mosstec.cn/?