Forum Discussion

Inactive User's avatar
Inactive User
14 years ago

Add text next to me-too button

We plan to deploy me-too feature and currently at testing stage for tweaking here and there. I have a question.

How can we add text next to the me-too button?

 

test.jpg

 

If the button receives no click from anybody, only the button is displayed in a post message as you can see in the image above which is kind of odd to me. 

 

When a user click on this button, there is some text showing the number of using clicking this button. This is fine for me as it doesn't look plain.

 

Any thoughts?

 

4 Replies

  • I find the "Me too" button not too self-explanatory. Our testing revealed that most users tend to use it like a "Facebook Like+1" button. Adding the possibility to add a short explanatory text next to it would definitely help.
  • xorrkaz's avatar
    xorrkaz
    Genius
    14 years ago

    We don't use the Me Too button, but Lithium makes it easy to adjust just about any string.  If you go to Studio > Text Editor and click the "Show text keys" button that will turn on the "string bomb."  Every string in Lithium will be replaced with its property key name.  You can then change the value of that text property.  Take the property, and add it to the Text Properties box.  For example:

     

    rating.forum_topic_metoo.0.title = Like +1

  • We regularly add text to displays using jQuery on the client side.  Again, we don't use the Me Too button, but here is some sample code we are using to add users' full names within thread display pages.  I'm sure you can adapt this to extend your Me Too button (or perhaps you can use the "string bomb" thing I mentioned in my other reply).

     

    <@liaAddScript>
    ;(function($) {
    $(document).ready(function() 
    {
       $('div.lia-message-author-username').each(function(index) {
           var uname = $(this).find('.lia-user-name-link').attr('title');
           if (typeof uname === 'undefined' || uname == '') {
               uname = $(this).find('.lia-user-name-link').text();
           }
           
           var currElem = $(this);
           $.ajax({
               type: "GET",
               url: "/restapi/vc/users/login/" + uname + "/profiles",
               data: ({
                   "xslt": "json-v2.xsl"
               }),
               success: function(result) {
                   var first_name = "";
                   var last_name = "";
                   $.each(result.response.profiles.profile, function(pindex, profile) {
                       if (profile.name == "name_first") {
                           first_name = profile.$;
                       }
                       if (profile.name == "name_last") {
                           last_name = profile.$;
                       }
                   });
                   
                   if (first_name != "" && last_name != "") {
                       $('<div class="lia-message-author-fullname"><b>' + first_name + ' ' + last_name + '</b></div>').insertAfter(currElem);
                   }
               }
           });
       });
    });
    })(LITHIUM.jQuery);
    </@liaAddScript>

     

  • Claudius's avatar
    Claudius
    Boss
    13 years ago

    Another (slightly hacker style) solution might be to simply add the string using the CSS ":after" pseudo property, e.g. something along the lines of:

    .lia-rating-image-active:after { content:" Click here if you have the same question."; }