Archive

Archive for the ‘Web Parts’ Category

Salamander My Sites Now Support Filtering By Site Url

July 6th, 2010 Richard No comments

I’ve added a property to Salamander My Sites so that you can now filter the site list by a regular expression on the site url.

MySitesRegEx

When the Site Name RegEx is set it checks the sites’ urls and only shows links to those that match the regular expression. In the case pictured only those sites with urls such as

  • http://moss/classes/Art1A
  • http://moss/classes/Art-b2
  • etc

This was prompted by a request from a school who wanted to link to a subjects class sites from their departmental site.

They wanted to keep all the class sites under the classes sub-site, as per the default Microsoft Learning Gateway set up as that’s the easiest way for students to get to them.

Salamander My Sites remains a free web part.

My Shared Documents Web Part

March 6th, 2009 RichardWillis No comments

I’ve finally released the long-awaited My Shared Documents Web Part. This is a companion product to My Documents, but instead of allowing access to the user’s home folder, it allows access to file shares on the network through SharePoint. It is styled just like a normal document library and respects the NTLM permissions that are set on the files.

For more details see http://www.salamandersoft.co.uk/myDocuments.html or contact me at mydocuments@salamandersoft.co.uk for a trial version.

Categories: My Documents, Web Parts Tags:

Salamander Redirect Web Part

March 6th, 2009 RichardWillis No comments

I’ve just finished writing another web part. This one is a web part
which simply redirects the user to another page. There’s quite a few of these around, but none of them suited the school who had the requirement. Their problem was that there were multiple domains the users could belong to – a domain per school, and the existing web parts couldn’t handle this, they were only able to look in one default domain, for example to find the active directory groups they redirected based on.

Salamander Redirect Web Part redirects based on the OU the user is contained in. The list of OUs and the redirect urls are kept in a SharePoint custom list on the same site and the most specific one is used to redirect the user. For example if the following data is in the list

ou=students,ou=users,dc=school1,dc=local    http://sharepoint/school1/students
ou=staff,ou=users,dc=school1,dc=local          http://sharepoint/school1/staff
ou=users,dc=school1,dc=local                       http://sharepoint/school1

Then if the user is in ou=students,ou=users,dc=school1,dc=local they will be redirected to http://sharepoint/school1/students, but if they are in ou=support,ou=users,dc=school1,dc=local they will be redirected to http://sharepoint/school1/.

If you are interested then please send an email to redirector@salamandersoft.co.uk.

Categories: Web Parts Tags:

Restricting Who Can Add Specific Web Parts to a Page

December 18th, 2008 RichardWillis 2 comments

Sometimes you want to restrict who can add a specific web part to a page. Maybe it can access sensitive information, or it can be connected up in a dangerous way, or even it places too much load on your server and you only want it in one place. Well the good news is that you can limit exactly who has access to add particular web parts to pages in SharePoint 2007 using the standard method of setting permissions. The web parts are kept in a list in SharePoint so you can use the normal list setting permissions to limit access.

You need to remove permissions to the web part itself. The process is

1.    From any site settings go to the top level site setting.

2.    Open up the web part gallery.

3.    Click the edit button for the web part you want to limit permissions to.

4.    Click Manage Permissions from the edit page.

5.    You will then see a standard Manage Permissions page. As with any permissions on a list, you will first need to break inheritance. Then set up the permissions so that the users you don’t want to be able to add the web part, don’t have any permissions on it at all, either directly or via a group membership.

Note: These permissions only affect being able to add the web part to a page and modifying the actual web part entry in the list. Once the web part has been placed on a page, these permissions are not used, the site permissions then control who can edit properties and delete the web part from the page. So you still need to consider the page level permissions carefully.

Categories: Web Parts Tags:

Recent Surveys Web Part

December 16th, 2008 RichardWillis No comments

This is one I forgot to blog about at the time. About a month ago I wrote a Recent Surveys Web Part which was suggested by one of my existing customers. It’s a pretty simple concept, it just displays all the recent surveys on a specified site, limited by age and maximum number. This particular school wanted to keep all their surveys in one location, but then display them on other sites within their portal. You can get more details at http://www.salamandersoft.co.uk/recentsurveys.html.

Categories: Web Parts Tags:

Add Document Library and Calendar support to List View Web Part

December 11th, 2008 RichardWillis No comments

After some feedback from a school, I’ve added support for Document Libraries and Calendars to the List View Web Part and fixed a couple of minor issues.

For document libraries you can now navigate through into their folders while staying on the original page.

For calendars it will now display the calendar format automatically if the view is in calendar format.

Categories: List View, Web Parts Tags:

Adding a CSS Stylesheet to a Web Part

December 10th, 2008 RichardWillis No comments

This is something that you would think would be really easy, after all you should always separate the styles out from your code. However, I had great difficulty finding anything on the web about it. I finally managed to crack it and am posting it here for others to find.

Basically you can add an HtmlLink control to the Headers collection of the page.

        ///<summary>Adds the stylesheet to the page.</summary>
        void AddStyleSheet()
        {
            string url = “~/_layouts/misWebParts/misWebParts.css“;
            foreach (Control control in Page.Header.Controls)
            {
                HtmlLink link = control as HtmlLink;
                if (link != null)
                {
                    if (link.Href == url)
                    {
                        //Already added
                        return;
                    }
                }
            }
            HtmlLink cssLink = new HtmlLink();
            cssLink.Href = url;
            cssLink.Attributes.Add(“type“, “text/css“);
            cssLink.Attributes.Add(“rel“, “stylesheet“);
            Page.Header.Controls.Add(cssLink);
        }

The code is for the School MIS web parts I’m working on. The stylesheet is deployed to the layouts directory so we can reference it via the url above. You need to check to see if the link has already been added as usually there’s going to be more than one MIS web part on the page.

Categories: Development, Web Parts Tags:

List View Web Part

December 10th, 2008 RichardWillis 3 comments

I’ve just finished a beta release of a list view web part for SharePoint. It allows you to display a list from another site even if it is in another site collection. It designed to be as simple as possible to set up.

To use it there’s 3 properties which you need to set:

  1. Site Url: The url of the site the list in on.
  2. List Name: The name of the list.
  3. View Name: The name of the view to use to display the list.

The connection to the list is made as the user viewing the web part, so will use their permissions. So if they don’t have permission on the list, they won’t see it.

If you want to display a list from another site collection, then it needs to be on the same server.

It’s only a Beta release so not all Errors have graceful error messages. You can download it from http://www.salamandersoft.co.uk/webparts/listview.zip. The beta will expire on 19 Jan 2009.

Have a go and let me know what you think either in the comments or email to listview@salamandersoft.co.uk.

I’m sure there’s other features I could add, but that depends on how popular it is and whether there’s any demand for them.

Categories: List View, SharePoint, Web Parts Tags:

SPLimitedAccessDiscovery

December 8th, 2008 RichardWillis 3 comments

I’ve just come across a nice little free SharePoint solution called SPLimitedAccessDiscovery. It’s a little solution which will give a report on everybody who has their permissions limited as “Limited Access” on the Site Permissions page of a site. Very helpful for tracking down why somebody has limited access as the report will list all objects as the people have access to. The report generated shows the account given the limited access, the type of object that was found to have unique permissions, the title of the list and item, as well as a url to the object and its ID.

It’s integrated nicely into SharePoint, the link to the report appearing on the standard settings page for a site after a site collection level feature is activated.

My only gripe is that installation could be a bit slicker. It’s supplied as a standard wsp, so you’ll need to install it with STSADM. A little batch file to do this would be good. The command I used to install is

“C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe” -o addsolution -filename limitedaccessreport.wsp

I also had the following error when trying to view the report

Request for the permission of type ‘Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ failed. 

This was because the web part needed higher permissions than my SharePoint was running at. It was easily solved by installing it in the GAC, but ideally the solution should either have installed itself in there, or even better added a custom code access permission.

There’s more information at the author’s site http://philwicklund.com/freeware/splimitedaccessdiscovery/default.aspx or can be downloaded from Codeplex.

Make sure that you get the 1.0.0.1 release as there is a bug in the 1.0.0.0 release.

Categories: Web Parts Tags:

Facility CMIS Web Parts

November 26th, 2008 RichardWillis No comments

I’ve just been looking at the server statistics and have noticed that I’ve had several hits from people who had searched for Facility CMIS web parts or serco CMIS web parts. Just to let you know that I’m currently working on some web parts for Facility CMIS ready to release in January at BETT.

These will cover areas like My Details, timetable, attendance, assessment etc, for pupils, staff and parents. If anyone is interested then drop me a line at miswebparts@salamandersoft.co.uk and I’ll keep you updated on progress.

Categories: Facility CMIS, Web Parts Tags: