Archives

Archives / 2005 / March
  • Macaw Discussion Board for Russian SharePoint

    Denis Fayruzov (dfayruzov [at] gmail.com) wanted to use the Macaw Discussion Board, but the standard provided template only works on English versions of SharePoint (LCID 1033). He used the provided zip file (MacawDiscussionBoard1.0r18Pages.zip) with aspx pages (used for the views and edit pages) and applied those to a standard discussion board. It worked! He created a list template from it, and the Russian Macaw Discussion Board (LCID 1049) is now available on http://spsutil.sourceforge.net. I could not try it out myself, I don’t have a Russian SharePoint installation;-) For any information on the Russian version contact Denis.

    If people want to make list templates available for other languages, mail them to me and I will put them on http://spsutil.sourceforge.net.

    If someone knows how to make a list template that works on any language version of SharePoint, let me know! That would make updates a lot easier!

  • NAnt question: evaluate NAnt expressions in text read from file

    I have a NAnt problem: I want to read file from text (actually xmlpeek from an XML document), and evaluate the NAnt expressions defined in the text. So for example:

    FILE: Input.txt:
    This is a ${word} text!

    FILE: PropertyTest.build:
    <project default="go">
     <target name="go">
      <property name="word" value="nice"/>
      <loadfile file="input.txt" property="message" />
       <echo message="${message}"/>
     </target>
    </project>

    CURRENT output:
    This is a ${word} text!

    WANTED output:
    This is a nice text!

    Any ideas?

  • Windows SharePoint Services Software Development Kit (SDK) – 3/9/2005

    New version of the SharePoint SDK(?)

    Windows SharePoint Services Software Development Kit (SDK) – 3/9/2005

    http://www.microsoft.com/downloads/details.aspx?FamilyID=1C64AF62-C2E9-4CA3-A2A0-7D4319980011&displaylang=en

    The installer installs the documentation in C:\WSSSDK. I’m not sure if it is really newer, because the first page says: Publish date of this SDK: January 2005.

    To keep yourself up-to-date of the newest downloads on SharePoint at Microsoft, look at:

    http://www.microsoft.com/downloads/results.aspx?sortCriteria=date&OSID=&productID=353C4E9D-9E78-4435-A360-01BB7F540D17

  • SharePoint DVWP: view XML results of your query

    When you create your own XSLT transformations in the data view web part you need to know the format of the XML resulting from the specifed query. Given this XML you can expiriment outside of FrontPage with an XSL tool like XSelerator to do real XSLT debugging. Note that outside of FrontPage (or online editing of the DVWP) you can’t use functions in the ddwrt namespace. 

    To get the XML results you can use a simple XSLT transformation. Edit the XSLT part of the DVWP via frontpage, or press the XSL Editor “Source Editor…” button in the toolpane of the data view web part:

    DVWPSourceEditor

    Now replace the current xslt transformation with the following code:

    To get a view like this:

    DVWPSourceViewSimple

    Or if you want to have a more fancy view like this:

    DVWPSourceViewLeftDVWPSourceViewRight

    use the following code which utilizes dp.SyntaxHighlighter

    With this more advanced view I had FrontPage crashing on save of the code. So maybe you can better stick to the simple view. Another problem I had with the advanced view is that the output was not always rendered correctly, I thing due to a shortcomming in the syntax highlighting code.

    One problem is that any typo in your query will result in an error message, use the back button to get back to your edit screen again and solve the problem (if your working with the online view). With FrontPage you can directly correct the problem because you have a complete source code view.

  • SharePoint DVWP: xslt limitations...

    John Jansen (Microsoft Office FrontPage) confirmed in a private e-mail conversation what I did find out the hard way:

    In the Xslt transformation of data view web parts the following functionality is blocked:

    • msxsl:script
    • xsl:include
    • xsl:import

    I can understand that msxsl:script is blocked, otherwise you could execute any server-side script. Why xsl:include and xsl:import is not supported I really don’t understand. Could be that they scan the script code string to be executed for the msxsl:script tag, and that handling inclusion of external code was to much work, but it makes data view programming really hard. Would be great if you could create a library of useful Xslt routines and include those in your custom xslt transformations.

    Another thing I have been working on is the possibility to register additional xslt extension object like the one in the ddwrt namespace (see also http://weblogs.asp.net/soever/archive/2005/01/03.aspx), but I never succeeded.

    Any ideas on extending the xslt transformations functionality in data view web parts?

  • Macaw Discussion Board... the way SharePoint discussions should work... and now do work!

    The Macaw Discussion Board

    This weblog post describes the immediate availability of a reworked and improved discussion board for Windows SharePoint Services and SharePoint Portal server providing last-post first views, a discussion thread view, and SWYRO (See What You Respond On). It is available on http://spsutil.sourceforge.net. This post is it’s documentation.

    Introduction

    It is great that SharePoint supports discussion lists, its a pity that their implementation is "suboptimal".

    The two biggest problems that I have with the discussion lists are:

    • When you reply on a discussion item, you don’t see the text you are replying on
    • Discussion items are displayed in the wrong order: oldest items first!

    Changing this behavior is not as easy as providing a new view. Some more work is required.

    We worked around these limitations more than a year ago, but I never found the time to make these modifications available to the community. Until now…

    The features

    There are two views on a discussion:

    • Complete thread index, latest started discussion thread at the top
      DiscThreadIndex
    • Latest posts view, shows the latest 40 posts with the newest post at the top
      DiscLatestPosts

    The thread index view provides the following information:

    • Title of first post in thread
    • Started by
    • Number of Replies
    • Last Post (date + poster)

    On selecting a thread, a hierarchical view of this discussion thread is displayed:
    DiscSingleThread

    If you are not sure from a certain reply on which post it is replying, you can select the “parent” link:
    DiscParentItem

    If you look at the content of a single post (for example after following a link from an alert e-mail), there is a view in thread link available to view the post highlighted in its complete discussion thread:
    DiscViewInThread

    Some other interesting features:

    • When you click on the name of a poster, you go to the UserInfo information on the user on WSS, and to the profile page of the user when on SharePoint Portal Server
    • Complete support for presence detection on all user names
    • Completely built on top of the standard WSS discussion board

    Availability

    The Macaw Discussion Board is available at http://spsutil.sourceforge.net. It is distributed as a SharePoint List Template: MacawDiscussionBoard1.0.stp.

    And if you are looking for the sourcode: it’s all there. Just fire up your FrontPage 2003 and you can look right in to it! I hope your XSLT skills are a bit up-to-spec;-)

    Installation

    The MacawDiscussionBoard List Template is constructed for usage in standard WSS sites. Usage in Portal Area’s is not tested. To test it out, create an empty top level site:DiscEmptySite

    Goto “Site Settings”, and select “Go to Site Administration”:
     DiscSiteSettings

    If you are on a top level site, you will see the option “Manage list template gallery”. If you don’t see this option, go to the top level parent of the current site and perform the actions from there:DiscTopLevelSiteAdmin

    On the List Template Gallery you can upload a new list template:
    DiscListTemplateGallery

    Specify the list template file, and press “Save and Closed”:
    DiscUploadTemplate

    The List Template is now available, select “Create” to add an instance of this new template:
    DiscTemplateUploaded

    Select the MacawDiscussionBoard:
    DiscCreate

    And you are done!! Congratulations!

    If you want a more permanent availability of the list template, and you are a SharePoint administrator, you can add the list template using the stsadm.exe tool on the SharePoint server. See the Administrators Documentation for more information.

    Troubleshooting

    If the Macaw Discussion Board list template does not appear under Discussion Boards in the Create screen, you are probably in a site or area that does not support the list template. Please test first is a standard WSS site.

    Limitations

    The Macaw Discussion Board has some limitations. For the Thread Index view, information on all items must be retrieved on server side. Happely enough NOT the body text;-). This means that performance can degrade on discussion lists which huge amount of posts. We have a discussion list with over 2500 posts without any problems. Let me know if you run into trouble, we can make somethig up.

    Configuration

    Some things on the discussion board can be configured like the styles of odd/even/selected posts in a discussion thread, the indenting in a hierarchical thread view, and the formatting of date/time. To do this configuration open the pages of the Macaw Discussion Board in FrontPage 2003.

    The following pages have configuration options (look for it in code view):

    AllItems.aspx:

            <!-- CONFIGURATION SECTION FOR DISCUSSION RENDERING -->
            <!-- format of date time rendering, uses standard .NET format as specified in http://authors.aspalliance.com/aspxtreme/aspnet/types/datetimeformatstrings.aspx -->
            <xsl:param name="PostDateTimeFormat">dddd, MMMM dd, yyyy H:mm</xsl:param>
            <!-- END OF CONFIGURATION SECTION FOR DISCUSSION RENDERING -->
     

    SingleThread.aspx:

            <!-- CONFIGURATION SECTION FOR DISCUSSION RENDERING -->
            <!-- style for odd/even/selected items in the thread -->
            <xsl:param name="OddItemStyle">background-color: #dddddd;</xsl:param>
            <xsl:param name="EvenItemStyle">background-color: #eeeeee;</xsl:param>
            <xsl:param name="SelectedItemStyle">background-color: Yellow;</xsl:param>
            <!-- format of date time rendering, uses standard .NET format as specified in http://authors.aspalliance.com/aspxtreme/aspnet/types/datetimeformatstrings.aspx -->
            <xsl:param name="PostDateTimeFormat">dddd, MMMM dd, yyyy H:mm</xsl:param>
            <!-- message when page in called without 'discussion' parameter -->
            <xsl:param name="NoThreadMessage">The Single Thread view can only display information if a thread is specified.</xsl:param>
            <!-- indentation level in pixels for threaded items in the tree -->
            <xsl:param name="TreeIndentation">10</xsl:param>
            <!-- END OF CONFIGURATION SECTION FOR DISCUSSION RENDERING -->

    NewForm.aspx:

            <!-- CONFIGURATION SECTION FOR DISCUSSION RENDERING -->
            <!-- style for odd/even/selected items in the thread -->
            <xsl:param name="OddItemStyle">background-color: #dddddd;</xsl:param>
            <xsl:param name="EvenItemStyle">background-color: #eeeeee;</xsl:param>
            <xsl:param name="SelectedItemStyle">background-color: Yellow;</xsl:param>
            <!-- format of date time rendering, uses standard .NET format as specified in http://authors.aspalliance.com/aspxtreme/aspnet/types/datetimeformatstrings.aspx -->
            <xsl:param name="PostDateTimeFormat">dddd, MMMM dd, yyyy H:mm</xsl:param>
            <!-- message when page in called without 'discussion' parameter -->
            <xsl:param name="NoThreadMessage">The Single Thread view can only display information if a thread is specified.</xsl:param>
            <!-- indentation level in pixels for threaded items in the tree -->
            <xsl:param name="TreeIndentation">10</xsl:param>
            <!-- END OF CONFIGURATION SECTION FOR DISCUSSION RENDERING -->
     

    Applying the Macaw Discussion Board changes to an existing discussion list

    Note: The below procedure has not been extensively tested. You are on your own, so please know what you are doing!

    It is possible to apply the Macaw Discussion Board to an existing discussion list. You can do this using FrontPage 2003.

    • Make a backup of your site containing the discussion list to modify!!!
    • Install the Macaw Discussion Board somewhere so you can access it’s pages usintg FrontPage 2003
    • Lookup the list name of the existing discussion list (GuidExisting). Look for example at the code of the EditForm.aspx page. At the end you see the following line with the GUID which is the list name:
      <ListName xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">{2F9B130C-EDE0-47D5-AF8C-E0A9B696DFEA}</ListName>
    • Lookup the list name for the installed Macaw Discussion Board (GuidMDB)
    • Make a copy of all pages in the existing list (make for example a backup directory in the List folder (at the same level as you .aspx list pages). Don’t move the pages, otherwise the interrnal links for the list pages gets messed up!
    • Copy over the pages of the Macaw Discussion Board instance to the existing list, overwriting the existing pages of your list instance.
    • On all pages do a replace of the Macaw Discussion Board instance GUID (GuidMDB) with the GUID of the original list (GuidExisting).
    • Remove any pages that are not also in the Macaw Discussion Board instance
    • Done!!

    If there is a need for an application that performs these actions, please let me know and *maybe* I’m in the mood to create one!

    Licensing

    Macaw Discussion Board License Agreement

    You can use this Software for any commercial or noncommercial purpose, as long as the Macaw Discussion Board is not marketed and sold as if it is your own application. In return, we simply require that you agree:

    • Not to remove any copyright notices from the Software.
    • That if you distribute the Software in source code form you do so only under this License (i.e. you must include a complete copy of this License with your distribution), and if you distribute the Software solely in object form you only do so under a license that complies with this License.
    • That the Software comes "as is", with no warranties. None whatsoever. This means no express, implied or statutory warranty, including without limitation, warranties of merchantability or fitness for a particular purpose or any warranty of noninfringement. Also, you must pass this disclaimer on whenever you distribute the Software.
    • That neither Serge van den Oever [Macaw] nor any contributor to the Software will be liable for any of those types of damages known as indirect, special, consequential, or incidental related to the Software or this License, to the maximum extent the law permits, no matter what legal theory it's based on. Also, you must pass this limitation of liability on whenever you distribute the Software.
    • That if you sue anyone over patents that you think may apply to the Software for a persons use of the Software, your license to the Software ends automatically.
    • That the patent rights, if any, licensed hereunder only apply to the Software, not to any derivative works you make.
    • That your rights under this License end automatically if you breach it in any way.

    FAQ

    Q1: Why is there no threaded view with newest thread on top. Same as the default view for a standard discussion board, but then implemented “right”?

    A:1 We have such a view at my company, but I could not get it working;-) There also is not really a need for such a view in my opinion. I never use the view at work, and no forum implementation uses such views.

    Q2: How about multilanguage support, do you support any other language than English?

    A2: I have no idea what happens if you install this on a site that is in another language. All texts in the discussion board will definitly remain in English. There is even a chance of broken link to the administrative pages because they link to the /_layouts/1033 directory. If anyone has any information on this (and information on making "language-neutral" templates)...

    Q3: When I add new views to the discussion list, they don’t become visible in the left menu.

    A3: This is by design. Because the wrong pages ended up at the left menu, I did add the links above “Actions” (The “Discussion” menu) manually. If you want to add a view, modify the pages AllItems.aspx (Thread Index), Latest.aspx and SingleThread.aspx.

    Acknowledgements

    Thanks to my colleagues Arjan Paauw and Olaf Conijn for input in the implementation of the Macaw Discussion Board.

  • Cool: monoppix, try out Mono on linux directly from CD

    I was amazed by the Knoppix version of Linux, that you could direcrtly run from CD and even USB memory stick. Great to have a look at some things you can do with Linux. Now someone created a special edition featuring the Mono technology, a free .Net framework implementation.

  • SharePoint DVWP: display profile page on user link

    FrontPage 2003 has a great feature when converting a CAML view on a list to a XSLT data view. One problem in this conversion is that the link on a user name changes from for example UserDisp.aspx?ID=1 naar UserDisp.aspx?Force=True&ID=1. This forces the display of the information available in the UserInfo table on a user. This happens even if SharePoint Portal Server is used, and in the CAML viewt he profile page of the user in the user its my site was displayed.

    This “wrong” URL is generated by a DDWRT function URLLookup.

    You can get back the correct behaviour by removing the Force=True as follows:

    Look for a line similar to:

    and convert it into: