WSS 3.0 - How to create new SharePoint Feature?

How to create New Feature in WSS 3.0?

How to add new menu item under “Site Settings” menu in wss 3.0?

1. Create a new folder, called “MyListUserFeature”, in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES

2. Create an Xml file, called “feature.xml” in the “MyListUserFeature” folder

3. Edit the feature.xml file and add the following content

<?xml version="1.0" encoding="utf-8" ?>

<Feature Id="A9CEB138-B991-4013-A1F9-26C6BB646021"

    Title="Feature My List User Feature"

    Description="Custom action on Site Actions"

    Version="1.0.0.0"

    Scope="Site"

    xmlns="https://schemas.micræsoft.com/sharepoint/">

      <ElementManifests>

            <ElementManifest Location="ListUsers.xml" />

      </ElementManifests>

</Feature>

4. Create an Xml file, called “ListUsers.xml” in the “MyListUserFeature” folder

5. Edit the file and add the following content

<?xml version="1.0" encoding="utf-8" ?>

<Elements xmlns="https://schemas.micræsoft.com/sharepoint/">

  <CustomAction

    GroupId = "SiteActions"

    Location="Microsoft.SharePoint.StandardMenu"

    Sequence="1000"

    Title="List Users">

    <UrlAction Url="/_layouts/Users.aspx"/>

  </CustomAction>

</Elements>

6. Install the new feature by running the following command

Stsadm –o installfeature –filename MyListUserFeature\feature.xml

7. Activate the new feature by running the following command

Stsadm –o activatefeature -filename MyListUserFeature \feature.xml -url https://siteurl

Now you will see the new menu item in the "Site Settings" of the site that you installed the feature.

Comments

  • Anonymous
    December 26, 2006
    Thanks, that is just what I wanted to know!

  • Anonymous
    February 09, 2007
    Thanks a lot It's very usefull for customization especially for me.

  • Anonymous
    September 13, 2007
    2007 MOSS Resource Links (Microsoft Office SharePoint Server) Here is an assortment of various 2007 Microsoft

  • Anonymous
    October 17, 2007
    Hi, thanks for your guideline here. But i am running a piculer trouble. i was able to find the feature working on my site, but it is not getting listed into the site features page where other features are listed. can you tell me what i am missing or what i need to do to get the feature name along with the others? thanks much again!

  • Anonymous
    August 06, 2008
    Hi, This is a very useful and valuable post. Thanks a lot.

  • Anonymous
    February 09, 2009
    Hi there, I was able to create the Feature on my site but I cannot find the button where I can deactivate it. Do you know why it does not show under Site Features? thank for your help.

  • Anonymous
    July 28, 2010
    Hi, What can I do, if want this new feature installed for only one specified list? Because this code adds the feature to each lists. thx!

  • Anonymous
    July 28, 2010
    Hi, What can I do, if want this new feature installed for only one specified list? Because this code adds the feature to each list. thx!