2/26/2008

SharePoint: If I had written SharePoint.......

We all have our gripe list, and I know SharePoint was created by a very large team, but .... I just have a short list of what I would have changed:

  • Calendars: when you enter a start date, automatically set the end date to match. This is always needed for one day meetings.
  • Calendars: I would have name the "Current Events" view something meaningful. To me "current" means today, this week, this month or some time frame. This view expands all recurring events and probably should have been named "Detailed event view".
  • Calendars: I would have put the All Day and Recurring checkboxes above date and time fields so users would not start to enter these and then find them gone after clicking the check boxes.
  • Make all the buttons consistent!!! Is the OK button at the top of the page, at the bottom, both or in the toolbar? Is it called OK, Save or Save and Exit???
  • Make the Delete and Remove buttons consitent and in places considered good user interface design! Too often you find these buttons: Delete, OK, Cancel all together, and your first instinct is to click the first button.
  • Wiki's would have had an Actions menu without having to click the out of sight (bottom of page) "View all pages" link. Wikis would also add "this list" to the search scopes dropdown without having to first click "View all pages".
  • The "Edit Item" button in Welcome, My Settings (userdisp.aspx) would let the user edit something, anything! (They can only update their profiles if My Sites is enabled, and a lot of companies have disabled My Sites until they figure out how to manage My Sites! [the first user who creates a "football betting pool" subsite under their My Site kills My Sites for everyone!])
  • Publishing and non-publishing features would be more consistent. Why do you have a "Navigation" option in a Team Site under a publishing site and "Top Links" and "Quick Launch" in a Team Site under a non-publishing site. (everyone wants dropdowns in the tabs, but can only get them with the "Navigation" option!!!)
  • I would have provided dropdown menus in the Top Link tabs to both WSS and MOSS Publishing users.
  • Site vs Site Collection vs Web? I would have used consistent naming of SharePoint sites in both Central Administration and the developer's API. (A single site is sometimes called a Site and sometimes a Web. A site collection is sometimes called a Site and sometimes a Site Collection)
  • The default view in Discussions would have been Threaded, not Flat.
  • Grouping in views would support more than two levels.
  • SharePoint Designer would be fast!!! (I can dream can't I?)
  • The Help files would be more helpful.

SharePoint: Using the Calendar to Schedule Meeting Rooms (multiple fields in a month view)

This is not a complete way to manage meeting rooms, but a tip on displaying multiple fields in a SharePoint Calendar view. In particular, you might want to see both the Location (Room 6B) and the meeting title (Staff Meeting) in the month view of the calendar. When displaying a Calendar in Month view you can only display the time (unchangeable) and a single field (your choice). To display more than one field you will need to add a calculated column to merge the two (or more) fields.
  1. Display the calendar, click Settings, Create a column
  2. Add a calculated column (I'll call it MonthData) with an equation to join the columns you want to display. Example: Location & " - " & Title (If you return to modify this equation it will have been reformatted as: =Location&" - "&Title )
  3. Uncheckmark "Add to default view" and the click OK
  4. Click the View menu and select Modify this view
  5. In the Calendar Columns section of the page change "Month View Title:" to your new column (MonthData)
  6. Click OK and check the results in the month view of the calendar

You could also add a new column name "reserved by" and use that in your calculated column to display the room and who has it reserved: =Location&" - "&[Reserved By]

Sorry, no tips here on how to find an available room or other "scheduling features"!

SharePoint: Excel 2003 Import and Outlook problems (Method 'Post' of object 'IOWSPostData' failed)

 

Updated… New version of Office, same old problem!  If you get the IOWSPostData error the same fix for Office 2007 will also work for Office 2010.

Updated again 2/24/13… This time for SharePoint 2013 and Office 2010.

One of my VPC images for SharePoint is acting up. It has MOSS 2007 and Office 2003. The problems are: Import from Excel fails and Connect To Outlook fails. Another VPC created from the same original setup is fine. The only thing really different with this VPC is that it has SharePoint Designer installed.

Errors from Excel: "object doesn't support this property or method"
Errors from Outlook (not consistent) : "Method 'Post' of object 'IOWSPostData' failed"

What appears to have happened is that SharePoint Designer is an Office 2007 product, it installs a bunch of Office 12 files and must be updating default paths or registry entries to point to Office 12 instead of Office 11. For the Excel issue I think it is loading the Office 12 DLL and calling from an Office 11 Excel macro file. I have not found a workaround yet for the Outlook problem. It works sometime and not others. My research so far (thanks to all of the bloggers out there!) has found at least a fix for the Excel Import problem. This requires an edit to the macro used by SharePoint to perform the import.

  • Open the macro file in Excel (Excel 2003 is ok, or at least worked for me)
      C:\Program Files\Microsoft Office 2007\Office12\1033\EXPTOOWS.XLA
    For Office 2010 find the file here:
      C:\Program Files\Microsoft Office\Office14\1033\EXPTOOWS.XLA
    or
      C:\Program Files (x86)\Microsoft Office\Office14\1033\EXPTOOWS.XLA
    Or just do a search of C: for EXPTOOWS.XLA

    You find that this is a hidden file, so you many need to change Windows Explorer to “Show hidden files”
    You may need administrator rights to save the file:
      - Click Start, All Programs, Microsoft Office
      - Hold down the Shift key and right-click Microsoft Excel
      - Click Run as Administrator
      - In Excel, click File, Open and navigate to C:\Program Files\Microsoft Office\Office14\1033
        and open the EXPTOOWS.XLA file.

     
  • Press Alt-F11 to display the Excel macro editor and the find the EXPTOOWS.XLA file
     
  • Find the line containing "lVer = Application.SharePointVersion(URL)" and change it "lVer = 2".
    (That's LVer, not iVer or 1Ver)

    Update: To play it safe, just add the lVer =2 at the end of the Initialize subroutine:
      image
     
  • Save the file. Click “Save changed and discard signature” to overwrite the old file.

More info here: http://msmvps.com/blogs/obts/archive/2006/12/05/384536.aspx

The only problem with this fix is that when you save the change you lose the digital signature from Microsoft on the macro file.

 

.

2/09/2008

SharePoint: Hiding Menus (not using HideCustomAction)

Hiding SharePoint List and Library Menus

For a recent project I needed to hide several menu items in the document library toolbar, and I wanted to do it as a Feature. The obvious choice from the SDK was HideCustomAction. But... it does not seem to work. A search of the web finds lots of discussion about HideCustomAction and how it only works on a few places, such as those listed in the MSDN article here. There is either not enough info in the table in that article, or that is the complete list of the only items that can be touched with HideCustomAction.

So what else can we do? Fall back to the old tricks, that's what! A little JavaScript routine can find and change what we need. For example, this will find and hide the Explorer View menu:

<script language="JavaScript">
 var doc = document.getElementsByTagName('ie:menuitem'); 
 for (var i = 0; i < doc.length; i++)
  {
    itm = doc[i];
    if (itm.id.match('OpenInExplorer')!=null)
      { itm.hidden=true; }
  } 
</script> 

 

The trick here is to find the menu tags on the page. What we are looking for is this:

      <ie:menuitem id="zz23_OpenInExplorer" ... hidden= ... />

The JavaScript starts by finding all tags named "ie:menuitem" and then looping through those to find the one we need. The hidden attribute is pretty obvious, so we set it to false.

For just one library:

Where do you put this JavaScript? For just one library use SharePoint Designer add this to the bottom of the allitems.aspx for that library. The best place is just before the end tag (</asp:Content>) tag of the "<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">" tag.

 

For all libraries:

To impact all libraries with a single edit you will need to use SharePoint Designer to add this JavaScript at the end of the Master Page (default.master), just before the "</BODY>" tag.

 

What about a Feature?

If you want to control the hiding of the menus by using a Feature so you can turn them on and off at will, and at the farm, application, site collection or site level the you have a little more work to do, but not too much.

I will return here later and add a full step by step, but here's the code you will need:

- A SharePoint Delegate control:

Add this to the bottom of your Master Page just before the </body> tag (The ControlId is up to you, but needs to match the Id used in the elements file):

  <SharePoint:DelegateControl runat="server" ControlId="MiscControls" AllowMultipleControls="true"/>


- A .Net User Control:

HideMenus.ascx

<%@ Control Language="C#" ClassName="HideMenus" %> 
<script language="JavaScript">
  var doc = document.getElementsByTagName('ie:menuitem'); 
  for (var i = 0; i < doc.length; i++)
  {
    itm = doc[i]; 
    if (itm.id.match('MultipleUpload')!=null | itm.id.match('OpenInExplorer')!=null) 
    { itm.hidden=true; }
  } 
</script>

 


- A feature file:

Feature.xml

<Feature
  Id="531F15CD-A646-45e5-AB61-4F8DF89C29D9"
  Title="Hide Menus"
  Description="Sample feature to hide selected menus (from TechTrainingNotes)"
  Scope="Web"
  Hidden="FALSE"
  xmlns="http://schemas.microsoft.com/sharepoint/"> 
 
  <ElementManifests>
    <ElementManifest Location="elements.xml" /> 
  </ElementManifests> 
</Feature>


- An elements file:

Elements.xml

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Control 
    ControlSrc="~/_controltemplates/HideMenus.ascx"
    Sequence="100"
    Id="MiscControls">
  </Control>  
</Elements>  

The is a list of items created by a typical WSS Master Page:

Menu item name

Menu

Menu text

PersonalInformation

The Welcome menu

My Settings

LoginAsDifferentUser

The Welcome menu

Sign in as Different User

RequestAccess

The Welcome menu

Request Access

Logout

The Welcome menu

Sign Out

MenuItem_Create

Site Actions

Create

MenuItem_Settings

Site Actions Site Settings

 

This is a list of items created by a typical document library allitems.aspx page:

(all of the above table plus the following)

New0 (zero, not O)

New

New Document (default click)

NewFolder

New

New Folder

Upload

Upload

Upload Document

MultipleUpload

Upload

Upload Multiple Documents

EditInGridButton

Actions

Edit in Datasheet

OpenInExplorer

Actions

Open with Windows Explorer

OfflineButton

Actions

Connect to Outlook

ExportToSpreadsheet

Actions

Export to Spreadsheet

ViewRSS

Actions

View RSS Feed

SubscribeButton

Actions

Alert Me

AddColumn

Settings

Create Column

AddView

Settings

Create View

ListSettings

Settings

Document Library Settings

DefaultView

View

All Documents (in typical library)

View1

View

Explorer View

ModifyView

View

Modify this view

CreateView

View

Create view

2/08/2008

SharePoint: Site Collection Quotas


To limit the storage of a site collection you can create and apply Quota Templates.

Some important things to know about quotas:
  • Quotas can only be applied to Site Collections, not to single sites or entire applications
  • Quota space includes library files, list contents (announcements, etc), master pages, etc (ie. Everything)
  • Files in the Recycle Bin are part of the quota calculation
  • The warning e-mail is only sent once!
  • Once the quota has been reached, no more uploads are permitted
  • Once the quota has been reached, many site edits are prohibited! For example adding an announcement or even modifying an existing view displays this: "Your changes could not be saved because this SharePoint Web site has exceeded the storage quota limit."
  • When a site is limited by a quota there is a new option in Site Actions -> Site Settings: "Storage space allocation". Here the site admin can see where quota is being used.
  • The last item uploaded that exceeded the quota will be uploaded successfully, even if it takes the site way over quota.

To create quotas:

Go to Central Administration and drill down to Application Management and Quota Templates. Create as many quota templates as needed.



When a user exceeds their quota
During a Multiple Upload they may see:


During a single Upload or other edit such as adding an announcement they will see:


To track quotas

Site administrators can go to Site Actions -> Site Settings and click "Storage space allocation" to review space usage. Here they can display lists of libraries, documents, lists and Recycle Bin contents. These lists are by default sorted on size, descending. They can be resorted on Date Modified or Size.


2/07/2008

SharePoint: Links for Forms Based Authentication (FBA)

Forms Based Authentication in SharePoint is truly a mixed bag. While great where Windows authentication is not practical, FBA has a lot of issues! Below are a few links I have found to be useful. Before you do the work to setup FBA read this list of "issues": http://msdn2.microsoft.com/en-us/library/bb977430.aspx The short list includes:
  • Bugs with alerts (fixed with SP1)
  • Issues with search, if the default authentication is not Windows
  • By default integration with Office products is disabled (this includes Outlook sync, "Edit in...", Explorer views and the New button)
  • Importing user profiles
  • Single Sign-On Service does not work
By the way, many of these issues are not major items when working with a public facing Internet site not using "team collaboration" type features. If you are still interested, then:

Note to spammers!

Spammers, don't waste your time... all posts are moderated. If your comment includes unrelated links, is advertising, or just pure spam, it will never be seen.