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?

SharePoint Learning Kit for SharePoint 2010

Standard

SharePoint Learning Kit is currently used in many industries but it has mainly been developed to be used in education sector. This E-Learning Tool can bring a different element of learning to pupils giving them access to their marks on work automatically having submitted it to the server.

In this scenario whitepaper we will look at 4 different ways SharePoint Learning Kit can be used ranging from a single site to a whole school to multiple schools.

What is SharePoint Learning Kit?

SharePoint Learning Kit also known as SLK is an E-Learning delivery application that is built to run on top of SharePoint 2007 and 2010. The certified SCORM 2004 product allows content from a SharePoint document library to be assigned, tracked and then marked to a group of learners.

Supporting SCORM 2004, SCORM 1.2 and Class Server content the learning resource can be assigned by the individual to themselves and to a group.image

This SharePoint feature can be used in all version of SharePoint including the Windows SharePoint Services 3.0 and SharePoint Foundation 2010.

SharePoint Learning Kit is currently at version 1.5 and available in 29 international languages. To download SharePoint Learning Kit navigate to http://slk.codeplex.com and click on the download button.

Assignment List Web Part

With SharePoint Learning Kit there is one web part that is called the Assignment List Web Part which has 2 functions. For the instructor it allows the member of staff to see the number of students that have submitted work. For the Learner it lists all the assignments they have to complete in that SharePoint site.

SLK Learner

When a student logs into the site and has the Assignment List Web Part of their page they are given a list of all the assignments they have to complete with the score they can achieve.

image

To start the assignment the learner will select the name of the assignment which will take them to a holding page that will list information such as the description, date of completion and the final score they could achieve. To start the assignment they select Begin Assignment.

SLK Instructor

If a SharePoint User is assigned as a SLK Instructor they have the permission to assign files from a document library to any assigned SLK Learners accounts. Once an assignment has been set, the Assignment List Web Part will list the assignment name and the number of students that have submitted their assignment.

image

An instructor can select the assignment name from the Assignment List Web Part and then view the score the student received from the assignment. As this assignment was a SCORM file with questions set out in the assignment the server has automatically given a score to the student. This score can be changed by the instructor and then any comments that have been added are sent back to the learner for them to review.

image

E-Learning Actions

Both the instructor and the learner can use the E-Learning Actions button. This feature turns the document in a document library into an assignment allowing you to assign the file to yourself as an individual or a group of learners.

image

On the following page the user is asked if they would like to assign the document to themselves. If the user is an SLK instructor they will also see the name of the site that they can assign the resource to.

image

Having selected a group you can then select the date the assignment should appear in the student Assignment List, when they have to have the assignment completed by and any other instruction you may want to give them. Towards the bottom of the page you can then select either to assign to the whole group or different individuals. You may want to use this feature to assign different levels of work to students with different abilities in the group.

SharePoint 2010 Site Template ID Numbers

Standard

Here are a list of all the site template ID numbers that you can use in SharePoint 2010.  When creating a new site through Powershell or STSADM you are asked to provide the site template ID for each of the sites.

Site Definition Site Template ID
Team Site STS#0
Blank Site STS#1
Document Workspace STS#2
Blog BLOG#0
Group Work Site SGS#0
Visio Process Repository VISPRUS#0
Basic Meeting Workspace MPS#0
Blank Meeting Workspace MPS#1
Decision Meeting Workspace MPS#2
Social Meeting Workspace MPS#3
Multipage Meeting Workspace MPS#4
Assets Web Database ACCSRV#1
Charitable Contributions Web Database ACCSRV#3
Contacts Web Database ACCSRV#41
Issues Web Database ACCSRV#6
Projects Web Database ACCSRV#5
Document Center BDR#0
Records Center OFFILE#1
Business Intelligence Center BICenterSite#0
My Site Host SPSMSITEHOST#0
Personalization Site SPSMSITE#0
Enterprise Search Center SRCHCEN#0
Basic Search Center SRCHCENTERLITE#0
FAST Search Center SRCHCENTERFAST#0
Enterprise Wiki ENTERWIKI#0
Publishing Portal BLANKINTERNETCONTAINER#0
Publishing Site CMSPUBLISHING#0

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