Deze plugin is niet getest met de laatste 3 grotere versies van WordPress. Mogelijk wordt het niet meer onderhouden of ondersteund. Ook kunnen er compatibiliteitsproblemen ontstaan wanneer het wordt gebruikt met recentere versies van WordPress.

Thumbs Rating

Beschrijving

Ik had een simpele en lichte plugin nodig om thumbs waarderingen toe te voegen. Ik kon er geen vinden, dus heb ik er zelf één gemaakt.

This plugin allows you to add a thumb up/down rating to your content (posts, pages, and custom post types). You can set it up to show anywhere you want, check out the Installation instructions.

De output is heel simpel, geen afbeeldingen, geen fonts, geen moeilijke CSS. Pas de output aan door de class the overschrijven in je style.css bestand.

Kenmerken

  • No output printed by default, check the Installation instructions.
  • Slaat de beoordelingen voor alle inhoud op in de huidige berichten tabel (geen nieuwe database tabellen worden aangemaakt).
  • Uses HTML5 LocalStorage to prevent the users from voting twice.
  • Easy to customize the output using CSS.
  • Show the most voted (positive/negative) items using shortcodes.
  • Show the buttons using shortcodes.
  • No jQuery dependency.

Internet Explorer 11 support

If you want the plugin to work with IE11 users, you need jQuery. For that use the 3.4.2 version of the plugin.

From 4.0.0 onwards the plugin has no dependencies and uses vanilla JavaScript (ES6 syntax). Which will cause it not to work for IE11 users.

Talen

  • Arabisch: ar (by iFlendra)
  • Catalan: ca
  • Chinese (China): zh_CN (by suifengtec)
  • Czech: cs_CZ (by togur)
  • Danish dk_DK (by BJARNE)
  • Nederlands nl_NL (by Thijs)
  • Engels
  • Frans: fr_FR (by Arnaud)
  • Duits: de_DE (by webserviceXXL)
  • Italiaans: it_IT (by marcochiesi)
  • Japans: ja (by heySister721)
  • Litouws: lt_LT (by Andrius)
  • Perzisch: fa_IR (by Hamed.T)
  • Portugees: pt_BR (by Felipe)
  • Pools: pl_PL (by Fafu)
  • Roemeens: ro_RO by (by AlexCruz1989)
  • Russisch: ru_RU (by anatolt)
  • Servisch: sr_RS (by Andrijana Nikolic)
  • Spaans: es_ES
  • Turks: tr_TR (by CrimsonIdol)

Help me een handje en vertaal de plugin in je taal, het zijn slechts enkele woorden.

Verzoeken

Dien gerust een aanvraag in, maar laten we het simpel houden.

Ping me

Gebruik je de plugin? Bevalt hij? Bevalt hij niet? Laat het me weten!

Schermafdrukken

  • Basic output with the default CSS with the TwentyThirteen theme.
  • This text is shown if you try to vote again.

Installatie

Activeer om te beginnen de plugin, vervolgens:

A) Voeg de shortcode toe aan de berichten of pagina’s waar je de thumb waardering knoppen wil laten zien:

[thumbs-rating-buttons]

B) Als je de vind dit leuk / vind dit niet leuk knoppen na al je inhoud (berichten, pagina’s, aangepaste berichttypes) wilt vertonen, plak je de volgende code aan het einde van het functions.php bestand van je thema.

function thumbs_rating_print($content)
{
  return $content.thumbs_rating_getlink();
}
add_filter('the_content', 'thumbs_rating_print');

C) Als alternatief kan je de knoppen enkel in bepaalde onderdelen van je thema terug laten komen. Plak de volgende code waar je de knoppen wilt tonen:

<?=function_exists('thumbs_rating_getlink') ? thumbs_rating_getlink() : ''?>

FAQ

Ik heb de plugin geactiveerd en zie de knoppen niet

Je moet specificeren waar je wilt dat de thumbs in je thema vertoond worden zie installatie instructies

Kan ik de kleuren aanpassen?

Uiteraard. Bekijk de CSS in de plugin (thumbs-rating/css/style.css) en overschrijf de klassen vanuit het style.css bestand van je thema.

Wanneer ik de beheer kolommen sorteer, verdwijnen sommige berichten

Als het bericht/pagina 0 beoordelingen heeft voor de kolom die je probeert te sorteren, verbergt WordPress deze.
Het toont enkele berichten/pagina’s met op z’n minst +1 of -1 beoordeling.

Hoe toon ik het aantal stemmen in andere onderdelen van mijn thema?

Plak de volgende code snippets in de loop:

<?=function_exists('thumbs_rating_show_up_votes') ? thumbs_rating_show_up_votes() : ''?>

<?=function_exists('thumbs_rating_show_down_votes') ? thumbs_rating_show_down_votes() : ''?>

(Beide functies accepteren het bericht ID als een parameter voor het geval dat je het nodig hebt)

Can I use the plugin to vote media images?

No, the plugin only works in posts and custom post types.

How do I run code whenever a user votes?

We have an action you can hook into. For instance, if you want to clear your cache.

You can add this to your theme’s functions.php

function example_callback( $post_ID, $type_of_vote, $thumbs_rating_count ) {
    // Place your code here
}
add_action( 'thumbs_rating_vote_action', 'example_callback', 10, 3)

Shortcode

De shortcode [thumbs_rating_top] accepteert de volgende parameters:

  • type: positief (standaard) / negatief
  • posts_per_page: 5 (default)
  • categorie: ID (standaard = alle)
  • show_votes: ja (standaard) / nee
  • post_type: iedere (standaard) / bericht / pagina / boeken
  • show_both: nee (standaard) / ja
  • volgorde: aflopend (standaard) / oplopend
  • sorteer op: aflopend (standaard)
  • exclude_posts: “133,2,54,234” (ID van berichten gescheiden door komma’s)
  • include_posts: “133,2,54,234” (ID of posts separated by commas)

Hier is een voorbeeld dat van enkele parameters gebruik maakt:

[thumbs_rating_top type="positive" posts_per_page="10" post_type="post" show_votes="no" order="DESC"]

De shortcode werkt niet in widgets of reacties

Het kan zijn dat je shortcodes toe moet staan in die onderdelen, hier lees je hoe.

Beoordelingen

9 oktober 2022
I'm so glad I stumbled upon this plugin. Everything works flawlessly, even with a site with 200+ entries directly on a homepage (a timeline). Thank you for this superb plugin Richard. I was really lucky to pick this one when looking around for a good one. I can't share the site because of the rules, but lets just say I'm more than happy with the result 🙂 The code example for clearing cache on vote was useful as well.
6 oktober 2022 1 reactie
Just the title. Nothing more could be desired, its simplicity is its best feature. Upvotes/Downvotes, pairing this with WPCode plugin you can make it show up on whichever pages you want. Excellent. One thing I am confused about though, is it possible for a user to change their vote? I experimented with it and I can't change my vote. Or I can't figure out how to anyway. This is the only problem that I'm having. Thanks! EDIT: I have now read the existing support like a good boy and realized that there is no method to reset your vote, but that once the cookies are cleared you can vote again. I'm assuming this does not remove the previous vote but allows you to vote multiple times. This is somewhat an issue with me but it is a distant issue. I am trying to use this to rank user submitted content on my site. So letting a user upvote their own content repeatedly (if they learn how to) would be messy.
20 januari 2021
This plugin meets up with my expectation. Simple, simple, lightweight,reliable. You cannot looking for more in many aspects.
1 februari 2020 3 reacties
Very Simple and useful 🙂 But one question to the develooper: Is it possible to use the buttons several times per page? For example: If I want to do a table with ten rows and each of the row contains content, the user could vote for. So that every button has an individual rating. Currently if i use several buttons in one table (per row), all buttons take the same vote. Is there something to change that? Hope the develooper replies and understood my bad english 😉
2 september 2019
Hi Thumbs, Thank you for your super lightweight plugin. It works like a charm! No issue whatsoever and Simple and Effective. If able to have the stars symbols would be nice too. We can have options by NUMBERS OR STARS. Then again, with star symbols might pull higher CPU resource? So that's not good after all... I'm not picky overall, it works for me and very nice designed. Giving 5 stars for your plugin. Way2Go!!! Thanks so much for your wonderful job...
17 augustus 2019 1 reactie
Great little plugin, easy to modify. I was having difficulties making my own function but then I found your plugin. I just changed the text and remove the down vote button. Thanks!
Lees alle 52 beoordelingen

Bijdragers & ontwikkelaars

“Thumbs Rating” is open source software. De volgende personen hebben bijgedragen aan deze plugin.

Bijdragers

“Thumbs Rating” is vertaald in 4 talen. Dank voor de vertalers voor hun bijdragen.

Vertaal “Thumbs Rating” naar jouw taal.

Interesse in ontwikkeling?

Bekijk de code, haal de SVN repository op, of abonneer je op het ontwikkellog via RSS.

Changelog

4.1.0

  • Add a plugin action for those who need a hook from their theme. Documented in the FAQ section.

4.0.3

  • Delete another piece of jQuery code.
  • Read the changelog for the 4.0.2 if you haven’t upgraded to the version 4 yet.

4.0.2

  • Breaking changes! Upgrade with caution.
  • Drop Internet Explorer 11 support.
  • Remove jQuery as a dependency.
  • Uses the ES6 JavaScript syntax.
  • Changed markup to use HTML button’s instead of span.
  • Print the text on the button element instead of relying in CSS.

3.4.2

  • Fixes critial bug with the shortcode not showing results.

3.4.1

  • Fixes critial bug with the shortcode not showing results.

3.4

  • Add include_posts parameter in shortcode.

3.3

  • Add orderby option in shortcode

3.2

  • Add exclude_posts option in shortcode (props @hpd2311)

3.1

  • Author column should not be removed from admin (spotted by sosojni)

3.0

  • Added Arabic translation ar