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

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.


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.