General Bloging

Development and Stuff

About the author

Author Name is someone.
E-mail me Send mail

Recent comments

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010

Solicitors

http://www.blakemores.co.uk/site/work_for_us/

http://www.anthonycollins.com/working-with-us/training-contracts.aspx

 http://www.sydneymitchell.co.uk/about-us/careers-recruitment

- possible need to check.

 http://www.daviesandpartners.com/recruitment

  http://www.fp-law.com/solicitors-jobs.html    

- family law paralegal vacancies

  http://traineerecruitment.irwinmitchell.com/training.html

  http://www.fbcmb.co.uk/careers/training

want 2.1 but is by post

 http://www.hadens.co.uk/join-hadens

 http://www.williamsonandsoden.co.uk/training-recruitment

 

 

 

 

 

 

 


 

 

 

 

 

 

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by gurney on Friday, July 09, 2010 3:30 PM
Permalink | Comments (0) | Post RSSRSS comment feed

Hiding fields in Sharepoint 2007

To hide fields in the edit and newform pages for a list add the following Javascript to the top on the

default list pages using SPD 

 <script language="javascript" type="text/javascript">

_spBodyOnLoadFunctionNames.push("hideFields");

function findacontrol(FieldName) {

   var arr = document.getElementsByTagName("!");
   // get all comments
   for (var i=0;i < arr.length; i++ )
   {
      // now match the field name
      if (arr[i].innerHTML.indexOf(FieldName) > 0)
      {         return arr[i];      }
   }
}

function hideFields() {

   var control = findacontrol("Influence");
   control.parentNode.parentNode.style.display="none";
   control = findacontrol("Experience");
   control.parentNode.parentNode.style.display="none";
 
}
</script>

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by gurney on Monday, February 23, 2009 9:40 AM
Permalink | Comments (0) | Post RSSRSS comment feed

Truncate log files 2005

I always for get how to do this, and the  have to look it up when the dev box runs out of disk space.

backup log DBName with truncate_only

dbcc shrinkfile (DBName_log, 1)

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: SQL server
Posted by gurney on Tuesday, February 17, 2009 1:24 PM
Permalink | Comments (0) | Post RSSRSS comment feed

Table Layout

Practical CSS Layout Tips, Tricks, & Techniques

The Web Standards Project’s (WaSP) Browser Upgrade Initiative (BUI), has spurred many a designer to move towards more standards compliant web design, using CSS rather than tables for layout to save user bandwidth while enhancing underlying semantics, accessibility, and reach.

“Tables are dead...”

Several designers have taken Jeffrey Zeldman’s lead in posting tutorials that have helped us get over the initial hump of table-less design. The first efforts have focused on creating two or more columns using CSS positioning instead of tables, thus allowing for a (complete) separation of structure from presentation. These broader techniques have been documented and archived at Eric Costello’s glish and Rob Chandanais' Blue Robot.

Others have chimed in, including Owen Briggs’ Box lesson and Tantek Çelik’s box model hack/workaround, detailed by Eric Costello, and explained by Tantek. Dotfile lists hundreds of sites designed with CSS layout.

“...Long live tables”

While these excellent resources address the larger issue of creating a general layout using only CSS positioning, other practical questions arise as we find ourselves, as designers, faced with a problem that is trivially easy to solve with tables, but not so obvious with CSS. Such a question was posed on the Webdesign-L list with the subject line “Tables are dead ... long live tables.”

The question

Suppose you want to have a bunch of thumbnail images that link to larger versions of the images – a fairly common type of web page. Suppose further that each image contains a short caption that you would like to keep centered underneath its image. And, in the interest of conserving browser window real estate, you want to line these image/caption pairs up in rows across the screen, but in such a way that they will wrap as necessary depending on the width of the browser window (liquid design). With the last requirement we have stepped out of the realm of tables, and into the realm of CSS.

One Step at a Time

Let’s look at this step-by-step. The first requirement is that the thumbnails have their caption centered beneath them. This is relatively straightforward: in your HTML place your image, followed by a break, and then put your caption in a paragraph that is aligned to the center (via CSS).

Next we want to line up these image/caption pairs across the browser window. Using tables for layout, each of these image/caption pairs would go into a separate TD. Using CSS we need to put them into a separate DIV. To get them to line up horizontally across the window we use CSS to FLOAT each of these DIVs to the left.

Here is what the CSS might look like at this point:

div.float {  float: left;  }  div.float p {   text-align: center;   }

And the HTML:

<div class="float">  <img src="image1.gif" width="100" height="100"  alt="image 1" /><br />  <p>caption 1</p></div><div class="float">  <img src="image2.gif" width="100" height="100"  alt="image 2" /><br />  <p>caption 2</p></div><div class="float">  <img src="image3.gif" width="100" height="100"  alt="image 3" /><br />  <p>caption 3</p></div>

And here is what it looks like in the browser:

image 1

caption 1

image 2

caption 2

image 3

caption 3

The next requirement can only be solved using CSS. We want the image/caption pairs to wrap if there are more than will fit in the browser window. FLOATing the DIVs to the left has already solved this problem. If we repeat those sample thumbnails a couple of times, they will wrap in the browser window:

image 1

caption 1

image 2

caption 2

image 3

caption 3

image 1

caption 1

image 2

caption 2

image 3

caption 3


Now, suppose you had more than one category of thumbnails you wished to display on your page, and you want to group them visually, with a background and/or border. Simply enclose them in a container DIV:

div.container {  border: 2px dashed #333;  background-color: #ffe;  }

However when we do this we run into a problem. When you float an element with CSS, it no longer takes up any “space” and the background and border show up above the images instead of surrounding them. We need to put some content other than the floated DIVs into the container DIV. Like a spacer DIV:

div.spacer {  clear: both;  }

Now the following HTML (note that there are spacer DIVs at the top and bottom of the container DIV):

<div class="container"><div class="spacer">  &nbsp;</div><div class="float">  <img src="image1.gif" width="100" height="100"  alt="image 1" /><br />  <p>caption 1</p></div><div class="float">  <img src="image2.gif" width="100" height="100"  alt="image 2" /><br />  <p>caption 2</p></div><div class="float">  <img src="image3.gif" width="100" height="100"  alt="image 3" /><br />  <p>caption 3</p></div><div class="spacer">  &nbsp;</div></div>

...gives us what is shown next:

image 1

caption 1

image 2

caption 2

image 3

caption 3

Based on code from Sam Marshall.

Nested DIVs, nested TABLEs, what’s the difference?

So now we have a bunch of nested DIVs. How is this any better than the nested tables they replace? The answer lies in the way the tag was intended to be used. DIVs imply a logical, or structural grouping. Even when they are nested they remain structural markup. In our example we grouped images with their captions (first level), and then grouped these image/caption pairs with similar image/caption pairs (second level). These are both examples of structural grouping that is handled quite well by the DIV tag.

However, tables imply a relationship between column and/or row headers, and the data in the table cells. When we use them for layout, we lose the structural semantics of a table. And we are back to using HTML for layout. Nesting tables only compounds the problem.

FORM(s) and Function

Another common use for table layout is lining up FORM elements with their labels. While it could be argued that this is an appropriate use of TABLEs, the CSS technique that I describe below will prove to be useful for other, similar layout needs, as we will see.

A typical layout for FORMs has the labels on the left, flush right, with the form elements on the right, flush left, with everything meeting in the middle:

Name:
Age:
Shoe size:
Comments:Go ahead - write something...

Based on original code concept from Eric Meyer.

The form above was created without the use of TABLEs. Once again we are using FLOAT to accomplish the positioning. The trick is to create a DIV that works like the TABLE row that we are used to using. Then we'll create two SPANs: one for the labels and the other for the form elements. Float the label SPAN left and the form element SPAN right. For the label SPAN, align the text right, and give the form element SPAN left-aligned text.

The CSS looks like this:

div.row {  clear: both;  padding-top: 10px;  }div.row span.label {  float: left;  width: 100px;  text-align: right;  }div.row span.formw {  float: right;  width: 335px;  text-align: left;  } 

The CSS above also gives widths for the SPANs. These can be absolute values like the example, or percentages that add up to 100% or slightly less, depending on padding and borders (and the box model you are designing for). In the example I have wrapped the form in another DIV to give it a border and a background.

The example HTML looks like:

<div style="width: 350px; background-color: #cc9;border: 1px dotted #333; padding: 5px;margin: 0px auto";>  <form>    <div class="row">      <span class="label">Name:</span><spanclass="formw"><input type="text" size="25" /></span>    </div>    <div class="row">      <span class="label">Age:</span><spanclass="formw"><input type="text" size="25" /></span>    </div>    <div class="row">      <span class="label">Shoe size:</span><spanclass="formw"><input type="text" size="25" /></span>    </div>    <div class="row">      <span class="label">Comments:</span><spanclass="formw">        <textarea cols="25" rows="8">        Go ahead - write something...        </textarea>      </span>    </div>  <div class="spacer">  &nbsp;  </div> </form></div>

Front and Center

You may have noticed part of the STYLE attribute for the containing DIV above contained the following: margin: 0px auto;. This results in the 400 pixel DIV being centered in standards compliant browsers. Some browsers, like IE5.x for Windows ignore this, but will (incorrectly) center DIVs that have a TEXT-ALIGN of center. To center DIVs in these browsers you can wrap a DIV with TEXT-ALIGN set to center, around another DIV that sets MARGIN to auto (and TEXT-ALIGN to left so text will align correctly). See Rob Chandanais’ Layout Reservoir for this and other centering technniques.

Splitting the Difference

A similar layout that is typically solved with tables is essentially the opposite of the above. Instead of meeting in the middle, you might want to place two elements at opposite sides of the browser window. This might be a case where you have a small logo that you want at the top right corner of your page, and some navigational elements at the top left:

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: CSS
Posted by gurney on Tuesday, January 20, 2009 8:30 AM
Permalink | Comments (0) | Post RSSRSS comment feed

Import export backup restore site

So just a couple of basics before we start.

  • My portal is located at http://portal.abc.local
  • I have a team site (standalone site collection) located at http://portal.abc.local/sites/hr

If I wanted to see a list of all of the site collections below my portal I can do that. The easy, out of the box way is to use stsadm.exe –o enumsites –url http://portal.abc.local

You will also notice from the screen shot that stsadm gives us more details in this version. ContentDatabase, StorageUsedMB, StorageWarningMB, and StorageMaxMB are all new pieces of information that could be handy in a pinch.

Anyway, back to the task at hand. How are we going to move HR to be part of the portal site collection? How about using stsadm.exe –o export

From the screen shot we can see at a minimum we will need to use the –url and –fliename options. So we probably want to run stsadm –o export –url http://portal.abc.local/sites/hr -filename HRsite.bak

Depending on the size of your site collection this command may run for several minutes. Once it finishes you will get a message saying Operation Completed Successful. Now we need to figure out how to get the site collection back in. To do this let's look at the command stsadm –o import

From this screen shot we can now see that we just need to do is import our previous file to a url inside our portal site collection. Something like stsadm –o import –url http://portal.abc.local/HR -filename HRsite.bak

Once again you should get a Operation Completed Successfully message. If you did then you should now be able to browse to http://portal.abc.local/sites/hr. Now don't forget to also go back and manually deleted your old site collection http://portal.abc.local/sites/hr once you are sure you have successfully moved everything. I will leave how to delete to you. It always scares me to give out instructions on deleting things because you never know who might only half way read this article and mindlessly delete something on accident. It happens!

Once you finish all of this moving around you will need to do a little navigation cleanup but nothing we can't do through site settings these days.

Shane SharePoint Help

Notes

I would just suggest that people make note of the -includeusersecurity option for both the export and import. Definitely save some headaches.

To determine whether the Stsadm.exe command-line tool was run successfully, review the Unified Logging Service (ULS) files that are located in the following folder:

Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\LOGS

 

 

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by gurney on Tuesday, December 23, 2008 3:45 PM
Permalink | Comments (0) | Post RSSRSS comment feed

Configuring Search

"1.  After you have installed SharePoint, go under Operations, and Services on the Server.

2.  Under there, start up Office SharePoint Server Search. If you get an Error when doing this the most likly cuase is that you have to prefix the Domain in front of all user names ie

ML234APPS\Admin etc

3.  Next, setup Shared Services for that farm.

4. Go to the Shared Services Administration website, and under there go to “Search Settings” under “Search”.

5. Under Search Settings -> Manage Content sources and Crawl Schedules. You should see a “Local Office SharePoint Server sites” setup for ya. You’d think this would do it – but no.

6. Click on that link and setup a schedule for “Full Crawl” and “Incremental Crawl”. If you want – start up a full crawl after you are done setting up this schedule.

7. You can specify other search engine criterion here – URLs to exclude in search results, various rules on following links/domains etc., the content access account (make sure this isn’t administrator – and you would have set this up anyway when you setup SharePoint server search in item #2), file types etc.

That’s it. Your search is ready to rock’n’roll. Go to your site – issue a search; should work now. " From a blog at http://blah.winsmarts.com/2006-11-Implementing_search_on_a_Sharepoint_2007_installation.aspx#feedback

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by gurney on Monday, December 22, 2008 5:26 PM
Permalink | Comments (0) | Post RSSRSS comment feed

What level SP Sharepoint

 

Using SharePoint Central Administration Web site SharePoint HTML Site Settings admin pages or IIS Manager, on the web sites properties HTTP Headers tab, virtual servers once extended will show the following version numbers: 
    MOSS 20071 or WSS 3.0 
Cumulative update (KB956056 & KB956057)  12.0.0.6327
    MOSS 20071 or WSS 3.0 
Infrastructure Update (KB951695 & KB951297)  12.0.0.6318
    MOSS 20071 or WSS 3.0 post-SP1 hotfix (
KB948945)      12.0.0.6303
    MOSS 20071 or WSS 3.0 post-SP1 hotfix (
KB941274)      12.0.0.6301
    MOSS 20071 or WSS 3.0 post-SP1 hotfix (KB941422)      12.0.0.6300
    MOSS 20071 or WSS 3.0 SP1                                        12.0.0.6219
    MOSS 20071 or WSS 3.0 
October public update               12.0.0.6039 
    MOSS 20071 or WSS 3.0 August 24, 2007 hotfix package 12.0.0.6036 
    MOSS 20071 or WSS 3.0 RTM                                        12.0.0.4518 
    MOSS 20071 or WSS 3.0 Beta 2 TR:                               12.0.0.4407 
    MOSS 20071 or WSS 3.0 Beta 2:                                    12.0.0.4017 
    Office 12 (PDC image - pre-beta):      12.0.0.3111 (This version of Office does not have a support link in the Add/Remove programs dialog box).

1To confirm that a particular service pack is install on SharePoint Server you must either check the version numbers of specific dlls as specified in the related Microsoft Knowledge Based article or select the Show Updates check box in Add and Remove Programs.

    WSS 2.0 SP3                                    6.0.2.8165 
    WSS 2.0 SP2 KB900929 + KB924881 6.0.2.8117 
    WSS 2.0 SP2 rollup KB900929           6.0.2.8000
    WSS 2.0 SP2                                    6.0.2.6568
    WSS 2.0 SP2 Beta = R2:                   6.0.2.6551 
    WSS 2.0 SP1 + KB887981                6.0.2.6411
    WSS 2.0 SP1:                                  6.0.2.6361 
    WSS 2.0 Unservice packed:               6.0.2.5530

To confirm that service packs are installed, especially with SharePoint Server 2007, goto Control Panel -> Add and Remove Programs
Select the product and then click: Click here for support. The versions will
be displayed as follows:

 

Windows SharePoint Services 3.0

Microsoft Office SharePoint Server 2007

post-SP1 hotfix (KB948945)

12.0.6303.5000

12.0.6303.5000
SP1

12.0.6219.1000

12.0.6219.1000
RTM

12.0.4518.1016

12.0.4518.1016
Beta 2 TR

12.0.4407.1005

12.0.4407.1005
Beta 2

12.0.4017.1006

12.0.4017.1006
 

Windows SharePoint Services 2

SharePoint Portal Server 2003

SP3

11.0.8173.0

11.0.8168.0

post SP2 rollup

11.0.8000.0

11.0.8126.2

SP2

11.0.7969.0

11.0.8126.0

R2 WSS SP2 beta

11.0.6551.0

 

SP1+KB887981

11.0.6411.0

With Service Pack 1

11.0.6361.0

11.0.6715.0

Unserviced pack

11.0.5608.0

11.0.5704.0

See David Hunter's blog post, "SharePoint 2007 Versions ", to find the version number directly from a SharePoint database.

Thanks to Matthew McDermott and Kenneth Searles for the update on the version related to the hotfix KB887981

Note: If you have a version number starting with 10, then it is either SharePoint Team Services (SPTS) or SharePoint Portal 2001 (SPS 2001).

  • SPTS, 10.0.2627.01 is the version with no service packs. In the Administrative Tools menu, you will see a link to Microsoft SharePoint Administrator. This will display a web page, where you can see the version number of the virtual server(s), e.g., 5.0.2.2623. The ISAPI filter is fpexedll.dll.
  • For SPS 2001, 10.145.4629 is the version number with no service packs. There will be no ISAPI filter, and from the Administrative Tools menu you will see a link to SharePoint Portal Server Administrator which launches a mmc snap-in.

Currently rated 2.5 by 2 people

  • Currently 2.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by gurney on Thursday, September 18, 2008 12:08 PM
Permalink | Comments (2) | Post RSSRSS comment feed

Adding menu item to single list

Creating Menu Item for a Specific List/Document Library Template

Recently I needed to add a special upload function to a custom Document Library definition that I created. In MOSS creating a custom Document Library/List definition is 20 times more intuitive and easy than in the previous version of SharePoint. So what to do? First, you open the features directory underneath the 12 hive (c:\program files\common files\microsoft shared\web server extensions\12\template\FEATURES). Create a copy of the list or document library feature that you would like to modify. Why create a copy? In my case I needed the new menu item to only be available for my new custom library, not in all document libraries. Our next step is to rename the folder of the feature we just copied to something that mnemonically represents the type of feature we are creating. Next, open the feature.xml file in our feature folder. Then, we need to generate a unique GUID for our new feature. You can generate a GUID inside of Visual Studio or go to the web and there is one on Microsoft's site. Or if your lazy like me type GUID generator in your friendly neighborhood Google search box and you will get plenty of web pages that will generate one for you. Under the Feature ID put your new GUID in place of the existing one. Ok, close the feature.xml were ready to open the next xml file. Our next step is to open the list templates folder and change the list template type number (the first element under the elements node in the file we just opened) from its current number to a new number. Now, if you read Microsoft's example on the technet website they use the number 20, don't do this. This inside word I have received was to use a number greater than 10,000 for your list template type such as 10009. Ok edit the rest of the obvious things like the display name, the description, and even add in a custom icon to show up next to the list/document library type on the create page. Ok we're ready to add our new menu item to our custom feature. We now need to add a CustomAction node inside of the elements node below the listtemplate area. The custom action is what is used to create our new menu item.

<CustomAction Id="MyCustomMenuAction"    

Creates a name for our new custom action

RegistrationType="List"

Sets the type of item this custom action will affect. Other possibilities are ContentType, FileType, ProgId

RegistrationId="10009"

KEY! This says only show this custom action in list templates of type 10009, therefore not everything!

GroupId="UploadMenu"

Sets the group which the new menu item will show up in. Other possibilities are any CustomActionGroup that you have defined, ActionsMenu, etc.

Location="Microsoft.SharePoint.StandardMenu"

The location in which the custom action will be made available. In this case it will be on the standard menu within lists/document libraries. Other options are EditControlBlock, NewFormToolBar, DisplayFormToolBar, EditFormToolBar

Sequence="1001

Specifies the sequence in which this new control will be displayed on the menu referenced by the groupID.

Title="Custom Upload Item"

Title of action the user will see on the menu.

ImageUrl="/_layouts/images/custom/CustomMenuItemIcon.jpg"

Specifies the icon associated with this menu item.

Description="Create a custom action in the upload menu.">

Description text that will go below the title of this action.

<UrlAction Url="/_layouts/myCustomPage.aspx?listName={ListId}"/>

The {ListId} token passes the internal unique identifier GUID for the list in the query string so you can know which list you came from. Other possibilities are {SiteId}.

</CustomAction>

 

 

A complete list of all of the attributes, some of the possible values, and purpose available within the customaction's node please visit http://msdn2.microsoft.com/en-us/library/ms460194.aspx.

Save all our changes and were ready to deploy.

Open a command prompt and navigate to the bin directory of the 12 hive ( address listed above 12\bin). In the command prompt type
stsadm.exe –o installfeature –name MyListTemplateFolderName\feature.xml –force
stsadm.exe –o activatefeature –name MyListTemplateFolderName –url http://SharepointSite/SiteCollectionName -force

So what are those steps again in an easy to follow guide that are not filled with my fluff and tangents?

  1. Copy the default document library Feature Folder and renamed it.
  2. Change the feature ID under Feature.XML to a unique guid <Feature Id="29AFAA71-E117-4E80-AA17-D0C71B360233"
  3. Open the listTemplates folder and edit the DocumentLibrary.xml
    1. Change the Type="101" to a number greater than 10,000.
    2. Change the display name
    3. Change the description
  4. Add a custom action block underneath the list template element in the elements node.
    1. <CustomAction Id="MyCustomMenuAction"

      RegistrationType="List"
       RegistrationId="10009"
        GroupId="UploadMenu"
      Location="Microsoft.SharePoint.StandardMenu"
      Sequence="1001"
      Title="Custom Upload Item"
      ImageUrl="/_layouts/images/custom/CustomMenuItemIcon.jpg"
      Description="Create a custom action in the upload menu.">
      <UrlAction Url="/_layouts/myCustomPage.aspx?listName={ListId}"/>
      </CustomAction>

    2. Now set the Registration ID to the number you set as the type in the listTemplate node (10009)
  5. Deploy the feature now with stsadm.exe
  6. Activate the feature with stsadm.exe


Finally, if you would like to create new menu items and apply them to existing libraries, menus, lists, or administration areas you can do this by simply creating a feature that does not include a list template. To do so, create a folder in the features folder of the 12 hive. In the new folder create text file and name it feature.xml (MUST BE CALLED FEATURE.XML). Insert our xml into page.

<?xml version="1.0" encoding="utf-8"?>

<Feature Id="InsertUniqueGUIDHERE"

Title="OZ Document Management Library"

Description="This Feature adds a new menu item to the upload menu "

Version="1.0.0.0"

Scope="Web"

Hidden="TRUE"

ActivateOnDefault="FALSE"

DefaultResourceFile="core"

xmlns="http://schemas.microsoft.com/sharepoint/">

<ElementManifests>

<ElementManifest Location="MenuItem.xml" />

</ElementManifests>

</Feature>

 

Now create another text file, call it MenuItem.xml, and insert elements node with our custom action inside of it

 

 

<?xml version="1.0" encoding="utf-8" ?>

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">

<!—This custom action adds the menu item to all Document Libraries (type=101) -->

<CustomAction Id="MyCustomMenuAction"

RegistrationType="List"
 RegistrationId="101"
  GroupId="UploadMenu"
Location="Microsoft.SharePoint.StandardMenu"
Sequence="1001"
Title="Custom Upload Item"
ImageUrl="/_layouts/images/custom/CustomMenuItemIcon.jpg"
Description="Create a custom action in the upload menu.">
<UrlAction Url="/_layouts/myCustomPage.aspx?listName={ListId}"/>
</CustomAction>

</Elements>

 

Hope this post has been helpful. IT took up about half of my flight from Houston to Fort Lauderdale to write, so mission accomplished. I was entertained and hopefully you are enlightened.

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by gurney on Monday, July 21, 2008 9:55 AM
Permalink | Comments (0) | Post RSSRSS comment feed

Setting up sharepoint 2007

How to install SharePoint Server 2007 on a single machine

One of my first ever blog articles (and by far most popular to date) was a set of instructions on how to install Beta1 of SharePoint Server 2007 on a single machine. I removed this article because it was too much of an overhead updating it with the various Betas and the official guides were being developed. Now that SharePoint is RTM, I do still get a lot of questions from customers on how to do a simple installation of SharePoint (with SQL 2005) on a single machine to be used for a stand-alone development, demonstration or simple 'play-pen' server (normally on a virtual machine). This guide will outline all of the main steps to setup such an environment.

Please bear in mind that this is just an unofficial guide to getting SharePoint 2007 installed quickly and easily in a demo / test environment. This guide will not necessarily observe best practices with regard to security etc. For production setups, you should seek guidance from the official documentation which is available on TechNet (http://technet2.microsoft.com/Office/en-us/library/3e3b8737-c6a3-4e2c-a35f-f0095d952b781033.mspx?mfr=true).

Pre-Install

There are several things that you must do before you even insert the SharePoint 2007 CD they are:

  • Install Windows 2003 R2 with the latest service pack (2 at time of writing) and all of the latest Windows Updates.

NOTE: Please do not use NewSID to change the SID of the machine if you are using a copy of another VM, this breaks things in SharePoint. My advice is to build Windows from fresh or to use Sysprep if you are using a copy of a VM.

  • Join your machine to a domain or create a domain by running DCPromo.exe from the Start > Run dialog.
  • Install the .net frameworks v3.0 and v2.0 from Windows Update. You can also download the full redistributable packages if your server is not online.
  • Install Windows 'Application Server' from Add/Remove Programs in Control Panel with default settings
  • Prepare a service account in your active directory domain to use for all Sharepoint services.

NOTE: Do not use the main domain\administrator account. This causes a problem if ever you wish to install Project Server 2007 on the same machine.

  • Give your service account local administrator rights and logon as this account throughout the entire installation process.
  • Install SQL 2005 (and latest service pack) with typical settings.
  • Assign your service account to the 'Security Administrators' and 'Database Creators' server roles in SQL server (You will need to use SQL Server Management Studio).

Base SharePoint Server Install

You are now ready to install SharePoint 2007 itself, follow these steps:

  • Login as your service account
  • Insert your CD (or attach your ISO image) and run setup.exe if it does not autorun.

NOTE: If you get an error about web service extensions here, ensure that 'ASP.net V2.0.50727' web service extension is allowed in IIS. If it is not in the list, perform a 'repair' on .net 3.0 framework using add/remove programs and then the web service extension will appear in the list. This is caused when IIS is installed after the .net framework

  • Enter your CD key and accept the license agreement.
  • Choose 'Advanced' on the installation type dialog.

NOTE: The definition of 'Advanced' means that you are using full SQL server (which may or may not be on the same machine). If you had selected 'Basic' then it would have installed the cut down version of SQL (MSDE).

  • Select 'Complete' on the Server Type screen and click 'Install Now'. The setup will now commence and you'll get a blue progress bar.
  • Once installed you will get a screen with a check box that reads "Run the SharePoint products and Technologies Wizard now". Ensure this is ticked and click 'Close'.
  • After a short pause, you'll get a 'Welcome' screen. Click 'Next'.
  • You will get a warning that the wizard is about to reset several services, click 'Yes'.
  • You'll be asked about the farm configuration, select to 'No, I want to create a new server farm'.
  • Provide the database server (your server name) and your account details (account in the domain\user format). Leave the database name as the default. Click 'Next'.
  • Leave the authentication mode as 'NTLM', set a specific port number is desired (not required) and click 'Next'.

NOTE: In a production environment, you would most likely use Kerberos where possible (if your infrastructure supports it).

  • You'll get a summary screen; click 'Next' to kick-off the process.

NOTE: If it fails here, it is most likely that you do not SQL setup correctly. Ensure your service account is in the right groups. Please also note that this section can take a very long time, especially step 2 (up to 45 minutes).

  • You'll get a success screen at the end, click 'Finish'.
  • The wizard will attempt to load the central administration window. You may need to login here, use your service account. You may also get prompted to add the site to your trusted sites; go ahead and do that.

NOTE: This authentication prompt is caused by the secure version of IE on Windows 2003 Server. You can turn if off by modifying the security settings in IE.

Services on Server Configuration

The first bit of configuration to do is set your server to host all services. You do not strictly have to enable all of these services, but I find it helps if you are using the machine to test / investigate functionality.

  • When the Central Administration screen appears, go to 'Operations' tab, then 'Services on Server'.
  • Start the 'Document Conversions Load Balancer Service'.
  • Start the 'Document Conversions Launcher Service', you'll have to choose the 'Load Balancer Server'; there should only be one option. If there are no options, ensure that the 'Document Conversions Load Balancer Service' has been started.
  • Start the 'Excel Calculation Services'.
  • Start the 'Office SharePoint Servers Search' service, observing the following guidelines:
    • Tick both Query and Indexing check boxes
    • Specify a contact email address (this can be any address)
    • Enter your service account in the 'Farm Search Service Account' section
    • Accept all other defaults and click 'Start'
  • Leave all remaining services in their default configuration

Web Application Setup

The next stage is to create the 3 web applications that will be required to host the basic set of sites for a typical deployment, these are:

  • Shared Service Provider Administration Site (Recommended to be called 'SSPAdmin')
  • My Site Host (Recommended to be called 'MySite')
  • The Main Intranet (or 'Portal') Site (Recommended to be called 'Intranet')

It is much simpler if all of these sites are on port 80 in IIS; this means that you do not have to remember to enter the ports all of the time. However having all three sites on port 80 means that each needs their own Host Header (required by IIS to differentiate between sites on the same port). The simplest way to do this is to create new 'Host (A)' records in DNS for each of your three sites. These should point to the IP address of your server; to do this follows these steps:

  • Open the DNS Management tool from Administration Tools on your domain controller
  • Navigate to your DNS zone
  • Create new 'Host (A)' record
  • Enter the Host header (i.e. 'SSPAdmin', 'MySite' or 'Intranet') for the site and the IP address of your server
  • Click 'Add Host' and repeat for each of the three sites

Now the DNS entries are configured, we can create the three web applications in SharePoint; follow these steps for all three of your web applications (i.e. 'SSPAdmin', 'MySite' or 'Intranet'):

  • In Central Administration, go to the 'Application Management' tab
  • Click 'Create or Extend Web Application' and then click 'Create a new Web Application'
  • Fill out the new web application screen observing the following points:
    • Change the New IIS Site description to read something like 'SharePoint – 80 - <Host header name>' where <Host header name> is the name of the web application your are creating (i.e. 'SSPAdmin', 'MySite' or 'Intranet')
    • Ensure the 'Port' is set to 80
    • Set the 'Host Header' to match the DNS record you created (i.e. 'SSPAdmin', 'MySite' or 'Intranet')
    • Change the 'Application Pool Name' to match the 'New IIS Site Description'
    • Enter your service account for the Application Pool account settings
    • Change the 'Database Name' to read something like 'WSS_Content_<Host header name>' where <Host header name> is the name of the web application your are creating (i.e. 'SSPAdmin', 'MySite' or 'Intranet')
    • Leave all other settings on default and click 'OK'
  • Repeat for all three web applications (i.e. 'SSPAdmin', 'MySite' or 'Intranet')

Shared Service Provider Setup

The next stage is to create the Shared Service Provider (SSP). The SSP is required in order to provide several key services such as Search or My Site. You can read more about SSP on my blog article about it here. To configure the SSP, follow these steps:

  • In Central Administration, go to the 'Application Management' tab
  • In the 'Office SharePoint Server Shared Services' section, click 'Create or Configure This Farms' Shared Services'
  • Click 'New SSP'
  • Fill out the 'New Shared Services Provider' screen observing the following guidelines:
    • For the 'SSP Administration Site' web application (the first one you get asked for), choose the web application that you created earlier (suggested name was 'SharePoint – 80 - SSPAdmin')
    • For the 'My Site Location' web application (the second one you get asked for), choose the web application you created earlier (suggested name was 'SharePoint – 80 - MySite')
    • Enter your service account for the 'SSP Service Credentials'
    • Leave all other settings on default and click 'OK'
  • The creation of an SSP can take some time (up to 1 hour on a virtual machine). When it is finished you will see a 'Success!' screen, Click OK.

Collaboration Portal Site Collection Setup

The next stage is to create a collaboration portal which is one of the more feature-filled site types and represents a typical intranet environment. To do this, follow these steps:

  • In Central Administration, go to the 'Application Management' tab
  • In the 'SharePoint Site Management' section, choose 'Create Site Collection'
  • Fill out the 'Create Site Collection' observing the following guidelines:
    • Ensure you have selected the 'Intranet' web application you created earlier (suggested name was 'Intranet')
    • Give your site a title ('Intranet' is suggested)
    • In the 'Template Selection' section, choose 'Collaboration Portal' from 'Publishing' tab
    • Enter you service account for the 'Primary Site Collection Administrator'
    • Leave all other settings on default and click 'OK'
  • When the 'Top-Level Site Successfully Created' message appears you have created the site, simply click the link that is provided (something like http://intranet)

Configure Indexing

The final step of the process is to configure indexing so that you have some search results. Though this step is optional, it is recommended as it will enable you to use the powerful search capabilities of SharePoint. To configure the index, follow these steps:

  • In Central Administration, click the 'SharedServices1' link on the left-side navigation (or whatever you name your SSP)
  • When the SSP Administration site appears, click on 'Search Settings' in the 'Search' section
  • On the 'Configure Search Settings' page, click 'Content Sources and Crawl Schedules'
  • Edit the 'Local office SharePoint Server Sites' content source by hovering your mouse over it and choosing 'Edit'
  • Fill out the 'Edit Content Source' observing the following guidelines:
    • Set a full crawl schedule to be at least once a day
    • Set a incremental crawl schedule for every 10 minutes
    • Tick the 'Start Full Crawl of this Content Source' tick-box
    • Click 'OK'
  • A crawl will now start. Initial crawls normally take up to 10 minutes.

The process is now complete. User should be able to access the main collaboration portal from http://intranet (or whatever you called the DNS record).

I hope this was useful, please comment with any errors or amendments

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by gurney on Monday, July 21, 2008 9:43 AM
Permalink | Comments (0) | Post RSSRSS comment feed

Adding a custom style sheet

There are many ways you can add and edit CSS in MOSS 2007, the method I will discuss here is lightweight and great to get a general understanding of how style sheets work, and get aquainted with some of the class naming conventions SharePoint uses.

Set up an Alternate CSS URL:

  • Create a Publishing Site. Select Site Actions, Create Site. Then select the Publishing Tab and finally choose Publishing Site. It will take a few moments for your site to provision.
  • Open your editor of choice and create a new file and add /* Custom Styles */ to it.
  • Save it as “Custom.CSS”. If you are using notepad don’t forget to select “All Files” from the “Save as Type” drop down menu before saving, otherwise you will have a .txt extension.

Go to your website in the browser and select Site Actions, View all Site Content

  • Select the Documents Library (create one if you don’t see it). Update:  The best place to store your CSS would be the Styles Library which is already created.  I have no idea why I said to place it in the Documents Library.  You can thank Amanda for reminding me.
  • Select the Upload Drop Down, Then Upload Document. Select Browse and then browse to and select the Custom.CSS file you created to upload it.
  • Go back to the Site Actions menu, then Site Settings, Modify all Site Settings.
  • From the Look and Feel Section, Select Master Page.
  • Scroll Down to the bottom of the page until you find the “Alternate CSS URL” section. Select Specify a CSS file to be used by this publishing site and all sites that inherit from it.

22.jpg

  • Then Click Browse. Select Current Site Documents on the left and finally select your Custom.CSS file. Click Ok a couple of times to return to the site settings page.

31.jpg

  • What you just did was set up an alternate style sheet for your site. Any style you add to this style sheet will take precendence. What that means is if you know there is a certain class applied to an element in your site and you want to change it, just add the class to your Custom.CSS style sheet and it will override the previous.

Identify and Overwrite Classes:

  • Now that you are set up, you’ll need to figure out what elements of your pages you wish to change, and what classes are applied to them. That’s where the Internet Explorer Developer Toolbar comes in. If you have not downloaded and installed the IE Developer Toolbar, you’ll need to do it now.
  • Go back to the browser, and back to the default page of your website.
  • From Internet Explorer Select View, Toolbars, Developer Toolbar. This will turn the bar on. Note: If you are using IE 7 you may need to hit the ALT key to expose your file menu.

42.jpg

  • From the Developer Toolbar now exposed at the top of your screen, select View Dom. This will open a menu at the bottom of your screen.

51.jpg

  • From the bottom menu, select Find, Select Element by Click. When this is enabled, you can click any element on the page to inspect that part of the DOM (Document Object Model) and subsequently see what class is applied to what element.

6.jpg

  • As you hover over elements of your page, you will notice they highlight with a dark blue border. When you find the element you wish change highlighted, you can click it to show the information about it, such as the class which is applied to it.
  • For this example we will assume we need to change the very top horizontal bar so that is has a yellow background, rather than the default blue.
  • Hover over this element and then click it when it has a blue border. Notice that the class in the bottom tells you it’s using .ms-gloablbreadcrumb. That means that if we add that class to our Custom.CSS file, then edit it to have a yellow background, our site will update to reflect the change.

7.jpg

  • To test this, Select Site Settings, View All Site Settings. Select the Documents Library and then Check Out the Custom.CSS file so that you can edit it. You will notice your ICON change slightly once the file is checked out. When it does click it to to open it in your editor.

8.jpg

  • Add the following code to the style sheet:

.ms-globalbreadcrumb {

background-color:#FFFFB0;
}

  • Save your style sheet.
  • Back in the browser, check the style sheet back in, publish/approve it if necessary.
  • You will notice now when you refresh the page that your top bar has changed to yellow.

9.jpg
This is the basis behind overwriting the custom CSS classes in a supported, non-destructive way.

Other Important Notes:

  • These classes are originally defined in the CORE.CSS located in the 12 HIVE on the file system of the SharePoint Server.  Update:  To quickly copy/paste all properties set in the CORE.CSS file, you can “Control + Click” on any underlined class name in SharePoint Designer 2007.  Doing so will not only open the CORE.CSS file (or whatever stlye sheet your class is defined in), but also jump directly to that piece of code!
  • If there is a theme applied to the site the CORE.CSS classes are overwritten by duplicate entries in the THEME.CSS. (It’s also important to note that Themes can be somewhat confusing as when you apply your theme, the THEME.CSS (and other styles) are actually added to a file called 1011-65001.css and then applied to the site).  If you were trying to personalize a theme by connecting to the site using SharePoint Designer 2007, you need to edit the 1011-65001.css file.
  • I would consider it best practice to use the Alternatte CSS URL where possible and copy the classes “from the CORE.CSS (or theme.css)”, paste it to the CUSTOM.CSS and then modify the approrpriate properties, or add new ones.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by gurney on Tuesday, July 15, 2008 4:22 PM
Permalink | Comments (0) | Post RSSRSS comment feed