Making Sense of the SharePoint World

Nov-272009

FeedBurner Under Control

MCBD07000_0000[1]The Fix is In, Thanks to Tom Resing

I have great news, thanks to fellow SharePointer Tom Resing. In my previous post I mentioned the problems the Community Kit for SharePoint:Enhanced Blog Edition has with the new link tracking parameters FeedBurner just started adding to their links.

In that post, I talked about the trials and tribulations of trying to get CKS:EBE working by installing an updated version. It turns out there was another approach to the problem. Although Google made the change to FeedBurner effective by default, Tom pointed out that they do offer an option to turn it off.

The Quick Fix

So, for those of you using both FeedBurner and CKS:EBE, here's the scoop. On the left menu in your FeedBurner Feed Stats Dashboard, in the Services section, is an option called "Configure Stats":

image

When you select Configure Stats, you have a section called "Reach", which has several options. You need to uncheck the box for "Track Clicks as a traffic source in Google Analytics":

image

That's all there is to it! Save the settings, and everything should be back to "normal".

Of course, it would have been nice if Google had posted a more conspicuous notice that they were making this change, and where it could be configured. It would have been even nicer if they had made the change "opt in" instead of "opt out".

Nevertheless, what's done is done. You should now be able to click through from my RSS feed directly to the articles you are interested in.

I apologize for any inconvenience.


Nov-252009

Burned by FeedBurner

MCj04314980000[1]At Least They Didn't Burn the Turkey

Just a quick note before I run off for the Thanksgiving holiday (USA). If you have been a subscriber to my RSS feed, you may have noticed a problem clicking through to my blog posts lately. This is because of a change that FeedBurner made a few weeks ago. They added extra parameter information to the connection string of links back to the blog.

This is theoretically a good thing, as it allows site logging to better determine where visitors are coming from. However, this blog uses the Community Kit for SharePoint: Enhanced Blogging Edition (CKS:EBE). The way CKS:EBE handles URLs doesn't allow it to correctly interpret these additional parameters. This resulted in broken page displays. You can still eventually navigate back to the right page, but it isn't as convenient as it should be.

I have just tested a patched version of CKS:EBE to resolve that problem. While the patch for the FeedBurner problem seems to work correctly, there are significant issues with other changes to the patched build of CKS:EBE. I noticed that my tag cloud was no longer resizing the keyword links to their proportions, for example, and there were major authentication problems. These glitches are bad enough that I decided to retract the update.

I apologize for the inconvenience. Rest assured, I'll continue working on getting links from FeedBurner working (without breaking everything else).

In the mean time, Have a Happy Turkey Day!


Jul-72009

Editing Themes with SharePoint Designer

MCj00834210000[1]A Matter of Style

By now, you are probably aware that SharePoint is a heavy user of Cascading Style Sheets (CSS) to control the look of your site. Hopefully, you are also aware that SharePoint Designer has (among other things) a great array of CSS editing tools. In Professional SharePoint Designer, we go into great detail on how these tools work, and many of the style elements used in a SharePoint theme. You can also find breakdowns of the classes used by SharePoint themes on Heather Solomon's site. She has a great SharePoint CSS Reference Chart, that allows you to copy snippets of the default (core.css) values of the elements for use in deriving your own theme styles.

With all of these resources, then, why am I writing yet another article on this topic? Simply because there is still more to say! In this case, I'm going to offer a few tips on connecting to the style sheet you want to edit, not only for "regular" SharePoint themes, but also for users of the Community Kit for SharePoint, Enhanced Blog Edition (CKS:EBE)!

Making the Connection

Whether you are using SharePoint's themes, or some other CSS, your style sheet is usually going to be invoked through a master page. On totally custom master pages, you will typically have a link to your style sheet something along the lines of:

<link rel="stylesheet" type="text/css" href="/somepath/mystyles.css">

But what if you (following my advice from the SharePoint Customization Hippocratic Oath) decide that you don't need to customize your master page, and just want to change the theme? The default SharePoint master pages don't give you a direct link to a theme's style sheet. Instead they reference a couple of placeholders (or tokens) that say "use whatever is defined for the site".

<SharePoint:CssLink runat="server"/>
<SharePoint:Theme runat="server"/>

The first token loads core.css, and any site-wide custom CSS file defined via the API or the Publishing feature's master page picker. The second loads whatever theme your user has applied through the site settings. Thus the load order is Core.css-->yourcustom.css-->appliedtheme.css. Since the last CSS definition for any given item "wins", any styles applied by the theme are always shown, followed by any items in the custom css that aren't overridden, and finally anything that remains in core.css.

Note: Since core.css essentially defines "everything", even complex themes are really just deviations from it. If core.css were loaded afterward, you would never see your customizations.

Mastering Your Environment

Now, while you can just edit the style sheets directly, it is much easier if you can see what you are doing in context. That means having a master page and content page open for editing in SharePoint Designer. Since you don't want to change your real master page, you can do this either on a separate site, or through copies of the default files.

The other thing you need to do is make sure SharePoint Designer is configured to make the changes in the external CSS file, rather than inline. To do this, in SharePoint designer select Tools/Page Editor Options. In the dialog that comes up, select the CSS tab:

image

Notice in the dialog, I have chosen "Manual Style Application", and made sure all of the drop-down choices are set to Classes or Rules. (Some may be "Inline" by default.) You may also choose whether images use styles or attributes for their sizes.

A Level of Indirection

Once you have your workspace configured, open your master page and test content page. When you try changing the an element, you will find SharePoint Designer automatically opens the .css file that is controlling it. In the screenshot below, I decided I wanted the links in the top bar bolded, so I highlighted the welcome control, and clicked the bold icon. I didn't have the CSS open initially, but notice how SharePoint Designer detected and opened the appropriate style sheet.

 image

In this case, it added a font-weight parameter to the .ms-globallinks style:

.ms-globallinks, .ms-globallinks a {
    color: #4c4c4c;
                font-weight: 700;
}

Notice that the stylesheet opened was "simp1011-65001.css". This file is assembled at the time you apply a theme to a SharePoint site, by combining "theme.css" and any "xxxExtension.css" files that may be in the theme folder. By default, you will usually find a "mossExtension.css". The ultimate name of the file will depend upon the theme you have applied, as well as the code page in place.

Technically, there is nothing wrong with editing this file. It is the file that is actually applied to all of your pages. However, if you want to export this theme for later reuse, you will have to divide the changes back into the constituent files. Wouldn't it be great to be able to change those constituent files directly, rather than trying to figure out which file the element lived in after the fact? Well, you can!

All you need to do is edit your master page, and replace the placeholder token with references to the actual .css files. Here is an example piece of code to do that:

<!--    <SharePoint:Theme runat="server"/> -->
    <link rel="stylesheet" type="text/css" href="/team1/_themes/simple/theme.css">
    <link rel="stylesheet" type="text/css" href="/team1/_themes/simple/mossExtension.css">

Notice that I commented out, rather than deleted, the original token. Now, when I make exactly the same change as before, it is theme.css that is opened by SPD!

image

Note: You can see these changes on the master page without actually saving it; however, unless the master is saved, your content pages won't reflect them.

Occasionally, you will change an element that the current theme doesn't already have an override for. In those cases, SharePoint will open and create a local copy of core.css. If that happens, pay attention to the style definition that was changed, and copy it into your theme file, rather than actually saving a modified core.css.

CKS:EBE Themes

The same basic principle applies to Community Kit for SharePoint - Enhanced Blog Edition themes. To create my blog's theme, Sanity Road, I made a copy of Intensive into its own folder. CKS:EBE themes live in a theme folder as well, but not the default SharePoint folder. Each theme incorporates both a master page, and the CSS, as well as the associated imagery. The screenshot below highlights the structure and relevant files:

image

Like a SharePoint theme, a CKS:EBE theme uses a token to reference the css file. Unfortunately, SharePoint Designer doesn't recognize the token, so when you open your master page, it looks like this:

image

However, like the SharePoint theme, you can replace that token with a link to the "real" file:

<!--    <link rel="stylesheet" type="text/css" href="<% $BlogUrl:~Theme/main.css %>" runat="server" /> -->
<link rel="stylesheet" type="text/css" href="main.css"/>

and achieve the full, rich SharePoint Designer editing experience:

image

 

Summary

SharePoint Designer offers some very powerful visual editing tools. In addition, it has a great CSS editor.

In this article, I have shown you how to set up SharePoint Designer and your master page to enable the easy, visual editing of SharePoint themes. I have also shown how to use the same technique on CKS:EBE. I hope these tips help you get the most out of SharePoint Designer's tools, and leverage all the other documentation out there about the actual construction of the themes themselves.


Published: Jul-07-09 | 3 Comments | 0 Links to this post
Tagged as: Design, SharePoint Designer, CKS-EBE

Jun-182009

A Peek Under the Hood

MCj03347000000[1]

What Makes The Sanity Point Run?

Today I'm going to give you a little peek under the hood of my new site. I'll compare what I used before, and what I have now, and how that impacts what I could do. Then I'll go into some technical detail about my current environment, and point out a few things to look for when selecting your own provider. Finally, I'll show you how I customized what I got from the ISP to produce The Sanity Point you are reading now.

The Importance of Dedication

Although I have brought most of my articles over from my previous blog, in many ways this site is the polar opposite of what I had before. The biggest change, of course, is that I have moved from a shared hosting environment (Office Live and Windows Live Spaces) onto a dedicated server. The key difference is, as its name implies, on a shared environment, your web site is using the same hardware as other users - potentially many others; while on a dedicated server, you are the only person on the box.

This greatly impacts what you are allowed to do with your site. Virtually all shared hosting providers pre-configure their servers with a selection of templates, tools, and utility applications (e.g. eStores, blog software, etc...). The usually allow (but don't always encourage) you to upload your own pages and images (typically via FTP or FrontPage extensions), and may offer connectivity to some shared database resources for server-side scripting. However, because you are sharing the host with other users, you won't usually be allowed to create compiled applications, or install and use components that the ISP hasn't already provided.

With a dedicated server, on the other hand, the ISP usually sets up a box, installs an OS, maybe some Antivirus software and a few free utilities, and hands you an administrator password. From then on, it is essentially "your box". Unless you buy enhanced support, the only thing they'll do is poke the power switch if you accidentally shut it down or otherwise lock it up, reset the admin password, or replace a component that gets fried. Otherwise, you are on your own and free to install any (legal) software, and customize the environment to your heart's content.

Yes, Virginia... You can Run SharePoint on Windows Web Server

Of course, with that freedom comes additional responsibility. Since only you know what you plan to do, you have to be careful in choosing options. Ordering a dedicated server is just like buying one for your own office. You need to consider:

  • The Operating System (Windows or a Linux/Unix variant)
  • The CPU
  • How much memory to order
  • How much network bandwidth you expect to use

And, of course, all of this is tempered by how much you can afford. Dedicated servers can get very expensive. If you look around, though, you can find some decent deals. The provider I chose, for example, (APlus.net) offers dedicated servers for as little as $45 a month.

In my case, since I wanted to run SharePoint, my first requirement was running Windows Server. That slimmed my choices a little, but not by much. Since I was only going to get a single box, for Internet-only users, and wasn't going to be running a domain, that made the obvious choice Windows Web Server 2008.

I can hear some of you saying "But wait! You can't run SharePoint on the Web Edition of Windows!!" Well, I'm pleased to say, that isn't entirely accurate. There has never been any restriction against running SharePoint on any edition of Windows Server. However, with Windows Server 2003 web edition, you weren't allowed to install a database server on that edition. This meant you needed at least two boxes in order to run SharePoint, which made dedicated hosting prohibitive for most users.

The good news is, with Windows Web Server 2008, Microsoft no longer has that restriction, so now you can effectively create a low-cost single-box SharePoint environment for Internet sites with either Windows SharePoint Services, or Search Server Express. That's what I've done here. While you can technically install WSS on 512MB, it really doesn't work very well, so I bumped the memory up to 3GB (the most SharePoint can effectively use on 32-bit Windows). I'm also running a dual-core CPU. This results in the Windows about page shown below:

img2

Note: APlus doesn't offer Web Edition in 64 bits, but for my usage, 32-bits is fine. By the time SharePoint 2010 rolls around with its 64-bit requirement, I'll be ready to replace this server.

Installing My Stuff

After sitting down and figuring out my realistic usage, I decided to directly install SQL Server 2008 Express and do an advanced Search Server 2008 Express installation, rather than setting up a basic Windows SharePoint Services install first. While this does limit me to 4GB per database, even for the WSS content databases, it also allowed me the full flexibility to set my service accounts and decide how to manage my databases.

Rule #1: Default Settings + Internet Facing = Bad Move!

Once I had SharePoint (well, MSSX) installed, all that gave me is the default stuff of SharePoint:

image

Now, that's all great, but if I just wanted the stock SharePoint look, I could have used a shared hosting provider. So next I added the Community Kit for SharePoint: Enhanced Blog Edition (CKS:EBE), and a few other goodies that I wanted to use in my sites. I've used the Intensive Theme in the past:

image

But again, I wanted something a bit more unique. So, with SharePoint Designer in hand, I took creating and applying a theme I call "Sanity Road", which is the theme you see today.

image

Going Beyond

Of course, going to a dedicated server is usually overkill if you only have one site, and can be a little flexible in your demands for customization. In my case, however, I'm going to use the server for some other things, such as demonstrations, and hosting other personal and community sites not necessarily related to SharePoint.

In this article, I've tried to give you a feel for the tasks involved in selecting and setting up hosting on a dedicated server. I hope you have found it helpful!