tag:blogger.com,1999:blog-71706742024-03-13T10:33:37.515+00:00Share PointsSharepoint 2003 development and thoughtsGiles Gregghttp://www.blogger.com/profile/06044593440123648749noreply@blogger.comBlogger13125tag:blogger.com,1999:blog-7170674.post-1148380340761263582006-05-23T11:18:00.000+01:002006-05-24T14:12:48.383+01:00Moved to wordpressSorry blogger, but wordpress is quite an impressive service. The features like categories, stats, and the comments feature are too good to resist.<br /><br />So, all my posts and future posts are now at <a href="http://sharepoints.wordpress.com/">http://sharepoints.wordpress.com/</a>Giles Gregghttp://www.blogger.com/profile/06044593440123648749noreply@blogger.com2tag:blogger.com,1999:blog-7170674.post-1134937783427553452005-12-18T19:50:00.000+00:002005-12-18T20:29:43.536+00:00Macaw ReskinnerWow, a whole year. More even, 13 months. How can so much time pass without a blog posting? Perhaps I got lazy. There are so many great SharePoint bloggers out there now, I didn't feel the need to post information. I also didn't want to become an "echo" blog, repeating the latest news that so many blogs seem to do. I like to think that as my role became one of project management, I didn't really come across many technical insights to share with the world.<br /><br />But anyway....<br /><br />You certainly start to become more attuned to the business challenges, and consequences, of implementing SharePoint, but you feel that you can't really post on work that is internal to a company.<br /><br />However, there is on thing that I have come across recently that I should definitely mention.<br /><br />The one thing everybody comments on, and Microsoft assures us is fixed in the next version, is options that people don't have permission to use are presented to every user. The other is the administration headache of making changes to layout. The amount of files you end up having to change is huge, and you can't help feeling that you're almost breaking SharePoint as you make those changes to allitems.aspx etc etc.<br /><br />A long while ago, I posted on how difficult the problem of customisation is. It received a lot of comments. I guess many people had the same problems. However, one comment offered a solution that had been proposed before, but never implemented until then.<br /><br />Alas, I didn't take the time to research it as it wouldn't have helped me then. But someone else did, and commented back on the same article, very positively. Recently I faced some challenges in an implementation, and my memory brought those comments to mind.<br /><br />Essentially, <a href="http://weblogs.asp.net/soever">Serge van den Oever</a> created a httpModule that uses regexp to edit html on the server, after it has been generated by SharePoint. This means you can edit the html of SharePoint web pages, on the server, without touching a single SharePoint config file or .aspx page, before they are sent down the wire to the user. While it may add overhead to your processing time, it is a beautifully clean solution, compared to the alternatives I have seen ( and implemented) before.<br /><br />That text and those links generated by locked down Microsoft dll's can now be search and replaced away by a simple regex. If for example you're one of those people needing to strip away that site settings link across all WSS sites on a server, I would recommend trying this out. The package can be downloaded from <a href="http://www.gotdotnet.com/workspaces/workspace.aspx?id=3ed68681-ae28-4d33-8c36-403e6af7fa11">gotdotnet</a>.Giles Gregghttp://www.blogger.com/profile/06044593440123648749noreply@blogger.com0tag:blogger.com,1999:blog-7170674.post-1100308397978625722004-11-13T01:13:00.000+00:002004-11-14T23:16:05.746+00:00Back from holidayOk, so I wasn’t actually on holiday for 3 months, but on my return I started a new job project managing a SharePoint implementation rather than acting as a technical consultant.
<br />
<br />A very different way of working.
<br />
<br />While tech knowledge helps in that role, you obviously spend much less time dealing with code and .aspx templates and the like, which has left me with not so much to publish.
<br />
<br />I have had quite a few circumstances where I’ve had knowledge that would be useful to post, but as a project manager, you’re not in the frame of mind where your instinct is to rush to your blog. Your responsibility is to resolving problems and keeping the project on track.
<br />
<br />I’m going to try this method of posting to my blog via email, and perhaps posting SharePoint thoughts from the perspective of a project manager.Giles Gregghttp://www.blogger.com/profile/06044593440123648749noreply@blogger.com0tag:blogger.com,1999:blog-7170674.post-1100459776943251602004-11-14T19:16:00.000+00:002004-11-14T23:14:37.510+00:00Data View Web PartsAlthough in my last post I mentioned SharePoint from the project management perpective, here's a tip that's purely development.
<br />
<br />One thing that winds me up is how SharePoint deals with ghosted pages. As soon as a page is unghosted it's lost to any future template changes. If you unsure to what unghosted pages are in SharePoint let me assure you they are "a bad thing".
<br />
<br />Now should you wish to create a data view web part from an existing list, you have to do it in FrontPage, and you have to then hit the save button, unghosting it and casting the page down in to the 7th circle of SharePoint annoyances.
<br />
<br />Unless...
<br />
<br />You first create a new web part page, and place your list as a web part on that new page. Then in FrontPage convert it into a Data View web part and do all the customisations you wish. Once done, hit save.
<br />
<br />Then visit the page in Internet Explorer. Modify the properties of the data view web part and you'll see the three buttons in the toolpane that displays the properties on the data view web part (Source Editor, DataQuery Editor, Parameters Editor). Open each property window and copy and paste the values to 3 local text files.
<br />
<br />You can now delete the web part page and the data view web part it contains. (Although I'd recommend waiting until you know this whole process has worked)
<br />
<br />Now go to the page you really want to display the data view web part on.
<br />
<br />Drop an empty Data View web part in to a zone. Open the toolpane, and for each property button paste in the values from your local text files.
<br />
<br />You'll now have your customised Data View web part, and no unghosting will have taken place!
<br />
<br />High-five!
<br />
<br />What’s that? You don't have an empty Data View web Part? Ah.
<br />
<br />Right-click save target as on http://gilesgregg.com/Data%20View%20Web%20Part.dwp.
<br />
<br />Copy it in to your wpcatalog folder under the sites’ root iis folder and you'll then find it under the Virtual Server gallery.
<br />
<br />Alternativly you could export the web part to a .dwp file off the temporary web part page and then import it to the destination page. This is certainly an easier method in the short term, but I've found having an empty data view web part in the Virtual Server gallery quite useful.
<br />
<br />Any feedback gratefully received...
<br />Giles Gregghttp://www.blogger.com/profile/06044593440123648749noreply@blogger.com3tag:blogger.com,1999:blog-7170674.post-1092512228710659122004-08-14T20:31:00.000+01:002004-08-15T01:01:08.183+01:00Modify Shared PageOk, just before I go off on holiday for a week, here is a quick post on something I've been using for a while.
<br />
<br />If anyone out there has been wanting to edit the drop-down that decends when the "Modify Shared Page" box is clicked, here is one quick and easy method.
<br />
<br />The structure and options of the menu are actually a small xml fragment embedded in the html source of each page. Simply by editing the xml you can edit the menu. Microsoft use this technique on many of their web sites.
<br />Here is an example javascript function that will add the create link to the bottom of the drop-down.
<br />
<br /><em><span style="font-size:78%;">function updateMenu()</span></em>
<br /><em><span style="font-size:78%;">{</span></em>
<br /><em><span style="font-size:78%;">//get a reference to the XML fragment</span></em>
<br /><em><span style="font-size:78%;"> //team workspace menu </span></em>
<br /><em><span style="font-size:78%;">var oNode = document.getElementById('MSOMenu_SettingsMenu'); </span></em>
<br /><em><span style="font-size:78%;">if(oNode==null){ </span></em>
<br /><em><span style="font-size:78%;">//meeting workspace menu </span></em>
<br /><em><span style="font-size:78%;">oNode = document.getElementById('MtgMenu_SettingsMenu'); </span></em>
<br /><em><span style="font-size:78%;">}</span></em>
<br /><em><span style="font-size:78%;">//check it exists</span></em>
<br /><em><span style="font-size:78%;">if(oNode!=null){</span></em>
<br /><em><span style="font-size:78%;">//append an additional node to the xml</span></em>
<br /><em><span style="font-size:78%;">oNode.innerHTML = oNode.innerHTML + '<ie:menuitem type="option" onmenuclick="javascript:window.location=\'_layouts/1033/create.aspx\';">Create</ie:menuitem>';</span></em>
<br /><em><span style="font-size:78%;">}</span></em>
<br /><span style="font-size:78%;"><em>}</em></span>
<br /><span style="font-size:78%;">
<br /></span>You can write any javascript functions you like, and have them executed by the onMenuClick property of the menuitem node.
<br />
<br />If you want to get ambitious, you can define sub-sections, icons, in fact pretty much re-write the whole menu. Have a look at the xml fragment to understand it's structure and properties. If you have difficulty finding it, search on the text 'MtgMenu_SettingsMenu'.
<br />
<br />Now, how do you run this javascript on the page? You can either create your own update.js file, and then edit every .aspx list and web part page template to include a reference to the js file. Or, add your function to the file ows.js as it is already referenced by every page.
<br />
<br />Additionally, you have to ensure the updateMenu function does not execute before the xml fragment has been written out in the html. You can either:-
<br />
<br />
<br /><ul><li>Use the onload event to fire the command. Alas, some sharepoint pages already use onload, and you risk damaging native functionality with this method.</li><li>Use setTimeout('updateMenu()',500); Here, you are dependant on the end user having downloaded the page completely within your specified time delay.</li><li>Edit each .aspx template and ensure the updateMenu() command is the last processing instruction on the page. Low risk, but a significant amount of work, and vunerable to Microsoft updates to SharePoint.</li></ul><p>
<br /><strong>Considerations</strong></p><ul><li>In either method, you are changing pages that will potentially get over-written by a SharePoint patch or update from Microsoft. Bear this in mind when choosing in which files to place new javascript functions.</li><li>If you do declare a path similar to the one "_layouts/1033/create.aspx", be aware that that it will not always be valid with respect to the page the user is on, particulary in the case of web part pages. I believe I have a solution for this, but I haven't investigated it yet.</li><li>If you edit ows.js, it will effect <em>every</em> site on the server, you may need additional logic in the javascript to ensure additions are only made for certain sites, for example testing the domain name.</li></ul><p>I'm sure others out there can think of ways to minimise the risks of running client-side javascript in this way, and perhaps increase the functionality of the updateMenu() command.</p>Giles Gregghttp://www.blogger.com/profile/06044593440123648749noreply@blogger.com6tag:blogger.com,1999:blog-7170674.post-1091895381485345152004-08-07T16:54:00.000+01:002004-08-13T12:30:44.703+01:00Make more postsA couple of weeks ago I dropped a <a href="http://www.bluedoglimited.com/SharePointThoughts/ViewPost.aspx?XPage=9b90f7d0-5db7-46d7-a8c0-92d76c08ae94:SetFilter:FilterField1%3d%252540ID%26FilterValue1%3d61">comment</a> on Maurice Prathers blog about using http compression on sharepoint. This is something I consider almost essential for any sharepoint site, regardless of your connection speed to the server.
<br />
<br />It looks like he took it up, and and has written a <a href="http://www.bluedoglimited.com/SharePointThoughts/ViewPost.aspx?ID=63">great post</a> on how to implement it. Which of course made me feel very lazy in not making an effort to post the info myself *note to self, post info*.
<br />
<br />He has also published very detailed info on the <a href="http://www.bluedoglimited.com/Shared%20Documents/HTTP%20Compression%20Analysis.mht">resulting performance</a>.
<br />
<br />my only comment is that he may have set the compression level a bit too high..
<br />
<br />UPDATE: Maurice has updated his article showing the performance benefits of using level 9 compression.
<br />
<br />great post Maurice.
<br />Giles Gregghttp://www.blogger.com/profile/06044593440123648749noreply@blogger.com1tag:blogger.com,1999:blog-7170674.post-1089544987274688182004-07-11T12:13:00.000+01:002004-07-11T13:27:24.676+01:00Portal Alternate HeaderI received a comment from Sunil on SharePoint customisation, and I decided to make a post of of my reply. It was great to receive a comment, firstly furthering the sharing of knowledge, secondly it's great to know that someone is reading my blog! Hey all you lurkers out there, drop a comment sometime, it's the sort of thing that motivates us to post more information.. ;-)
<br />
<br />anyway, back to the question...
<br />
<br /><em>is there any way where I can change the home page of portal server and all following site pages ( not my sites) will have the same. I tried the alternateheader, but I don't know where I made the mistake none of the pages got changed or no changes error happend also. no change.</em>
<br />
<br />There are a couple of options available to you with SPS. You can specify an alternate image for the top corner, and an additional CSS stylesheet through the SharePoint administration interface. However it sounds like you want more substantive changes.
<br />
<br />WSS sites are created from a single template, either STS or MPS. However SPS sites are made up from multiple templates under the system 60 directory :- SPSBWEB, SPSCOMMU, SPSNEWS, SPSNHOME, etc..
<br />
<br />Thus, any changes you make must be made to the ONET.XML file must be made to all the SPS?????/xml/onet.xml files. Additionally, they must be made <strong>before</strong> you create the portal site.
<br />
<br />However, the Portal ONET.XML files already have an alternate header defined, "PortalHeader.aspx" which you can find in the layouts/1033 directory (presuming you are using the 1033 locale). So, you can edit that file to implement changes to the portal header.
<br />
<br />Except, no, you can't really.
<br />
<br />Without going into great detail on the SharePoint architecture, all sharepoint pages are based on an .aspx template somewhere under the /60/ directory. Some of those templates contain a line of code saying:-
<br />
<br /><%
<br />string alternateHeader = SPControl.GetContextWeb(Context).AlternateHeader;
<br />if (alternateHeader == null || alternateHeader == "")
<br />{
<br />%>
<br />
<br />Pages that contain this statement <strong>will</strong> show any changes that you make to PortalHeader.aspx. Pages that don't, won't. Unfortunetly the only pages that have this statement are admin pages under the layouts/1033 directory. Even then, its not all of them.
<br />
<br />Pages that the end user sees run under a different architechure to the administration pages. So how do you edit the header on these pages? So far, the only method I am aware of is to edit every single template file. There are about 100 per language for STS sites (web part page and list templates), I haven't worked out how many for portal sites, as I'd rather not even think about it. The most managable solution I have found is to use a javascript include that manipulates the DOM client-side at run-time, but this is only suitable for minor edits.
<br />
<br />Anyone who has found how to use an alternate header properly across all pages, please raise your hand. Much kudos is available to whoever can draw the sword of customisation from the stone of SharePoint.Giles Gregghttp://www.blogger.com/profile/06044593440123648749noreply@blogger.com24tag:blogger.com,1999:blog-7170674.post-1088025142739895822004-06-23T22:04:00.000+01:002004-06-23T22:12:22.740+01:00Ghosted and UnghostedOr, as I once called them, inherited and modified.
<br />
<br />Anyone wanting to understand what going on behind the screens when you're editing pages with FrontPage 2003 needs to read <a target="_blank" href="http://www.bluedoglimited.com/SharePointThoughts/DispLog.aspx?XPage=58b5f5d8-21cc-49b1-af2e-26cf89e44bc3:SetFilter:FilterField1%3d%252540ID%26FilterValue1%3d4">Ghosted and unghosted pages - part 1 of 2</a>.
<br />
<br /><a href ="http://www.bluedoglimited.com/SharePointThoughts/default.aspx" target="_blank">Maurice Prather's blog</a> is an excellent resource for serious developers...Giles Gregghttp://www.blogger.com/profile/06044593440123648749noreply@blogger.com0tag:blogger.com,1999:blog-7170674.post-1088019126549945502004-06-23T20:19:00.000+01:002004-06-23T21:44:24.213+01:0010 page limit in Meeting workspaceNot any more.
<br />
<br />This one held me up for an afternoon...
<br />
<br />Anyone else who has tried to get around the 10 page limit in meeting workspaces will probably have spent a bit of time going through the XML config files, and I had pretty much given up after 2 hours...
<br />
<br />Then, the first real sign of desperation set in. I considered using FrontPage.
<br />
<br />No, really.
<br />
<br />Obviously I continued searching the 60 directory, even binary searching the dlls to see if I could even find where the limit was set. But eventually I fired up FP2003 and very quickly found I could copy and paste existing .aspx files in the /pages directory until there were 13 files.
<br />
<br />Then reloaded my site, and 14 tabs appeared. And they worked. And I could use all the existing page management tools in the web interface. Fantastic.
<br />
<br />So why does the limit exist? Possibly a performance factor, perhaps a UI consideration. SharePoint seems perfectly happy for now...
<br />
<br />To be fair to the FrontPage 2003 team, FP2003 is a great product, but old memories die hard. ;-) Check out their blog at <a target="_blank" href="http://blogs.msdn.com/frontpoint">http://blogs.msdn.com/frontpoint</a>Giles Gregghttp://www.blogger.com/profile/06044593440123648749noreply@blogger.com1tag:blogger.com,1999:blog-7170674.post-1088018277373580902004-06-23T20:08:00.000+01:002004-06-23T20:19:34.093+01:00New memberI've been a bit slack over the last couple of weeks and neglected to post my recent discoveries with SharePoint, intend to make up for that over the next 24 hours..
<br />
<br />Plus I've invited a friend to also post his own notes... Oisin works at a much lower level than myself in .Net so I'm sure he'll be adding posts about optimising threads and debugging the CLR... right Ois?
<br />
<br />First tip while it's in my head, when you're running SPS on Win2003, don't then convert it to a DC and install DNS and Active Directory. Not if you want to be able to use SPS again in a hurry...
<br />
<br />I'm guessing most people out there will know this already. Especially if they've any common sense at all...Giles Gregghttp://www.blogger.com/profile/06044593440123648749noreply@blogger.com0tag:blogger.com,1999:blog-7170674.post-1086401264149367292004-06-05T02:54:00.000+01:002004-06-05T03:24:39.423+01:00Visible security options<a target="_blank" href="http://weblogs.asp.net/danielmcpherson/">Daniel McPherson</a> has a great blog that's well worth reading. He was also kind enough to give a very detailed reply to a question I posted to him.
<br />
<br />It's a question that is often asked, Why can read only users see all the administration options, and how can I stop it?
<br />
<br />Read Daniel's <a target="_blank" href="http://weblogs.asp.net/danielmcpherson/archive/2004/05/17/133605.aspx">answer</a>
<br />
<br />For the record, I firstly edited the themes to make all the classes used by security sensitive links hidden. Then I wrote a client-side javascript function that hid the remaining elements by searching for them through the DOM. Then, for administrators to be able to make changes, I wrote a script that undid all the 'visible:hidden' changes. I made the function available in the 'Modify Page' drop-down by editing the XML fragment embedded in the page that determines the contents of the menu (also with client-side script). To finalise, when administrators clicked the option in the menu, a cookie wound be written to remember their setting.
<br />
<br />Believe me, that didn't all happen at once! :-D
<br />
<br />Probably about 2 weeks of messing about to get to the final stage... but it's still a messy way of doing things. A cleaner solution is needed. Anybody know what it is?
<br />
<br />Giles Gregghttp://www.blogger.com/profile/06044593440123648749noreply@blogger.com0tag:blogger.com,1999:blog-7170674.post-1086400244038019632004-06-05T02:37:00.000+01:002004-06-05T03:12:47.446+01:00Using alternate header in ONET.XMLSerge has written a lot of detail on using the AlternateHeader parameter in ONET.XML. This is the best way to customise those hundreds of admin pages in the _layouts directory.
<br />
<br /><a target="_blank" href="http://weblogs.asp.net/soever/archive/2004/06/01/145831.aspx">http://weblogs.asp.net/soever/archive/2004/06/01/145831.aspx</a>
<br />
<br />Unfortunetly AlternateHeader doesn't customise the web part pages or the list pages, which are of course the pages that make up 99% of the site for the average user. Unless I've missed a trick of course, let me know!
<br />
<br />To assist in editing the ONET.XML file, and those templates, here are a few pointers.
<br />
<br />When editing the NAVBARS elements, an iisreset will be required to see the change.
<br />
<br />When editing the top PROJECT element, no amount of restarting will pick up the changes, the AlternateHeader, CustomJSUrl, and AlternateCSS parameters are grabbed at the point the site is created, so you can't change a site that already exists...
<br />
<br />When editing files that the parameters point to, or editing the .aspx templates for the web part pages and list pages, no restarting required at all, the changes are immediatly live!
<br />
<br />remember changes in these areas will be the first to get over written by service packs and the like, so think about your changes carefully..Giles Gregghttp://www.blogger.com/profile/06044593440123648749noreply@blogger.com3tag:blogger.com,1999:blog-7170674.post-1086047661605218492004-06-01T00:49:00.000+01:002004-06-01T01:11:10.586+01:00Sharepoint 2003 blogHi all,
<br />
<br />Another new Sharepoint Blog, looking forward to Sharing points on Sharepoint.
<br />
<br />It's a mighty powerful thing, but it's not an obviously powerful thing is it?Giles Gregghttp://www.blogger.com/profile/06044593440123648749noreply@blogger.com0