Archive

Archive for the ‘Sharepoint’ Category

My SPQuery doesn’t work

October 23rd, 2008 3 comments

I had my first tortuous experience with SPQuery today and found out a few things.  Now this isn’t a full explanation of SPQuery, I suggest Ted’s book for that. But there is the answer to a couple of gotcha’ s that can truip you up

Read more…

Categories: development, Sharepoint Tags:

Sharepoint – WSS 3 / Moss

July 15th, 2008 No comments

Having recently attended a developer course in Wss3 development I intend to update many of the old 2003 web parts and techniques I had previously developed.  However I have a backlog of stuff to clear at work and no environment to build them on as yet.  When I get time and VPC sorted I will get round to it.

So anyone interested in sharepoint might want to subscribe to the sharepoint category of this blog (or not), rather than read the trite and silverlight and sap and other stuff.

Categories: Sharepoint Tags:

Sharepoint / Silverlight Parts RC1 Update

August 6th, 2007 1 comment

As the RC1 has been released I had five minutes spare to ensure they worked in RC1. 

Here are the links

PhotoViewer. : The stand alone version of the WebPart project I do the testing and enhancements on first, its easier to see when I have messed it up here.

**Update** Moved to codeplex.

Currently in a laughable state of development, try it you will see.

Silverlight Photo Viewer WebPart : The Sharepoint Portal version of Photo Viewer.  Coded as an Installable WebPart.  This means that if installed on a portal level then any user on any portal are can jsut drop this on and it displays from the default Image Library list.  This needs some work to make it work “MySite” cos it explodes at the moment, also I need to try it on Sub Sites of MySite and WSS Sites.  This should work on Sharepoint 2003 and MOSS 2007 as all 2003 webparts should (mostly).

Silverlight WebPart Template : A Really Simple Webpart project that implements a button that says click me.  It has mouseover anims and fullscreen and thats it.  What’s special about this is that the webpart is coded to allow multiple instances of this part on the same page.  The photo viewer code is based on this.    This should work on Sharepoint 2003 and MOSS 2007 as all 2003 webparts should (mostly).

Would really like to hear if you implement this and what you think and what improvements could be made.  I know of a few but I’m interested in your opinions and there should be a lot considering how many downloads there have been lately.

Technorati tags: , ,
Categories: Sharepoint, Silverlight Tags:

Updated WebPart

June 6th, 2007 No comments

I had chance to make the xaml nicer last night so I updated the original article and the source code.  I also included a CAB file for those who can’t build the source code.  Again see original for source and cab links.

Technorati tags: , ,

Categories: development, Sharepoint Tags:

Sharepoint Silverlight Image Library Viewer Part

June 5th, 2007 12 comments

Well that’s a long title but I think you get the idea of what this post is about.

Building on top of my web part template I thought I ought to do something useful that I could share. So Combining the ability to peruse lists from a webpart and mangling this into Silverlight I made a webpart Image Library viewer.

Now this is pretty rough and ready the xaml is from the VB school of design, “Grey Blue and Boxy”, but get a designer on the case and your away.  It contains elements of a jscript Control.  The photos at the bottom scroll left and right and are added dynamically.  This is a good use of the CreateFromXaml but using the “true” option for the namespace scope, which is better than find and replace of the video library example.  It does full screen by clicking the little grey blue square (see what I mean about design) which is taken from the video library sample and doesn’t scale to exactly 4:3, again I don’t have time to investigate, it involves pencils and math’s and I’m a bit busy.

The webpart itself looks specifically for a list called “Image Library” one of the default lists created by portal sites.  This can be changed so that you could have a toolpart selection.  It relies on the list being an Image Library list.  If the list is not there it blows up I haven’t spent long on this making it bomb proof.

If there are no pictures in the image library it resorts to displaying text in the webpart that the list is empty, not some custom display in the Silverlight part.

Read more…

Categories: development, Sharepoint, Silverlight Tags:

SPSite.LastContentModifiedDate

November 24th, 2006 2 comments

This can’t be right, it’s insane.  What’s insane ? Well it appears that the LastContentModifiedDate gets updated when the Site Usage is re-calculated.  So my Last Modified webpart is made pretty much useless by having the SiteUsage data enabled.

That blows. Hope its just coincidence.

 

Technorati tags: , ,
Categories: development, Sharepoint Tags:

That Todd Bleeker

November 23rd, 2006 No comments

menupart.jpg 

Whilst poking about on sharepoint sites I was looking at Todd’s site again, and stumbled across another of his CEWP again, this one was for a menu part, its great , as they always are leveraging the power of sharepoints built-in functionality but what I never knew before was just how easy it was to generate sharepoint menus.

This is the html for two menu items and its opening link

<menu id=”myLinks” class=”ms-SrvMenuUI”>

<ie:menuitem

iiconSrc=”http://www.highdots.com/website-ranking-checker/images/search_engines/google.gif”

onMenuClick=”window.location.href=’http://google.com’;”

>Google</ie:menuitem>

<ie:menuitem

iiconSrc=”http://www.highdots.com/website-ranking-checker/images/search_engines/msn.gif”

onMenuClick=”window.location.href=’http://msn.com’;”

>MSN</ie:menuitem>

</menu>

<div class=”ms-HoverCellInActive”

onmouseover=”this.className=’ms-HoverCellActive’”

onmouseout=”this.className=’ms-HoverCellInActive’”>

<a id=”menuLink”

style=”CURSOR: hand”

onclick=”JavaScript: if(!myLinks.isOpen())

myLinks.show(this, true, 0, 0, 0);”

tabindex=”0″>

Search Engines

</a>

</div>

 Taken from http://mindsharpblogs.com/todd/archive/2006/08/15/1242.aspx

Now because I spend my time writing dynamic webparts (ie not fixed content) I can name the menu based on the webparts clientId and have these littered all over a page.

Must think up some use for it now.

Technorati tags: , ,

Categories: development, Sharepoint Tags:

Ajax and Sharepoint 2

November 17th, 2006 2 comments

Subtitle:Don’t you think the way lists display suck ?

Well I do, no in the web parts themselves, but in the inevitable postback to a crappy looking list item page.

In the previous post you could see the web part I was working on, well its just a demo piece and needs a lot of work, but I figure why should I do all that work I’ll let you do some.  Actually I may not have time to finish this one so I thought I’d put out what I had done.

The web part allows you to select a list that is currently available on this current site. You have to enter the Main field name in the Text box below and its away.  This part will rip through the list contents and spit them out with a link in the web part.  When you click that link the Ajax stuff fetches the list data item and displays it in the box, fast.

Now there is a lot to do here, things like provide html editing for the list display both list and popup designs.  Use the ID instead of the “Title” field (duplicates won’t work in this version)

Also figure out the field type and display appropriately being the main one.

Lots left to do but you can do it.

When you create this you MUST GAC IT.  It was developed with Sharepoint security at FULL, figure it out for yourself if you want a better config.

The web.config needs the HTTP Handler adding (you own key remember)

<httpHandlers>
<add verb=”GET” path=”DynamicCustomListPart.ashx” type=”DynamicCustomListPart.DynamicCustomListWebPart, DynamicCustomListPart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=*************” />
</httpHandlers>

Source Code

*NB.  This is a demo and not production software, use at own risk.

 

Technorati tags: , , ,
Categories: development, Sharepoint Tags:

Sharepoint and Custom HttpHandlers

October 12th, 2006 No comments

If you are daft enough to remove your HttpHandler from the GAC don’t be surprised if sharepoint goes bang.

I did just that and hit Site Settings and got a plain file not found message, not very helpful.

I narrowed it down to the last scarey thing I did which was HttpHandlers, deleted the entries and all was working I then figured I removed it from the GAC and sps bin folder so Sharepoint was not finding the dll.  Pretty poor message though.

Categories: development, Sharepoint Tags:

WebParts and Ajax

October 5th, 2006 No comments

I have been playing about with ajax recently,  actually I’ve been doing ajax and dynamic web applications since IE4 was released, I was lucky enough to spend 9 months programming a client side dynamic application back then using RDS MTS and dhtml classes, its just this .NET postback model dragged me away from it.  But anyway I’ve been playnig with it again.

What I wanted to do was use ajax in a webpart however its the same old story, having to have a seperate web site to host the data side of the relationship then configure sharepoint to allow that site as an exclusion url…….

Well no need I can do it with HttpHandlers in the same web part that is making the request, this should overcome the security issue of cross website posting, instead of having to resort to Dynanic Script calling using JSON (see links below)

http://tagneto.org/how/reference/js/DynamicScriptRequest.html

http://ajaxpatterns.org/On-Demand_Javascript

Now I haven’t tried it yet, bit busy at the minute, but I have no reason to believe it won’t work, after all the images thing did and this is very similar.

*Update* : It worked just fine, however I used Json output instead of trying to parse XML the end product seemed faster.  Also I still used the dynamic calling method, so this is not a full test of security bypassing but it keeps all code together, except for the remote data web service, as the json object is a web service proxy also.
Again you need to check that sharepoint is not being overloaded by your webpart being a httphandler

*Update Again* : I have more posts on this site and some working source code.  See
Ajax and Sharepoint
Ajax and Sharepoint 2
Yet another Ajax Sharepoint Part

tags: , , ,

Categories: development, Sharepoint Tags: