HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Small mod to use CSS instead of HTML Button

AdrianAdrian Wandering SpiritMontreal MVP
edited April 2013 in Feedback

I made a small mod to the plugin to use CSS instead of the HTML button. To do the same here are the changes I made:

in default.php

change line 274 to:

  $QuoteText = T('<span class="likeicon">Like</span>');

Add this to the CSS

  span.Like span.LikeThis a span.likeicon
 {
  background: #6A8789;
border: none;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -o-border-radius: 5px;
  border-radius: 5px;
  color: white;
  margin: 0;
  padding-left: 5px !important;
  padding-right: 5px;
  border: 0;
  outline: 0;
 text-align: center;
  }

Output will look like below.( I modified the original CSS to be blue on likes)

Comments

  • hgtonighthgtonight ∞ · New Moderator

    Cool! This is exactly the same way I got into modding Vanilla. The addons here really do provide some great insight into what is possible using this framework.

    In the tradition of providing constructive feedback, I offer the following points.

    Looking at your CSS, it seems that the extra span is unnecessary. Changing your code to T('Like') should provide the same look. This would leave you with lighter weight markup (and who doesn't like that!).

    If T('Like') is too common of a phrase, you could change it to something like T('Plugin.ILikeThis.Like', 'Like'). This lets you use the phrase Plugin.ILikeThis.Like as the key in your locale definitions.

    I don't know if I have seen you around before, so welcome to the community!

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • AdrianAdrian Wandering Spirit Montreal MVP
    edited April 2013

    I come and go like the wind. I used to be here a lot. Made some plugins ect. Then my project ended and I had no Vanilla fun. But now I am back :) and I hope to stay. I have a huge Vanilla project for my personal use I am building. Thanks for the code change.

Sign In or Register to comment.