I'm looking for a part-time remote job.

Hire me


I'm the author of:

Mastering Redmine is a comprehensive guide with tips, tricks and best practices, and an easy-to-learn structure.

Check the book's project or

Buy the book

Social pages of the book:

By buying this book you also donate to Redmine (see this page).


Follow me:

New Like 0.1.0, like new

The Like button plugin have not been updated for a long time (sorry for this) and, therefore, I guess, the plugin lost some of its consumers. So this version can feel like a new plugin.
Added by Andriy Lesyuk over 11 years ago

Download Like Button 0.1.0

This version changes the default settings of the Like button. Usually, you should not care though... You should, if you have not saved the configuration of the button and it uses the default settings. Thus, if your configuration is:

  • The button is shown on the sidebar;
  • The button does not include faces;
  • The text on the button is “Like” or similar text in other languages;
  • The button uses the light color scheme.

It can be, that the plugin still uses the default settings... In this case to preserve them you need to go to Administration → Plugins → Configure (to the right from the “Like button” title) and just click “Apply”. This should be done before the upgrade!

Earlier this plugin was coming with 6 modified core view files! So you needed either to use them or to remove them and patch core view files on your own... Luckily previous versions of Redmine were much similar, so pre-patched view files were not too complicated to maintain. But things changed with Redmine 2.x.x.

Recent versions of Redmine are too much different! Maintaining pre-patched view files appeared to be a huge headache – some files were impossible to make compatible with all versions, so I needed to keep copies of these files for different versions (as for the Meta, see here). This way the installation of the plugin were going to be quite complicated. So I needed a better solution.

And I found it – it’s JavaScript! Instead of adding hooks to the places, where the “Like” button should appear, now I add the button, where I’m able to, and move it to the right place using JavaScript!

This way I succeeded to drop 5 pre-patched files. But one file still remains... It’s the news index page. Luckily it’s not critical to have the “Like” button on this page. Therefore, to enable the button there you need to patch the corresponding core view file manually:

  • Copy app/views/news/index.html.erb (or index.rhtml on older Redmine and ChiliProject) into the plugins/like/app/views/news directory.
  • Add:
    <%= call_hook(:view_news_index_left, :news => news) %>
    
  • After:
    <div class="wiki">
    <%= textilizable(news, :description) %>
    </div>

See also this page.

If you don’t do this, the button won’t appear on the news list page (so it’s safe to leave things as they are).

This version also includes translations:

Taking the opportunity I also want to mention, that I plan to rename this plugin to something like “Social buttons” as soon as I add support for at least one other social network (see #1782).


I believe, that the Like button plugin should always be installed with the Meta plugin. The latter makes the liked page look much more nicer in Facebook! But the latter recently also introduced support for the Facebook Open Graph protocol, what makes Redmine pages handled by Facebook even better. See the appropriate news of the Meta plugin.

In fact, the Meta was initially written especially for the Like button plugin. But I believe, that the work done by the Meta plugin is so important that I even review it as an essential plugin in my recently published book “Mastering Redmine”. You can find more details about this book here as well as here (the project dedicated to the book).

One of the next versions of this plugin is going to include other sharing buttons for other social networks. Consider subscribing to this project using the subscription form on the sidebar to catch that moment.


Comments

Terms of use | Privacy policy