何小碩's profileGet More... ExperiencePhotosBlogListsMore ![]() | Help |
|
May 29 Core.CSSSkinning a SharePoint 2007 site with Master Pages is by no means and open/shut case of altering the look and feel of a site. There are some CSS inheritance issues that have to be contended with first. As a quick refresher, styles applied to elements in a page will be styled according to the last property that was applied to it. An inline style will override a style listed in the HEAD tag or in a linked CSS file. Additionally, you can selectively override style properties by selectively listing what should be overridden. For example:
In this sample, the body style of the page will be white with no margins because the inline style only overrode the background property. This overriding facet of CSS is key in SharePoint. Being 100% aware of what style sheets are called where can really help decrease the number of headaches you incur while trying to figure out why your custom styles are not appearing in your site. Here is a general breakdown of how styles are pulled into a rendered SharePoint page in regards to master pages:
So if you want to override any styles that are listed in CORE.CSS (and you will be if you are skinning your site), you will need to do one of the following:
My recommendation is to store styles in the master page itself in a set of STYLE tags. If your master page design has variations for assorted subsites, store the CSS differences in a file and reference it via the Master Page settings, or if you need CSS changes for a single page, store it in an HTML file and reference it in a hidden Content Editor Web Part. ** This post refers to Microsoft Office SharePoint Server 2007 (MOSS 2007) Beta 2 Tech Refresh. Details are subject to change in the RTM version. ** Create a Feature: Master Pages for Site CollectionsThis article refers to Microsoft Office SharePoint Server 2007 (MOSS 2007) Beta 2 Tech Refresh. Details are subject to change in the RTM version. One way master pages can be stored and used in MOSS 2007 sites is through creation in SharePoint Designer and storage in the Master Page Gallery. This method will create a master page in the content database. But what if you need to use one or two master page across multiple site collections? For ease of updates and maintenance, we don't necessarily want to store a copy of the master page in each site collection. Instead we can create and store master pages on the file system as a SharePoint Feature and make it available for new and existing site collections. If for some reason you don't want to create a custom Feature, you can manually work through this process by editing the default Publishing Layouts Feature that ships with SharePoint. See this article here for instructions. A huge thanks to my friend Andrew Connell for showing me the light on how to accomplish this with a custom feature. His help was invaluable. Create a Feature: Add Custom Master Pages to your Site Collections
![]() Adding to our Feature: Adding More Custom Master Pages to your FeatureIf you ever need to add new master pages to this feature, you can edit the Feature and redeploy it. Alternately, you can create a new Feature for each custom master page. For that scenario, just follow the steps above for creating a new feature. The following outlines how to update your Feature with new master pages.
May 25 MOSS 2007 網站範本代碼表GLOBAL#0 = Global template (1033) May 21 好東西SharePoint on your Phone!One of the interesting new features in MOSS 2007 is the support around mobile devices. In this article, I’ll aim to give you a quick overview of how you can get the next version of SharePoint on your phone. What are Mobile Views? Every list and library in MOSS 2007 or WSSv3 is capable of hosting ‘Mobile Views’. These are standard views of lists or libraries that an administrator has defined as being mobile enabled. You can also view individual list items in mobile form. This is a picture of the mobile view for a standard task item. How do you navigate to these Mobile Views? Every site has a mobile home. You can get to it by simply appending an ‘m’ on the end of the URL. For example the mobile view for the following URL http://<server>/TestSite can be accessed by http://<server>/TestSite/m. From the mobile home you can navigate through the lists, libraries and list items in the site. This picture shows the mobile home of a standard team site How do I configure Mobile Views? Each list has a default mobile view, but you can configure any normal view as being ‘mobile’. This is all done through the same interface that you’d use to modify view filters, sorts etc. This picture shows the UI for enabling a normal view as being ‘mobile’ When you access a list using your device, you can use a drop-down to choose the most appropriate view. However, generally speaking the most sensible views for a mobile device are pre-configured as the default mobile view. For example, the default for a tasks list is ‘my tasks’. How do I play with this more? The easiest way to investigate this further is to get the Microsoft Windows Mobile emulator from http://msdn.microsoft.com/mobility/windowsmobile/downloads/emulatorpreview/default.aspx. Follow the instructions on the page for getting onto Betaplace and downloading the emulator. Once you have the installation file, I suggest that you install it directly onto your SharePoint server. This way it is much easier to configure the networking between the server and the emulator. The emulator will allow you to emulate a smart phone or PDA. I found that the PDA is easiest to work with. Follow these instructions to get a mobile view of SharePoint on your PDA emulator (you should be able to adapt them for SmartPhone if you are familiar with the SmartPhone interface) - Install the emulator and start the ‘Emulate Pocket PC-WM 2003 SE(Cold Boot)’ from your start menu - Map your real network card to the device by going to File > Configure > Network Tab > Enable ‘NE2000 PCMCIA adapter and bind to’ and click ‘OK’ Note: All of the following instructions are for the device interface itself, not the emulator application, unless otherwise stated. - Go to ‘Settings’ from the start menu - Click on ‘Network Cards’ - Choose ‘The Internet’ on the ‘My network card connects to’ drop-down - Click on ‘NE2000 Compatible Adapter’ - Set your IP and Name Server settings in accordance with your environment (it needs to be in the same subnet as your server). - Click ‘OK’ until you are back to your home screen - On the emulator application, disable and re-enable the network card mapping from File > Configure > Network Tab > Enable ‘NE2000 PCMCIA adapter and bind to’ (this is the equivalent to unplugging the PCMCIA card, you’ll see the icon change on the device screen) - On the device, wait for the network icon to show that it has re-connected. - You will get a new icon at the top of the device screen. Click on it and choose ‘This network card connects me to the internet’ - Load Internet Explorer from the start menu and type your portal URL with an /m at the end - Enter login credentials and the mobile home should appear I hope this was interesting. Published Friday, April 21, 2006 6:32 PM by Martin.Kearn@Microsoft.com From A Marvellous Point MOSS SP1 更新後檔案版本
May 20 新增客製化欄位至文件庫Note: Don't forget to make backup copies of the files you modify in this tip.1. Open schema.xml file for the document library that is located in the following path: LocalDrive:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\DocumentLibrary\DocLib 2. Locate <Fields> tag and add following field inside the <Fields> tag: <Field ID="{20487AC7-D872-4B10-ACB8-CF3002C29687}" Type="Text" Name="MyField" ShowInNewForm="FALSE" ShowInFileDlg="FALSE" DisplayName="$Resources:core,MyField;" Filterable="TRUE" Sortable="TRUE" Sealed="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="MyField"><!-- _locID@DisplayName="camlid2" _locComment=" " --> Field ID should be unique. Run Select NewID() in SQL Query Analyzer to get a new GUID and use it as the field ID. 3. Open core.en-US.resx file located in the following path: LocalDrive:\Program Files\Common Files\Microsoft Shared\web server extensions\12\Resources 4. Locate following tag in the file: <!-- shared resources --> and add following lines in this section (shared resouces section) <data name="MyField"> 5. Save the changes and reset IIS. Next time when you will create a document library, this field will be a part of your document libray. Make the "Overwrite existing file" check box to be unselected by default in MOSS 2007One of our customers wanted a way to *uncheck* the “Overwrite existing file” option by default. For better understanding, here’s what it is: 1. Open a team site in WSS V3. 2. Navigate to a document library. 3. Choose the *Upload* option to upload a document. 4. Here you'll see that the "Overwrite existing files" option is selected (*checked*) by default. Well, if you have to do this in WSS V2, the procedure is pretty lengthy… 1. Open <Install Drive>:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\1033\SPSTOC\LISTS\DOCLIB 2. After backing up the Schema.xml file, pop it open and look for the below tag: 1. <INPUT type=hidden name="putopts" id=putopts value="true"> 3. Change value="true" to value="false" 4. And then find the below line in the same file (~ 7-8 lines down the line): 1. <INPUT TYPE=CHECKBOX name="overwrite" id=overwrite value="true" CHECKED DEFANGED_Onclick="setputopts()" tabindex=1 title="]]><![CDATA[Overwrite]]><![CDATA["> 5. Delete the word CHECKED from the above line. 6. Save the Schema.xml file. After an IISRESET, the “Overwrite existing file” option should be unchecked by default for all document libraries. In MOSS 2007/WSS V3, however, to do the above is quite simple. All that we need to do is to make a small modification to the *Upload.aspx* file located under: <Install Drive>: \Program Files\Common Files\Microsoft Shared\web server extensions\12\template\layouts. Open the upload.aspx file and look for the following tag: <asp:CheckBox id=”OverwriteSingle” Checked=”true” Text=”<%$Resources:wss,upload_document_overwrite_file%>” runat=”server” /> Change Checked=”true” to Checked=”false”. Really simple indeed isn’t it? Due to the fact that WSS V3 & MOSS 2007 is tightly integrated with ASP.NET 2.0 framework, most of such functionality is controlled through application pages instead of schema.xml files as in the previous version. Well, if there’s a requirement for such cosmetic changes, you could look out for ASPX files. However, PLEASE NOTE: modifying any OOB (Out Of the Box) files is unsupported, so it’d be a good idea to keep a backup of the files that needs modification. It’s also a good idea to keep a backup of the *modified* files, just in case you don’t miss the customizations if those files were to be overwritten by future patches. Published Sunday, April 01, 2007 11:39 PM by sridhara 如何將 Survey 中的[匯出至 Excel]功能取消Add the following javascript snippet to the survey page (using FrontPage). This causes the 'Export results to spreadsheet' button to not appear... <script language=javascript> theExport = diidIOExportToSpreadsheet[0]; </script> From Mauro Cardarelli Try It... May 18 大陸刀郎-㊣◆別說我的眼淚你無所謂-〔腰壽雞好聽〕一个人在这个夜里 無題(鄭源: 愛海滔滔) 歌詞試著去努力 鼓起勇氣放棄你 (#)一定是我不夠好 所以你才想要逃 (△)只要你過得很好 什麼都已不重要 Repeat *,#,△ 總有一天你會看到 愛如海掀起驚天巨滔 無題(胡楊林: 香水有毒) 歌詞演唱:胡楊林 我曾經愛過這樣一個男人 他說我是世上最美的女人 你身上有她的香水味 是我鼻子犯的罪 不該嗅到她的美 擦掉一切陪你睡 你身上有她的香水味 |
|
|