June 2007 - Posts

SharePoint Designer Tips and Tricks

 Will keep adding to the blog post as we go.

  • When using the dataform webpart and customizing the xsl manually BE sure to keep the "Show with sample data" check box checked. Otherwise SharePoint designer has a tendency to insert the actual data in place of the xsl so that when you display the data it is just repeating.
  • If you are using versioning in a pages library to enable rollback of changes, you better remove all the webpart zones on the page. The webpart zones cause the webparts to be saved into the database and there is no rollback so even if you rollback your page in the library only your formating outside the zones rolls back. NOTE: once you remove the webpart zones you will only be able to edit the pages in the designer.
  • If you are using the dataview web parts and the designer to build the traditional model of a lists that drills down to a detail page and you are not using web parts you will find that the title for each page will not be aligned with what you are displaying. Not the title that you see on the page, but the one in the top of the browser and more importantly what you see in search results!!!. The fix for this is to first make sure that you are passing the ID of the detail record to the detail page as a query string parameter named "ID" and then you can use the SharePoint "ListItemProperty" control to display whatever column value from the list item you want as the title.  Here is a sample of what your page code will look like

<asp:Content ContentPlaceHolderID="PlaceHolderPageTitle" runat="server" >    
Product:
<Controls:ListItemPropery runat="server" Property="Title" List="154FE4EB-6DC6-4ACA-A5AD-E329E33237EC"  id="ListItemPropery1"></Controls:ListItemPropery>  
</asp:Content>

The list id guid is fairly easy to find out for your list it, just example the generated code for your detail dataview web part, it will be a parameter in there. The Property setting is the column name you want to use for the title. NOTE: If you don't pass ID= in the query string or if the id you pass does not exist in the list you will get that nasty SharePoint exception. To fix this I quickly created my own control that inherited from ListItemProperty and allowed me to specify a different QA parameter other then just ID and also to fail gracefully. Here is the code http://sharepointsearch.com/cs/blogs/site_admin/SPWListItemProperty.cs.txt

Del.icio.us | Digg It | Technorati | Blinklist | Furl | reddit | DotNetKicks
Posted by notorioustech | with no comments
Filed under:

BIG huge spectacular resource listing.

 This took some effort. We have compiled and are compiling all the great resources out there for SharePoint and search. We have categorized them and organized them. Users can now rate and effect the rankings of each resource and add comments.

http://www.sharepointsearch.com/pages/bigresourcelist.aspx

This page was built entirely with SharePoint designer!!!!

Note: if you are counting on versioning in your pages library to allow you to rollback then you are in for a nasty surprise. Because the webparts are in Web part zones they are not actually stored with the .aspx file but in the SharePoint database, so even if you try to rollback a version you still have the same web parts. This caused more than a few headaches as the SharePoint designer kept erasing modifications that I had made in the datalist web part. The FIX: Simple but effective. Remove all Webpart zones from your page and the web parts will now be stored directly on the page. You will no longer be able to configure them in the browser but for the ability to truly use CMS functionality it was worth it.

 

Del.icio.us | Digg It | Technorati | Blinklist | Furl | reddit | DotNetKicks
Posted by notorioustech | with no comments

New note taking functionality - not exactly OneNote but still cool.

Well besides community managed web pages for definitions like wikipedia we have found a pretty cool use for it on our site here.

You will notice when you login ( need to register for membership first) that there are now two additional personal links in the top right "Add Note" and "My Notes".  The add note will pop open a windown no matter where you are on the site and capture the current url and allow you to add comments, links etc and it will be saved in your own personal space which you can access any time by clicking "My Notes".

So what's it good for. As you are doing your research capture your notes and when done go to mynotes to print them all out. They will be saved for as long as you have a membership on the site and cannot be accessed by anyone but you.

Del.icio.us | Digg It | Technorati | Blinklist | Furl | reddit | DotNetKicks
Posted by notorioustech | with no comments
Filed under: ,

Securing SharePoint WSS

As part of our security review on this site we created a simple member account and tried to hack everything.

and OOPS found some stuff. The defaul read privilages that we had assigned to members still allowed some unwanted access. Basically our page library where we store all of our content pages was still allowing users to download a copy of the .aspx page. While not technically a security breach it would have allowed people to copy our functionality without asking.

We have since disabled this by creating a new permission level with just the following enabled

  • View Items  -  View items in lists, documents in document libraries, and view Web discussion comments.
  • View Pages  -  View pages in a Web site.
  • Open  -  Allows users to open a Web site, list, or folder in order to access items inside that container.

and that's it. We do override this for certain lists that users require posting access to like their notes and so forth.

Del.icio.us | Digg It | Technorati | Blinklist | Furl | reddit | DotNetKicks
Posted by notorioustech | with no comments

SharePoint gets list item ratings by users.

Just finishing up testing of a new feature to the WSS site.

Being able to attach a custom ranking field to any list allowing users to provide a rating with comments for every item.

  • Features:
  • One post per member per listitem
  • Rollup of ratings per item.
  • Combination of Site Ranking and user ranking for sorting and display until enough users post
  • Moderation of user ranking posts.

This was all done by the following

  • new custom field to add to lists
  • new ranking lists to store users input
  • new event handler on the ranking lists to rollup and calculate rankings and then update the custom field on the list item
  • customized forms for entering rankings (very cool what can be done with just the SharePoint Designer)

Next step is to update the users points within Community Server to account for these posts.

 

Del.icio.us | Digg It | Technorati | Blinklist | Furl | reddit | DotNetKicks
Posted by notorioustech | with no comments

End of second day after releasing this Community Site.

First off. Thank you Tam Tam. Your posting for us went viral, I watched the stats and the hits spread rapidly with many coming from all over the World.

We are in need of experts and participation so spread the word.

Also,  after finding out a little more about what happened with sharepointblogs.com we have revised our own backup / redundancy plans. 

1. We are currently running a pretty powerful server with RAID 1.

2. We do SP Full backups and CommunityServer DB backups nightly along with regular file system backups.

3. We are in the process of configuring a virtual server which will host a mirror of the above server and be kept in sync at all times with database replication.

4. We will be hosting that virtual server at another location for redundancy, if anyone wants to volunteer some permanent server space and an ip that would be great otherwise it will have to be a rather temporary location we have in mind for now.

More to come on the site. User group listings, with events. More content all around. Consultants area. and so forth.

 

Del.icio.us | Digg It | Technorati | Blinklist | Furl | reddit | DotNetKicks

Viral Invite For SharePoint

Viral Invite is when a site give you a form to invite 5 or more friends at once to check the site. This was SOOO easy using SharePoint for this. Here are the steps.

First Create a simple lists with a subject, body and 5 email fields. Grant post only access to your members on this list.

Create a new .aspx page and using the sharepoint designer Insert->SharePoint->Custom List Form to create and customize the submit screen.

Then create a new workflow triggered on add only for the new list.

Then you check each each of the email fields against this regex: ^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$

The action for each test is to append that field to a variable called emails or something like that in the workflow, now there is no append so you need to combine existing variable with the field into variable:

The last workflow step is to send the email. 

Really Really Easy. 

 

 

Del.icio.us | Digg It | Technorati | Blinklist | Furl | reddit | DotNetKicks
Posted by notorioustech | with no comments

CommunityServer.org and SharePoint WSS 3.0

What a perfect match. I'll say it again. What a perfect match. By combining CommunityServer.Org and SharePoint WSS we are able to deliver a first rate community oriented website.

For Blogging, Discussion Forums, Subscription management, File Management Community Server was the first choice of integration. Because it is built on ASP.Net 2.0 using master pages and standard authentication models we are able to seemless integrate it.

For rapid application building and content management SharePoint was also an easy choice.

Here is a listing of all the integration points and so forth. More posts will be coming with specific details as time permits.

  • Authentication - SharePoint is relying on the custom CommunityServer.org Authentication provider. This allows us to easily integrate their subscription model and other features.
  • Groups - SharePoint is using it's usual groups but we had to create an event handler in CommunityServer.org to automatically add new users to a SharePoint group so that they would have access to the site. Code will be uploaded upon request.
  • Master Pages and navigation - while SP and CS both use master pages they are obviously different and cannot be shared so we had to keep the 1 SharePoint MasterPage and the 2 CS master pages synced up manually. Not the best model custing and pasting the Menu control every time there are changes. We really need to drive the ASP menu from a central xml file to both.
  • Default.aspx redirect - because the default.aspx page in the root of WSS is not version controlled and we wanted full rollback capabilities we move the default.aspx into a document library and created a c# control that redirects to it from the root default.aspx. Will post this code too.
  •  

Will post more as it comes to me. I really should have been posting right along as I developed the site, but was pressed for time. Will play catch up. If you see some functionality on the site and want to know how it was done just ask.

Del.icio.us | Digg It | Technorati | Blinklist | Furl | reddit | DotNetKicks