iPhone Detected, site running in minimal mode.
Home     Tags/Archives     Tweets     About Kevin

SPSIndy LogoWow, what a great day we had on Saturday at the first ever SharePoint Saturday Indianapolis event.  I was fortunate to be on the organizing committee for this event along with Rob Bogue, John Ferringer, Kory Geyer, David Reed, Krista Sellery, and Mike Mitchell.
 
We also had a great group of volunteers that really helped with all the logistics of the day including: Andy Bradley, Tuong Do, Keith Oswalt, Karyn Williams, John Boomershine, and Mike Ticker.  The folks at our facility, the Gene Glick Junior Achievement Center, were also great all day long!
 
I also heard from all the sponsors that they really felt appreciated by both the organizers and the attendees and were looking forward to future opportunities to be involved in similar community events in Indianapolis!  Support these folks because without them “free” events just can’t happen!
 
For my part, in addition to having a speaking slot (more on that below), I was put in charge of speaker management and service.  This was certainly the most rewarding part of the entire experience for me as I got to meet and interact with a lot of great folks from the SharePoint community, both local and from other regions.  In addition to the event on Saturday, we all had a great time out at Scotty’s Brewhouse for the speaker dinner on Friday night.  I have a few pictures from that here.

All the speakers did an outstanding job, both inside the walls of their sessions, as well as outside in the hallways.  I saw numerous side conversations going on as our expert community played good-will ambassadors to all.  Please join me in thanking all the speakers including: Andy Hoffman, Chris Geier, Daniel Galant, Darrin Bishop, David Petersen, Enrique Lima, Fabian Williams, Hope Foley, James Curtis, Jeff Willinger, Jennifer Martinez, Jennifer Mason, Jim Grabinski, Joe Mack, John Ferringer, Kevin Dostalek, Marcy Kellar, Ram Gopinathan, Rob Wilson, Sean McDonough, Steve Pietrek, and Woody Windischman.  If you want to follow all these fine SharePoint experts easily on Twitter, I’ve created a Twitter list that you can follow here.

A few statistics that we have about the event:

  • Registrations – 372
  • Attendees - 250
  • Sponsors – 10
  • Speakers – 22
  • Sessions – 20 (in 4 tracks of 5 each, then we also had a welcome and closing session)

My Session:
So I presented “Social Computing with SharePoint 2010”.  Unlike my nSpin presentation from a few weeks ago which was developer focused, this presentation was in the “Business and End User Track” and so was a bit less technical.  I had a pretty experienced SharePoint audience, however not very experienced when it came to “social” especially inside the enterprise.  I love this topic because it virtually presents itself and demo’s very well.  To add a little bit of fun to the demos I mocked up the Dunder Mifflin corporate organization, complete with about 30 of “The Office” profiles as employees (all under the Fair Use Copyright exemption for Educational use only of course :)  This was pretty well appreciated by the audience, but it also made putting in all those status updates, social tags, and comments much more self-entertaining as well [that’s what she said].

Dunder Mifflin Org. Browser Screencap

Presentation ThumbnailThank you to everyone that attended the session.  For those that missed it, I’m doing a slightly altered version of it along with a customer on February 16th at the Microsoft offices.  Go here for more information.  If you’d like a copy of my slides, you can download them by clicking on the thumbnail on the right- although about 50% of the presentation was demo.

Do you have a favorite memory from SPSIndy or any other feedback for the organizing committee?  If so, please post it below!


Here is the mindmap and code samples from the presentation I gave last night at nSpin entitled "Overview of the SP2010 Social Platform for Developers".  NOTE: This is NOT the presentation I'm giving at SPSINDY.  To view/download the whole mindmap just click on the thumb below:
Mindmap Thumb
As for the codesamples, here are a couple notes:
  • General
    • These are all VS2010 projects
    • You will need to change some of the hardcoded SPSite URLS to yours- anywhere you see http://sp2010
    • The first and third projects must be run on a SharePoint 2010 server.  As such, you need to insure that your project's framework targets are .Net 3.5 and the CPU targets are either x64 or AnyCPU -- do not try to use x86 for these.  The second project doesn't matter.  If you load the solution file, these will all be set properly.
  • The first project is a visual webpart (AreaSpecialist) that accesses the user profile manager to pull down out a profile image, and allows the user to "give them Kudos" as it tracks their peer rating.
    • You'll need to change the deploy location in the project settings.
    • Remember to create the custom property in the user profile service application called "KudosRating" of type integer.
    • This version of the code has the elevated privilege implemented.
  • The second project is a windows form application (SocialBrowser) that allows a user to browse around your portal or the internet and it automatically adds any comments that have been made by folks within your organization to the datagrid at the bottom by accessing the SocialData webservice.
    • You will need to change the URL for the social data webservice reference, and then choose "update webservice".
  • The third project is a command line application that is a custom gatherer that imports and publishes twitter feeds to the SharePoint activity feed.
    • Don't forget to create the custom profile property "TwitterAccount" and fill in a couple in your user's profiles.
    • You need to run the "RegisterTwitterActivityApplication" at least once successfully (it's presently commented out in Program.Main).
    • After you register the twitter application, doublecheck that "Twitter" is available as an ActivityType at the bottom of your "Edit Profile" screen (and check the box if it isn't already).
    • Remember to deploy the RESX files to \14\Resources
    • Remember to deploy the twitter image (if you want to use it) to \14\Templates\Images
    • This code was cobbled together from the official custom gatherer sample as well as this blog post and this one.

To download all the sample code projects click the image below:

Codesample Download Thumb

All content posted here is free for anyone else to (re)use so long as you attribute it.  If I get at least 10 requests in the replies to this blog post, I will record a camtasia screencast and post it for everyone that couldn't attend last night.


Hey everyone!
 
I just wanted to drop a note to all about two speaking engagements I've got lined up here in the month of January.  I hope if any of the topics below are of interest that you'll be able to come and check them out.
 
The first is a SharePoint 2010 Development topic for the nSpin group that is coming up THIS THURSDAY.
 

nSpin Logo

Event
nSpin SIG meeting following the Indy .Net UG meetin
Date/Time
1/14/10, 7:30ish (.NET UG starts at 6)
Title
Overview of the SharePoint 2010 Social Platform for Developers
Level
200-300ish
Audience SharePoint Developers
Link
Description
In this session we're going to run through a brief overview of the new social features in SP2010 just to provide a bit of context and then immediately dive into a talk about how you can leverage these features as a social computing platform as you build out custom socially aware applications within the enterprise.  Specifically we're going to look at the User Profile Service, the Social Data Service, and Activity Feeds.
 
 
The second is a more general overview of all the new social features in SP2010 being delivered at the SharePoint Saturday event on January 30th.  This will be a great event-- we have 21 speakers lined up in 4 tracks.  As of last week, there were already 175+ attendees signed up!  We absolutely will run out of space, so if you are interested in this event, then you need to go and register immediately!  Here's the details around my session:
 

SPSIndy Logo

Event
SharePoint Saturday Indianapolis
Date/Time
1/30/10, ~11:00 (slot 2), event starts at 8:00
Title
Social Computing with SharePoint 2010
Level
200
Audience General
Link
Description
In this session we'll explore the many social computing features in the new platform including improvements to MySites (MyProfile and MyNetwork), Search, Blogs, and Wiki's as well as looking at new features such as Social Tagging, Comments, Ratings, and the Activity Feed.  In addition to the feature tour, we'll also discuss the business case for social computing within the enterprise and key considerations as you formulate your plans.
 
Hope to see lots of folks at these events and their related after-hours activities.  If you make it to any of them, be sure to stop by and say hi!


I recently did a presentation at the Indianapolis SharePoint Developers group, nSpin (a SIG of the IndyNDA) on how to use the Community Kit for SharePoint Extended Blog Edition (CKS:EBE) to customize your blog running on top of SharePoint.
 
Due to other environmental factors outside of our control, we ended up having to compress the 85 minute presentation into 30 minutes.  There were also quite a few people that couldn't make it and were asking me for slides.  Well, I'm not really a slide kind of guy-- this particular presentation was about 33% Animated MindMap and 66% demos.  So anyway, I decided to record it over the weekend as a screencast for everyone!
 
Hope you enjoy it, it is split into two parts below (sorry Viddler had trouble encoding it as a single file).  Please let me know if I got anything wrong- I'm always looking to improve.  If anyone out there is wanting a live version of this presentation (speaking engagement) or any others for that matter, now or in the future, please keep me in mind and drop me a line.
 

PART 1
Customizing CKS:EBE Part 1 Video

PART 2
Customizing CKS:EBE Part 2 Video


I’ve seen a few questions out on Twitter in the past few weeks on how to change SharePoint page behavior based on querystrings passed in an URL.  While the context for this question leads to many possible alternatives (filter web parts, custom web part, xslt, js, etc…)  I found that the advice I was giving in most cases was “if you just need something quick (and dirty), then just inject some javascript.  It seems though that arn’t many easily findable tutorials around for how to do this, so I decided to write this article.  Please note that this is NOT the best way to accomplish every possible problem scenario taking into account security, maintainability, performance, etc…  It does however work which makes it a viable tool to add to your bag of tricks in my book.  Also, I’m going to present the code samples here using straight javascript, but you could certainly streamline some of the code by using other frameworks like jQuery.

So to begin, the first thing we need is some javascript that can read the querystring and parse it into a JS array for us to use later.  There are a ton of these snippits all around the web, here’s the one I use:

function getQueryStringArray() {
    var qs = location.search.substring(1, location.search.length);
    var args = qs.split("&");
    var vals = new Object();
    for (var i=0; i < args.length; i++) {
        var nameVal = args[i].split("=");
        var temp = unescape(nameVal[1]).split('+');
        nameVal[1] = temp.join(' ');
        vals[nameVal[0]] = nameVal[1];
    }
    return vals;
}

Ok, so now we need a function to “find” the control we’re after on the page so that we can do stuff to it (like set it’s value, or hide it).  I have found that the easiest way of doing this is to look for an element that has the right TagName (e.g. “input”), the right SharePoint Datatype (e.g. “TextField”), and SharePoint FieldName (e.g. “Title”).  The TagName is easy, since that’s the actual tag of the element in the DOM.  The SharePoint Datatype is actually appended to the END of the ID attribute, so a little parsing will be required.  Finally, the SharePoint FieldName is the value assigned to the TITLE attribute of the element.  It would be cool if we could just key off this alone, but obviously on any given page you can’t guarantee all items will have a unique TITLE attribute.  Here is an example of an element that you may want to target on a form’s NewForm.aspx or EditForm.aspx pages:

<input name="ctl00$m$g_beee8c5c_b1a1_4356_84f5_
462f43dc6b4a$ctl00 $ctl04$ctl09$ctl04$ctl00$ctl00$TextField" type="text" maxlength="255" id="ctl00_m_g_beee8c5c_b1a1_4356_84f5_
462f43dc6b4a_ctl00_ctl04_ctl09_ctl04_ctl00
_ctl00_TextField" title="RelatedCT" class="ms-long" />

And here is an example function that you could use to parse the DOM and return the target element based on these three pieces of information:

function getFieldElement(tagName, identifier, title) {
  var len = identifier.length;
  var tags = document.getElementsByTagName(tagName);
  for (var i=0; i < tags.length; i++) {
    var tempString = tags[i].id;
    if (tags[i].title == title &&
            (identifier == "" ||
             tempString.indexOf(identifier) == tempString.length – len
            )
       ) {
         return tags[i];
    }
  }
  return null;
}

// So for Example, to return the target element above we’d make the following call
var theElement = getFieldElement(“input”, “TextField”, “RelatedCT”);

Once you have a handle to the element, you can do all sorts of things with it.  For exmaple, setting it’s value, making it readonly (if you don’t want to the user to change it’s value once you’ve populated it from the querystring), or even hiding the whole field all-together.  Here is an example function that can does all of the above (note, slight changes are required to work with non-textfields such as checkboxes, dropdowns, lookup lists, etc.)

function processField(theFieldName, theValue, setReadOnly, setHidden) {
    var el=getFieldElement("input", "TextField", theFieldName);
    if(el!=null) {
        if(theValue!=null) {  el.value=theValue;  }
        if(setReadOnly) {  theField.readOnly=true;  }
        if(setHidden) { 
            //Set the whole table row to not display (includes label and all)
            theField.parentElement.parentElement.parentElement
        .style.display="none";
        }
    }
}

Ok, now that we have all of our helper functions ready to go, we need to put them all in a JS file and drop that where it can be accessed from the form pages (or where ever you plan to do the injection).  Possible places to consider are a document library (if you don’t have physical access to the server) or  12/TEMPLATE/LAYOUTS/1033 (if you do have physical server access).  The nice thing about the later location is that you can either directly link to the script from anywhere via /_layouts, OR you can use the  <SharePoint:ScriptLink> tag to have SharePoint automatically generate a non-client-cachable link to the script.  You will also need to use the _spBodyOnLoadFunctionNames.push method on the pages to get SharePoint to correctly insert you “injected” code into the proper spot in the whole JS Init of the pages (remember there are all sorts of things SharePoint pages need to run before we get to your injected code).  When I edit/customize a list’s NewForm.aspx or EditForm.aspx page I generally like to inject this bit of code at the very top of the PlaceHolderMain content placeholder.  Here is an example that links to my saved helper functions from above, pushes a function onto the OnLoad chain, and then set’s the values and visibility of 3 fields from the querystring.

<asp:Content ContentPlaceHolderID=”PlaceHolderMain” runat=”server”>
     <SharePoint:ScriptLink runat=”server” Name=”ListFuncs.js”/>
     <script type=”text/javascript”>
          _spBodyOnloadFunctionNames.push(“processFields”);
          function processFields() {
               var vals=getQueryStringArray();
               processField(“TaskList”, vals[“List”], true, false);
               processField(“TaskID”, vals[“TaskID”], true, true);
               processField(“OriginalAuthor”, vals[“author”], false, false);
          }
     </script>
[ … rest of the form …]
</asp:Content>

While this article certainly was an exhaustive tutorial on how to do this form of SharePoint customization, I’m hoping it will be enough to get some of you started in the right direction and experimenting.

  << Older      [more posts]   

RSS FeedBack to the HomepageMy Twitter FeedMy Stumbles

Tags

Hide Low Frequency Tags

Archives

Recent Posts