Toggle SharePoint User Interface between SharePoint 2007 and SharePoint 2010

Just released the SharePoint Toggle UI project to Codeplex: http://sptoggleui.codeplex.com/

 

If you are one of those users who is still getting used to the new SharePoint 2010 user interface, you can now switch between the familiar SharePoint 2007 user interface and the new SharePoint 2010 user interface back and forth!

 

After installing the SharePoint Toggle UI, you get the option in the Site Actions menu

 

toggleui-action

 

Click on Toggle Visual Mode to switch to SharePoint 2007 user interface

 

2007ui

 

Notice you still have the SharePoint 2010 out of the box Visual Upgrade options enabled

 

visual-upgrade

 

Click again on Site Actions | Toggle Visual Mode to switch to SharePoint 2010 user interface!

 

Deactivate Features Deployment Step for SharePoint 2010

If you are developing SharePoint 2010 applications in Visual Studio 2010, you would wonder why there is no Deactivate Features deployment step available but only Activate Features deployment step.

image

This becomes a problem when you retract your solution as the features do not get deactivate from the site.

Let me introduce to my first Visual Studio 2010 Tools for SharePoint 2010 extension – Deactivate Features Deployment Step 

Deactivate Features Deployment Step is an extension for Visual Studio 2010 tools for SharePoint 2010. Use this deployment step to deactivate features in a local SharePoint site.

deactivate_features_step

It is available for download at the Visual Studio Gallery or from your Visual Studio 2010 Extensions Manager

image

jQuery Web Parts for SharePoint – Release v1.0.0.0

jQuery Web Parts for SharePoint brings the various jQuery UI elements to SharePoint as web parts. It uses jQuery SmartTools to integrate jQuery in SharePoint.

Installation Instructions

Available Web Parts
- Accordion Web Part for Announcements List
- News Ticker Web Part for Announcements List
- Image Cycle Web Part for Pictures Library

Screenshots

Accordion Web Part

accordion_webpart.png

News Ticker Web Part

newsticker_webpart.png

Image Cycle Web Part

imagecycle_webpart.png

 

To download, visit the CodePlex site.

Item-level Permissions for Document Libraries – Release v1.1.0.0

Just released Item-level Permission for Document Libraries v1.0.0.0. You can get it here.

ilp_documents_settings_page

Changes in v1.1.0.0

- ILP now uses SharePoint Solution Installer for installation/un-installation

- Fixed a bug with Timer Job & RunWithElevatedPriviliges

- Changed the visibility of the ILP site columns, ILP list instance. They are now visible in the site.

- Added the ability for developers to hook their own event handlers. Read more here >> Info for developers

Known Issues

- If you are using the API to enable ILP & register your custom event handlers, you have to use the API again to disable ILP & un-register your custom event handlers to the corresponding document library or list.

Item Level Permission for Document Libraries – Release v1.0.0.0

 

[There is currently some problem with CodePlex and I am not able to upload my files or source code in my CodePlex project. This project will be eventually moved to CodePlex soon.]

This project is now available at CodePlex – http://ilp.codeplex.com 

--------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------

ILP enables item-level permission for document libraries and also allows users to select a set of default permissions that can be applied to the new items and existing items in the document library.

Installation

Execute the install.bat to install. You will be prompted for two Urls – Web Application Url and Web Url.


ILP for Document Libraries will be activated in the Web Url you specify above. So in my above example screenshot, the ILP will be available for the root web / in the http:/sample web application.

How to activate for any other web?

Go to the Site Settings for your web and click on Site Features.


Activate the ILP:Item level permission library settings feature

ilp_feature_activate

Once activated, ILP will be available to that web.

To uninstall, execute the un-install.bat script.

Usage

You can locate the Item-level permissions for the document library in the document library's Settings Page under the Permissions and Management tab

ilp_settings

Click on the Item-level permissions for this document library to open the item-level permissions page


ilp_documents_settings_page

You can now specify your options

  • Require new items to inherit parent permissions?
    • Choosing Yes will enable item-level permission for this document library
    • Choosing No will disable item-level permission for this document library.
  • Default Permission Levels
    • Any additional permissions you might like to give to the new items
    • Choose a Permission Level and then select the groups. Groups == SharePoint Groups.
    • If left empty, nothing happens.
  • Permissions to existing items
    • This helps to update the existing items in the list.
    • If ILP is enabled
      • Choosing Yes will set ILP for existing items in the document library, inherit parent permissions and also apply any default permission levels (chosen in Step 2, if any).
      • Choosing No will not modify existing items in the document library.
    • If ILP is not enabled
      • Choosing Yes will disable ILP for existing items in the document library and copies the parent permissions back.
      • Choosing No will not modify existing items in the document library.

 

 

 

 

Developers, Developers, Developers – ILP API

If you are a devleoper and want to consume the ILP API, you can do so.

Download the latest ilp_api_{version}.zip. Unzip and add reference to the the Chaks.SharePoint.Docs.ILP.dll in your project

You can now use the Extension method EnableItemLevelPermissions on the SPList object.

Below is the declaration of the EnableItemLevelPermissions method:

ilp_enableitemlevelpermissions

It accepts ItemLevelPermissionSettings as the only parameter

ilp_itemlevelpermissionsettings

  • EnableItemLevelPermissions
    • Specify whether to enable ILP or not
  • DefaultGroups
    • List of default SharePoint groups you want to apply to the items
  • DefaultPermissionLevel
    • The default permission level you want to apply to the items
  • ApplyToExistingItems
    • Specify whether to apply the changes to the existing items or not

You can safely ignore EventReceiverAssembly and EventReceiverClass as it is internally used by the ILP to hook to the proper event receiver. From next release onwards, developers will be able to hook up to their own event receivers using these two peoperties.

Using the API

Below are some code samples on using the API

 

 

using Chaks.SharePoint.Docs.ILP;

namespace ConsoleApplication
{
    class Program
    {
        static void Main(string[] args)
        {
            using (SPSite spSite = new SPSite("http://sample"))
            {
                using (SPWeb spWeb = spSite.RootWeb)
                {
                    SPList imagesList = spWeb.Lists["Site Collection Images"];

                    List<SPGroup> spGroups = new List<SPGroup>();
                    spGroups.Add(spWeb.SiteGroups[1]);
                    spGroups.Add(spWeb.SiteGroups[2]);

                    ItemLevelPermissionSettings settings = new ItemLevelPermissionSettings
                                                               {
                                                                   EnableItemLevelPermissions = true,
                                                                   DefaultPermissionLevel = spWeb.RoleDefinitions["Full Control"],
                                                                   DefaultGroups = spGroups,
                                                                   ApplyToExistingItems = true
                                                               };

                    imagesList.EnableItemLevelPermissions(settings);

                    Console.WriteLine("Permissions applied....Press any key to continue");
                }
            }

            Console.ReadKey();
        }
    }
}

You can pass null if you dont intend to apply any default permission level and default groups

ItemLevelPermissionSettings settings = new ItemLevelPermissionSettings
{
     EnableItemLevelPermissions = true,
     DefaultPermissionLevel = null;
     DefaultGroups = null;
     ApplyToExistingItems = true
};

Note

Even though ILP for Document Libraries is meant only for Document Libraries (as the same suggests), using the API, you can also apply it to a SharePoint List.Please note that, it does not override the SharePoint out of the box Permissions settings and thus if you have already set up unique permissions for a SharePoint list, they will also be applied along with the ILP settings.

Downloads

Add Bing to Windows 7

Now that Bing is live, you would like to try out the new search engine. If you want to add Bing as one of the search providers in your Internet Explorer browser, you can do so from here

You can add Bing to your Internet Explorer by installing the Bing search add-on available at the Internet Explorer add-ons website.

image

And if you want to add Bing to Windows 7, you can do so by downloading this small file and enjoy Bing in Windows 7!

 

image

StsAdmin Extension Utility – createsitecolumn

NOTE: As of June 26th, 2009, this utility has a new home - http://csc.codeplex.com/

Feel free to post your feature suggestions or any bugs related to StsAdm 'createsitecolumn' extension here

======================================================= 

Here is my first ever stsadm.exe command extension! – createsitecolumn

stsadm.exe -o createsitecolumn -url http://mysite -name MyTextField -type Text -group Examples

stsadm.exe -o createsitecolumn -url http://mysite -name MyChoiceField -type Choice -group Examples -choices 4,5,3

stsadm.exe -o createsitecolumn -url http://mysite -name MyChoiceField -type MultiChoice -group Examples -choices “Choice A”,”Choice B”

Currently supported column types are as follows:

  • Text
  • Note
  • Choice
  • Boolean
  • Calculated
  • Currency
  • Number
  • User
  • URL
  • DateTime
  • MultiChoice

If there exists a site column already, the command will delete that site column and create again with the supplied values. This is one of the places I require your valuable feedback – whether to delete the site column if its already present

Installation

Extract the stsadm-createsitecolumn-extension.zip and run the Setup.exe. Make sure you deploy the solution only to central administration.

 

Below are the installation screenshots

createsitecolumn-installer-1

createsitecolumn-installer-2

createsitecolumn-installer-3

createsitecolumn-installer-4

createsitecolumn-installer-5

After successful installation, you can check the extension using this command: stsadm –help createsitecolumn 

createsitecolumn-help-message

Feel free to comment or email me if you have find any bugs or any suggestions! I am very happy to get your feedback.

NZTE Website now live on MOSS

So, we at Intergen completed a a very challenging project and it went live this week!

Checkout the New Zealand Trade & Enterprise website which is built using MOSS - Yes, Internet facing MOSS website Cool

nztesite

How do you structure your WCF projects?

WCF projects do not always tend to stay in one project solution. As the business requirement grows, we see that we might need to break up our WCF solution into various bits. Here is a way I handle my WCF projects.

I break up my WCF project into the following bits (each being a class library in Visual Studio):

  • DataContracts
  • MessageContracts
  • FaultContracts
  • ServiceContracts
  • ServiceImplementation
  • ServiceHost

The ServiceHost project can be a self hosted application or a WCF Service Application hosted in IIS. This can change according to your business requirements. This breakup helps me to handle each of the component more efficiently.

image

There is still one thing that we need to address here – How do we plan to handle Service Errors(and possibly return them back to the Client)? Again, there are many ways to accomplish this, but best is to go with your business needs.I will be writing more about this soon.

I am very much interested to know how you handle your WCF projects and the structure you use for WCF projects. Feel free to share your thoughts


Creative Commons License
Chaks' Corner Blog by Chakkaradeep Chandran is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Based on a work at www.chakkaradeep.com.
Permissions beyond the scope of this license may be available at http://www.chakkaradeep.com.