$49

Upvote

Documentation  •  Changelog

Documentation

BREAKING CHANGE (v1.2.0)

If your version of Upvote is 1.2.0 or newer, then the following information is not relevant to you.

If your version of Upvote is earlier than 1.2.0, please keep reading to learn how to update.

What was the change?

As of v1.2.0, Upvote will now generate voting icons automatically. This means that they don't need to be established manually (unless you want to override the default icons).

See how to customize your icons...

What's the easiest way to fix it?

First, you will want to remove the second parameter of your "upvote" and "downvote" calls...

OLD WAY: {{ craft.upvote.upvote(entry.id, iconUp) }}
         {{ craft.upvote.downvote(entry.id, iconDown) }}

NEW WAY: {{ craft.upvote.upvote(entry.id) }}
         {{ craft.upvote.downvote(entry.id) }}

Then, you can pass your existing definitions in via the new method of defining custom icons.

If you want to maintain your custom icons, simply add this code beneath your existing icon definitions...

{% do craft.upvote.setIcons({
    up   : iconUp,
    down : iconDown,
}) %}

Or if you'd prefer to rely on the default icons, you can simply discard the code where you have previously defined the up & down HTML icons.

Font Awesome

By default, Font Awesome is now included in the plugin. If your icons don't require the Font Awesome library, you can easily disable it in the plugin's Settings menu.

Why did it change?

The primary motivation for the change was to re-allocate the usage of the second parameter. This makes it possible to allow voting for multiple aspects of the same element.

OLD WAY: {{ craft.upvote.upvote(entry.id, iconUp) }}

NEW WAY: {{ craft.upvote.upvote(entry.id, 'loremipsum') }}

Contact us for additional support

As always, we're here to provide support for our products. Please email [email protected] with any questions, and we'll be happy to help you with this transition!