Windows Live Alerts web tracker BlogRankers.com Software
Computers blogs
Chat with me if I'm online!
Search Zimmergren.net
Goodies

SharePoint Forum and SharePoint Forum Web Part

A lot of people have been bugging me about the Discussion Forum WebPart I've created for SharePoint (WSS 3.0 and MOSS 2007 alike, of course). Therefore, I decided to give you some update as to what's going on.

First of all...

The main reason for me being a little more passive with the blog the last couple of (1-3) months is due to the fact that I've had a hell-of-a-lot to do, both professionally and personally.

Sneak peak of the Web Part

Following here, are some screenshots of the current layout of the Forum Web Part which people have been longing for.

Note (nice-to-have): The Web Part is 100% compatible with any theme you choose. If you alter or change the current theme, the Web Part will play along nicely with those changes - as seen in the last screenshot!

ScreenShot005

ScreenShot006

ScreenShot007

Note: The following screenshot is using the built-in "Petal" theme, with no further modifications to the Web part
ScreenShot008

Features of the Web Part

Everything is based on generic SharePoint lists! No databases needed!
Also, the authentication for the forum relies on the authentication-method you're using for your SharePoint installation. Hence you don't need any additional configuration of the Forum Web Part. Just add it to your site and you're done.

  • Forum, Thread and Post sections
    • Any number of forums can be created
    • Each forum can contain any number of threads
    • Each thread can contain any number of posts
  • Optimized for performance
    • Since a few upgrades in the underlying code, the Web Part now spins like a cat and have been tested for up to 120 000 posts in 10 forums and a huge amount of threads - no problem!
  • Breadcrumbs
    • [Home] - [Forum] - [Thread] - [Post]
    • Exist in the header and the footer
  • Stastistics
    • The footer on each page contains stats on the forums including
      • Total number of posts
      • Total number of threads
      • Total number of forums
      • Latest activity
        • Author
        • Date and Time
        • Thread (title with link)
  • Forum Management
    • Create, Edit and Manage existing forums, threads and posts as Administrator
    • Management-permissions can of course be given to anyone, using your default SharePoint Groups
  • Theming
    • The Web Part supports all built-in themes
    • The Web Part supports most custom-built themes, as long as you're using the default css-classes

SharePointForum.com

Part from being busy with all the aforementioned goodies, we're currently starting up www.sharepointforum.com - which will be the first site to really test the Forum WebPart beauty out before it's thrown into the hands of the people.

SharePointForum.com is an initiative taken by one of my fellow Swedish SharePointians, Daniel Bugday. I joined up with him and together we're bringing SharePointForum up front to be the new Swedish SharePoint User Group - with over 200 registered members already!

During the week to come (this week, and perhaps also the next week) is all about setting up the new hardware we've got for the servers. Once that's done, we're opening the doors to all your people who've already registered - and ofcourse to any number of new members.

Do I need to be a Swede?

Of course you do not need to be a Swede to join our User Group. We've opened the door for everyone, and everyone is invited. In fact, by reading this - consider yourself invited!

Sounds Awesome with a combined SharePoint Forum and User Group - Where do I sign up?

Hold your horsed a week or two, once the new server is up we'll be using a whole new and improved authentication system with a much easier way to manage members - as well as a much more intuitive interface for logging in etc. for you guys!

When we launch for real, I'll be sure to update you :-)

Thanks for tuning in, and as always - any questions per email will be answered, but I prefer you keep them to the comments here :-)

See you around


Published: Aug-12-08 | 24 Comments | 0 Links to this post

Screencasting software

For those of you who're interested in recording some screencasts and video tutorials, I just ran across this blog: http://mashable.com/2008/02/21/screencasting-video-tutorials/

I wanted to post this as a bookmark to myself, and as a peak to those of you who's interested.

Some of them are free, some are commercial.


Published: Jul-30-08 | 1 Comment | 0 Links to this post

U2U CAML Query Builder - New version out

I just read Karine Bosch's blog where she posted some news on the U2U CAML Query Builder, so I just ought to get your attention in that direction.

Check the detailed updates out in Karine's blog:
http://www.u2u.info/Blogs/karine/Lists/Posts/Post.aspx?List=d35935e0%2D8c0e%2D4176%2Da7e8%2D2ee90b3c8e5a&ID=30

Cheers


Published: Jul-26-08 | 35 Comments | 0 Links to this post

What browser do you use?

I was reviewing the logs from the stat-counters on my blog and to my surprise I found out that almost 20% of all the readers are using Internet Explorer 4.01. - In my opinion that product doesn't even exist anymore ;)

Simple stats from my counters, converted to percentage:

Internet Explorer < 4.01 - 0.5%
Internet Explorer 4.01 - 20%
Internet Explorer 5.0 - 2%
Internet Explorer 5.5 - 1%
Internet Explorer 6.0 - 12%
Internet Explorer 7.0 - 13%
Internet Explorer 8.0 - 5%

Firefox 0.* - 0.5%
Firefox 1.* - 1%
Firefox 2.* - 4%
Firefox 3.* - 1%

Other - n%

It would be fun to know what browser you people mainly use, and why.

So my very simple question is: What browser do you use?

My own answer:

I use Internet Explorer 7 as a day-to-day browser, mainly because it rocks!
I use Internet Explorer 8 as a test- and development browser to see if my designs and products will work
I use Firefox 3.0 as a test- and development browser to see if my designs and products will work

Please comment :)

Published: Jul-21-08 | 24 Comments | 0 Links to this post

Infrastructure updates for MOSS 2007 and WSS 3.0

As some of you might already know, Microsoft released their infrastructure updates to MOSS and WSS yesterday (2008-07-15).

Instead of yabbing along here about the actual updates, I'm simply going to provide you with links to the downloads and documents, so you can read it yourself.

Sidenote: Just installed the update for WSS 3.0 on my blog, running WSS 3.0 SP1 - and so far so good.

32-bit downloads

Download 32-bit: Infrastructure Update for Windows SharePoint Services 3.0 (KB951695)
Download 32-bit: Infrastructure Update for Microsoft Office Servers (KB951297)

64-bit downloads

Download 64-bit: Infrastructure Update for Windows SharePoint Services 3.0 (KB951695)
Download 64-bit: Infrastructure Update for Microsoft Office Servers (KB951297)

Information about the updates

Documentation: Infrastructure Update for Windows SharePoint Services 3.0
Documentation: Infrastructure Update for Microsoft Office Servers

Get going :)


Published: Jul-16-08 | 3 Comments | 0 Links to this post

SharePoint's hidden user-list - User Information List

Okay, this might not come as news to most SharePoint developers who've been around a while, but lately I've been messing with the User Information List in SharePoint and it doesn't seem that many people know that it exists.

Note: This list is only visible to and accessible by administrators.

User Information List - Background

The User Information List stores information about a user by having some metadata set up for the user. Some examples are Picture, Email, DisplayName, LoginName etc. ) For a complete list of fields, see further down this blogpost under "User Information List Fields".

Something to note is that when a user is granted access to a site, a new item will be created in the User Information List storing some information about the user.

When a user add/create or edit an item, SharePoint will display something like "Last modified at 1/1/2008 by Tobias Zimmergren" like the following pic:

image

In this example the DisplayName (used to display System Account) is gathered from the User Information List

Browsing the User Information List

The User Information List can be accessed (Only if you're admin) via the browser by navigating to /_catalogs/users/simple.aspx from your site. (Ex: http://zimmergren/_catalogs/users/simple.aspx)

This works for both Windows SharePoint Services 3.0 (WSS 3.0) and Microsoft Office SharePoint Server 2007 (MOSS 2007) and looks like this when you access it through the browser:

image

Write code to interact with the User Information List

If you want to interact with this list to set properties on a user (Probably only want to do this if you're running WSS) you could do it like this:

// Instantiates the User Information List
SPList userInformationList = SPContext.Current.Web.SiteUserInfoList;

// Get the current user
SPUser user = SPContext.Current.Web.EnsureUser(@"ZIMMER\TobiasZimmergren");

// The actual User Information is within this SPListItem
SPListItem userItem = userInformationList.Items.GetItemById(user.ID);

The above code will give you the SPListItem object which links to the currently logged in user (the one executing the request).

You can then work with the SPListItem object like normal to get or set the properties like this:

string pictureURL = userItem["Picture"].ToString();

User Information List Fields

Instead of writing out all the fields/columns availible, you can simply create a new Console Application and insert the following code in order to output all the fields names and internalnames:

image
Note: You will ofcourse have to change the URL and User LoginName
Note2: No comments needed about not disposing the objects as this was merely a sample, eh? ;)

You're welcome

Hope this will enlighten some of you people in your quest for the holy grail (SharePoint All-Mighty Knowledge?)

Work is calling me, so I'll have to end this small post right here and right now, catch you soon again.


Published: Jun-25-08 | 18 Comments | 0 Links to this post

Back on track

I've been getting tons and tons of mail from people regarding the blog, Forum Webpart and my vacation during the last 3 weeks.

There has been quite a few things happening the last couple of weeks. Not only the awesome vacation I had in Egypt, but also moving into my new apartement.

Egypt

Hats off to Egypt, and to the people who recommended me to go there. It's an interesting place to visit, and there's plenty of souvenirs to buy if you're that kind of person (Like me). Part from just purchasing souvenirs the Red Sea is probably one of the best places in the world to dive and snorkel in. We went snorkling in the Red Sea and holy cow, it's awesome. Incredible-looking fishes swimming right next to you, almost checking you out as you dive around. It was like swimming straight into the Discovery Channel or a giant aquarium if you like.

New apartement

The other thing that has obsorbed most of my sparetime (blogtime, sharepoint-coder-time etc) is my new apartement which I moved into this weekend. If you've got your ways through Malmö (Down south in Sweden), you're welcome to pay me a visit for some never-ending SharePoint nerd talk and a beer or two.

SharePoint Forum WebPart

People have been bugging me lately about the SharePoint Forum WebPart, and getting a working version out there. As mentioned before, other things did get my focus the last couple of weeks - but now I'm back and I need your suggestions, which I'll leave the next blogpost for!

Thanks for tuning in, and please re-send any emails I might have accidentally sorted out during the crazy hours of mail-sorting the last couple of days ;)


Published: Jun-10-08 | 3 Comments | 0 Links to this post

SharePoint Virtual Images from Microsoft

WSS 3.0 SP1 Virtual Disk

Tonight at 08:23 Microsoft released the Windows SharePoint Services 3.0 SP1 virtual disk with Visual Studio pre-installed.

You can find the Windows SharePoint Services 3.0 SP1 here

MOSS 2007 Virtual Disk

Most of you probably already know that there's an image out for Microsoft Office SharePoint Server 2007 to use with Virtual PC or Virtual Server 2005, but if you didn't know:

You can find the Office SharePoint Server 2007 VHD here.

 

Sidenote: Yes, I'm still going to Egypt - Just had to pitch in the update about WSS 3.0 SP1 virtual harddrive since a lot of people attending my SharePoint Development classes asks about just that! :)

Edit: URL's were interchanged, updated. Thanks Paresh.


Published: May-17-08 | 6 Comments | 0 Links to this post

Forum WebPart, Egypt and new litterature

Hi people. As many of you guys already know I'm off to Egypt for a well deserved vacation for 2 weeks now. I'll be back on track June 4th with lots of new material to blog about.

Here's a quick status of all things going on:

SharePoint Forum WebPart

The SharePoint Forum WebPart that I'm currently developing is shaping up, but there's still things that needs to be take care of before I can throw it into the wild. I was hoping to get it out as a beta already, but more prioritized things came up and I had to postpone it a few days.

I promise to get it up and running as soon as I'm back from the pyramids!

Inside the Index and Search Engines: Microsoft Office SharePoint Server 2007

I purchased MVP Patrick Tisseghem and Lars Fastrup's latest book, Inside the Index and Search Engines which will cover a lot of the ground when it comes to enterprise search. I've started to read it a bit now, and it's quite well written with many good samples. This will be the only litterature I'm bringing on my vacation to Egypt on monday ;)

Egypt - I'm off for a 2 week vacation by the pyramids

On monday I'm going to Egypt and I'll stay there for 2 weeks on a well deserved vacation. As aforementioned, I'll take on the "inside the index and search engines"-book while down in Egypt during some "lazy hours" and will probably have some nice feedback regarding this book when I'm back.

See you around

See you around when I'm back, with even more material on different topics regarding SharePoint.

Keep up the good work people, and I'll just sip some Mojitos, Egyptian Whiskey and eat some good food for the next two weeks.


Published: May-16-08 | 89 Comments | 0 Links to this post

How To: Easily construct your CAML queries with CAML Query Builder

This post is a mere followup to my previous minor posts on the subject of SPQuery and SharePoint queries located here.

Basically this post will provide step-by-step instructions to construct your CAML (Collaborative Application Markup Language) queries using the U2U CALM Query Builder which you can find on the U2U Community Tools page.

Prerequisites

In order to be able to follow along with this step-by-step instructions you'll need the following:

  • U2U CAML Query Builder 2007 or later
  • A site containing a Task List with some items
    • Some items with Status set to Completed
    • Some items with Status set to something else than Completed
Let's get going!
  1. First of all, make sure you've got some items in your Task list:
    image

  2. Launch U2U CAML Query Builder

  3. Fill in the URL to your SharePoint site and choose weather you'd like to go in the Object Model-way or using SharePoint Web Services. I chose Connect via Object Model:
     image

  4. Select "Tasks" in the list that you'll be presented with, and the right-hand side of the application will automatically be filled with the fields availible for that list, which will be the basis for our query:
    image

    As you can see here, there's the option to:
    • Choose the field - the CAML Query Builder will automatically choose the InternalName
    • "Order By" - order the results being returned in any choose order
    • "Where" - Specify which results should be part of the returning resultset, this is the most vital tag if you ask me!
    • "Test Your CAML!"
      • "Editor": Enter any CAML here and hit the "Test" button in order to test the entered query directly against your List
      • "Parameters": Retrieves any parameters
      • "Result": The returning result of the query you test
        (tip: Always test your query before applying it to your code, no matter how simple it may be)

 

  1. Select the "Status" field
  2. Check "Where" and choose "Equal"  and choose the value "Completed" like this:
    image

  3. Hit the little arrow pointing to the right, and the query will be automatically created for you and you'll get the CAML in the bottom-window like this:
    image
    IMPORTANT: When you construct your query in SharePoint later on, REMOVE the <Query> tags. See this post on the subject.

  4. Now that you've created the CAML you want, hit the "Test" button to the right and make sure you get the desired result!
    image
    Note: You can check the column called Status and make sure that all rows returned states "Completed"

  5. Now we've got our CAML Query ready to be implemented in our SharePoint code. Since we didn't make anything complex or advanced it'll be quite easy to implement this query, as I will show you now.
Prepare a Console Application for SharePoint Development

I will for simplicity create a Console Application to retrieve the desired SPListItem objects based on our SharePoint CAML query

  1. Create a new Console Application

  2. Add a reference to Microsoft.SharePoint.dll (Windows SharePoint Services) in order to be able to access the SharePoint object model
    image

  3. Add the following standard using-directive (Microsoft.SharePoint) in order to be able to use the classes in the SharePoint namespace:
    image

  4. Now we're ready to roll - hang on to your camel
Implementing a normal list loop, without queries (not a good approach)

The following example is what it basically looks like at many implementations. A straight through loop that'll basically loop EVERY item in the list and check EVERY object if it's matching what we want - this is not a valid approach if you've got a couple of thousand (or even just a couple of hundred) items in the list. It'll take way too long.

 

image 

The output is correct, but the time to walk through each item may even cause a timeout if you've got many thousand items in the list.
image

Implementing SharePoint (CAML) Queries using the SPQuery object (very good approach)

This will demonstrate how you achieve exactly the same result as previously demonstraded, but with less resource-hogging and much quicker.

Direct advantages:

  • Ordering, you can specify exactly in what order, sorted on any column that you want your resultset to be.
  • Filter out unwanted items (using the Where-tag you can simply choose ONLY the items you want returned)
  • SharePoint will dig right into the list and pick out the correct objects much faster than the previous example

Take a look at the following code, which will implement our previously created query:
image 
IMPORTANT: As you can see in the code above, I didn't use the <Query> and </Query> tags provided by the U2U CAML Query Builder. If you do, your query will not work ;)

Conclusion

You may not acknowledge any performanceboost if you've got up to 100 items in your list, but when the list grows you'll notice a huge difference immediately.

I did a test on my Forum Web Part where I had about 2500 posts (items in a list) and retrieved them using the first approach mentioned here (simply looping all items and using if-statements on each of them) - it resulted in timeouts all the time. When the page loaded, it took more than a minute per request, which isn't appreciated by anyone ;)

When I made the comparsion with my SPQuery implementation to directly pick out the items I wanted, it resulted in a 1 second loadtime instead of more than a minute. This speaks a lot about how good queries are.

Yeah okay.. So what should I do now?

You should most definately refactor all your code to use Queries if you havn't already!

Most people already do use this approach, but since I keep seeing implementations that doesn't, I just thought I'd write this little piece up.

Hope someone can find it useful.


Published: May-05-08 | 292 Comments | 1 Link to this post
 Next >>