Skip to content

Category: Technology

Overriding SharePoint 2010 CSS Classes – Background Images

I just overcame a tough little problem while branding a SharePoint 2010 site. I was trying to override the s4-title class in my themeable class but it just wouldn’t work. SharePoint Designer thought it was OK, my css class was loading last, ond IE Developer tools showed it as the active background image. Still no dice.

image

As is often the case when you’re overriding a class, the parent styles are in effect until overridden. I just couldn’t figure out what – the standard style didn’t show a background image. As it turns out, one was in fact declared in corev4.css (the standard set of classes). It didn’t show because it was positioned way above the page.

background:url("/_layouts/images/bgximg.png") repeat-x -0px -1023px;

I’m not sure why they do this (I suspect that it has to do with the theming engine), but my background was inheriting it. Once I added

background-position:0 0;

to my overridden class, my background appeared just fine.

image

Hope this helps someone.

9 Comments

SharePoint 2010 Page Layouts – What’s this UIVersionedContent all about?

If you work with the publishing features of SharePoint at all, or you do much branding, you’ve undoubtedly run into the UIVersionedContent control. Here’s an example of its use:

image

So what does this thing do? Simply put, it allows the SharePoint visual upgrade feature to work. When a site collection is upgraded from SharePoint 2007 (depending on the options selected), the sites themselves may wind up looking pretty much the same as they did before the upgrade. That’s because the SharePoint team didn’t want to be breaking any customizations or forcing users in specific teams to deal with new design elements, or for those concerns to hold up any upgrades. They therefore have introduced Visual Upgrade – this allows sites (not site collections) to be upgraded one at a time.

However if my site using the 2010features is using the same master page, or page layout as a site that uses the 2007 features, how will that work? That’s where this control comes into play. The control simply contains a ContentTemplate control, which in turn contains the markup to be used. It also possesses an attribute, “UIVersion” which is set to either 3 or 4. These numbers correspond to the old WSS versioning system (WSS 3, SharePoint Foundation 4) and will use the contained markup if the version of the site matches the attribute.

You’ll normally see these controls in pairs, giving an either/or type capability,but there’s no need to restrict them to this.

It’s actually a pretty slick system,but it does add a lot of text to the page layouts. One annoying thing is that all of the V3 supporting code is there even if it’s a brand new install of 2010. This makes sense, because you can introduce a V3 content database into the mix at any time, and you never know when you might need the support. However, if you know that the master pages and page layouts you’ll be working with will only be used in by V4 content, you can feel free to go ahead and remove the V3 tags. Before you do though, make sure that you’re not editing the system default masters/layouts. Always create new ones and do your customization there.

I’ve not seen any other values for the attribute besides 3 and 4 – these are processed by the server accordingly. I’m intrigued by the development possibilities though. Ideally, this could support an environment where I can register a “version” that my site could select to use. This would be much cleaner than keeping multiple master pages for variations in branding, or to support micro sites. This also might be a better model in the WCM world for multi lingual support. I have no idea if that’s the plan, but to me it would make sense.

2 Comments

Storing Data In The Cloud

Last week, my colleague Ed Senez posted a very good article about cloud computing, and it’s benefits.Our company has been making moves toward the cloud for a couple of years now, with both Microsoft’s BPOS offering, and our own SharePoint Extranet Accelerator. While companies struggle with the benefits and risks of moving pieces of their business to the cloud, I can see a huge role for the cloud in the consumer space, primarily because it is so cost effective. I have been moving a lot of my personal data to the cloud for the past little while, and I thought that I would share my current observations.

Photos and Videos

Almost any Facebook user is familiar with posting pictures. The social functionality is great – tagging people lets all their friends know that they are in a new picture (maybe not so great if you don’t like the picture, but I digress….). YouTube is of course great for uploading and sharing videos, but both of these services have one drawback – they convert the files on upload resulting in a loss of fidelity. If you care about the quality of your source content, you can’t rely on these services for backup.

This fact led me a few months back to Flickr. At first look, Flickr had a lot of limitations too – a maximum file size,and a maximum upload rate per month,which initially caused me to dismiss it. What I found out was that with the subscriber version there are no limits at all – you can upload to your hearts content, and it will store the images in their true source format. I have been doing just that when I could for the past few weeks, and currently have over 2000 pictures in my photostream. Just 8000 or so to go.

Flickr also allows you to share your pictures publicly, with family and friends, or just keep them private. However, Flickr doesn’t have Facebook’s ubiquity, so I use it for purely public pictures only, and continue to rely on Facebook primarily for sharing and people tagging. Flickr does allow for videos as well, but it does have some size limits, so I will be relying on YouTube for sharing my videos, along with a separate backup strategy (see below) as I get my videos organized.

So how much does this cost? For $25 per year, I know that all of my personal pictures are backed up. Pictures are quite literally irreplaceable. Documents can be recreated, but you’ll never have a chance to capture those precise moments again. The fact that I can use the services to share picture (in full source quality) is really just a bonus.

Simple Storage with SkyDrive

Did you know that you have 25 GB of storage in the cloud that you can use free of charge? If you have a Windows Live ID (also free..) then you do. It’s called Sky Drive, and it’s extremely handy. Simply upload the files you wish to private, shared, or public folders and they’re safely secured away and accessible from any machine with a web browser. Because SkyDrive also uses WebDAV, you can map your SkyDrive folders directly to folders on your computer.

When you are navigating through your SkyDrive, you also have access to the recently released Office Web Applications. These are light, browser only versions of Microsoft Word, Excel, PowerPoint, and One Note, and they’re completely free of charge. You can create a new document using these apps, or edit anything that you upload. These apps are very handy for occasional use, for viewing purposes, or just for accessing an Office document that may have been sent to you when you don’t have the Office applications readily available.

Sky drive should pretty much eliminate the need for FTP servers, certainly for personal use. Given the cost of the service ($0.00), I really don’t see why someone wouldn’t want to take advantage of it.

Backup

I think that everyone that has used a computer for any amount of time has at some point lost data. Afterwards, there is a mad rush to back up the systems, and then make sure that there is a system in place to back everything up. Corporations typically have solid backup strategies in place (that aren’t tested frequently enough, in my opinion), but personal users are often too busy to ensure that their data is backed up in a timely fashion. There are a ton of consumer backup product out there, but they all often have one fatal flaw. They require the user to actually do something to make it work.

This is where the cloud can be of great help. If we can assume that the machine will typically have a connection to the internet, then for all intents and purposes, our backup destination is always available. All that is needed is a good service to make this painless and automatic for the end user. There are a number of such providers out there, and I’m going to briefly discuss the one that I’ve settled on – Carbonite.

With Carbonite, you download a small application that runs in the background, and is constantly ensuring that your files are being backed up. For most users it is as simple as a next – next install, which will backup all standard data folders. If you want to back up a non standard folder, just right click on it and choose to add it to the backup. You can always see what the backup status is from the console, but carbonite also (optionally) places a small indicator over the icon for each file that you have to let you know its backup status. The backed up files are also browser accessible from any internet connected PC, allowing you to access your files in a pinch, and one of the nicest features is that it not only keeps a mirror image of your system off site, it maintains file versioning, so when you make a change to a file and later decide that it wasn’t such a good idea, you can retrieve a previous version.

Given most end users’ bandwidth constraints, the initial backup can take a little while. Mine took two weeks, but that’s me. After initial backup, it all goes very rapidly. So what’s the cost of all of this storage? You can back up as much as you want from a single machine for $55 US per year. To me, that’s a no-brainer.

 

I spend about 5-10% of my time inside my company firewall. Tools to help with remote connectivity are crucial, and I really see a place for cloud based services to provide a lot of these tools. They’re safe, they’re easy, they’re useful, and they’re highly cost effective. In storage alone, I now back up all of my important personal data (redundantly I might add) and enhance my convenience in accessing it. All for less than $100/year.

I’m sold.

Leave a Comment

Now THAT’S Planning Ahead – Next SharePoint Conference Announced

The next SharePoint Conference has been announced…..for fall 2011. I’m guessing the folks at Microsoft got tired of the “when will the next conference be” question. I can’t even get airline tickets that far ahead.

It does seem that they’re not taking the annual approach to the product specific conferences any more. It was 18 months between the last 2 SP Conferences, and the BI Conference is being held at Tech Ed right now – the previous one was October 2008.

Looks like they’re pretty confident of future demand! The precise dates are Oct 3-6 2011, in Anaheim California.

Leave a Comment

Exporting a Publishing site from SharePoint 2010 Enterprise and Importing Into Standard

I do a lot of development/configuration on my local SharePoint farm for all sorts of reasons. When  the content is ready I rely heavily on the stsadm.exe export and import commands to move content. However, this doesn’t always go as smoothly as planned. Usually site features that exist on the source, but not at the destination is the problem. When importing, you will receive an error indicating that a particular feature can’t be found.

Normally this is because of custom or third party solutions/features, but can also be an issue with out of the box deployments moving content from an Enterprise edition to a standard edition (but not the other way around).

There is some guidance for dealing with this out there for SharePoint 2007 but not much for 2010. Having recently gone through this in a trial and error fashion, I thought that I would share what worked. Essentially, you need to remove the offending feature before you do the export, deactivating doesn’t always suffice. My case below is for a publishing site, and your mileage will vary depending on the site template that you are using. First, the offending features are uninstalled:

stsadm -o uninstallfeature -force -name WACustomReports
stsadm -o uninstallfeature -force -name BizAppsListTemplates
stsadm -o uninstallfeature -force -name IPFSSiteFeatures
stsadm -o uninstallfeature -force -name ReportListTemplate
stsadm -o uninstallfeature -force -name DataConnectionLibrary
stsadm -o uninstallfeature -force -name PremiumSite
stsadm -o uninstallfeature -force -name PremiumWeb

Then the site is exported:

stsadm –o export –url http://mysiteaddress –filename myexportfile

Once done, the export file can be imported. However, don’t forget to reinstall those features – the previous step uninstalled them from all application (read – use with caution)

stsadm -o installfeature -force -name WACustomReports
stsadm -o installfeature -force -name BizAppsListTemplates
stsadm -o installfeature -force -name IPFSSiteFeatures
stsadm -o installfeature -force -name ReportListTemplate
stsadm -o installfeature -force -name DataConnectionLibrary
stsadm -o installfeature -force -name PremiumSite
stsadm -o installfeature -force -name PremiumWeb

Your mileage may vary depending on what you have in your farm,but all you need to do is to add to the commands above with the features in question.

3 Comments