Wiki Webpart 2.0

The next generation Wiki Webpart is there! Sounds good J The (stupid) name remains, but the core has changed.

What is it?

With the Wiki Webpart you can upload images and documents from a Wiki edit page into existing picture/document libraries. After the file has been uploaded, a link will be inserted into the Wiki Content.

This is either a or a tag, depending on the uploaded file.

How does it work?

After uploading the image/file, it will be put into your Wiki Content via JavaScript. There is no reload of the Wiki page required any more.

Why can’t I upload files when I create a new Wiki Page?

Because MS decided to change the normal “NewForm” behaviour in Wiki libraries. Unlike in lists/document librariew a new item is created through “_layouts/CreateWebPage.aspx” and not the NewForm.aspx. And since this one is not unique for the Wiki library, I can not adjust it.

Requirements

.NET 3.5 (SP1) on all of your frontend servers 

Installation

The Wiki Webpart comes as a SharePoint solution (wsp file), which will be installed on your SharePoint farm via “stsadm -o addsolution -filename WikiWebpart.wsp”.

The solution contains two features.

One has to be activated on site collection level (it will allow you to use the Webpart).

The second feature has to be activated on each web, where you want to use the Wiki Webpart.

After the features have been activated, there is a new entry in the General Settings of a Wiki library.

Enabling the Webpart in the Wiki properties will add the Webpart to the EditForm of your Wiki library. Disabling it, will remove the Webpart. There is no need to add the Webpart with the console application anymore!

Upgrade from previous version:

If you already have an older version installed, the installation steps are similar.

  • stsadm -o upgradesolution -filename RH.WikiWebpart.wsp -name RH.WikiWebpart.wsp -immediate –allowgacdeployment

After upgrading the solution, you have to retract and redeploy it in the central administration. This step is necessary, because the features within the solution have changed!

Update 30. Nov 2008:
A small bugfix release.

Update:

Instead of this solution you can use my Custom Files and Images Upload Field.

If you want to use it, please make sure you disable this feature on the wiki, the web and on your sitecollection.

Download

For all the (security) guys who wanted the source code, you can get it now.

Download solution

Download source code

 

Tags: