 |
| Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XsnLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | FileType | xsn | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.2 | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.3 | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.4 | 255 | | View in Web Browser | /_layouts/images/ichtmxls.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=1 | 0x0 | 0x1 | FileType | xlsx | 255 | | View in Web Browser | /_layouts/images/ichtmxls.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=1 | 0x0 | 0x1 | FileType | xlsb | 255 | | Snapshot in Excel | /_layouts/images/ewr134.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=1 | 0x0 | 0x1 | FileType | xlsx | 256 | | Snapshot in Excel | /_layouts/images/ewr134.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=1 | 0x0 | 0x1 | FileType | xlsb | 256 |
|
|
| Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XsnLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | FileType | xsn | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.2 | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.3 | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.4 | 255 | | View in Web Browser | /_layouts/images/ichtmxls.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=1 | 0x0 | 0x1 | FileType | xlsx | 255 | | View in Web Browser | /_layouts/images/ichtmxls.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=1 | 0x0 | 0x1 | FileType | xlsb | 255 | | Snapshot in Excel | /_layouts/images/ewr134.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=1 | 0x0 | 0x1 | FileType | xlsx | 256 | | Snapshot in Excel | /_layouts/images/ewr134.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=1 | 0x0 | 0x1 | FileType | xlsb | 256 |
|
|
|
 |
|
|
|
|
|
|
|
|
5/04/2008Apparently the 'Weather' on NineMSN thinks that it is still Friday... errr.... Friday was YESTERDAY!!

2/04/2008
Good to see that sanity prevails.. 13/03/2008Today I finally solved a problem that has been driving me crazy... It all starts with IE 6 and AJAX (within MOSS 2007). I have a 'showcase' style application that displays a bunch of pictures and I wanted to use a ModalPopup Extender to allow users to navigate through the pictures. The issue is that IE 6 doesn't like it very much...
Here is the page in IE 7:
 Fig 1: IE 7 – Closed
 Fig 2: IE 7 – With Showcase
As it also turns out... FireFox works well too:
 Fig 3: FireFox – Closed
 Fig 4: FireFox – With Showcase
IE 6 is totally broken. It turns out that when you have nested absolute positioned DIV's you cannot have an inner DIV show 'outside' the parent.
<DIV id="parent" style="position: absolute; left: 0px; top: 100px;z-Index: 1;"> <DIV id="inner" style="position: absolute; left: 50px; top: 90px; z-Index: 2;"> Some Text </DIV> </DIV>
IE 7 and FF display:
IE 6 displays the DIV inside the parent and the 'top' cannot extend beyond the top of the parent DIV:
My parent DIV contains the thumbnails. This means that the positioning is completely wrong... In my case I already offset Y by 150px from the top of the page to show the page banner, the result in IE 6 is:
 Fig 5: IE 6 – Broken
There are some posts on that describe 'hacking' the AJAX Control Toolkit to fix the issue. I didn't really want to do that!! So what I found was that there are events that you can hook up to in AJAX. Specifically, the ModalPopup fires a 'add_showing' event. With this, you can relocate the DIV. Of course, it is a little complicated when the control is actually a web part sitting in MOSS 2007.
In the RenderContents event, I did some browser detection and then emitted the required JavaScript to fix the issue.
 Fig 6: Code to fix the issue.
So now, it works with no modifications to the AJAX Control Toolkit!!
 Fig 7: Fixed in IE 6!!
11/03/2008One of my colleagues was having an issue today where they couldn't get SharePoint Designer to connect to their MOSS server. As it turns out, this is quite easy to fix. When you setup 'high' security sites using MOSS/WSS, one of the things you definitely want to do is turn off client integration. Client integration allows MOSS/WSS to launch native applications, a good example is the Document Library integration within Word documents.
Client integration can pose a security risk for internet facing web sites. The big problem... when it is turned off, it also stops SharePoint Designer from connecting to a site. You get a whole bunch of 'password' related errors that don't tell you the true story...
So, turn it on when developing a site, turn it off when you're done!! 12/02/2008Well today the SharePoint team release a new version of the Visual Studio extensions for Windows SharePoint Services. The only problem is that it breaks all the existing projects that were created with the CTP version.
The FIX
As it turns out the fix is not too bad but a bit long winded.
Fig 1: The web part project in Solution Explorer.
If you go to WSP view, you won't see any web parts from your projects. It will pick up the feature but nothing else...
Fig 2: Missing web parts.
As it turns out... in the CTP, the 'elementsManifest.xml' was created in a hidden directory called 'PKG'. You need to move it to your project directory.
Fig 3: Before the move... |
Fig 4: After the move... |
Next thing is that your elementManifest.xml will be missing an 'Id' attribute. You need to add it. It is the same Guid attribute that your WebPart has.
Fig 5: Entering the Id attribute in the elementManifest.xml
The next thing is to change the paths in your feature.xml to point to the new location. In my case, the directory is called 'Clock'.
Fig 6: Location changed for elementManifest.
Then go into WSP view and hit the refresh (see fig 7).
Fig 7: Refresh button
Note that you will see the old 'feature'.
Fig 8: Refreshed
Just delete the old one and your problem is solved!!
Fig 9: Cleaned up and fixed!! As it turns out, SharePoint has something called a 'Delegate Control'. You will see plenty of these on your master page through SharePoint Designer.
 Fig 1: Delegate Control tag on Master page.
You can 'inject' HTML/markup into a delegate control. Simply put, there is a sequence that the delegate control runs in, if you put your code earlier on in the sequence, it will inject into the resulting markup. All you need to do is override the render method of your class (derived from WebControl) and it's done!
 Fig 2: Render override.
The real work is done by the feature itself. You need to ensure that your elementManifest.xml has the correct tags in it.
 Fig 3: elmentManifest.xml
Line 3 – Id is the actual name of the delegate control we are injecting into.
Line 4 – This needs to be less than 100. 100 is the default that SharePoint uses for its own content.
Line 5 – This is the custom class that had the render method override (see Fig 2).
Line 6 – This is the assembly where the class in Line 5 is compiled.
That is basically it. Once the feature is deployed, you will see your injected code.
 Fig 4: Injected Dublin Core metadata.
22/01/2008Introduction
If you are not aware of Dublin Core or AGLS... both are used to give search engines a bit of a hint about the content you have on your site. The basic principal is called SEO (Search Engine Optimization). Dublin Core is a defacto standard in the Metadata industry for tagging content and documents; AGLS is a superset that was designed by the Australian Government.
You will see Dublin Core/AGLS in lots of places, for example The Bureau of Metrology. The easiest way to see it... 'View Source'. You should see something like this (the yellow highlighted stuff is DC/AGLS):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Home Page - Bureau of Meteorology</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta http-equiv="Refresh" content="600">
<link rel="Schema.AGLS" href= "http://www.naa.gov.au/recordkeeping/gov_online/agls/1.2">
<meta name="DC.Identifier" scheme="URI" content="http://www.bom.gov.au"> <meta name="DC.Title" content="Bureau of Meteorology Homepage"> <meta name="DC.Creator" content= "corporateName=Bureau of Meteorology; address=GPO Box 1289, Melbourne, Victoria, Australia; postcode=3001"> <meta name="DC.Subject" scheme="BoM_Library _Thesaurus" content= "Australia.Bureau of Meteorology; Meteorological services"> <meta name="DC.Publisher" content="corporateName=Bureau of Meteorology"> <meta name="DC.Date.created" scheme="ISO8601" content="2000-01-01"> <meta name="DC.Date.modified" scheme="ISO8601" content="2006-04-03"> <meta name="DC.Description" content= "Bureau of Meteorology web homepage provides the Australian community with access to weather forecasts, severe weather warnings, observations, flood information, marine and high seas forecasts and climate information. Products include weather charts, satellite photos, radar pictures and climate maps."> <meta name="DC.Type.documentType" scheme="BoM_document list" content= "Homepage"> <meta name="DC.Format" content="html"> <meta name="DC.Coverage.jurisdiction" content= "Commonwealth of Australia"> <meta name="DC.Rights" scheme="URI" content= "http://www.bom.gov.au/other/copyright.shtml"> <meta name="AGLS.Function" scheme="AGIFT" content= "Science; Earth Sciences; Atmospheric sciences; Hydrology; Oceanography"> <meta name="AGLS.Audience" scheme="BoM_audience list" content="All"> <meta name="DC.Language" scheme="RFC1766" content="en"> <meta name="DC.Type.aggregationLevel" content="collection"> <meta name="AGLS.Availability" content= "corporateName=Bureau of Meteorology; address=GPO Box 1289, Melbourne, Victoria; postcode=3001; contact=tel 03 9669 4000; contact=fax 03 9669 4699; contact=ABN 92637533532"> <meta name="keywords" content="Bureau of Meteorology; homepage"> <meta name="description" content= "Bureau of Meteorology web homepage provides the Australian community with access to weather forecasts, severe weather warnings, observations, flood information, marine and high seas forecasts and climate information. Products include weather charts, satellite photos, radar pictures and climate maps">
<link rel="home" href="/" title="home"> <link rel="copyright" href="/other/copyright.shtml"> <link rel="search" title="Site Search" href="/search/"> <link rel="contact" title="Contacts" href="/inside/contacts.shtml"> <link rel="accessibility" title="Accessibility Statement" href="/other/accessibility.shtml"> <link href="/standard/stylestd.css" rel="stylesheet" type="text/css">
Adding it to MOSS
As it turns out, there is an easy way to add Dublin Core/AGLS to a MOSS web page. The answer... Delegate Controls 18/01/2008I had a recient need to add attachments to list items as part of a data migration. It turns out to be really easy so here is the code:
using System; using System.Collections.Generic; using System.Text; using System.IO;
using Microsoft.SharePoint;
namespace FileUpload { class Program { static void Main(string[] args) { using (SPSite site = new SPSite(" http://moss01:8060")) { using (SPWeb web = site.OpenWeb("people")) { SPList list = web.Lists["Staff Directory"];
FileInfo file = new FileInfo(@"C:\Documents and Settings\Administrator\Desktop\MyFace.gif");
// Get a list item, just hard coded to get the first one. SPListItem attachItem = list.Items[0]; attachItem.Attachments.Add(file.Name, AddFile(file)); attachItem.Update();
} } } internal static byte[] AddFile(FileInfo file) { FileStream fStream = File.OpenRead(file.FullName); byte[] contents = new byte[fStream.Length]; fStream.Read(contents, 0, (int)fStream.Length); fStream.Close();
return contents; } } }
| Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XsnLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | FileType | xsn | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.2 | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.3 | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.4 | 255 | | View in Web Browser | /_layouts/images/ichtmxls.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=1 | 0x0 | 0x1 | FileType | xlsx | 255 | | View in Web Browser | /_layouts/images/ichtmxls.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=1 | 0x0 | 0x1 | FileType | xlsb | 255 | | Snapshot in Excel | /_layouts/images/ewr134.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=1 | 0x0 | 0x1 | FileType | xlsx | 256 | | Snapshot in Excel | /_layouts/images/ewr134.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=1 | 0x0 | 0x1 | FileType | xlsb | 256 |
|
|
|
|
|
|
|
|