While SharePoint 2007 does offer a blog-template, this is actually quite minimalistic. Even though you can usually add attachments to every list item in sharepoint, this is not possible for blog posts.
Well, actually, attachments are enabled for blog posts, and if you’re using an editor such as Windows Live Writer all images and files are being added as attachments to the current post. But this just isn’t possible if you’re stuck with the web-editor for writing new posts.
So I did some digging on what’s needed to get SharePoint to offer attachments for blog posts.
First of all you should be aware, that you’re going to modify some files dear and near to SharePoint – this might not always be the recommended way 🙂
OK, let’s get started. Since we already noticed that attachments are enabled on the list of posts, we somehow need to get this darn button in the toolbar to appear.
Since the blogging feature is built-in into SharePoint it’s view definition is found in the
DefaultTemplates.ascx within the
%CommonProgramFiles%\Microsoft Shared\Web Server Extensions\12\Template\ControlTemplates. Within this file are a whole lot of Rendering-Templates defined. Based on the existing
BlogForm Template I created my own Template called
Important are the two highligthed lines. The first line adds a link to display a dialog to upload an attachment, the orher line adds the actual code for the dialog and stuff.
OK, so now we habe our new layout in place, that allows us to add attachments to new posts. Next we need to alter our blog to make use of this new template definition.
So using SharePoint-Designer open up the blog and navigate got the posts list. Open up the
NewPost.aspx and find the webpart-element in the code view. There should be a line like
which you wand to edit to
This will use our new template-definition instead of the build-in template view.
This is basically all you need to do – well you also might want to edit the
EditPost.aspx to use a template which enables the upload of new attachments; but I leave that to you.
Oh – one final note: this enables uploading attachments to a blog-post, but the attachments are not automatically displayed for e.g. as a list of items in the end of the post. You will have to add the links to the attachments in your post manually!.
Today I had some really strange experiences while deploying some SharePoint application using a custom build WSP file.
First, I tried to re-deploy an existing solution, but that didn’t seem to succed. At least my SharePoint site replied with a “Service unavailable” notice. So I though, I should retract the solution – maybe someting in my updated solution broke my SharePoint site.
So doing a
stsadm –o retractsolution –name myapp.wsp –allcontenturls –immediate
also just failed on me. So next I was stuck. I couldn’t neither delete the solution nor retry to retract the solution because everytime I got the message, that another job is currently retracting this solution. This is why I couldn’t do anything at the moment. But what now? It didn’t seem like the was any other job running.
So I gathered a list of all running deployments using
stsadm –o enumdeployments
stsadm –o canceldeployment –id
to actually cancel the running deployment. After that I could issue
stsadm –o deletesolution –name myapp.wsp –force
This actually remove the solution – but I had to find, that this wasn’t the cause for my “service unavailable”. So all this for nothing!
The strange thing about that is, that only one out of a dozen websites was not working. Then it strike me – looking at the IIS admin I found, that the app-pool associated with this SharePoint site was stopped – restarting the app-pool solved my “service unavailable” immediately.
Top ten facts about Chuck Norris and SharePoint 2010:
- Chuck Norris never starts an Approval workflow in SharePoint. Chuck doesn’t need approval.
- Chuck Norris isn’t afraid to customize, one look and SharePoint runs at peak performance.
- Putting Chuck Norris in the SharePoint Visitors group is futile. Chuck always has Full Control.
- Chuck Norris doesn’t have a SharePoint Disaster Recovery Plan. He doesn’t recover data, only hostages.
- Chuck does not subscribe to Alerts. He knows what is happening before it happens.
- Chuck Norris IS the Governance Plan.
- In SharePoint 2010, the Farm Administrators group is being renamed to ‘Chuck’s Group’.
- Chuck Norris never get’s unexpected errors with SharePoint because he is always ready for everything.
- Chuck Norris doesn’t prepare for SharePoint 2010. SharePoint 2010 prepares for him.
- SharePoint 2010 was a Chuck Norris idea.