RSS
 

Archive for août, 2006

Apply style sheet (Theme) the public view of personal site and infos on styles sheets

30 août

To meet the requirements of my client, I had to create a custom theme for their personal sites. I encountered couple problems and I found some help in the following exerpt of an msdn article:

Customizing the Portal Site
Chapter: Customizing Personal Sites

Customizing Themes, Styles, and Templates
Users can customize the appearance of their personal sites and the individual pages on them by using themes, styles, and templates. Each list or page on a personal site uses cascading style sheets to define its appearance and layout.

From the Site Settings page of the personal site, individual users can apply a theme to the private view of their sites, or save an existing list or site as a template to use when creating new lists or sites on their personal sites. These actions update the appropriate cascading style sheet (.css) files so that changes in styles are applied automatically.

To make changes to the public view of a personal site, or to make changes to the look of pages that are more significant than what is allowed by the existing themes and templates, users with local administrator rights to the portal site server can update the Web Part Pages (.aspx files) and .css files directly using a Web page editor such as FrontPage.

Applying Themes to Personal Sites
Themes allow users to easily customize the look of their personal sites from the Site Settings page for each site. Themes are applied automatically to the entire personal site, except for the public view. Applying the theme to the public view requires additional steps by the portal site administrator.

You can also apply themes to other SharePoint sites created from your personal site.

1.Open the Site Settings page for the personal site:
-To view your own personal site, use the Site Settings link on the home page of the personal site.
-As a portal site user with the Manage User Profiles right, you can edit the site settings for the personal site of any user in the portal site from the View 2.User Profiles page of the portal site:
3.On the home page of the portal site, click Site Settings.
4.On the Site Settings page of the portal site, in the User Profile, Audiences, and Personal Sites section, click Manage profile database.
5.On the Manage Profile Database page, in the Profile and Import Settings section, click the user’s account name, and then click Manage Personal Site.
6.On the Site Settings page of the personal site, in the Customization section, click Apply theme to site.
7.On the Apply Theme to Web Site page, click the theme you want to apply, and verify that the previewed theme is acceptable.
8.Click Apply.

For information about customizing the style sheets for themes, see “Customizing Style Sheets for Personal Sites,” later in this paper.

Applying Themes to the Public View of Personal Sites
By default, the public view of a personal site cannot be customized through the Site Settings pages for the personal site. When you apply themes to the personal site by using the Apply Theme to Web Site page, a reference to a .css page for the theme is added to the HTML that is generated by the Web Part Page for the private view of the personal site. The file for that page is Default.aspx, located in the Program FilesCommon FilesMicrosoft Sharedweb server extensions60Template1033SPSMSITE directory.

That reference is not added to the HTML page generated by the Web Part Page for the public view of the personal site, and so the theme does not extend to the public view.

To apply the same theme to the public view, you must have local administrator rights on the server for the portal site.

Open the file Public.aspx in the Program FilesCommon FilesMicrosoft Sharedweb server extensions60Template1033SPSMSITE directory of the computer that hosts the personal sites.

1.Search the .css file for the public view for the following comment tags:

Code:

ode><!–begmstheme–>
<!–endmstheme–>

2.Between those comment tags is the following tag:

Code:

ode><SPSWC: MySiteTheme visible= »false » runat= »server »/>

3.Change the “false” value to “true” and save Public.aspx to the original location.
4.Open the public view of the personal site and verify that the theme was properly applied.

Customizing Style Sheets for Personal Sites
Each page or list on a personal site uses a cascading style sheet (.css) file to format its style and appearance. Those .css files are references in the .aspx files for personal sites: Default.aspx for the private view and Public.aspx for the public view.

As a portal site administrator, if you want to change the style of the personal site more than is allowed on the Site Settings page for the site, you can edit the .css files directly and then save the files to their original location.

The .css files for personal sites are located at Program FilesCommon FilesMicrosoft Sharedweb server extensions60TEMPLATELAYOUTS1033STYLES. The main .css file used by the portal site is Owspers.css. Other .css files include the default portal site style sheet (Sps.css), which does not affect the look of personal sites, and special styles for users with uncommon browsers and menus found on personal sites. In most scenarios, you will edit only Owspers.css.

The personal site may also use themes that are referenced in the .aspx files for personal sites. The .css files for these themes are located in thematic subfolders at Program FilesCommon FilesMicrosoft Sharedweb server extensions60TEMPLATE. You can customize an existing theme by modifying these .css files. By default, each theme has five different .css files. For personal sites, the important files for each theme are Theme.css, the main style sheet for the theme, and the two style sheets for the theme’s color scheme: Color0.css and Color1.css. You can also develop new themes for your organization and put them in a new subfolder at this location, using the style sheets of the existing themes as an example.

 
 

Creating a theme for WSS and error: A theme with the name "ThemeID 1011" and version already exists on the server.

28 août

This article relate on the creation of a new theme for WSS.

If you follow the instruction in the SDK you may end the process with the error message:

A theme with the name “ThemeID 1011″ and version already exists on the server.

I will first provide the correct steps and related information to create a new theme. Afterward, I will provide “the tip” that will fix the whole mess.

Create a custom theme

All of the themes available for use on a SharePoint server are stored beneath a single folder (one subfolder per theme):

C:Program FilesCommon FilesMicrosoft Sharedweb server extensions60TEMPLATETHEMES

Here are the basic steps to create a new theme called “IXIS »:

First, make a working copy of the new theme.
Pick one of the folders containing a theme in the directory listed above, and make a copy of it in directory listed above. For example, copy the WATER folder to the IXIS folder. Note: the folder name must be all caps.
You can modify the files you copied as a starting point for your theme.

Second, modify the files that hook your theme to the list of available themes.
In your theme’s folder, rename the WATER.INF file to the MIST.INF. This name should match your folder name exactly.

Edit the INF file to set the DisplayName of your theme. You can have spaces. No ” are required when you have spaces.

[info]
title=IxisTheme

Finally, the list of available themes is defined in this file:
C:Program FilesCommon FilesMicrosoft Sharedweb server extensions60TEMPLATELAYOUTS1033SPTHEMES.XML

Edit this XML file and insert a new section for your custom theme, in the position in the list you want your entry to appear. Note: the list is not automatically alphabetized.

Code:

<Templates>
<TemplateID>IXIS</TemplateID>
<DisplayName>IxisTheme</DisplayName>
<Description>Description</Description>
<Thumbnail>../images/ixisimage.png</Thumbnail>
<Preview>../images/ixisimage.gif</Preview>

</Templates>

a) The TemplateID must match your folder name, but should be all lower case.
b) The DisplayName should match the title you set in the MIST.INF file. At least, that’s the convention the canned themes follow.
c) The Preview image is a 300h x 180w pixel gif, and is used by the Apply a Theme function in the Admin tool. It’s unclear to me whether/when the PNG version is used.

Third, apply the theme to your SharePoint site.
1. On the top link bar, click Site Settings.
2. In the Manage This Web section, click Apply theme to site.
3. Choose the name of your new theme, and click Apply.

Finally, implement and test your changes
Now you can navigate to your SharePoint site to view the effects of your
changes to the theme.

You still have the same exact error? Here is “the tip »:
When you apply a theme, it is copied into the WSS Site. When you had all your failures, the “Bad theme” had been copied to “subwebfolder” _theme. It is Cached. Even if you iisreset, this cache will not be cleared. So you need to clear this folder and reapply the working theme. then it should work!

Here is some more info:

a)From a XP client computer, create a new Network Shortcut and enter UNC adress like \urlsubsite.

b)Look for _Theme folder. This is a virtual folder. You suposed to have a subfolder with the name of your folder theme. If so, go with your browser to change theme for “no theme ».

c)Delete the virtual folder under _Theme and go back to your browser to apply
your problematic theme.

It works fine for me. Remember, UNC will work if WebClient service on client computer is up and on XP.

Note: I forgot to mention that, if you are modifying your theme from the global Theme location, you’ll need to apply another theme and than, reapply your modified theme before you can visualise your modifications.
Again, because the template is duplicated to the WSS Site Directory. Reapplying the theme will overwite the theme in the WSS directory.

 
 

SharePoint Sites vs. Portal Areas

25 août

First, let me say that the following text is not from me. This is an exerpt from MSDN at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_SP2003_ta/html/ODC_SPSCustomizingSharePointSites1.asp

I put this part overhere becaise it answers questions we need to answer when we design a portal. When we start to explain the difference between a portal area and a WSS Site to a client, it does not take very long for the client to be lost (Even if he says everything is alright ;-) ).

By going through this test you will get a better knowledge of what the differences are or at the least, some nice sentences to explain and maybe use in your documentation ;-)


When planning for corporate environments such as an intranet portal or SharePoint site, you need to consider some of the differences between a Windows SharePoint Services site and a SharePoint Portal Server portal area. An area is a means of publishing and aggregating content using a navigational taxonomy, whereas a SharePoint site facilitates collaboration of team members using collaboration objects and custom lists. Users have unlimited view and editing access to the portal areas; by contrast, SharePoint sites are only available to members. Individual users can personalize a portal area in more ways than a SharePoint site.

Moreover, areas are based on the Windows SharePoint Services framework and offer a set of unique templates. You can determine whether to use a portal area, or a SharePoint site by deciding first what you intend to do with the site. In general, use areas and portals for information publishing, and SharePoint sites for online collaboration.

Create SharePoint sites when you want to collaborate across projects in
the following ways:
-Sharing and retaining versions of documents
-Scheduling
-Delegating and sharing tasks
-Handling presence and messaging
-Sharing and targeting information
-Managing meetings

Create areas when you want to publish information such as the following:
-Aggregated listings
-Target audiences
-Content for publishing
-Document postings
-Navigational taxonomy
-User profiles
-Lists
-News
-Managed spaces for users or subject-matter experts
-Areas of subject expertise
-Community interests
-Subsites for a categorized set of documents

With the union of SharePoint Portal Server and Windows SharePoint Services, you can integrate SharePoint sites and areas to create custom environments that target a particular interest group. For example, you can publish related content created from collaborative projects on several SharePoint sites to an area, encouraging information sharing and easy access to relevant information.

Customizing a SharePoint Site

SharePoint sites are designed to be flexible. You can tailor a site to fit your users’ needs by adding or removing pages, changing the appearance of pages, changing the site navigation, and making other customizations.

To customize SharePoint sites, you must have the following rights, which are included in the Web Designer and Administrator site groups:Manage
Lists

-Add and Customize Pages
-Apply Themes and Borders
-Apply Style Sheets

Other users of your site cannot gain access to the pages required to perform these tasks unless you specifically assign them to a site group that contains these permissions.

Customizing Web Sites From Within the Browser

You can perform basic customization from within the browser, using links from the Home, Create, and Site Settings pages of the Web site. From the browser you can perform basic customizations such as the following:

-Add a list
-Change the layout of the home page
-Change the picture on the home page
-Add a Web Part to a Web Part Page
-Change a site’s display name (not the URL)
-Apply a theme

For more information about customizing Web sites from within the browser, see the Microsoft Windows SharePoint Services Help.