Adding PDF Search Support and Icon to SharePoint 2007

Mike Gannotti has instructions posted on his blog for adding the PDF icon to SharePoint 2007 as well as the steps required to install the PDF iFilter and include the File Type in the content index. He even links to the correct places on the Adobe site where you can not only download the iFilter but also the correct 17 x 17 icon. Nice work!

This is one of many posts that I add to my blog to save me to trouble of looking for the link later since I am sure I will refer to it again. J

SharePoint 2007 – Document Library Send To Feature

One of the neat new features of a SharePoint document library in SharePoint 2007 is the ability to send a document to another location. This feature is great for a couple of reasons. The first is that most teams have a collaborative area where they create content that will eventually be consumed and available for the remainder of the company. In many cases, this collaborative area is restricted to only those that belong to the team responsible for creating the content. However once the document is complete, it should be published out to a location where everyone has access. The problem with relocating the document to a less secured area is that it involves us either moving or copying it. Moving doesn’t seem like a good idea since it is likely that the team may wish to make further updates at a later time. If that is the case, then it would be most appropriate for them to make those updates in their collaborative area since that is where they do all their work. Copying involves duplicating a file and that typically introduces issues with synchronization of content. However using the Send to functionality of a document library, we can create a link from the source document to the published copy so that whenever the document is checked back in, the author will be prompted to update the published versions. Another great feature of this Send To option is the ability to create a custom location. This allows us to specify a common place that content may be published to. To do this you must go to the Advanced Settings of the document library, and specify the location of the document library you wish to publish to. Note: Make sure you specify the library url (example: http://server/sites/sitename/libraryname) and not a view of the library (example: http://server/sites/sitename/libraryname/allitems.aspx). Once you have your specified custom location, it will show up in context menu of documents in that library.

SharePoint 2007 Customization Tricks, Create a Stylish Page Curl Using CSS

Creating a stylish page curl with CSS is pretty easy, you just need to create the curl and apply it as a background-image, position it properly and off you go.

This is one example of how you can get creative with WSS v3 sites using only CSS.

Here’s the code you’ll need to add to your style sheet. I recommend using the AlternateCSSUrl method if you are lucky enough to have a MOSS installation.

/* Page Curl */
.ms-bodyareacell
{
background-image:url(“/_layouts/images/pagecurl.gif”);
background-repeat:no-repeat;
background-position:top left;
/* padding should be a few pixels more than the pagecurl image height */
padding:30px;
}

Upload your pagecurl.gif to the images folder in the 12 hive: (Download a quick sample pagecurl.gif)
C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12TEMPLATEIMAGES

Before:

before.gif

After:

after.gif
You’ll need to modify the image background color to suit that of your site so I’ve included a large’ish version of the page curl in .PSD format for those that wish to modify it. Download the pagecurl.PSD file

Happy Customizing

Another User Group Meeting Down

I just returned home from our monthly .NET user group meeting. The presentation of the evening was by Mark Simms on multi-threading.

Earlier this month I managed to get my hands on some of those limited edition SharePoint Travel Tumblers which Lawrence and company produced.

To extend our thanks, I decided to spread a little SharePoint Cheer during the Holiday Season, and take a few photos with some members of the group underneath the mossletoe. (Ok that was cheezy).

Nothing says geek like a group photo with a 100 foot backdrop of Powered by MOSS 2007 Dual Projected onto a Massive Screen!
sp3.jpg

sp1.jpg

sp4.jpg

Customizing the MOSS 2007 Drop Down Menu

While customizing the Top Drop Down Navigation Bar, you might notice some of the drop down items do not stretch all the way when you hover over them.  You will get a “two tone” effect, not exactly desirable.

Since I’ve run into this several times I figured I would share the CSS I’ve been editing to get around this:

The problem child:
The *width and min-width seem to cause trouble when you have long items. 

.ms-topNavFlyOuts a
{
display:block;
*width:120px;
min-width:120px;
color:#3764a0;
padding:4px 8px 4px 8px;
}

The Fix:
Pretty straight forward, remove or comment out those two properties.  Use width:100%; instead.

.ms-topNavFlyOuts a
{
 display:block;
 width:100%;
 padding:4px 8px 4px 8px;
}
Happy Customizing

 

Gettin’ Married!!

So on the odd chance there still exists someone in this world who doesn’t know yet, I figured I would announce it here…Shane and I are getting married. He popped the question last night and I have been grinning like a silly fool ever since.  Actually technically he handed me a little white box and I babbled and balled for several minutes but minus that momentary lapse in control, I am pretty excited and definitely thrilled.  He is an awesome guy and I can’t think of anyone else better to spend the rest of my life with.  It’s very cool when you are with someone that continuously encourages you to be stronger and better at what you aspire to do but always still remain 100% yourself at all times.

Add your company logo to all sites in a site collection

One common request from customers when it comes to SharePoint Customization is, How do I add my company logo to the site? This was common in V2, and it’s just as common with 2007.

You might be quick to point out that in 2007 “Hey that’s easy, you can do it from the browser by selecting Site Title, Description and Icon from the Site Settings page right?.

While you would be correct in saying this, what happens when the customer creates sub sites and while navigating through these sites realizes hey wait a minute, where’s my logo – you fraud!

While the OOTB functionality is great for specifying the logo on a site by site basis there is no way to have this inherited by all sub sites which are created there after. If you create 20, 30, 40 subsites, you would be forced to change the logo in the site settings of every site.

This easily forseeable crisis which you will inevitably face at some point is actually easy to deal with thanks to the power of .MASTER pages.

Getting started adding a company logo to the master page:

  • Browse to the top level of your site collection in the browser.
  • From The Site Actions Menu, Select View All Site Content
  • Select the Site Collection Images Library
  • Upload your Company Logo (companylogo.gif) – If required, approve this image.
  • Open SharePoint Designer 2007 and Select File, Open Site. Type the URL of the top level of your site collection.
  • Locate the master page gallery in the left pane. _catalogsmasterpage
  • Double click the default.master (you may be prompted to check it out – if so choose yes)
  • Search For: <SharePoint:SiteLogoImage id=”onetidHeadbnnr0″ LogoImageUrl=”/_layouts/images/titlegraphic.gif” runat=”server”/>
  • Repace With: <asp:Image runat=”server” id=”logo” ImageUrl=”< %$ SPUrl: ~sitecollection/sitecollectionimages/companylogo.gif %>/>

What the above does is replace the default (site by site) mechanism for replacing the company logo with a hard coded reference to the company logo which you uploaded to the Site Collection Images library.

By doing this, all pages which inherit from the top level default.master will be updated to reflect this change. Each time you create a sub site, simply inherit the master page of the parent site to ensure this behaviour remains in tact.

Happy Customizing,

The rule of 3’s

By now everyone has heard the tragic story of James Kim whom perished in the cold Oregon Mountains while searching for help for his wife and kids.

It’s hard to say how anyone would react in such a desperate situation, but in the unfortunate event you do find yourself facing such a crisis, a couple of important tips from the experts on surviving harsh conditions.

  1. You can survive for three hours without shelter (in freezing temperatures)
  2. You can survive for three days without water
  3. You can survive for three weeks without food

It’s always easier to look back in retrospect of course so if nothing else, learn from this tragic event and remember that your best odds for survival are ensuring you have shelter.


Getting the most out of SharePoint Designer 2007

If you deal with SharePoint Customization, you’ll likely be using SharePoint Desginer 2007.  This tutorial will help you get the most out of your workspace by creating a custom toolbar which will give you quick access to common tasks.

Create a Custom Toolbar

  • Right click in a blank area next to your toolbar and select Customize.

    1.gif

  • Select the Toolbars Tab and click New.
  • Name your Toolbar anything you like.  In my case I chose SharePoint Workspace

    2.gif

  • Click on the Commands Tab.  Notice that in the Categories list on the left you have all your available menus with the options each has showing on the right in the Commands section.  You can drag and drop commands on to your custom bar to add them.  In this case we want to create a bar that will give us the best options for Customizing SharePoint sites.

    3.gif

From the File Category Drag the following items to your bar:

  • Workflow
  • CSS
  • New Website
  • New Subsite
  • SharePoint Content
  • Document Library
  • List
  • Create from Master Page
  • SharePoint Master Page
  • Publish Selected Files
  • SharePoint Site Template

We will stop here for the example but you can continue adding buttons as you see fit, moving through the categories and commands.

Drag your bar to the top of the screen until it snaps into place.  You now have your most common used items at your finger tips.

4.gif

You can easily customize your bar further by selecting the Rearrange Commands Button.

5.gif

Happy Customizing … Hope it Helps!

ASPMenu Source Code Released

Direct Link from the ECM and SharePoint Team Blogs:

The AspMenu class that ships with WSS 3.0 (and by extension MOSS 2007) is nearly identical in behavior to ASP.NET 2.0’s Menu class (as the name implies). AspMenu derives from Menu and adds tweaks to work around a few reasonably well known annoyances and provides improved highlighting support.

 

Unfortunately, this class was marked sealed and is therefore not eligible to be used as the base class for derived types. Effectively, this means that customers cannot inherit the additional functionality of the AspMenu class when trying to provide further customization of the menu.

 

We realized this problem too late in the release process and were unable to remove the sealed marker from the AspMenu class that ships with WSS. However, we are instead providing the source code for that class here (as an attachment to this blog entry) under the name MossMenu.

 

Note: MossMenu is provided as is and will only work on sites built with WSS 3.0 or MOSS 2007. MossMenu relies on some JavaScript which has been included along with the C# source. This is really just for completeness’ sake [aside: some trival about the use of the apostrophe for the possessive forms of nouns] as this script is automatically included on most pages through the core.js script include reference.

 

Issues with the ASP.NET 2.0 menu, which have been worked around:

1)     If the mouse pointer happens to be hovering over a menu item that exposes a fly-out as the page is loading, it is possible that an error dialog will appear stating: “Internet Explorer cannot open the Internet site, Operation aborted” and a blank page will be shown upon clicking OK. It seems that the problem arises from attempting to append to the DOM before it is properly initialized.

2)     If SSL termination is employed on a site with a menu, users will be greeted with “This page contains both secure and nonsecure items. Do you want to display the nonsecure items?” when hovering over a menu item which exposes fly-outs. (http://support.microsoft.com/?id=910444)

3)     In right-to-left locales, the fly-out indicator arrow still points from left-to-right.

 

Improvements to default highlighting behavior of ASP.NET 2.0 menu:

·         When hooking the menu up to a SiteMapProvider through a SiteMapDataSource, the menu automatically highlights the node that matches that returned by the provider’s CurrentNode property. However, if the particular node returned by CurrentNode is not shown by the menu nothing will be highlighted at all. The improved behavior determines if there is an ancestor of the current node which is displayed in the menu and highlights this node instead.Download the ASPMenu Source