Category Archives: SharePoint News

SharePoint news from Tony Phillips

SharePoint 2010 Centered MasterPages

I spent a lot of time creating centered MasterPages for SharePoint 2010 using Adventure Works and Minimal MasterPages as starting point.

There was a number of issues when using these pages (as starting points). I struggled to get the QuickLaunch to appear on the adventure works MasterPage without distorting the content and also struggled with compatibility with IE7 and other random combinations of browsers. Starting from scratch with the minimal MasterPages creates a huge amount of work rewriting all of the CSS (although this would be the preferred method if I had time!)

In the end I went back and started to make my MasterPage based on the V4 master. Here is how I managed to get it to work by using CSS and very minor changes to the MasterPage itself. I based it around blogs I had read by Randy Drisgill and a few of my own trial and error experiences http://blog.drisgill.com/2010/12/my-real-world-branding-with-sharepoint.html.

I set the class s4-nosetwidth to the workspace div (this stops SharePoint setting the width automatically). We can then wrap our content in a table (single cell) or a div. This will be the container for the page. The reason we dont set a width to the workspace is because this would put the scroll bar in the center of the page.

<div id=”s4-workspace” class=”s4-nosetwidth”>
<table class=”s4-workspace-maintable”>
<tr><td>
<div id=”s4-bodyContainer”>

In the CSS file, you just need to set the width and centering of this table….simple! I have also included a fix for IE7 which crops content. This is a bug found in the standard V4 master. You may still find some issues using IE7 with this MasterPage but much less than using the Adventure works master or using the V4 master with the alternative method of centering.

CSS

/*——————-Browser Fixes ———————*/
/* fixes IE7 cropping*/
.ms-rte-layoutszone-outer
{
float:none!important;
}
/*—————End of Browser Fixes ——————*/

/* —————width and centering——————-*/
.s4-workspace-maintable{
background:white!important;
/*Fixed width*/
width:95%!important;
/* Center the page */
margin: 0 auto!important;
}
/* ———end of width and centering——————*/

MOSS 2007 and windows server 2008 IIS web dav

Windows 2008 SP2 or R2 doesn’t have web dav installed on IIS by default.

SharePoint actually uses it’s own web dav, so IIS web dav does not need to be installed. If you install IIS web dav on Server 2008 SP2 or R2, it will conflict with the SharePoint web dav and cause the explorer view, upload multiple documents, upload pictures to stop working when connecting using a windows 7 client.

Hope you find this tip useful….

BETT 2010 – Stand H9

bettI will be at BETT 2010 with CORE Education and Consulting Solutions. I will be doing a short SharePoint branding workshop.

BETT 2010 http://www.bettshow.com/

CORE Education http://www.coreeducation.co.uk

I will show how CSS can be used to customise vanilla SharePoint sites and how you can use Master Pages and Features to create richer SharePoint designs.

These workshops will be regular across all the days at BETT next week. If I’m free just ask me and I will start a workshop for you.

See you soon,
Tony

SCORM in SharePoint

When Uploading large SCORM content into document libraries you may need to change the max file upload in the web application settings and also in the web.config file as shown below:

Edit the httpRuntime tag in the web.config

<httpRuntime executionTimeout=”999999″ maxRequestLength=”184320″ />

New Custom Designs

Here’s one of my most recent designs for a school in Bradford. It’s SharePoint 2007 site using CSS, master pages and page layouts. It’s an interface for a primary school which hopefully makes it easier to use without losing the SharePoint functionality.

We had a nice opening ceremony which was attended by the local news paper (see below).

http://www.thetelegraphandargus.co.uk/district/district_bradford/4627331.School_blazes_trail_with_hi_tech_system/

I have posted a few of my new SharePoint Master Pages and Styles below

If you are interested in SharePoint solutions for schools please visit
http://www.coreuk.co.uk

I will post some more designs very shortly.

Getting external RSS feeds working through a proxy in SharePoint

  1. Find the web.config file for the web application
  2. e.g.

    C:\Inetpub\wwwroot\wss\VirtualDirectories\443

  3. Backup web.config and then open the file in notepad
  4. Append the  <defaultProxy> tag to include the proxy details
  5. <system.net>

    <defaultProxy>

    <proxy usesystemdefault=”false” proxyaddress=”http://proxy:80/” bypassonlocal=”true” />

    </defaultProxy>

    </system.net>

  6. Substitute http://proxy:80/ with your proxy address and port
  7. Save the web.config file

SharePoint Blueband MasterPage IE8 Drop-Downs

When using the Blueband masterpage or a custom masterpage, you may find that the drop-down menus don’t work in Internet Explorer 8 (IE8).

ie8 problem

There is a fix for internet explorer or you can view the page in compatibility mode. The only problem is you can’t expect all your users to know how to do this. Your site will be unusable to some of your users.

To fix this problem include the following meta tag into your masterpage:

<meta http-equiv=”X-UA-Compatible” content=”IE=EmulateIE7″ />

It will force IE8 to render the page as it would if it was still IE7. Maybe not the best of fixes but all that Microsoft provide at the moment. The SP2 update to sharepoint just adds this line into the Masterpages (this will not add it into custom masterpages that you have already made!).

Removing the Close Web Part Button

It can be very annoying having users accidently close web parts. It’s a long process to restore them.
To re-open a closed web part:

Go to Site Actions > Edit Page:
o Add a web part
o Advanced Web part gallery and options
o Select “Closed Web Parts”
o Drag-n-drop the web part back onto your page

To prevent this process from happening, try turning off the close web part button. It doesn’t remove the possibility of a user closing the web part but makes it much less likely to accidently happen!

For Each Web Part:

1.    Click on the web part menu and choose “Modify Shared Web Part” (as shown below)

2.    Expand “Advanced”

3.    Uncheck “Allow Close” (see below)

4.    Press OK

Inheriting a Master Page Across Site Collections

Ok, your publishing pages inherit fine but what if you want to inherit a master page on multiple site collections?

Unfortunately there is no easy way to do this if you want it to apply to the form pages as well, you could apply that master page to the entire web application but this would restrict one master page for the site. You need to create a site feature based on this master page template.

1. Open your master page in SharePoint Designer 2007 and make the appropriate changes to the site.

2. Insert your HTML, Javascript and attach your CSS, etc….

3. Copy and paste your master page code into notepad and save as masterpageName.master

4. Follow Heather Solomon’s excellent tutorial on creating a site feature and use your MasterpageName.master as the master page template

http://www.heathersolomon.com/blog/articles/servermstpageforsitecollect_feature.aspx

Once the site feature is activated you can goto Site Actions –> Site Settings –> Master Page and select your master page from the list (tick the box if you want it to apply to all the subsites)

Master Page Settings
Master Page Settings

Result – A custom master page which can be inherited by all the site’s children and the forms.