Friday, June 13, 2008

Sharepoint, Moss 2007 and Wss3.0 Articles

Sharepoint, Moss 2007 and Wss3.0 Articles

Ravinder Rao Polneni: Changing the properties for default Templates

Ravinder Rao Polneni: Changing the properties for default Templates

Customized Theme in MOSS 2007

Customized Theme in MOSS 2007

Windows Sharepoint Server (WSS) and Sharepoint Portal Server (SPS) both ship with several built-in themes, giving you the ability to change the look and feel of a site quite dramatically. Choosing one of these themes is simply a matter of clicking on the “Site Settings” link in the upper navigation and then “Site Theme” under the “look and Feel” header. On the “Site Theme” page you should see a list of available themes on the right. Click on one of these themes and you’ll see a preview on the left of the page. All of the themes available for use on a SharePoint server are stored beneath a single folder named “THEMES“. This folder contains a unique folder for each theme: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\THEMES.
To create a theme, start by creating a new folder with the images and CSS files that make up the theme. Here are the steps to create a new theme called “MOSSTHEME″:
Here is a short procedure of creating a custom site theme named "MossTheme":
1. Copy any theme folder in "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\THEMES" folder and paste with its name replaced with "MossTheme". In this example, copy GRANITE folder.
2. In MossTheme folder, rename GRANITE.INF file to MOSSTHEME.INF in upper case.
3. Open MOSSTHEME.INF file with notepad.
4. Change the value of title under [Info] to MossTheme.
5. Replace every word, Granite, under [titles] with MossTheme.
6. Open "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033\SPTHEMES.XML" file with notepad.
7. Add the following lines under tag:
'<' templates '>'
'<'templateid'>'MossTheme '<'/templateid'>'
'<'displayname'>'MossTheme '<'/displayname'>'
'<'description'>'ossTheme '<'/description'>'
'<'thumbnail'>'images/ MossTheme.gif'<'/thumbnail'>'
'<'preview'>'images/ MossTheme.gif'<'/preview'>'
''
Notice that preview and thumbnail paths are images/MossTheme.gif. By default, MOSS 2007 and WSS 3.0 will not have such image files.
8. In order to display thumbnail and preview correctly, you will need to capture the screen and save the file in "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\IMAGES" folder with MossTheme.gif name. You can change the .gif file name if you change the thumbnail and preview file names in tag.
9. Do an iisrest for the server to recognize the new theme.
Pretty simple procedure. Now you are ready to test your new theme. In Site Settings, you can now choose MOSSTHEME; however, the theme will not differ from Granite theme. Now, it is time for you to play with theme.css file!

Posted by Karun at Wednesday, May 07, 2008

Thursday, June 12, 2008

How to change a user's password in Active Directory with Directory Services and C#

How to change a user's password in Active Directory with Directory Services and C#
How to change a user's password in Active Directory with Directory Services and C#

Below is a code snippet that I hope will be helpful. There are some obvious assumptions made - that the user has experience coding in Directory Services and C# - let me know if you would like more info.

private const string GETUSERID_QUERY = "((&(objectClass=user)(samAccountName={0}))(&(objectClass=contact)(displayName={0})))";

public bool ChangePassword(string rootDSE, string userName, string newPassword) { // Here, the rootDSE is already set, so is the user's name and their desired new password. // We'll call a sub that will resolve the user's name to their ID in AD and invoke the change password on that userID // You can do something as simple as DirectoryEntry root = new DirectoryEntry() - that'll return your root to you... // User name is the same as Context.User.Identity.Name - their loginID (please forgive any typoes - I'm not using a dev env for this)...
using(DirectoryEntry userEntry = GetUserByLoginID(root, username)) { try { userEntry.Invoke("SetPassword", new object[] { newPassword }); userEntry.Invoke("SetInfo"); // It's possible you might not even need this call...
userEntry.CommitChanges();
} catch(System.Reflection.TargetInvocationException err) { throw new PasswordPolicyException(comError.Message,comError); /// Assuming you have a method to handle this... } } }
private DirectoryEntry GetUserByLoginID(string rootDSE, string userID) { using (DirectoryEntry searchRoot = new DirectoryEntry(rootDSE)) { using (DirectorySearcher searcher = new DirectorySearcher(searchRoot, String.Format(GETUSERID_QUERY, userID))) { SearchResult searchResult = searcher.FindOne(); if (searchResult==null) return null; else return searchResult.GetDirectoryEntry(); } } }

Create a Custom Theme for WSS 3.0 or MOSS 2007

Create a Custom Theme for WSS 3.0 or MOSS 2007
SharePoint Out-of-Box Themes
If the blue and white default theme for SharePoint does not fit your style, you can choose another theme in WSS 3.0 or MOSS 2007. SharePoint provides 18 themes out of the box.

To change the theme of a site
1. Select Site Settings under Site Actions
2. Click on Site Theme under Look and Feel
3. On the Site Theme page, you can select different themes and you’ll see a preview of that theme on the left. Once you have decided on a theme, click the Apply button.
Viola! Your site now has a new look and feel.
Create a Custom Theme to apply But what if you don’t want to use an out of the box theme? Create your own!! To create a custom theme for applying to sites, you need to re-purpose an existing theme. It’s quite easy with a few modifications. If you can copy/paste, you can do it!
Step 1 – Copy existing theme
Choose a theme to re-purpose (something that closely resembles your desired look)
For our example, we are using “Wheat”
Choose a name for your new theme
For our example, we will use “LewTek”
Copy the chosen theme in the themes folder in 12 Hive
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\THEMES"
Paste this folder and rename it to your chosen new name

Step 2 – Edit Setup Information File
In your new theme folder, rename OLDNAME.INF file to NEWNAME.INF (Wheat to LewTek)
– Ensure its upper case
Open NEWNAME.INF with notepad or your favorite text editor (LEWTEK.INF)
Change the value of title under [info] from Oldname to Newname.
Change all values under [titles] from Oldname to Newname.

Step 3 – Edit SPTHEMES.XML
Next we need to edit this file so that we can actually choose our newly created theme. This will make it available in the list of themes on the Site Theme page.
Open SPTHEMES.xml in notepad or any other text editor for editing. It is located in the following directory:
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033\SPTHEMES.XML"
Next you need to add your new template. Add the following lines under the tag (you may find it easier to just copy and paste the tags for an existing theme, and then changing it): LewTek LewTek Type a description for your new theme. images/thlewtek.gif images/thlewtek.gif

The thumbnail and preview tag reference an image. This image does not exist yet and you’ll need to create it. Once your theme is complete, you can take a screenshot of it and then resize it.
This will be the preview image on the Site Theme page.
Ensure that the size of the image is 375 x 231 pixels.
Once you create the image, place it in the following directory:
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\IMAGES"
Now if you navigate back to the Site Theme page and refresh it – you’ll see your custom theme available to apply to the site. You’re done!

Edit Your Custom Theme
The good news is that you created a custom theme to apply to sites. The bad news? Well, it looks just like the old theme that you copied. There are many ways to edit the theme that you have created, so I won’t go into much detail on that here. However, here are some tips and resources I recommend.
Theme Editing Tips
The file theme.css in your theme folder contains all of your styles
Edit this style sheet to make changes to your theme’s look – change the colors, change the font, etc...
Images in your theme folder can be edited / replaced.
After making any changes to your theme, reset IIS prior to reapplying the theme.
The theme is stored in the database when you apply it, so you must refresh.
You reset IIS by Start > Run: iisreset
Make incremental backups of your Theme folder as you are working. Somewhere along the way you WILL mess up and need to revert.
Theme Editing Resources
MOSS CSS style reference:
http://www.heathersolomon.com/content/sp07cssreference.htm
Image Editing Software (free)
http://www.getpaint.net/index.html
Theme generator (great for consolidating colors in a style sheet)
http://hermansberghem.googlepages.com/themegenerator.htm
IE Developer Toolbar (nice tool for viewing styles on a page in real time)
http://www.microsoft.com/downloads/details.aspx?familyid=e59c3964-672d-4511-bb3e-2d5e1db91038&displaylang=en#Overview
Notepad2 (enhanced notepad features – good for text editing if you don’t have an editor)
http://www.flos-freeware.ch/notepad2.html

features


Feature stapling
One aspect of features I wanted to cover quickly is the relationship SharePoint Features have with site definitions. Site definitions are created by a developer and subsequently used by site owners to create new sites. Much of this facility is also available by the 'Save site as template' functionality, though there are some minor differences. Additionally the 'Save site as template' functionality is removed on SharePoint publishing sites (or at least the link in Site Settings is via a HideCustomAction feature element), due I think, to some site information/functionality which SharePoint cannot properly save into a .stp file. So developers often create site definitions as part of their customization, and it's a process well-documented in the WSS SDK.If you have created a site definition, there are several ways of using features with it. These are:-
Create a site from the definition and subsequently deploy your features to the site.
Include the features in the site definition (onet.xml) before using it to create sites.
Use feature stapling to associate your features to the site definition.
Since the first option doesn't really associate the Features to the site definition, we'll focus on options 2 and 3.
2. Include features in site definition
This option should be used if the site definition has not yet been deployed, and no sites have yet been created from it. The section of the onet.xml file where features are associated with the site definition contains may look something like:{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Courier New;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0??;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;??\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;??\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;??\red192\green192\blue192;}??\fs20 \cf2 <\cf13 Configuration\cf2 \cf6 ID\cf2 =\cf0 "\cf2 0\cf0 "\cf2 \cf6 Name\cf2 =\cf0 "\cf2 BLANKINTERNET\cf0 "\cf2 >\par ?? <\cf13 SiteFeatures\cf2 >\par ?? <\cf13 Feature\cf2 \cf6 ID\cf2 =\cf0 "\cf2 C85E5759-F323-4EFB-B548-443D2216EFB5\cf0 "\cf2 />\par ?? <\cf13 Feature\cf2 \cf6 ID\cf2 =\cf0 "\cf2 A392DA98-270B-4e85-9769-04C0FDE267AA\cf0 "\cf2 />\par ?? <\cf13 Feature\cf2 \cf6 ID\cf2 =\cf0 "\cf2 7C637B23-06C4-472d-9A9A-7C175762C5C4\cf0 "\cf2 />\par ?? \par ?? <\cf13 WebFeatures\cf2 >\par ?? <\cf13 Feature\cf2 \cf6 ID\cf2 =\cf0 "\cf2 00BFEA71-DE22-43B2-A848-C05709900100\cf0 "\cf2 /> \par ?? <\cf13 Feature\cf2 \cf6 ID\cf2 =\cf0 "\cf2 00BFEA71-E717-4E80-AA17-D0C71B360101\cf0 "\cf2 /> \par ?? \par ?? <\cf13 Modules\cf2 >\par ?? <\cf13 Module\cf2 \cf6 Name\cf2 =\cf0 "\cf2 Home\cf0 "\cf2 />\par ?? \par ??}-->














The ID value is, of course, the feature GUID. The SiteFeatures element contains features which should be activated when the site definition is used to create a site collection, and the WebFeatures element contains features for when the definition is used to create a standard web within a site collection.
3. Use feature-stapling to associate your features to the site definition
This option should be used when the site definition is already in use (and sites have been created). This is because there are risks in modifying a site definition once it has been deployed, since the site definition files on the filesystem are used for pages which are ghosted (not modified).
To use feature-stapling, you first need the feature(s) you wish to link to the site definition - these should be created in the normal way. The, you should create a 2nd feature which does the actual stapling. Sample values for the various files are shown below:
The manifest.xml file if you are wrapping your feature in a solution:{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Courier New;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0??;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;??\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;??\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;??\red192\green192\blue192;}??\fs20 \cf2 \par ??<\cf13 Solution\cf2 \cf6 xmlns\cf2 =\cf0 "\cf2 http://schemas.microsoft.com/sharepoint/\cf0 "\cf2 \cf6 SolutionId\cf2 =\cf0 "\cf2 26E1A1D9-7BB2-4e76-888E-B20184B16E3B\cf0 "\cf2 >\par ?? <\cf13 FeatureManifests\cf2 >\par ?? <\cf13 FeatureManifest\cf2 \cf6 Location\cf2 =\cf0 "\cf2 COB.Demos.FeatureStapling\\feature.xml\cf0 "\cf2 />\par ?? \par ??}-->






The feature.xml file which defines the feature 'header' information:{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Courier New;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0??;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;??\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;??\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;??\red192\green192\blue192;}??\fs20 \cf2 \par ??<\cf13 Feature\cf2 \cf6 Id\cf2 =\cf0 "\cf2 4AF9999A-0517-4224-9ED3-D2F9F87D92E2\cf0 "\cf2 \par ?? \cf6 Title\cf2 =\cf0 "\cf2 COB.Demos.FeatureStapling\cf0 "\cf2 \par ?? \cf6 Description\cf2 =\cf0 "\cf2 Staples a set of features to custom site definitions. The features/site definitions are defined in stapling.xml.\cf0 "\cf2 \par ?? \cf6 Version\cf2 =\cf0 "\cf2 1.0.0.0\cf0 "\cf2 \par ?? \cf6 Scope\cf2 =\cf0 "\cf2 Farm\cf0 "\cf2 \par ?? \cf6 Hidden\cf2 =\cf0 "\cf2 FALSE\cf0 "\cf2 \par ?? \cf6 xmlns\cf2 =\cf0 "\cf2 http://schemas.microsoft.com/sharepoint/\cf0 "\cf2 >\par ?? <\cf13 ElementManifests\cf2 >\par ?? <\cf13 ElementManifest\cf2 \cf6 Location\cf2 =\cf0 "\cf2 stapling.xml\cf0 "\cf2 />\par ??\par ??}-->

Title="COB.Demos.FeatureStapling"
Description="Staples a set of features to custom site definitions. The features/site definitions are defined in stapling.xml."
Version="1.0.0.0"
Scope="Farm"
Hidden="FALSE"
xmlns="http://schemas.microsoft.com/sharepoint/">



And finally, the core feature definition in the stapling.xml file:{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Courier New;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0??;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;??\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;??\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;??\red192\green192\blue192;}??\fs20 \cf2 <\cf13 Elements\cf2 \cf6 xmlns\cf2 =\cf0 "\cf2 http://schemas.microsoft.com/sharepoint/\cf0 "\cf2 >\par ?? <\cf13 FeatureSiteTemplateAssociation\cf2 \cf6 Id\cf2 =\cf0 "\cf2 F6924D36-2FA8-4f0b-B16D-06B7250180FA\cf0 "\cf2 \cf6 TemplateName\cf2 =\cf0 "\cf2 MySiteDefName#0\cf0 "\cf2 />\par ?? <\cf13 FeatureSiteTemplateAssociation\cf2 \cf6 Id\cf2 =\cf0 "\cf2 94C94CA6-B32F-4da9-A9E3-1F3D343D7ECB\cf0 "\cf2 \cf6 TemplateName\cf2 =\cf0 "\cf2 MySiteDefName#0\cf0 "\cf2 />\par ?? <\cf13 FeatureSiteTemplateAssociation\cf2 \cf6 Id\cf2 =\cf0 "\cf2 02464C6A-9D07-4F30-BA04-E9035CF54392\cf0 "\cf2 \cf6 TemplateName\cf2 =\cf0 "\cf2 MySiteDefName#0\cf0 "\cf2 />\par ??}-->





The FeatureSiteTemplateAssociation element maps feature GUIDs to site defintions - note that the format of the TemplateName attribute value is #. This obviously allows a degree of flexibility and allows you to do fairly complex things with different configurations of site definitions.The final thing to note is that feature-stapling won't affect any sites which have already been created from a site definition, only subsequent sites. The only way to do this is to activate your features individually on the site, though obviously an STSADM script can help you activate multiple features against multiple sites

Provisioning Site Collections, Portal Style

10/1/2007
Provisioning Site Collections, Portal Style
Have you ever needed to create a site collection that consists of more than one site? This is a very common scenario, and in fact this very site is an example. This site collection started as a blank site and a sub site was added using the blog site template. MOSS can create a site collection using the Collaboration or Publishing site templates and in both cases, sub sites are involved.
This is accomplished using a Provisioning Provider. The examples in this article apply to MOSS, but if you are using WSS I will talk about how to extend WSS at the bottom.
As in all examples of custom site templates that don't involve the save as site template, *.stp, sort of site templates, this one starts with a web template file in the 12 hive's \TEMPLATE\1033\XML (or not 1033 if you are a different locale). For this example I have created an xml file called WEBTEMPProvisioningExample.xml that contains the following:






This file says that we have a new site definition that will display in the eLumenotion group called 'Team Site with Blog Sample'. It points to a second file, Provisioning.xml that is located in the 12 hive's \TEMPLATE\SiteTemplates\eLumenotion\XML folder that contains the following:


siteDefinition="STS#0"
displayName="Team Site with Blog"
description="A root level team site with a blog." >

siteDefinition="BLOG#0"
displayName="A Blog"
description="A site for a person or team to post ideas, observations, and expertise that site visitors can comment on." />



The result is that when a user chooses to create a new site collection, MOSS invokes the Microsoft.SharePoint.Publishing.PortalProvisioningProvider class to read in the file specified by the ProvisioningData attribute and create the Sites and webs. And the result is a team site with a blog as a sub site.
It's unfortunate that this handy little class, PortalProvisioningProvider, is in an assembly that doesn't come with WSS, but it is pretty simple, and the provider model makes creating your own close to trivial.
All you need is a class based on SPWebProvisioningProvider. This abstract class defines a single method that accepts a SPWebProvisioningProperties that contains the SPWeb at the root of the new site collection and a string that has the path to the file containing the rest of the provisioning instructions that contains anything you want!
So, what could you do with an implementation of SPWebProvisioningProvider? Well, right off the top of my head you could:
Create a collection of subsites.
Configure any arbitrary aspect of the site through code.
Add and activate features.
Deactivate features.
Create site columns, content types, and lists.

You get the idea. Basically anything that you could do through the object model is possible. This is the equivalent of a feature receiver for a site template.
I personally don't think you should use this as an alternative to schema xml, because no one can peer into your dll short of reflector or its equivalent, but if you wanted to create a third party solution that was obfuscated or if you just can't figure out the xml definitions and have to show something tomorrow or be fired, it might not be the worst thing in the world.

One master page for all sites

Hello, Is it possible to have one master page for all sites in a web application? That way, all I need to do is to make changes in one master page and every page, no matter which sub site it is, will have the same layout. The problem I am having is that (it could be by design) each site seems to have its own master page and only way I can have all site to have the same look and feel is by making changes in all master pages. Thanks...a


Was this post helpful to you?




Reply



Top




John Stover
8/15/2007 10:28 AM PST



Hello Ace, It is unclear whether you are using WSS or MOSS? If using MOSS, you can inherit from the top level master page. If you are using WSS, the out of the box functionality is that all sites utilize their own master page. You can, however, create a site template that uses the master page you wish and create all subsequent WSS sites from your template(s). Hope this helps, John Stover Click to show or hide original message or reply text.
> Hello, > Is it possible to have one master page for all sites in a web > application? > That way, all I need to do is to make changes in one master page and > every > page, no matter which sub site it is, will have the same layout. > The problem I am having is that (it could be by design) each site > seems to have its own master page and only way I can have all site to > have the same look and feel is by making changes in all master pages. > > Thanks...a >


Was this post helpful to you?




Reply



Top




Ace
8/15/2007 10:34 AM PST



Thanks for the reply. I did not know that it works differently with WSS and MOSS. Yes, this specific case was with WSS v3 for proofing but it will eventually be done in MOSS. So it sounds like I can use one master page for all sites with MOSS 2007. As with WSS v3, yes, that's what I did.... after making changes, save it as a site template and create sub sites with the site template. But I was concerned about future change requests and that's why I brought the question to this group. The bottom line is MOSS offers the concept of one master page for all sites but with WSS, there is one master page per site, correct? a "John Stover" wrote: Click to show or hide original message or reply text.
> Hello Ace, > > It is unclear whether you are using WSS or MOSS? If using MOSS, you can > inherit from the top level master page. If you are using WSS, the out of > the box functionality is that all sites utilize their own master page. You > can, however, create a site template that uses the master page you wish and > create all subsequent WSS sites from your template(s). > > Hope this helps, > John Stover > > > Hello, > > Is it possible to have one master page for all sites in a web > > application? > > That way, all I need to do is to make changes in one master page and > > every > > page, no matter which sub site it is, will have the same layout. > > The problem I am having is that (it could be by design) each site > > seems to have its own master page and only way I can have all site to > > have the same look and feel is by making changes in all master pages. > > > > Thanks...a > > > > >


Was this post helpful to you?




Reply



Top




John Stover
8/15/2007 10:58 AM PST

Answer

Hello Ace, Correct. MOSS offers the ability to use one master page for top level and all subsites. WSS does not. John Stover Click to show or hide original message or reply text

Wednesday, June 4, 2008

Web 2.0 Collides With E-Discovery

Web 2.0 Collides With E-Discovery
30 05 2008
By Dan Regard & Tom Matzen, Law Technology News
You have received a document request from opposing counsel. Among the various items of calendar entries and e-mails requested is a request for “Any and all social networking or business networking information related to the key player(s).”
This raises questions of what is in scope, where is it, how much is enough, and who is responsible for producing it? Welcome to the collision between Web 2.0 and electronic data discovery.
Internet entrepreneurs who went through the boom and bust of the dot-com era are rapidly rolling out new tools, new software and new services under the moniker of Web 2.0. You are not alone if a definition of Web 2.0 eludes you. It may best be defined in reference to that which was before: Web 1.0.
Web 1.0 is a “one to many” link between users and data, where users are connected to information silos via the Internet conduit.
Users surf the Web to gain access to these collections of content. As a general rule, they do not deposit personal or corporate information or do so only in widely dispersed and unmanaged fashions. Some Web 1.0 examples are Barnes & Noble and Encyclopedia Britannica.
The Web as a Platform
Web 2.0 is defined as a trend in Web technology aimed at facilitating information sharing and collaboration among users by using the Internet as a platform.
In short, Web 2.0 services promote network effects from user contributions creating a far-reaching collective intelligence.
For the complete article, click here.

SharePoint 2007: Link dump

SharePoint 2007: Link dump
Unhiding and hiding content typeshttp://blogs.vertigo.com/personal/willa/Blog/Lists/Posts/Post.aspx?ID=8SharePoint Lists from Reporting Serviceshttp://www.teuntostring.net/blog/2006/04/using-sharepoint-lists-extension-on.htmlCustomizing the Content Query Web Parthttp://www.sharepointblogs.com/vandest/archive/2006/06/20/8495.aspx http://msdn2.microsoft.com/en-us/library/ms497457.aspxData View Tips from Mark Krugerhttp://www.sharepointblogs.com/mkruger/archive/2006/05/12/dataviews.aspxCreate a view that shows all announcements in the site collectionCrossList Mode - query for items across multiple lists in multiple Web sites in the same site collection e.g. “show all tasks that are due today”, “show all documents created by me in the site collection”, or “show all announcements in the site collection”.http://blogs.msdn.com/sharepointdesigner/archive/2007/04/24/spdatasource-and-rollups-with-the-data-view.aspxSharePoint Securityhttp://sharepointsecurity.com/Debugging SharePointhttp://blogs.msdn.com/sharepoint/archive/2007/04/10/debugger-feature-for-sharepoint.aspxCustomise SharePoint Style Sheetshttp://www.heathersolomon.com/content/sp07cssreference.htmHiding the Quick Launchhttp://www.wssdemo.com/blog/Lists/Posts/ViewPost.aspx?ID=268Custom 404 Error Pageshttp://blogs.msdn.com/jingmeili/archive/2007/04/08/how-to-create-your-own-custom-404-error-page-and-handle-redirect-in-sharepoint-2007-moss.aspxEditing Pages with SharePoint Designerhttp://www.sharepoint-tips.com/2007/04/sharepoint-designer-article-1-how-to.htmlTechnet Virtual Labs - get your hands dirty for freehttp://www.microsoft.com/technet/traincert/virtuallab/default.mspxSharePoint Logical Architecture Designhttp://blogs.msdn.com/sharepoint/archive/2007/04/09/investing-in-logical-architecture-design-samples.aspxInstalling MOSS Successfulyhttp://www.sharepointblogs.com/sharepointdiary/archive/2007/04/11/how-to-install-configure-moss-2007-successfully.aspx

Out of the office? Take SharePoint with you!


We have recently been investigating a great tool for SharePoint. This is the Colligo Contributor for SharePoint. It is a client side install, which allows any user to download whole SharePoint (or parts of ) sites locally, having a (thick client) interface which is virtually identical to the Sharepoint UI.This will enable users to take any SharePoint sites / libraries they are currently working with, and keep working with these when they are out of the office. As soon as they are back in the office, the software automatically synchronizes everything back to the SharePoint server, so you don't have to upload everything manually. I think this is an invaluable tool for those who often work out of the office, or anywhere where there is no access to SharePoint.As a bonus, there is an Outlook Add-In. This addin allows you to take lists offline (this time within Outlook). It basically works as above, but at a list level. The final touch is one is able to drag and drop emails from the inbox into a synched list, with all the email meta data (from, to, subject, recieved, priority etc) automatically, and then everything goes straight into SharePoint.Defintely the best tool for SharePoint I've seen lately. Visit http://www.colligo.com for more information.
Posted by dattard at 20:29 0 comments Links to this post
Labels:

Custom SharePoint Reports using CAML


  1. I've long wondered how the default SharePoint Site Collections reports are created, and finally I came across an article on how this is done. It seems the only thing required, is a CAML query.
    The following article from the MS ECM blog explains how to create your own reports with a number of examples using CAML queries. Check it out.
    http://blogs.msdn.com/ecm/archive/2006/11/15/report-rapport.aspx
    A summary of how to do it:
    Site Actions > Manage Content and Structure > Content and Structure Reports > New item and fill in the following information:
    Report Title
    Leave both Resource Ids empty, they're for internal use (?)
    CAML List Type - You can specify a list template here if you only want your report to search through a specific type of list. For example, the out of the box "My Tasks" report specifies in this field to ensure the report only queries the My Tasks list. This SDK article has a list of these ServerTemplate values for each SharePoint list type.
    CAML Query - The CAML query for the report
    Target Audience - if you want the report to be targeted to a particular audience
    Report Description

Integrating ASP.NET applications and SharePoint 2007

Link Dump
SharePoint 2007 - Built on ASP.NET 2.0MOSS 2007
MOSS 2007 - Creating an ASP.NET application in the _layouts directory using Visual Studio 2005
Application Development on MOSS 2007 and WSS 3.0
ASP.NET 2.0 Web Part Infrastructure and SharePoint 2007
Write Custom WebParts for SharePoint 2007
Using ASP.NET Web Part into MOSS 2007 Web Site

SharePoint Performance Tuning

When you are thinking in terms of large server farms, you'll need to spend some good time tuning your SharePoint setup for performance.

Joel Oleson (who else?) has a great post on performance tuning of the application pool settings.

Although some people beg to differ on some of these settings. As always, you should always test and tune and see what works best for you.

SharePoint 2007: Show the Quick Launch in Custom Web Part Pages

SharePoint 2007: Show the Quick Launch in Custom Web Part Pages
Funnily, when you create a Web Part Page, the Quick Launch is not available. This has always annoyed me, because it changes the look and feel of the whole site. Looks like this can be easily fixed.

One Off Fix


Open the Page for editing in Sharepoint Designer
Remove the LeftNavBar Content Place holder from Master Page (ie. remove the content Place holder)
Save the Page. You can now find the Quick Launch in Web Part Page
Permanent Fix

If you have MOSS 2007 - All you have to do is to activate the "Office SharePoint Server Publishing" feature for your team site. Once you activate this feature, the team site will have some publising site features: a new "pages" library will be created, and all new created pages will be automatically stored in this library. In addition all pages will display the same "envelope" - including the missing quick launch on the left side of each page.


The only problem with this solution is that now every change you make requires publishing, and this is certainly NOT a natural part of team-site working flow.

Hack

This is the same as above fix in SharePoint Designer however the hack is on the file system and applies to all team sites created on your server. Also, if any upgrade changes these files, you'll have the "old" style again. And please backup before you change anything.

If you only have WSS installed - in this case you don't have the "Office SharePoint Server Publishing" feature installed. However, you can change the team site page templates, and have them display the quick launch.

Browse to the "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\1033\STS\DOCTEMP\SMARTPGS" folder on the SharePoint server.This folder contains all templates that you see in the "New Web Part Page" wizard
Every page inherits the same team site's master page, and all of them override this master page's placeholder tags. This is why the quick launch is not displayed in new pages created in a team site.
Delete the "PlaceHolderLeftNavBar" content tag in the required templates and save the file/s

References:

http://techblog.udayakumar.net/2007/08/how-to-display-quick-launch-in-web-part.html

http://kwizcom.blogspot.com/2007/05/adding-quick-launch-to-team-site-pages.html

Master Page and Themes on WSS sites in MOSS

Master Page and Themes on WSS sites in MOSS
I was in a meeting the other day showing off master pages on a "team" site on our MOSS farm and discovered a few things... The steps below should work with any of the master pages and themes. Feel free to substitute. The steps below are great for IWs or IT Pro's or whoever is trying to change the look and feel of your site. This is a walk thorugh of my experience trying to brand a simple team site and change it from MS Blue.
Let’s call this How to hide the MS blue...
Applying a Site Master
Retracing my steps...
Create a "team" site (team template)
In site settings, go to site collection features and activate the "Office SharePoint Server Publishing Infrastructure" feature
Under Look and feel in site settings, go to Master Page
for Site Master page choose BlackVertical.master (check the box to apply to sub sites)
Expected result... go to home page and I'd see a fancy site with the black sides (no MS blue right?)
Wrong. Apparently the Site Master applies to publishing pages only (works for Intranet or Internet Portal Templates, but you'll discover it doesn't apply to sub sites with WSS templates)
Applying a System Master
5. Go back to site settings, Master Page, and for System.Master page choose BlackVerticle.Master (check the box to apply to sub sites)
Site Settings looks MS blue
Go to home page.
WooHoo now we have the new master page... ,
Wait the bars on the web parts are MS blue...
9. Go to site settings, under look and feel choose Site themes and choose Obsidian. Click apply.
10. Site settings, now looks like the black obsidian theme, but going to the home page or any list still has the blue web part bar.
So, how do we solve that?
Applying a Custom CSS (from a theme)
11. Go to site settings, click view source, you'll see the reference to the theme in the style sheet just a few lines down... Look for:
12. Copy the href URL path of the css reference (minus the querystring): /sites/tr5iw/_themes/Obsidian/Obsi1011-65001.css
13. Go to Master Page, scroll to the bottom, choose Specify a CSS file to be used and put in the URL to the CSS. "/sites/tr5iw/_themes/Obsidian/Obsi1011-65001.css" check the box to apply to sub sites and “click Apply”
14. Go to homepage
15. We did it. No blue.
Finish… Without opening any tools our UI in our team site has a consistent theme across site settings, the homepage and list pages.
So what did we learn? There is a difference between site.master and system.master in relation to the pages and templates.
Site Master: The site master page will be used by all publishing pages. (That’s great for the Internet and Intranet publishing site, but not for many of the subsites)
System Master: Use the system master page for all forms and view pages in this site. (let me amend this with these are all the site templates and pages that the site master does not apply to, including team sites, document workspaces, web part pages, and all non publishing pages.
MSDN has some good content on modifying master pages:
Master Pages
Customizing Master Pages in Windows SharePoint Services
SharePoint Designer on Office Online has some good info as well
Introduction to ASP.NET Master pages
Looking for more than out of the box ones? Here are some sample master pages.

Migration Hassles - made easy(ier)

I stumbled across the following while struggling with some migrations, haven't had time to try it out though it looks promising!Migrating implementations has been one of my greatest headaches since day 1, and anything which helps with this is always welcome.Introducing the SharePoint Content Deployment Wizard. The tool provides a wizard-like approach to deploying content between SharePoint sites. The selected content is exported using the Content Migration API (PRIME), giving a .cmp file (Content Migration Package) which can be copied to other servers.http://www.sharepointnutsandbolts.com/2007/12/introducing-sharepoint-content.html

Tuesday, June 3, 2008

Recover a deleted site collection from SQL Backup

Recover a deleted site collection from SQL Backup
Solution from Mauro Cardarelli's blog: http://blogs.officezealot.com/mauro/archive/2007/12/12/20674.aspxIn this scenario, let's assume that you have NOT been doing site collection backups but you do have SQL backups. You notice that last night's content database backup is considerably smaller than the night before (yes, you have been saving multiple days of backups). Phew! Your data is all there; we just need to reconnect it. Here's how:1. Create a new database and restore (through SQL Server) the last good database into it2. At the command prompt, use stsadm command to add the content database to your sitestsadm.exe -o addcontentdb -url -databasename -databaseserver 3. Run an IISRESET4. Go to Central Administration and look at the list of content databases for your web application (under Application Management). There should be two (the old one - with zero sites - and the new one just attached). Delete the old database.5. Done! Go to your URL... all should be good again.

What makes a good general-purpose development platform?

What makes a good general-purpose development platform?
Easy to install
Easy to configure
Integrates well with simple tools
Easily extended to make simple tools
Easy to debug
Easy to create test automation
All configuration stores easily in source control
Others I'm forgetting

Changing the properties for default Templates

If we want to change the properties for a specific template we need to modify parameters in the webtemp.xml file.1. To hide this template to change the hiddent parameter and set this parameter to True. By default it is set to False.2. If you want to change the title there is a parameter called title.Same way you can change the description, order and images.This file is located at at Local_Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\1033\XML