SharePoint Blog - René Hézser

Anmelden  RSS Feed RSS Feed
Startet die Suche

Archive

Kategorien

Links

Andere Blogs



Add to Technorati Favorites


Wiki Webpart 2.0  

Sep 282008

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 <img> or a <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:

 
Posted by René Hézser | 21  Comments | Trackback Url  | 0  Links to this post | Bookmark this post with:        
Tags: Webparts, Development, SharePoint, Upload Webparts
Technorati Tags: , , ,

Links to this post

Comments

commented on  Thursday, October 16, 2008  8:39 PM  by  WSS 3.0
Will this web part work with WSS 3.0, or does it require the full blown MOSS 2007? Thanks! Looks very good.

Tom Winter

commented on  Sunday, October 19, 2008  3:22 PM  by  re: WSS 3.0
Hi Tom,
WSS V3 would be enough :-)

René

commented on  Tuesday, November 11, 2008  5:23 PM  by  Error message
I have the webpart installed and activated but when I attempted to upload an image I received the following error:

Error (_button_ServerClick): System.IO.FileNotFoundException: Could not load file or assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. File name: 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' at RH.WikiWebpart.InsertLinkIntoWiki(SPWeb web, String filename, FileType fileType) at RH.WikiWebpart._button_ServerClick(Object sender, EventArgs e)

Any suggestions? Thanks for developing this much-needed enhancement and thanks in advance for your help.

commented on  Friday, November 14, 2008  7:22 PM  by  Can not activate?
Hi, Thanks for the solution.

I have ran "stsadm -o addsolution -filename WikiWebpart.wsp" and everything seems ok, said it has completed. But I am having a hard time finding where to enable this feature?

Can you point me to this. thanks!

commented on  Friday, November 14, 2008  9:21 PM  by  AW: Wiki Webpart 2.0
Getting the following error when trying to activate.
Any help would be greatly apprecited! thanks!!!

Required Features

One or more features must be turned on before this feature can be activated.

RH.Wiki Picture/Document Upload Webpart
With this Webpart you can upload pictures/documents directly to your Wiki




commented on  Sunday, November 16, 2008  10:12 AM  by  re: Error message
Please install the .NET Framework 3.5 (SP1)

commented on  Sunday, November 16, 2008  10:33 AM  by  re: Can not activate
Please see this post:
http://www.hezser.de/blog/Lists/Beitraege/Post.aspx?ID=118

René

commented on  Sunday, November 16, 2008  10:35 AM  by  re: AW: Wiki Webpart 2.0
Please read this post:
http://www.hezser.de/blog/Lists/Beitraege/Post.aspx?ID=118

René

commented on  Monday, November 17, 2008  5:33 PM  by  Wiki Webpart 2.0
René thanks for the response, i have read that article and i was just wondering what are the required "Activations" to get your webpart to activate?

I am still getting the "One or more features must be turned on before this feature can be activated. " when i try to activate it on the website level. There is no where i can activate it on the farm level.

Thanks for your help!

commented on  Monday, November 17, 2008  5:33 PM  by  Wiki Webpart 2.0
René thanks for the response, i have read that article and i was just wondering what are the required "Activations" to get your webpart to activate?

I am still getting the "One or more features must be turned on before this feature can be activated. " when i try to activate it on the website level. There is no where i can activate it on the farm level.

Thanks for your help!

commented on  Tuesday, November 18, 2008  7:19 PM  by  Use of this webpart.
René good effort on this wiki webpart!

One question, I am just testing this webpart and it seems to only add this webpart in "Edit" mode and not "Create". What is the point in the two step process? Why would someone add a doc and edit it inorder to upload image/doc?

As well after uploading it, how does someone reference it in the document? Imean we are just uploading pictures with no reference to them. It would be more useful if this webpart actually associated the uploaded images in the document being created or edit.

commented on  Friday, March 27, 2009  8:45 AM  by  robert
Hi René!
Great Webpart!
Is there a way to insert images in Custom Lists (e.g. in a rich-text-column)?
thanks,
robert

commented on  Saturday, March 28, 2009  11:22 AM  by  René Hézser
Hi Robert,
please take a look at my last "Update". There is a link to my custom field type. Maybe it can help you.

René

commented on  Friday, June 19, 2009  3:02 PM  by  Maxime
Thanks for sharing source code ! It allowed me to port your webpart to .Net framework 2.0. It's a great webpart empowering the wiki library.

commented on  Wednesday, June 24, 2009  9:21 AM  by  René Hézser
Hi Maxime,
instead of this webpart, you could use my custom field type. It is more flexible.

René

commented on  Thursday, July 02, 2009  3:46 PM  by  Maxime
Right, that's in fact what I did to allow upload in discussion lists too ;)

Porting them to .NET 2.0 wasn't too hard :p

Anyway, thank you very much, your work is very appreciated.

commented on  Thursday, August 06, 2009  2:17 PM  by  Stephan
Hello,

just tested the webpart, installation and activation succeeded. Now I have a question:
The section in you explanation

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

does not fit my view, there is no new entry like mentioned above... What went wrong? What can I do about it?

Kind regards
Stephan

commented on  Friday, August 14, 2009  10:05 PM  by  René Hézser
Hi Stephan,
"Update:

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

If you want to continue using the Webpart, make sure you activated both features!

René

commented on  Thursday, December 10, 2009  2:43 AM  by  Kez
Can I change what image library the uploader saves the files to

commented on  Saturday, February 06, 2010  6:37 PM  by  René Hézser
Hi Kez,
you can change the library in the Webpart properties.

René

commented on  Tuesday, April 13, 2010  5:22 PM  by  Patrick
I had same problems with activation with this webpart but then I tried the Custom Files and Images Upload Field solution and this works great.
Tnx René!!!

Name *:
URL:
Email:
Kommentar:


CAPTCHA Image Validation