Discourse Topic Voting

:discourse2: Summary Discourse Topic Voting gives the ability to vote on topics in a specified category.[1]
:open_book: Install Guide This plugin is bundled with Discourse core. There is no need to install the plugin separately.

Features

To enable it, edit any category, look on the settings tab for the “Allow users to vote on topics in this category” checkbox:

Once enabled, a “Votes” item is available in the top menu. The topics in that category can be voted on with the count of votes added next to the topic title.

The vote count is also included next to the title when scrolled.

To make it easier to see vote counts from a topic list, the vote count is also added under the topic titles.

Here are the views a user will see before and after voting in a topic:

Screenshot 2024-05-13 at 10.08.17 AM Screenshot 2024-05-13 at 10.10.13 AM

There is also a section in the user’s profile page that displays their active votes:

Active Votes

The term Active Votes refers to the votes a user has cast in topics that are currently available for voting. Limiting Active Votes encourages users to vote thoughtfully for the topics that matter most to them.

  • The number of Active Votes available to each user is configurable by Trust Level. Default values:

    • TL0: 2
    • TL1: 4
    • TL2: 6
    • TL3: 8
    • TL4: 10
  • Each user may cast only one vote per topic.

  • When a topic is closed or archived, the vote count on the topic remains unchanged. These votes are no longer considered Active. The users who cast these votes will have their one vote from that topic restored to their pool of available votes.

  • If a topic is re-opened or unarchived, the votes are reclaimed and applied back to the users’ Active Vote count.

  • If a topic reclaims the votes of a user, causing them to exceed their Active Vote limit, they simply need to wait until topics are closed or archived to allow them to vote again.

  • If an entire topic (Topic A) is merged into another Topic-Voting topic (Topic B), all the the following takes place:

    1. Unique votes from Topic A are added to Topic B.
    2. Duplicated votes (the same user voted in both topics) from Topic A will not be added to Topic B. Instead, the vote from Topic A will be restored to the user’s pool of available votes.
    3. Topic A’s vote count is set to zero and the topic is closed so that no further voting can take place in Topic A.

Settings

Name Description
topic voting alert votes left Alert user when this many votes are left
topic voting enabled Allow users to vote on topics?
topic voting show who voted Allow users to see who voted?
topic voting show votes on profile Allow users to see their votes in their activity feed?
topic voting tl0 vote limit How many active votes are TL0 users allowed?
topic voting tl1 vote limit How many active votes are TL1 users allowed?
topic voting tl2 vote limit How many active votes are TL2 users allowed?
topic voting tl3 vote limit How many active votes are TL3 users allowed?
topic voting tl4 vote limit How many active votes are TL4 users allowed?

Category Setting

topic voting category setting

EXTRAS

:information_source: In the categories where the Voting plugin is activated, Likes are automatically deactivated. Some sites may want to use both functions at the same time to like replies, see how to re-enable Likes.

Data Explorer Queries

List people who voted for a topic along with their email addresses:

--[params]
-- int :topic_id

SELECT
tvv.user_id,
email
FROM topic_voting_votes tvv
JOIN user_emails ue ON ue.user_id = tvv.user_id
WHERE topic_id = :topic_id
AND ue.primary = true

More explorer queries can be found in Data & reporting - Topics tagged topic-voting

:discourse2: Hosted by us? This plugin is available on our Business and Enterprise plans Topic Voting | Discourse - Civilized Discussion


  1. and is the result of this spec put together by @erlend_sh ↩︎

Last edited by @southpaw 2025-07-25T02:39:13Z

Check documentPerform check on document:
128 إعجابًا

كجزء من إعادة التسمية للمكون الإضافي https://meta.discourse.org/t/discourse-post-voting/227808، قمنا أيضًا بإعادة تسمية هذا المكون الإضافي الآن لتكميله. :partying_face: :slightly_smiling_face:
لذا أرحب بكم جميعًا رسميًا الآن في المكون الإضافي Discourse Topic Voting. :tada::balloon::champagne:

14 إعجابًا

أعجبني هذا المكون الإضافي حقًا. أستخدمه لفئة مخصصة لمقالات المدونة. عند الدخول إلى فئة مع تمكين هذا المكون الإضافي، هل سيكون من الممكن فرز قائمة الموضوعات حسب عدد الأصوات تنازليًا؟

شكرا مرة أخرى!

إعجاب واحد (1)

تم تقسيم مشاركتين إلى موضوع جديد: Votes not being returned on topic close

ألاحظ في الرسوم المتحركة على

أن المستخدم يكتشف فقط أن

  • لديه في الواقع عدد محدود من الأصوات
  • وأن لديه الآن xx صوتًا متبقيًا
    بعد أن ينقر للتصويت.

ربما يجب أن يتعلم كل هذا عند تمرير الماوس فوق زر التصويت، قبل أن ينقر.

3 إعجابات

تم تقسيم منشورين إلى موضوع جديد: 'مشكلة عرض ‘من صوّت’

لجعله أكثر رسمية، تم الآن ترحيل جداول قاعدة البيانات لهذا المكون الإضافي إلى topic_voting_ لتتوافق مع تلك الموجودة في post_voting_ أيضًا، إلى جانب إعدادات الموقع.

عندما يقوم مالكو الموقع بتحديث هذا المكون الإضافي، سيتم تحديث استعلامات مستكشف البيانات الحالية التي تستخدم الجداول القديمة تلقائيًا لاستخدام أسماء الجداول الجديدة.

6 إعجابات

كيف يمكنني إعادة تمكين ردود فعل Discourse على المنشور الأول لموضوع تصويت؟

هل جربت النصيحة لإعادة تمكين الإعجابات؟

إعجابَين (2)

آه، آسف، لقد فعلت ذلك ولكن اعتقدت أنه لا يعمل حتى أدركت أنني كنت أنظر إلى منشوراتي الخاصة، لذلك لم يكن ينبغي أن أتوقع رؤية زر الإعجاب :ضحك:

إعجابَين (2)

هل هناك أي طريقة لإضافة زر التصويت مباشرة إلى قائمة الموضوعات؟

إعجاب واحد (1)

أعتقد أن هذا ما تبحث عنه:

3 إعجابات

هل هناك طريقة لجعل منشئ الموضوع يقوم بالتصويت الأول على منشوره تلقائيًا؟ لدينا مجموعة من المستخدمين الذين ينشئون هذه المواضيع ولكنهم ينسون التصويت عليها، ومن المزعج تذكيرهم في كل مرة. أتساءل فقط :slight_smile:

شكرًا على الإضافة!

إعجاب واحد (1)

أنا أؤيد ذلك. بدون معرفة المستخدمين أن الأصوات محدودة لا يمكنهم تعديل سلوكهم، لذلك الهدف الأصلي من تشجيع المستخدمين على التصويت بتفكر ليس محققًا بشكل فعال.

هل من الممكن تعطيل التصويت على المواضيع لكل موضوع في فئة معينة؟ نحن نريد أن تكون أغلب المواضيع في الفئة قابلة للتصويت، لكن أحيانًا نريد نشر مواضيع غير قابلة للتصويت. أرى أن هناك خاصية على المواضيع تسمى can_vote، لكنني لا أستطيع أن أجد مكانًا في واجهة المستخدم أو أي استدعاء API لتحديث ذلك. يبدو أن الأمر ممكن لأنه في البداية يتم إنشاء موضوع “حول فئة XYZ” الذي لا يكون قابلاً للتصويت.

@tyler.lamparter ربما هذا الإعداد في إعدادات الفئة؟

@NateDhaliwal لقد قمنا بتمكين ذلك، لكنني أتساءل إذا كان بإمكان بعض الموضوعات التي تم وضعها في تلك الفئة أن يتم تعطيلها. لذا 99% من الموضوعات التي توضع في فئتنا يجب أن تتضمن تصويت على الموضوع، ولكن عدد قليل منها لا ينبغي أن يكون كذلك.

صحيح. لا أعتقد أن ذلك ممكن. قد يكون بإمكانك إخفاؤه باستخدام CSS، لكن ذلك سيكون صعبًا لأنه سيكون تغييرات على مستوى الموقع بالكامل، وليس لكل موضوع على حدة…

السبب في أنه يبدو ممكنًا هو وجود علامة can_vote على كل موضوع وهي بالفعل تقود ما تعرضه واجهة المستخدم. أنا فقط لا أرى أي طريقة لتحديث هذه العلامة عبر واجهة برمجة التطبيقات أو تعيينها عبر واجهة المستخدم.

موضوع “حول هذه الفئة” الذي يتم إنشاؤه كلما تم إنشاء فئة جديدة:

موضوع نشره أحد مستخدمينا في الفئة:

إعجاب واحد (1)

بالنسبة لفئة #الميزة هنا، فإن خيارات التصويت والمعلومات مخفية باستخدام CSS بسيط يعتمد على علامة لموضوعات #التغذية الراجعة.

إعجابَين (2)