Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I want to change social tags and notes buttons in the ribbon, but I don't know how and even if it is possible.

So we have 2 social buttons in the ribbon, I like it and Tags & notes. I want to change those buttons:

  • Change the text on the buttons.
  • Change the picture

Is it possible? And where should I start?

If it is not possible, what is a big chance, should I than create my own 2 custom actions, with own text and pictures?

But where do I find the definitions of:

  • Ribbon.ListItem.TagsAndNotes.ILikeIt
  • Ribbon.ListItem.TagsAndNotes.TagsAndNotes

I can't find them in cmdui.xml But then the question is how do I add the functionality of the OOTB buttons?

Update:

Following the msdn article (http://msdn.microsoft.com/en-us/library/ff407619.aspx) I created here a replacement button but it doens't work:

  <CustomAction Id="Ribbon.ListItem.TagsAndNotes.ILikeIt"
  Location="CommandUI.Ribbon"
  Title="Sanco version of I Like It">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition 
          Location="Ribbon.ListItem.TagsAndNotes.ILikeIt">
          <Button Id="Ribbon.ListItem.TagsAndNotes.ILikeIt"
            Sequence="5"
            Command="ReplacementButtonCommand"
            LabelText="Replaced Button"
            TemplateAlias="o1" />
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
          Command="ReplacementButtonCommand"
          CommandAction="javascript:alert('This button has been replaced.');" />
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>
share|improve this question

2 Answers 2

up vote 3 down vote accepted

Ok I found the solution with this modified xml I did achieve expected results:

  <CustomAction Id="Ribbon.ListItem.TagsAndNotes.NewLike" 
                Location="CommandUI.Ribbon"    
                Title="New version of I Like It">   
    <CommandUIExtension> 
      <CommandUIDefinitions>   
        <CommandUIDefinition             
          Location="Ribbon.ListItem.TagsAndNotes.ILikeIt">
          <Button Id="Ribbon.ListItem.TagsAndNotes.Like.NewButton"
                  Command="ILikeIt"             
                  LabelText="New Text"
                  Sequence="90"
                  Image32by32="/_layouts/images/custom.png"
                  TemplateAlias="o1" /> 
        </CommandUIDefinition>   
      </CommandUIDefinitions>  
    </CommandUIExtension>   
  </CustomAction>

With this xml I could change the name and also add different pictures on the buttons, same time having exactly the same functionality.

I hope this will safe time for someone.

PS: after deploying the solution clear cache of the browser cuz it seems sometimes the ribbon is cashed and you might not see the results.

share|improve this answer

The easiest would be to do it with Javascript (JQuery). You can set them to display:none through CSS, modify them on document.ready(), and make them visible again. This will avoid the usual flicker occuring when you modify something visible on the page right after page load.

If you want to use CSS only, you can change the icons by hiding the current ones and using a background image to show new ones. You will not be able to change the text with CSS.

Rebuilding your own control sounds like overkill where a simple javascript will do the job.

share|improve this answer
    
Maybe you are right, but for my environment it is better to do everything or as much as possible server side. And creating and replacing the buttons shouldn't be too difficult, but I still dont't get the right effect. –  Shkipper Aug 6 '12 at 12:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.