I ran across this great article if you’re looking embark on customising your Sharepoint
2007 menus…from Site Settings through to drop down Actions menus, then here is a
great MSDN article to start.

http://msdn2.microsoft.com/en-us/library/ms473643.aspx

— snip —

How to: Add Actions to the User Interface 

Using Features makes it easy to add actions to menus of the user interface in Windows
SharePoint Services. This example shows how to add actions to various menus through
a Feature and how to activate it within the deployment.

Location and Group ID

To define a custom action for a particular menu, you must identify the menu by setting
the location to the appropriate Windows SharePoint Services namespace, and by using
the ID that Windows SharePoint Services uses to identify the specific location.

For example, to add a custom action to the Site Settings page, set the Location attribute
of the CustomAction element
to Microsoft.SharePoint.SiteSettings.and specify a particular area within the
page through the GroupId attribute.

The following table shows Location and GroupId values that are possible.

Area

Location

GroupId

Display form
toolbar

DisplayFormToolbar

n/a

Edit form toolbar

EditFormToolbar

n/a

New form toolbar

NewFormToolbar

n/a

List view toolbar

ViewToolbar

n/a

Edit control
block menu (per item)

EditControlBlock

n/a

New menu for
list and document library view toolbars

Microsoft.SharePoint.StandardMenu

NewMenu

Actions menu
for list and document library view toolbars

Microsoft.SharePoint.StandardMenu

ActionsMenu

Settings menu
for list and document library view toolbars

Microsoft.SharePoint.StandardMenu

SettingsMenu

Upload documents
menu for document libraries

Microsoft.SharePoint.StandardMenu

UploadMenu

Site Actions
menu

Microsoft.SharePoint.StandardMenu

SiteActions

Site Settings
Site Collection Administration links

Microsoft.SharePoint.SiteSettings

SiteCollectionAdmin

Site Settings
Site Administration links

Microsoft.SharePoint.SiteSettings

SiteAdministration

Site Settings
Galleries Links

Microsoft.SharePoint.SiteSettings

Galleries

Site Settings
Look and Feel links

Microsoft.SharePoint.SiteSettings

Customization

Site Settings
Users and Permissions links

Microsoft.SharePoint.SiteSettings

UsersAndPermissions

Site Actions
menu for surveys

Microsoft.SharePoint.StandardMenu


Different actions may require using different CustomAction attributes to identify
the menu in which to place a custom menu item. But you may also need to specify other
parameters for the action, for example, to specify a version, user permissions required
to perform the action, or placement in relation to existing actions in the menu. The
custom actions of the following example show a variety of attributes.

URL Tokens

Windows SharePoint Services supports the following tokens with which to start a relative
URL:

~site – Web site (SPWeb)
relative link.

~sitecollection – site collection (SPSite)
relative link.

In addition, you can use the following tokens within a URL:

{ItemId} – Integer ID that represents the item within a list.

{ItemUrl} – URL of the item being acted upon. Only work for documents in libraries.
[Not functional in Beta 2]

{ListId} – GUID that represents the list.

{SiteUrl} – URL of the Web site (SPWeb).

{RecurrenceId} – Recurrence index.

Procedures

To add actions to the user interface in a site collection
  1. Create a UserInterfaceLightUp folder within the setup directory at the following
    location: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES.

  2. Create a Feature.xml file in the new UserInterfaceLightUp folder to provide the manifest
    for the feature, such as the following.

    Copy
    Code

    <?xml version="1.0" encoding="utf-8" ?>
    <Feature Id="GUID" 
        Title="Light Up"
        Description="This example shows how you can light up various areas inside Windows SharePoint Services."
        Version="1.0.0.0"
        Scope="Site"
        xmlns="http://schemas.microsoft.com/sharepoint/">
      <ElementManifests>
        <ElementManifest Location="Lightup.xml" />
      </ElementManifests>
    </Feature>
  3. To replace the GUID placeholder in the previous Id attribute, generate a GUID by running
    guidgen.exe located in the Local_Drive:\Program Files\Microsoft Visual Studio
    8\Common7\Tools
    directory.

  4. Create a Lightup.xml file to define elements for the various actions included within
    the feature. For the sake of example, the URL for each action points to an .aspx file
    and passes it a value that identifies the source of the request, as follows:

    Copy
    Code

    <?xml version="1.0" encoding="utf-8" ?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <!-- Document Library Toolbar New Menu Dropdown -->
      <CustomAction Id="UserInterfaceLightUp.DocLibNewToolbar"
        RegistrationType="List"
        RegistrationId="101"
        GroupId="NewMenu"
        Rights="ManagePermissions"
        Location="Microsoft.SharePoint.StandardMenu"
        Sequence="1000"
        Title="MY DOCLIB NEW MENU TOOLBAR BUTTON">
        <UrlAction Url="/_layouts/LightupHello.aspx?NewMenu"/>
      </CustomAction>
    <!-- Document Library Toolbar Upload Menu Dropdown -->
      <CustomAction Id="UserInterfaceLightUp.DocLibUploadToolbar"
        RegistrationType="List"
        RegistrationId="101"
        GroupId="UploadMenu"
        Rights="ManagePermissions"
        Location="Microsoft.SharePoint.StandardMenu"
        Sequence="1000"
        Title="MY DOCLIB UPLOAD MENU TOOLBAR BUTTON">
        <UrlAction Url="/_layouts/LightupHello.aspx?UploadMenu"/>
      </CustomAction>
    <!-- Document Library Toolbar Actions Menu Dropdown -->
      <CustomAction Id="UserInterfaceLightUp.DocLibActionsToolbar"
        RegistrationType="List"
        RegistrationId="101"
        GroupId="ActionsMenu"
        Location="Microsoft.SharePoint.StandardMenu"
        Sequence="1000"
        Title="MY DOCLIB ACTIONS MENU TOOLBAR BUTTON">
        <UrlAction Url="/_layouts/LightupHello.aspx?ActionsMenu"/>
    </CustomAction>
    <!-- Document Library Toolbar Settings Menu Dropdown -->
      <CustomAction Id="UserInterfaceLightUp.DocLibSettingsToolbar"
        RegistrationType="List"
        RegistrationId="101"
        GroupId="SettingsMenu"
        Location="Microsoft.SharePoint.StandardMenu"
        Sequence="1000"
        Title="MY DOCLIB SETTINGS MENU TOOLBAR BUTTON">
        <UrlAction Url="/_layouts/LightupHello.aspx?SettingsMenu"/>
      </CustomAction>
    <!-- Site Actions Dropdown -->
      <CustomAction Id="UserInterfaceLightUp.SiteActionsToolbar"
        GroupId="SiteActions"
        Location="Microsoft.SharePoint.StandardMenu"
        Sequence="1000"
        Title="MY SITE ACTIONS BUTTON">
        <UrlAction Url="/_layouts/LightupHello.aspx?SiteActions"/>
      </CustomAction>
    <!-- Per Item Dropdown (ECB)-->
      <CustomAction 
        Id="UserInterfaceLightUp.ECBItemToolbar"
        RegistrationType="List"
        RegistrationId="101"
        Type="ECBItem" 
        Location="EditControlBlock"
        Sequence="106"
        Title="MY ECB ITEM">
        <UrlAction Url="/_layouts/LightupHello.aspx?ECBItem"/>
      </CustomAction>
    <!-- Display Form Toolbar -->
      <CustomAction 
        Id="UserInterfaceLightUp.DisplayFormToolbar"
        RegistrationType="List"
        RegistrationId="101"
        Location="DisplayFormToolbar"
        Sequence="106"
        Title="MY DISPLAY FORM TOOLBAR">
        <UrlAction Url="/_layouts/LightupHello.aspx?DisplayFormToolbar"/>
      </CustomAction>
    <!-- Edit Form Toolbar -->
      <CustomAction 
        Id="UserInterfaceLightUp.EditFormToolbar"
        RegistrationType="List"
        RegistrationId="101"
        Location="EditFormToolbar"
        Sequence="106"
        Title="MY EDIT FORM TOOLBAR">
        <UrlAction Url="/_layouts/LightupHello.aspx?EditFormToolbar"/>
      </CustomAction>
    <!-- Site Settings -->
      <CustomAction 
        Id="UserInterfaceLightUp.SiteSettings"
        GroupId="Customization"
        Location="Microsoft.SharePoint.SiteSettings"
        Sequence="106"
        Title="MY SITE SETTINGS LINK">
        <UrlAction Url="/_layouts/LightupHello.aspx?Customization"/>
      </CustomAction>
    <!-- Content Type Settings -->
      <CustomAction 
        Id="UserInterfaceLightUp.ContentTypeSettings"
        GroupId="General"
        Location="Microsoft.SharePoint.ContentTypeSettings"
        Sequence="106"
        Title="MY CONTENT TYPE SETTINGS LINK">
        <UrlAction Url="/_layouts/LightupHello.aspx?General"/>
      </CustomAction>
    </Elements>

    Other common GroupId values that can be used include ViewToolbar, ViewSelectorMenu,
    and PersonalActions (Welcome menu)

  5. Add a LightupHello.aspx file such as the following in the \TEMPLATE\LAYOUTS directory
    to serve as target for the links created in the previous step.

    Copy
    Code

    <%@ Page Language="C#"  Inherits="System.Web.UI.Page"%>
    <%
    string clientQuery = Page.ClientQueryString;
    if (clientQuery == "NewMenu")
    {
        Response.Write("You came from the new document menu.");
    }
    else if (clientQuery == "UploadMenu")
    {
        Response.Write("You came from the upload menu.");
    }
    else if (clientQuery == "ActionsMenu")
    {
        Response.Write("You came from the actions menu.");
    }
    else if (clientQuery == "SettingsMenu")
    {
        Response.Write("You came from the settings menu.");
    }
    else if (clientQuery == "SiteActions")
    {
        Response.Write("You came from the Site Actions menu.");
    }
    else if (clientQuery == "ECBItem")
    {
        Response.Write("You came from the document's context menu.");
    }
    else if (clientQuery == "DisplayFormToolbar")
    {
        Response.Write("You came from the display item properties form.");
    }
    else if (clientQuery == "EditFormToolbar")
    {
        Response.Write("You came from the edit item properties form.");
    }
    else if (clientQuery == "Customization")
    {
        Response.Write("You came from the Site Settings menu.");
    }
    else if (clientQuery.StartsWith("General"))
    {
        Response.Write("You came from the Content Type Settings menu.");
    }
    %>
  6. At a command prompt, type the following commands to install the Feature in the deployment,
    activate the Feature on a specified subsite, and then reset Microsoft Internet Information
    Services (IIS) so that the changes can take effect.

    Copy
    Code

       a. stsadm -o installfeature -filename UserInterfaceLightUp\feature.xml
       b. stsadm -o activatefeature -filename UserInterfaceLightUp\feature.xml -url http://Server/Site/Subsite
       c. iisreset
  7. To see the various custom actions that you have added, navigate to the following locations
    from the home page of a Web site in the site collection:

    1. Click Site Actions to see the new action on the Site Actions menu.

    2. Click Site Settings on the Site Actions menu to see a new action in
      the Look and Feel section of the Site Settings page.

    3. Navigate to a document library and open each menu on the toolbar to see a new action
      on each menu.

    4. In a document library that contains items, click the down arrow for an item to see
      the new action on the edit control block menu.

    5. On the edit control block menu for an item, click View Properties and Edit
      Properties
      to see new actions on the Display form and Edit form toolbars.