Add a banner to SharePoint 2010

Standard

One of my most popular blogs is Adding a Banner to your SharePoint but is for SharePoint 2007.  Here is how to do it for SharePoint 2010.

image

Banner Image

You need to create a banner at the top of the page.  The image by default is replicated so I have created a large wide image which is 2500px by 100px you won’t see the replication.

Banner

Building the CSS

We need to create our own CSS file which will be uploaded with the banner image into the same folder.

On your desktop create a new file and call it newcss.css.  Open the file in notepad and add the below code.  When your site is loaded, SharePoint will also look at this CSSfile but first we must tell SharePoint to look at this file.

image

.s4-title {

 

    background:#F9F9F9 url('/SiteAssets/banner.jpg') repeat-x 0px 0px;

 

    margin:0;

 

    min-height:121px;

 

    overflow-x:hidden;

 

    padding:30px 0 0 310px;

 

    word-wrap:break-word;

 

}

 

Reference CSS in V4 Master Page

As mentioned above we need to tell SharePoint to load the new CSS file.

Go to Site Actions and Site Settings.  Under Galleries you will see Master pages.  You will now see a list of different files and search for v4.master.  Open this file in SharePoint Designer

image

We are going to add a line of code that will load the new CSS file.  Add the code to line 36 on its own line.

<link rel="stylesheet" href="/siteassets/NewCSS.css" type="text/css" media="screen" />

 

image

All we need to do now is upload the CSS file and the banner image.

Down the left hand side of your SharePoint page click on ‘All Site Content’ and open the Site Assets library.

Upload the CSS and banner image into this library.

image

When you next refresh your page you will be able to see your banner on the page.

image

Submitted Banners

Big thanks and congratulations to Paul Martin who submitted his banner to me.

moreton

Embed YouTube and other code into SharePoint 2010

Standard

SharePoint likes to keep code safe and when adding embedded code SharePoint takes a look and decides whether or not to it likes it.  And a good example of this is YouTube content.

SharePoint being safe

When we navigate to our SharePoint we select the Edit site button and then click on HTML and select Edit HTML Source.

image

I’ve selected a video from YouTube and have copied the embedded code.  I’m now going to paste this code into the window that opened up.

image

When we select OK to save this code and expect the YouTube video to load on our page we get this yellow warning message appear and then disappear very quickly and the YouTube video appears on our page.

image

When we click save to save the page the YouTube video disappears and when we go and check the HTML Source it is now completely empty.

Embedding code to SharePoint

There are many ways to resolve this issue and one of these includes stopping SharePoint from removing the embedded code but this isn’t realistic.

Instead we are going to save the content of the embedded code to a text file, upload it and then use a web part to pull this information viewing it as HTML and loading the content.

Open notepad and paste the embedded code into it.

SNAGHTML1352467

Save the file and upload the file into SharePoint.  A good place would be the SiteAssets library.

Add a content editor web part to your page and edit the web part.

image

In the properties box down the right hand side you will see 3 dots, click on these to open up a new windows.

image

Paste the URL of the text file we uploaded and click OK

SNAGHTML14a4002

When you now save your SharePoint page you will always have your embedded code.

image

This doesn’t necessarily have to be a YouTube video.  It could be flash code, html code or any other embeddable code.

Create SharePoint Site using Powershell

Standard

You should becoming increasingly familiar with PowerShell and SharePoint 2010 now and you are building so great scripts to help manage your environment.

A few weeks ago I had the requirement to create over 3000 sites with the site names stored in a Excel spreadsheet.

image

But first we need to understand how to create a site using Powershell.  The special command is new-spweb which only has 1 requirement and that is the URL of the site but there are several other parameters that you should use when creating a site with Powershell.

Parameter Information
-url Where do you want to create the new site which includes the URL of the new site
-template Add the template number to use the Basic Site or Publishing Site.  A full list here
SharePoint 2010 Site Templates
-name Display name of the site
-AddToTopNav Do you want the site to display in the top navigation bar?
-UseParentTopNav Do you want the site to display in the parent navigation?

Configure SharePoint 2010 Search to crawl internet sites

Standard

SharePoint Search can be used to search multiple different locations and one of these is internet sites. Before deciding whether to crawl an single internet site there are a few things to consider:

  • How much content you want to crawler on that website?
  • Do you want to crawl the whole website?
  • The larger the website your crawler the larger the database will grow in your SharePoint/SQL Farm.
  • When will you crawl the site?  Does crawling it a secpefic times course a lag on other reaching the site.
  • Know how many pages deep you need to go into the site.

For this example I decide to crawl my blog site http://www.bfcnetworks.com.  I have a few web analytic plugins installed which help me to understand which are my frequently hit pages and also for me to see the number of people who are visiting my site.

When starting a crawl there are 2 main areas I see the SharePoint 2010 crawler on the site.  The first is in the Who’s Online.  When turning on bots I see 4.01.  This is the SharePoint crawler

image

I can also see which page the bot is crawling as well.  Using StatPress it allows me to see the pages that were last hit.

Untitled-1

Configure SharePoint 2010 Search to Crawl Internet Site

Log into your Central Admin and go to your Search Administration page.

Down the left hand navigation select Content Sources

image

Select New Content Source

image

Give a name to the content source and select Website as a Content Source Type.

image

Enter the name of the website you want to crawl.

image

From evaluating which website and the pages you want to crawl enter number of pages deep you which to crawl.

image

Select up any crawl schedules you want.

Select OK to save this new Content Source.

When you have started a full crawl you will see your results in your search centre

image

Upload PowerPoint slides into SharePoint 2010 Slide Library

Standard

With SharePoint 2007 and 2010 we can upload slides from our PowerPoint and upload and share them in a SharePoint Slide Library.  Here’s how to do it.

image

Create Slide Library

Go to Site Actions and select More Options.

image

From the list select Slide Library and click create.

image

Give you slide library a name and click Create at the bottom of the page.

image

Take note of the URL of the document library.

Upload slides from PowerPoint

Open the presentation you want to share slides from.  Click on File, Save and Send and then click on Publish Slides

image

Now select Publish Slides.  You will now be asked which slides you would like to upload.  Either check the individual slides you want to upload to click on Select All.

SNAGHTML119d177

Enter the URL of the Slide Library we created earlier and click Publish.

image

When you click publish you will see at the bottom of the PowerPoint a status bar letting you know when it the upload process is going.

image

When it has completed it you will see the slides you uploaded in the SharePoint Slide Library.

image

Configure SharePoint 2010 Search to crawl file servers

Standard

SharePoint Search can do so much more than just search your SharePoint sites and one of the features with in SharePoint 2007 and 2010 is the ability to search a file share.

Here is how to configure SharePoint to crawl a file server.

In my environment I have 2 servers.  A domain controller that is a file server and also a single SharePoint 2010 server farm.

Configure SharePoint Search

Log into your Central Admin and go to your Search Administration page.

Down the left hand navigation select Content Sources

image

Select New Content Source

image

Give a name to the content source and select File Shares as a Content Source Type.

image

Add the UNC path for the shared documents.

image

If you want just that folder to be searched select ‘Only crawl the folder of each start address’.

Select up any crawl schedules you want.

Select OK to save this new Content Source

Configure File and Folder Permissions

The SharePoint Search Crawler will run under a user and this user requires permission to the shared folder.  To ensure you know which user is crawling you can do this on your file server by opening the File Services Snap In and selecting Manage Session from the Action panel.

image

You will see which user is connecting to that share.

Add the user to have Read Only permission to that share and folder.

SharePoint 2010 Document Library Views and Styles

Standard

Out of the box with SharePoint 2010 you can have 7 different style/views for you documents

Default View

image

Basic Table

image

Document Details

image

Newsletter

image

Newsletter, No Lines

image

Shaded

image

Preview Pane

image

Change your document view and style

Navigate to your document library.

Click on Library and click Modify View

image

Navigate down the page until you see Style and expand this group.

image

Select the style you want

image

Add a banner to SharePoint 2010

Standard

One of my most popular blogs is Adding a Banner to your SharePoint but is for SharePoint 2007.  Here is how to do it for SharePoint 2010.

image

Banner Image

You need to create a banner at the top of the page.  The image by default is replicated so I have created a large wide image which is 2500px by 100px you won’t see the replication.

Banner

Building the CSS

We need to create our own CSS file which will be uploaded with the banner image into the same folder.

On your desktop create a new file and call it newcss.css.  Open the file in notepad and add the below code.  When your site is loaded, SharePoint will also look at this CSSfile but first we must tell SharePoint to look at this file.

image

.s4-title {

 

    background:#F9F9F9 url('/SiteAssets/banner.jpg') repeat-x 0px 0px;

 

    margin:0;

 

    min-height:121px;

 

    overflow-x:hidden;

 

    padding:30px 0 0 310px;

 

    word-wrap:break-word;

 

}

 

Reference CSS in V4 Master Page

As mentioned above we need to tell SharePoint to load the new CSS file.

Go to Site Actions and Site Settings.  Under Galleries you will see Master pages.  You will now see a list of different files and search for v4.master.  Open this file in SharePoint Designer

image

We are going to add a line of code that will load the new CSS file.  Add the code to line 36 on its own line.

<link rel="stylesheet" href="/siteassets/NewCSS.css" type="text/css" media="screen" />

 

image

All we need to do now is upload the CSS file and the banner image.

Down the left hand side of your SharePoint page click on ‘All Site Content’ and open the Site Assets library.

Upload the CSS and banner image into this library.

image

When you next refresh your page you will be able to see your banner on the page.

image

Submitted Banners

Big thanks and congratulations to Paul Martin who submitted his banner to me.

moreton