Staff directories are a very common request for Intranets. Oddly SharePoint doesn't have a feature called Staff Directories but it contains many bits and pieces that can help build one.
i.e People Search, Custom user properties, My sites, People and Groups page.
There are also out of the box solutions that you can purchase from http://www.bamboosolutions.com such as http://store.bamboosolutions.com/p-41-user-directory-web-part-release-14.aspx
Or you can write code such as http://blogs.syrinx.com/blogs/sharepoint/archive/2007/10/05/sharepoint-2007-face-book-web-part.aspx
This article is to demonstrate how far we can go with just out of the box configuration trying various methods.
Method 1 - Using the User Information List
################### Read this First ################################
Before you try this at home, please note that this solution is very limited. I am making notes as I attempt various methods and these articles are my findings not neccesarily the best solutions.
A better solution is found in part 2 of this article - http://blog.sharepointsydney.com.au/post/Creating-a-staff-Directory-in-SharePoint-Part-2-People-Search.aspx
Pros of this method
Very easy to set up
- Does a good basic job
- Some decent styles and info available OOTB
- Can't create own styles
- Content doesn't synch with SharePoint Profiles (This may be fixable with Bamboo Solutions User Sync)
- As users are removed from SharePoint they still remain in this list (This may be fixable with Bamboo Solutions User Sync)
- Can't edit the page that results appear on. E.G Can't add web parts.
- Can't search for users. Can only group by SharePoint groups.
- When users update their details in MySites it takes a while for the UIL to reflect the changes. This is because syncing is done by a Timer Job called "Profile Synchronization" which runs by default once an hour.
More info: http://sharepointsherpa.com/2008/01/31/employee-directory-using-user-information-list-in-sharepoint-2007/
As part of the experiment I will use the Personalization Site Template
to create a dedicated Staff Directory site for no particular reason
other than I want to see what this site template does.
So here is what the new site looks like. It is just a normal site but it contains a couple of filters preloaded on the page. It also applies a link to this area directly to the creators mysites section.
Now let's go to the People and Groups page and see what our options are.
In this image you can see that I have actually jumped a few steps ahead.
Really all that I have done is created a few groups - Sales, Marketing etc. Under Settings -> 'Edit Group Quick Launch' you can define which groups to show in the Quick Launch on the left.
In our example the client would like to be able to browse by department so we can either create groups to represent each department or perhaps these departments already exist if you are using AD.
Next notice in the top right dropdown that we have created a new view called Staff Directory. You could create as many views as you like perhaps even filtering by location. Or alternatively instead of using the groups in quick launch you could use the views to filter by dept instead.
Note: For some reason list settings option only appears from the top level site which is where you go to create custom views.
Here is where we start the limitations of this approach. You can create a new view but the properties that are displayed in that view seem to be limited to these.
Not sure at this point if you can add more. This may not be a huge limitation as all we areally want this view fo ris to display some basic info about the users and if they want more they can really click through to the user MySite page.
The other bit of customisation for this view is that you can select different styles for displaying the info.
I'm trying to find if you can create your own styles but can't find any info.
You can open any of the views of the UIL from SharePoint Designer by opening the root site but the only options available appear to be the same as you get from the browser view.
On thing I noticed is that a ListViewWebPart is used to display the info but can't find any info on editing styles for LVWP either.
At this point this solution is not looking flexible enough for me so I am abandoning it and moving onto trying the People Search instead in part 2 of this artilce.
I was trying to format the layout of the Custom Query Webpart similar in fashion to instructions found at http://www.heathersolomon.com/blog/articles/CustomItemStyle.aspx.
The problem was that no matter what I did in CQWP based on the announcements list the title and image appeared but the body text was not showing up.
After reading a few articles including http://martijnmolegraaf.blogspot.com/2008/12/configuring-and-customizing-content_20.html I realised that body was a custom field and so I needed to export the webpart.
Edit the exported webpart file with all my custom fields.
The line to edit looked like
<property name="CommonViewFields" type="string">
Note the name followed by datatype.
Then import the webpart back in and use it as you would any other CQWP.
Editing skins with designer can be frustrating due to the many quirks in the process.
For a good starting point read here - http://www.sharepointblogs.com/tigirry/archive/2007/07/27/easy-way-of-editing-customized-theme-in-moss-2007.aspx
Some additional tips.
After you edit CSS files don't swich themes until you copy all your changes back to the theme.css file in the 12 hive otherwise SharePoint will overwrite your changes.
Every time you change themes SharePoint puts a local copy of the theme folder copied from the 12 hive which overwrites the current themes folder.
Only 1 theme folder per site collection appears in Designer.
Also as an extra note in the Masterpage section of sesttings, the system Masterpage option is used for the document center masterpage.
It appears the difference between the SIte Master Page and System Master page is primarily the quick launch. Which becomes the treeview in the System Page.
In this article, we are going to explore how to modify an existing Sharepoint theme. This process is pretty straight forward and this article provides a few tips and tricks along the way. Please note this process requires some previous CSS experience.
Copy the theme directory you want to customize
1. Navigate to THEMES folder: %Program Files%\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\THEMES. Copy theme folder you want to modify and rename the copied folder. Here, we copied the BREEZE2 folder and renamed it to DERWENT.
Update the copied files with the new theme information
2. Navigate into the new theme folder and rename the .INF to the name of the new theme. Here we renamed BREEZE2.INF to DERWENT.INF.
3. Open the INF that was just renamed and update all the entries with the new name of your theme. A global search and replace (Ctrl+H in most editors) will take care of this easily for you. Here we changed all the Breeze2 entries to Derwent.
4. Next, we need to add the new theme into the XML file so that Sharepoint knows it exists. To do this, we are going to edit the SPTHEMES.XML file located in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033. Add the following <Templates> entry into the XML file:
For now, leave the <Thumbnail> and <Preview> tags as they are, we will get to these later. They simply specify which images will show up when the user is previewing a theme. Since we don’t have a screenshot of our new theme yet, we do not have anything to put here. Your XML file should look similar to the one below:
Make CSS changes to the theme
5. Next, we are going to edit the theme.css style sheet located in the new theme folder (for example, C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\THEMES\DERWENT\theme.css).
This is where all of the hard work comes in. In order to work more efficiently, it is a good idea to save a couple of the Sharepoint pages locally (File -> Save As… from IE, select Webpage, complete (*.htm;*.html) for Save as type).
This will allow you see the CSS changes on a local page without have to perform an iisreset (See Step 6) on the server.
For the pages I saved locally, the .htm files seemed to link to “Derw1011-65001.css” style sheet instead of the expected theme.css file. It turns out the “Derw1011-65001.css” is actually a copy of the theme.css style sheet. (The “65001” in the filename comes from the codepage setting in the .INF file). So when you save a page locally, it will also save the “Derw1011-65001.css” file since the .htm file links to this file. Edit the “Derw1011-65001.css” file locally and once you’re happy with the changes, copy the contents of this CSS file into the theme.css file located on the server (after making a backup, of course).
Microsoft has provided some documentation (http://msdn.microsoft.com/en-us/library/ms438349.aspx) on the CSS classes used in core.css which shares some common CSS classes with theme.css, however I found it easier to examine the CSS information using IE Web Developer or Firebug.
Force Sharepoint to recognize changes
6. Now that you finished with your CSS changes, you need to perform an iisreset from the command prompt in order for the Sharepoint server to recognize the changes.
To do this, start the command prompt (Start -> Run… -> type cmd -> Enter).
Type iisreset, then hit enter.
Note: be careful performing this command on a server in a production environment as it will sever any active connections to all of the websites being hosted on the server.
Apply customized theme to site
7. Next, we are going to apply the newly created theme. Open a browser and navigate to the Sharepoint page that you want to apply the new theme to. Click Site Actions -> Site Settings.
Once in Site Settings, click “Site Theme” from the Look and Feel section:
This will bring up a list of all available themes that you can apply to the site. You should see the theme we added in the previous steps. Below, you can see the Derwent theme we added in the example:
Highlight the theme you added, and click apply.
Update preview image
8. Notice the Preview image shown to the left of the list of themes. You will still see the preview image of the copied theme.
In order to update that image with a preview of our own theme, we need to grab a screenshot of our new theme and add it to the proper location.
Navigate to the home page of the site you changed the theme for. In our example, we would navigate to the My Home page.
Take a screenshot of this page and resize it to about 350 x 230 pixels using your favorite image editor (i.e. SnagIt).
Save the screenshot in a standard format (.gif, .jpg, or .png).
9. Next, we need to add the image to the Sharepoint server so that the image will appear when a user is attempting to select a theme.
Copy the screenshot image you created in Step 8 into %Program Files%\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\IMAGES. Here you can see I’ve named my screenshot Derwent_Preview.gif:
10. Repeat Step 4, updating the <Preview> and <Thumbnail> attributes in the SPTHEMES.XML file with the new name of your preview image, as shown below:
11. Repeat Step 6 to complete the changes on the Sharepoint server.
12. Next, we need to see our changes on the Sharepoint site. Repeat Step 7 to navigate to the Site Themes Settings Page.
Notice that the image you just created isn’t showing up in the preview? In order to see the changes you just made to the theme, you must first apply another theme (any theme listed - it doesn’t matter which one), and then reapply the new theme. This is required to see ANY changes you have made to theme, if you already have the theme applied.