Quantcast
Channel: Discourse Meta - Latest topics
Viewing all 60599 articles
Browse latest View live

How to update "Fade Out" effect on recently visited Topic row?

$
0
0

@LilTrashPanda wrote:

Hi everyone!

I've been scratching my head over this one for quite a few weeks now, so figured I'd stop by and see if anyone else knows the answer to this. I'm attempting to update the "Fade Out" effect that's applied to the row of the last Topic you visited in the Topic List. Right now, it seems the fadeout color defaults to whatever your Tertiary setting is in your color scheme; however, since I'm separating each Category on my forum into its own brand, I need the ability to update that color to better match its category's theme.

Here's a quick GIF I created where I back out of a topic and use my cursor to circle the effect I'm trying to find the CSS for so I can alter it. Any help would be super appreciated; thanks for reading! :slight_smile:


Edited title for clarity.

Posts: 3

Participants: 2

Read full topic


Unliking a post

$
0
0

@removed wrote:

I'm a member of another Discourse forum, and I accidentally liked a post I now wish to unlike. Is this possible in Discourse?

Posts: 6

Participants: 3

Read full topic

Rerender widget from modal

$
0
0

@LeoMcA wrote:

I've run into a bit of a problem I can't work out while trying to implement an "Improve this translation" modal in the discourse-translator plugin.

After I (successfully) submit the improved translation to the server, I want to update the displayed translation which requires me to rerender the widget displaying the translation, but nothing I've tried works.

This is where I want to trigger the widget rerendering:

And this is the widget I want to rerender:

I know I'm properly updating the model with the improved translation, because when I interact with the widget (which causes a rerender) the improved translation appears in the widget in place of the old one.

It's just how do I trigger that rerender from outside of the widget? :confused:

Posts: 1

Participants: 1

Read full topic

Advanced search and admin bulk update options don't make sense for messages

$
0
0

@tobiaseigen wrote:

When at some stage messaging gets more love and attention, here's one feature that would be worth fixing. Repro:

  • logged in as staff, go to advanced search and filter by "are in my messages"
  • select the selection icon, select one or more messages
  • select the admin wrench
  • see bulk update options which are all oriented to discussion topics, not messages - see screenshot

Options I'd expect/hope to see here:

  • move to inbox
  • move to archive
  • delete messages
  • add users/groups to message
  • remove users/groups from message
  • change tags

Posts: 1

Participants: 1

Read full topic

Tag search in tags dropdown box does not work

Fail to upgrade discourse

$
0
0

@trandatnh wrote:

Hi,

I'm using https://github.com/discourse/discourse/compare/28b7ef7...tests-passed

any upgrade from web failed. This is one of the upgrade error

HEAD is now at 5543727 Merge pull request #4583 from saiqulhaq/master
********************************************************
*** Please be patient, next steps might take a while ***
********************************************************
$ bundle install --deployment --without test --without development
Fetching gem metadata from https://rubygems.org/..............
---------------------------------

== Seed from /var/www/discourse/db/fixtures/001_categories.rb

== Seed from /var/www/discourse/db/fixtures/002_groups.rb

== Seed from /var/www/discourse/db/fixtures/003_post_action_types.rb
 - PostActionType {:id=>1, :name_key=>"bookmark", :is_flag=>false, :position=>1}
 - PostActionType {:id=>2, :name_key=>"like", :is_flag=>false, :icon=>"heart", :position=>2}
 - PostActionType {:id=>3, :name_key=>"off_topic", :is_flag=>true, :position=>3}
 - PostActionType {:id=>4, :name_key=>"inappropriate", :is_flag=>true, :position=>4}
 - PostActionType {:id=>5, :name_key=>"vote", :is_flag=>false, :position=>5}
 - PostActionType {:id=>8, :name_key=>"spam", :is_flag=>true, :position=>6}
 - PostActionType {:id=>6, :name_key=>"notify_user", :is_flag=>true, :position=>7}
 - PostActionType {:id=>7, :name_key=>"notify_moderators", :is_flag=>true, :position=>8}

== Seed from /var/www/discourse/db/fixtures/004_screened_ip_addresses.rb
 - ScreenedIpAddress {:id=>1, :ip_address=>"10.0.0.0/8", :action_type=>2}
 - ScreenedIpAddress {:id=>2, :ip_address=>"192.168.0.0/16", :action_type=>2}
 - ScreenedIpAddress {:id=>3, :ip_address=>"127.0.0.0/8", :action_type=>2}
 - ScreenedIpAddress {:id=>4, :ip_address=>"172.16.0.0/12", :action_type=>2}
 - ScreenedIpAddress {:id=>5, :ip_address=>"fc00::/7", :action_type=>2}

== Seed from /var/www/discourse/db/fixtures/005_badge_types.rb
 - BadgeType {:id=>1, :name=>"Gold"}
 - BadgeType {:id=>2, :name=>"Silver"}
 - BadgeType {:id=>3, :name=>"Bronze"}

== Seed from /var/www/discourse/db/fixtures/006_badges.rb
 - BadgeGrouping {:id=>1, :name=>"Getting Started", :default_position=>10}
 - BadgeGrouping {:id=>2, :name=>"Community", :default_position=>11}
 - BadgeGrouping {:id=>3, :name=>"Posting", :default_position=>12}
 - BadgeGrouping {:id=>4, :name=>"Trust Level", :default_position=>13}
 - BadgeGrouping {:id=>5, :name=>"Other", :default_position=>14}
 - Badge {:id=>1, :default_name=>"Basic User", :badge_type_id=>3, :query=>"\n  SELECT u.id user_id, current_timestamp granted_at FROM users u\n  WHERE trust_level >= 1 AND (\n    :backfill OR u.id IN (:user_ids)\n  )\n", :default_badge_grouping_id=>4, :trigger=>4, :default_allow_title=>false, :default_icon=>"fa-user", :system=>true}
 - Badge {:id=>2, :default_name=>"Member", :badge_type_id=>3, :query=>"\n  SELECT u.id user_id, current_timestamp granted_at FROM users u\n  WHERE trust_level >= 2 AND (\n    :backfill OR u.id IN (:user_ids)\n  )\n", :default_badge_grouping_id=>4, :trigger=>4, :default_allow_title=>false, :default_icon=>"fa-user", :system=>true}
 - Badge {:id=>3, :default_name=>"Regular", :badge_type_id=>2, :query=>"\n  SELECT u.id user_id, current_timestamp granted_at FROM users u\n  WHERE trust_level >= 3 AND (\n    :backfill OR u.id IN (:user_ids)\n  )\n", :default_badge_grouping_id=>4, :trigger=>4, :default_allow_title=>true, :default_icon=>"fa-user", :system=>true}
 - Badge {:id=>4, :default_name=>"Leader", :badge_type_id=>1, :query=>"\n  SELECT u.id user_id, current_timestamp granted_at FROM users u\n  WHERE trust_level >= 4 AND (\n    :backfill OR u.id IN (:user_ids)\n  )\n", :default_badge_grouping_id=>4, :trigger=>4, :default_allow_title=>true, :default_icon=>"fa-user", :system=>true}
 - Badge {:id=>17, :default_name=>"Reader", :badge_type_id=>3, :multiple_grant=>false, :target_posts=>false, :show_posts=>false, :query=>"  SELECT id user_id, current_timestamp granted_at\n  FROM users\n  WHERE id IN\n  (\n    SELECT pt.user_id\n    FROM post_timings pt\n    JOIN badge_posts b ON b.post_number = pt.post_number AND\n                          b.topic_id = pt.topic_id\n    JOIN topics t ON t.id = pt.topic_id\n    LEFT JOIN user_badges ub ON ub.badge_id = 17 AND ub.user_id = pt.user_id\n    WHERE ub.id IS NULL AND t.posts_count > 100\n    GROUP BY pt.user_id, pt.topic_id, t.posts_count\n    HAVING count(*) >= t.posts_count\n  )\n", :default_badge_grouping_id=>1, :auto_revoke=>false, :system=>true}
 - Badge {:id=>16, :default_name=>"Read Guidelines", :badge_type_id=>3, :multiple_grant=>false, :target_posts=>false, :show_posts=>false, :query=>"  SELECT user_id, read_faq granted_at\n  FROM user_stats\n  WHERE read_faq IS NOT NULL AND (user_id IN (:user_ids) OR :backfill)\n", :default_badge_grouping_id=>1, :trigger=>8, :system=>true}
 - Badge {:id=>14, :default_name=>"First Link", :badge_type_id=>3, :multiple_grant=>false, :target_posts=>true, :show_posts=>true, :query=>"  SELECT l.user_id, l.post_id, l.created_at granted_at\n  FROM\n  (\n    SELECT MIN(l1.id) id\n    FROM topic_links l1\n    JOIN badge_posts p1 ON p1.id = l1.post_id\n    JOIN badge_posts p2 ON p2.id = l1.link_post_id\n    WHERE NOT reflection AND p1.topic_id <> p2.topic_id AND not quote AND\n      (:backfill OR ( p1.id in (:post_ids) ))\n    GROUP BY l1.user_id\n  ) ids\n  JOIN topic_links l ON l.id = ids.id\n", :default_badge_grouping_id=>1, :trigger=>2, :system=>true}
 - Badge {:id=>15, :default_name=>"First Quote", :badge_type_id=>3, :multiple_grant=>false, :target_posts=>true, :show_posts=>true, :query=>"  SELECT ids.user_id, q.post_id, q.created_at granted_at\n  FROM\n  (\n    SELECT p1.user_id, MIN(q1.id) id\n    FROM quoted_posts q1\n    JOIN badge_posts p1 ON p1.id = q1.post_id\n    JOIN badge_posts p2 ON p2.id = q1.quoted_post_id\n    WHERE (:backfill OR ( p1.id IN (:post_ids) ))\n    GROUP BY p1.user_id\n  ) ids\n  JOIN quoted_posts q ON q.id = ids.id\n", :default_badge_grouping_id=>1, :trigger=>2, :system=>true}
 - Badge {:id=>11, :default_name=>"First Like", :badge_type_id=>3, :multiple_grant=>false, :target_posts=>true, :show_posts=>true, :query=>"  SELECT pa1.user_id, pa1.created_at granted_at, pa1.post_id\n  FROM (\n    SELECT pa.user_id, min(pa.id) id\n    FROM post_actions pa\n    JOIN badge_posts p on p.id = pa.post_id\n    WHERE post_action_type_id = 2 AND\n      (:backfill OR pa.post_id IN (:post_ids) )\n    GROUP BY pa.user_id\n  ) x\n  JOIN post_actions pa1 on pa1.id = x.id\n", :default_badge_grouping_id=>1, :trigger=>1, :system=>true}
 - Badge {:id=>13, :default_name=>"First Flag", :badge_type_id=>3, :multiple_grant=>false, :target_posts=>true, :show_posts=>false, :query=>"  SELECT pa1.user_id, pa1.created_at granted_at, pa1.post_id\n  FROM (\n    SELECT pa.user_id, min(pa.id) id\n    FROM post_actions pa\n    JOIN badge_posts p on p.id = pa.post_id\n    WHERE post_action_type_id IN (3,4,7,8) AND\n      (:backfill OR pa.post_id IN (:post_ids) )\n    GROUP BY pa.user_id\n  ) x\n  JOIN post_actions pa1 on pa1.id = x.id\n", :badge_grouping_id=>1, :default_badge_grouping_id=>1, :trigger=>1, :auto_revoke=>false, :system=>true}
 - Badge {:id=>25, :default_name=>"Promoter", :default_icon=>"fa-user-plus", :badge_type_id=>3, :multiple_grant=>false, :target_posts=>false, :show_posts=>false, :query=>"\n  SELECT u.id user_id, current_timestamp granted_at\n  FROM users u\n  WHERE u.id IN (\n    SELECT invited_by_id\n    FROM invites i\n    JOIN users u2 ON u2.id = i.user_id\n    WHERE i.deleted_at IS NULL AND u2.active AND u2.trust_level >= 0 AND not u2.blocked\n    GROUP BY invited_by_id\n    HAVING COUNT(*) >= 1\n  ) AND u.active AND NOT u.blocked AND u.id > 0 AND\n    (:backfill OR u.id IN (:user_ids) )\n", :default_badge_grouping_id=>2, :trigger=>0, :auto_revoke=>true, :system=>true}
 - Badge {:id=>26, :default_name=>"Campaigner", :default_icon=>"fa-user-plus", :badge_type_id=>2, :multiple_grant=>false, :target_posts=>false, :show_posts=>false, :query=>"\n  SELECT u.id user_id, current_timestamp granted_at\n  FROM users u\n  WHERE u.id IN (\n    SELECT invited_by_id\n    FROM invites i\n    JOIN users u2 ON u2.id = i.user_id\n    WHERE i.deleted_at IS NULL AND u2.active AND u2.trust_level >= 1 AND not u2.blocked\n    GROUP BY invited_by_id\n    HAVING COUNT(*) >= 3\n  ) AND u.active AND NOT u.blocked AND u.id > 0 AND\n    (:backfill OR u.id IN (:user_ids) )\n", :default_badge_grouping_id=>2, :trigger=>0, :auto_revoke=>true, :system=>true}
 - Badge {:id=>27, :default_name=>"Champion", :default_icon=>"fa-user-plus", :badge_type_id=>1, :multiple_grant=>false, :target_posts=>false, :show_posts=>false, :query=>"\n  SELECT u.id user_id, current_timestamp granted_at\n  FROM users u\n  WHERE u.id IN (\n    SELECT invited_by_id\n    FROM invites i\n    JOIN users u2 ON u2.id = i.user_id\n    WHERE i.deleted_at IS NULL AND u2.active AND u2.trust_level >= 2 AND not u2.blocked\n    GROUP BY invited_by_id\n    HAVING COUNT(*) >= 5\n  ) AND u.active AND NOT u.blocked AND u.id > 0 AND\n    (:backfill OR u.id IN (:user_ids) )\n", :default_badge_grouping_id=>2, :trigger=>0, :auto_revoke=>true, :system=>true}
 - Badge {:id=>12, :default_name=>"First Share", :badge_type_id=>3, :multiple_grant=>false, :target_posts=>true, :show_posts=>true, :query=>"  SELECT views.user_id, i2.post_id, i2.created_at granted_at\n  FROM\n  (\n    SELECT i.user_id, MIN(i.id) i_id\n    FROM incoming_links i\n    JOIN badge_posts p on p.id = i.post_id\n    WHERE i.user_id IS NOT NULL\n    GROUP BY i.user_id\n  ) as views\n  JOIN incoming_links i2 ON i2.id = views.i_id\n", :default_badge_grouping_id=>1, :trigger=>0, :system=>true}
 - Badge {:id=>21, :default_name=>"Nice Share", :badge_type_id=>3, :multiple_grant=>true, :target_posts=>true, :show_posts=>true, :query=>"  SELECT views.user_id, i2.post_id, current_timestamp granted_at\n  FROM\n  (\n    SELECT i.user_id, MIN(i.id) i_id\n    FROM incoming_links i\n    JOIN badge_posts p on p.id = i.post_id\n    WHERE i.user_id IS NOT NULL\n    GROUP BY i.user_id,i.post_id\n    HAVING COUNT(*) > 25\n  ) as views\n  JOIN incoming_links i2 ON i2.id = views.i_id\n", :default_badge_grouping_id=>2, :trigger=>0, :system=>true}
 - Badge {:id=>22, :default_name=>"Good Share", :badge_type_id=>2, :multiple_grant=>true, :target_posts=>true, :show_posts=>true, :query=>"  SELECT views.user_id, i2.post_id, current_timestamp granted_at\n  FROM\n  (\n    SELECT i.user_id, MIN(i.id) i_id\n    FROM incoming_links i\n    JOIN badge_posts p on p.id = i.post_id\n    WHERE i.user_id IS NOT NULL\n    GROUP BY i.user_id,i.post_id\n    HAVING COUNT(*) > 300\n  ) as views\n  JOIN incoming_links i2 ON i2.id = views.i_id\n", :default_badge_grouping_id=>2, :trigger=>0, :system=>true}
 - Badge {:id=>23, :default_name=>"Great Share", :badge_type_id=>1, :multiple_grant=>true, :target_posts=>true, :show_posts=>true, :query=>"  SELECT views.user_id, i2.post_id, current_timestamp granted_at\n  FROM\n  (\n    SELECT i.user_id, MIN(i.id) i_id\n    FROM incoming_links i\n    JOIN badge_posts p on p.id = i.post_id\n    WHERE i.user_id IS NOT NULL\n    GROUP BY i.user_id,i.post_id\n    HAVING COUNT(*) > 1000\n  ) as views\n  JOIN incoming_links i2 ON i2.id = views.i_id\n", :default_badge_grouping_id=>2, :trigger=>0, :system=>true}
 - Badge {:id=>5, :default_name=>"Welcome", :badge_type_id=>3, :multiple_grant=>false, :target_posts=>true, :show_posts=>true, :query=>"  SELECT p.user_id, min(post_id) post_id, min(pa.created_at) granted_at\n  FROM post_actions pa\n  JOIN badge_posts p on p.id = pa.post_id\n  WHERE post_action_type_id = 2 AND\n      (:backfill OR pa.post_id IN (:post_ids) )\n  GROUP BY p.user_id\n", :default_badge_grouping_id=>2, :trigger=>1, :system=>true}
 - Badge {:id=>9, :default_name=>"Autobiographer", :badge_type_id=>3, :multiple_grant=>false, :query=>"  SELECT u.id user_id, current_timestamp granted_at\n  FROM users u\n  JOIN user_profiles up on u.id = up.user_id\n  WHERE bio_raw IS NOT NULL AND LENGTH(TRIM(bio_raw)) > 10 AND\n        uploaded_avatar_id IS NOT NULL AND\n        (:backfill OR u.id IN (:user_ids) )\n", :default_badge_grouping_id=>1, :trigger=>8, :system=>true}
 - Badge {:id=>10, :default_name=>"Editor", :badge_type_id=>3, :multiple_grant=>false, :query=>"  SELECT p.user_id, min(p.id) post_id, min(p.created_at) granted_at\n  FROM badge_posts p\n  WHERE p.self_edits > 0 AND\n      (:backfill OR p.id IN (:post_ids) )\n  GROUP BY p.user_id\n", :badge_grouping_id=>1, :default_badge_grouping_id=>1, :trigger=>2, :system=>true}
 - Badge {:id=>6, :default_name=>"Nice Post", :badge_type_id=>3, :multiple_grant=>true, :target_posts=>true, :show_posts=>true, :query=>"\n  SELECT p.user_id, p.id post_id, p.updated_at granted_at\n  FROM badge_posts p\n  WHERE p.post_number > 1 AND p.like_count >= 10 AND\n    (:backfill OR p.id IN (:post_ids) )\n", :default_badge_grouping_id=>3, :trigger=>1, :system=>true}
 - Badge {:id=>7, :default_name=>"Good Post", :badge_type_id=>2, :multiple_grant=>true, :target_posts=>true, :show_posts=>true, :query=>"\n  SELECT p.user_id, p.id post_id, p.updated_at granted_at\n  FROM badge_posts p\n  WHERE p.post_number > 1 AND p.like_count >= 25 AND\n    (:backfill OR p.id IN (:post_ids) )\n", :default_badge_grouping_id=>3, :trigger=>1, :system=>true}
 - Badge {:id=>8, :default_name=>"Great Post", :badge_type_id=>1, :multiple_grant=>true, :target_posts=>true, :show_posts=>true, :query=>"\n  SELECT p.user_id, p.id post_id, p.updated_at granted_at\n  FROM badge_posts p\n  WHERE p.post_number > 1 AND p.like_count >= 50 AND\n    (:backfill OR p.id IN (:post_ids) )\n", :default_badge_grouping_id=>3, :trigger=>1, :system=>true}
 - Badge {:id=>18, :default_name=>"Nice Topic", :badge_type_id=>3, :multiple_grant=>true, :target_posts=>true, :show_posts=>true, :query=>"\n  SELECT p.user_id, p.id post_id, p.updated_at granted_at\n  FROM badge_posts p\n  WHERE p.post_number = 1 AND p.like_count >= 10 AND\n    (:backfill OR p.id IN (:post_ids) )\n", :default_badge_grouping_id=>3, :trigger=>1, :system=>true}
 - Badge {:id=>19, :default_name=>"Good Topic", :badge_type_id=>2, :multiple_grant=>true, :target_posts=>true, :show_posts=>true, :query=>"\n  SELECT p.user_id, p.id post_id, p.updated_at granted_at\n  FROM badge_posts p\n  WHERE p.post_number = 1 AND p.like_count >= 25 AND\n    (:backfill OR p.id IN (:post_ids) )\n", :default_badge_grouping_id=>3, :trigger=>1, :system=>true}
 - Badge {:id=>20, :default_name=>"Great Topic", :badge_type_id=>1, :multiple_grant=>true, :target_posts=>true, :show_posts=>true, :query=>"\n  SELECT p.user_id, p.id post_id, p.updated_at granted_at\n  FROM badge_posts p\n  WHERE p.post_number = 1 AND p.like_count >= 50 AND\n    (:backfill OR p.id IN (:post_ids) )\n", :default_badge_grouping_id=>3, :trigger=>1, :system=>true}
 - Badge {:id=>24, :default_name=>"Anniversary", :default_icon=>"fa-clock-o", :badge_type_id=>2, :query=>"  SELECT u.id AS user_id, MIN(u.created_at + interval '1 year') AS granted_at\n    FROM users u\n    JOIN posts p ON p.user_id = u.id\n   WHERE u.id > 0\n     AND u.active\n     AND NOT u.blocked\n     AND u.created_at + interval '1 year' < now()\n     AND p.deleted_at IS NULL\n     AND NOT p.hidden\n     AND p.created_at + interval '1 year' > now()\n     AND (:backfill OR u.id IN (:user_ids))\n   GROUP BY u.id\n   HAVING COUNT(p.id) > 0\n", :default_badge_grouping_id=>2, :trigger=>0, :auto_revoke=>false, :system=>true}
 - Badge {:id=>28, :default_name=>"Popular Link", :badge_type_id=>3, :multiple_grant=>true, :target_posts=>true, :show_posts=>true, :query=>"        SELECT tl.user_id, post_id, current_timestamp granted_at\n          FROM topic_links tl\n          JOIN posts p  ON p.id = post_id    AND p.deleted_at IS NULL\n          JOIN topics t ON t.id = p.topic_id AND t.deleted_at IS NULL AND t.archetype <> 'private_message'\n         WHERE NOT tl.internal\n           AND tl.clicks >= 50\n      GROUP BY tl.user_id, tl.post_id\n", :badge_grouping_id=>3, :default_badge_grouping_id=>3, :trigger=>0, :system=>true}
 - Badge {:id=>29, :default_name=>"Hot Link", :badge_type_id=>2, :multiple_grant=>true, :target_posts=>true, :show_posts=>true, :query=>"        SELECT tl.user_id, post_id, current_timestamp granted_at\n          FROM topic_links tl\n          JOIN posts p  ON p.id = post_id    AND p.deleted_at IS NULL\n          JOIN topics t ON t.id = p.topic_id AND t.deleted_at IS NULL AND t.archetype <> 'private_message'\n         WHERE NOT tl.internal\n           AND tl.clicks >= 300\n      GROUP BY tl.user_id, tl.post_id\n", :badge_grouping_id=>3, :default_badge_grouping_id=>3, :trigger=>0, :system=>true}
 - Badge {:id=>30, :default_name=>"Famous Link", :badge_type_id=>1, :multiple_grant=>true, :target_posts=>true, :show_posts=>true, :query=>"        SELECT tl.user_id, post_id, current_timestamp granted_at\n          FROM topic_links tl\n          JOIN posts p  ON p.id = post_id    AND p.deleted_at IS NULL\n          JOIN topics t ON t.id = p.topic_id AND t.deleted_at IS NULL AND t.archetype <> 'private_message'\n         WHERE NOT tl.internal\n           AND tl.clicks >= 1000\n      GROUP BY tl.user_id, tl.post_id\n", :badge_grouping_id=>3, :default_badge_grouping_id=>3, :trigger=>0, :system=>true}
 - Badge {:id=>36, :name=>"Appreciated", :default_name=>"Appreciated", :default_icon=>"fa-heart", :badge_type_id=>3, :query=>"      SELECT p.user_id, current_timestamp AS granted_at\n      FROM posts AS p\n      WHERE p.like_count >= 1\n        AND (:backfill OR p.user_id IN (:user_ids))\n      GROUP BY p.user_id\n      HAVING count(*) > 20\n", :default_badge_grouping_id=>2, :trigger=>0, :auto_revoke=>false, :system=>true}
 - Badge {:id=>37, :name=>"Respected", :default_name=>"Respected", :default_icon=>"fa-heart", :badge_type_id=>2, :query=>"      SELECT p.user_id, current_timestamp AS granted_at\n      FROM posts AS p\n      WHERE p.like_count >= 2\n        AND (:backfill OR p.user_id IN (:user_ids))\n      GROUP BY p.user_id\n      HAVING count(*) > 100\n", :default_badge_grouping_id=>2, :trigger=>0, :auto_revoke=>false, :system=>true}
 - Badge {:id=>31, :name=>"Admired", :default_name=>"Admired", :default_icon=>"fa-heart", :badge_type_id=>1, :query=>"      SELECT p.user_id, current_timestamp AS granted_at\n      FROM posts AS p\n      WHERE p.like_count >= 5\n        AND (:backfill OR p.user_id IN (:user_ids))\n      GROUP BY p.user_id\n      HAVING count(*) > 300\n", :default_badge_grouping_id=>2, :trigger=>0, :auto_revoke=>false, :system=>true}
 - Badge {:id=>38, :default_name=>"Thank You", :default_icon=>"fa-heart", :badge_type_id=>3, :query=>"      SELECT us.user_id, current_timestamp AS granted_at\n      FROM user_stats AS us\n      INNER JOIN posts AS p ON p.user_id = us.user_id\n      WHERE p.like_count > 0\n        AND us.likes_given >= 10\n        AND (:backfill OR us.user_id IN (:user_ids))\n      GROUP BY us.user_id, us.likes_given\n      HAVING COUNT(*) > 20\n", :badge_grouping_id=>2, :default_badge_grouping_id=>2, :trigger=>0, :auto_revoke=>false, :system=>true}
 - Badge {:id=>32, :default_name=>"Gives Back", :default_icon=>"fa-heart", :badge_type_id=>2, :query=>"      SELECT us.user_id, current_timestamp AS granted_at\n      FROM user_stats AS us\n      INNER JOIN posts AS p ON p.user_id = us.user_id\n      WHERE p.like_count > 0\n        AND us.likes_given >= 100\n        AND (:backfill OR us.user_id IN (:user_ids))\n      GROUP BY us.user_id, us.likes_given\n      HAVING COUNT(*) > 100\n", :badge_grouping_id=>2, :default_badge_grouping_id=>2, :trigger=>0, :auto_revoke=>false, :system=>true}
 - Badge {:id=>39, :default_name=>"Empathetic", :default_icon=>"fa-heart", :badge_type_id=>1, :query=>"      SELECT us.user_id, current_timestamp AS granted_at\n      FROM user_stats AS us\n      INNER JOIN posts AS p ON p.user_id = us.user_id\n      WHERE p.like_count > 0\n        AND us.likes_given >= 1000\n        AND (:backfill OR us.user_id IN (:user_ids))\n      GROUP BY us.user_id, us.likes_given\n      HAVING COUNT(*) > 500\n", :badge_grouping_id=>2, :default_badge_grouping_id=>2, :trigger=>0, :auto_revoke=>false, :system=>true}
 - Badge {:id=>33, :name=>"Out of Love", :default_name=>"Out of Love", :default_icon=>"fa-heart", :badge_type_id=>3, :query=>"      SELECT gdl.user_id, current_timestamp AS granted_at\n      FROM given_daily_likes AS gdl\n      WHERE gdl.limit_reached\n        AND (:backfill OR gdl.user_id IN (:user_ids))\n      GROUP BY gdl.user_id\n      HAVING COUNT(*) >= 1\n", :badge_grouping_id=>2, :default_badge_grouping_id=>2, :trigger=>0, :auto_revoke=>false, :system=>true}
 - Badge {:id=>34, :name=>"Higher Love", :default_name=>"Higher Love", :default_icon=>"fa-heart", :badge_type_id=>2, :query=>"      SELECT gdl.user_id, current_timestamp AS granted_at\n      FROM given_daily_likes AS gdl\n      WHERE gdl.limit_reached\n        AND (:backfill OR gdl.user_id IN (:user_ids))\n      GROUP BY gdl.user_id\n      HAVING COUNT(*) >= 5\n", :badge_grouping_id=>2, :default_badge_grouping_id=>2, :trigger=>0, :auto_revoke=>false, :system=>true}
 - Badge {:id=>35, :name=>"Crazy in Love", :default_name=>"Crazy in Love", :default_icon=>"fa-heart", :badge_type_id=>1, :query=>"      SELECT gdl.user_id, current_timestamp AS granted_at\n      FROM given_daily_likes AS gdl\n      WHERE gdl.limit_reached\n        AND (:backfill OR gdl.user_id IN (:user_ids))\n      GROUP BY gdl.user_id\n      HAVING COUNT(*) >= 20\n", :badge_grouping_id=>2, :default_badge_grouping_id=>2, :trigger=>0, :auto_revoke=>false, :system=>true}
 - Badge {:id=>40, :default_name=>"First Mention", :badge_type_id=>3, :multiple_grant=>false, :target_posts=>true, :show_posts=>true, :query=>"  SELECT acting_user_id AS user_id, min(target_post_id) AS post_id, min(p.created_at) AS granted_at\n  FROM user_actions\n  JOIN posts p ON p.id = target_post_id\n  JOIN topics t ON t.id = topic_id\n  JOIN categories c on c.id = category_id\n  WHERE action_type = 7\n    AND NOT read_restricted\n    AND p.deleted_at IS  NULL\n    AND t.deleted_at IS  NULL\n    AND t.visible\n    AND t.archetype <> 'private_message'\n    AND (:backfill OR p.id IN (:post_ids))\n  GROUP BY acting_user_id\n", :badge_grouping_id=>1, :default_badge_grouping_id=>1, :trigger=>2, :system=>true}
 - Badge {:id=>41, :default_name=>"First Emoji", :badge_type_id=>3, :multiple_grant=>false, :target_posts=>true, :show_posts=>true, :query=>nil, :badge_grouping_id=>1, :default_badge_grouping_id=>1, :trigger=>0, :system=>true}
 - Badge {:id=>42, :default_name=>"First Onebox", :badge_type_id=>3, :multiple_grant=>false, :target_posts=>true, :show_posts=>true, :query=>nil, :badge_grouping_id=>1, :default_badge_grouping_id=>1, :trigger=>0, :system=>true}
 - Badge {:id=>43, :default_name=>"First Reply By Email", :badge_type_id=>3, :multiple_grant=>false, :target_posts=>true, :show_posts=>true, :query=>nil, :badge_grouping_id=>1, :default_badge_grouping_id=>1, :trigger=>0, :system=>true}

== Seed from /var/www/discourse/db/fixtures/007_web_hook_event_types.rb
 - WebHookEventType {:id=>1, :name=>"topic"}
 - WebHookEventType {:id=>2, :name=>"post"}
 - WebHookEventType {:id=>3, :name=>"user"}

== Seed from /var/www/discourse/db/fixtures/009_users.rb
 - User {:id=>-1, :name=>"system", :username=>"system", :username_lower=>"system", :email=>"no_email", :password=>"55eb949707e861c5343e756dc4738137", :active=>true, :admin=>true, :moderator=>true, :approved=>true, :trust_level=>4}

== Seed from /var/www/discourse/db/fixtures/500_lounge_category.rb

== Seed from /var/www/discourse/db/fixtures/501_meta_category.rb

== Seed from /var/www/discourse/db/fixtures/502_staff_category.rb

== Seed from /var/www/discourse/db/fixtures/999_settings.rb

== Seed from /var/www/discourse/db/fixtures/999_topics.rb
***  Bundling assets. This might take a while ***
$ bundle exec rake assets:precompile
Purging temp files
I, [2016-12-03T03:31:57.021928 #3542]  INFO -- : Writing /var/www/discourse/public/assets/common-ec4b0622157af11e26208756d9f4ce2d42304b1bf7776190337d5aa9337f3c67.css
I, [2016-12-03T03:32:24.360305 #3542]  INFO -- : Writing /var/www/discourse/public/assets/desktop-ac6eec1e71ca63e3ff0a7e08a721b4fc946f001f4046be204abeb2c89349c909.css
I, [2016-12-03T03:32:51.664447 #3542]  INFO -- : Writing /var/www/discourse/public/assets/mobile-43cbf43ed6d9fab8348729698972c475cc0bdbbee35d8ed45b497aa4da5ea6fe.css
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/cached_environment.rb:47:in `load'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/bundle.rb:23:in `block in call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/utils.rb:196:in `dfs'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/bundle.rb:24:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/processor_utils.rb:75:in `call_processor'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/processor_utils.rb:56:in `call_processors'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/loader.rb:60:in `block in load'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/loader.rb:44:in `load'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/cached_environment.rb:47:in `load'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/base.rb:66:in `find_asset'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/base.rb:73:in `find_all_linked_assets'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/manifest.rb:134:in `block in find'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/manifest.rb:133:in `each'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/manifest.rb:133:in `find'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/manifest.rb:185:in `compile'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-rails-3.1.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/rake/sprocketstask.rb:147:in `with_logger'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-rails-3.1.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
MiniRacer::RuntimeError: Error: `SCRIPT` tags are not allowed in HTMLBars templates (on line 11)
JavaScript at validateStartTag (<anonymous>:23146:13)
JavaScript at Parser.finishStartTag (<anonymous>:23019:7)
JavaScript at Parser.finishTag (<anonymous>:23003:14)
JavaScript at Object.tagName (<anonymous>:25040:25)
JavaScript at Object.tokenizePart (<anonymous>:24864:33)
JavaScript at Parser.ContentStatement (<anonymous>:22843:22)
JavaScript at Parser.acceptNode (<anonymous>:23216:27)
JavaScript at Parser.Program (<anonymous>:22743:14)
JavaScript at Parser.acceptNode (<anonymous>:23216:27)
JavaScript at Parser.BlockStatement (<anonymous>:22770:42)
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/mini_racer-0.1.7/lib/mini_racer.rb:167:in `eval_unsafe'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/mini_racer-0.1.7/lib/mini_racer.rb:167:in `block (2 levels) in eval'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/mini_racer-0.1.7/lib/mini_racer.rb:217:in `timeout'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/mini_racer-0.1.7/lib/mini_racer.rb:166:in `block in eval'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/mini_racer-0.1.7/lib/mini_racer.rb:63:in `block in with_lock'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/mini_racer-0.1.7/lib/mini_racer.rb:63:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/mini_racer-0.1.7/lib/mini_racer.rb:63:in `with_lock'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/mini_racer-0.1.7/lib/mini_racer.rb:164:in `eval'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/execjs-2.7.0/lib/execjs/mini_racer_runtime.rb:27:in `block in eval'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/execjs-2.7.0/lib/execjs/mini_racer_runtime.rb:66:in `translate'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/execjs-2.7.0/lib/execjs/mini_racer_runtime.rb:26:in `eval'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/execjs-2.7.0/lib/execjs/mini_racer_runtime.rb:34:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/barber-0.11.1/lib/barber/precompiler.rb:31:in `compile'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/barber-0.11.1/lib/barber/precompiler.rb:8:in `compile'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/ember-handlebars-template-0.7.4/lib/ember/handlebars/template.rb:166:in `block in precompile_ember_handlebars'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/cache.rb:85:in `fetch'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/ember-handlebars-template-0.7.4/lib/ember/handlebars/template.rb:165:in `precompile_ember_handlebars'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/ember-handlebars-template-0.7.4/lib/ember/handlebars/template.rb:89:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/ember-handlebars-template-0.7.4/lib/ember/handlebars/template.rb:39:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/processor_utils.rb:75:in `call_processor'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/processor_utils.rb:56:in `call_processors'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/processor_utils.rb:75:in `call_processor'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/processor_utils.rb:56:in `call_processors'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/loader.rb:60:in `block in load'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/loader.rb:44:in `load'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/cached_environment.rb:47:in `load'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/bundle.rb:23:in `block in call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/utils.rb:196:in `dfs'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/bundle.rb:24:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/processor_utils.rb:75:in `call_processor'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/processor_utils.rb:56:in `call_processors'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/loader.rb:60:in `block in load'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/loader.rb:44:in `load'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/cached_environment.rb:47:in `load'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/base.rb:66:in `find_asset'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/base.rb:73:in `find_all_linked_assets'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/manifest.rb:134:in `block in find'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/manifest.rb:133:in `each'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/manifest.rb:133:in `find'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/sprockets/manifest.rb:185:in `compile'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-rails-3.1.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-3.6.3/lib/rake/sprocketstask.rb:147:in `with_logger'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/sprockets-rails-3.1.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
Bundling assets

Posts: 6

Participants: 2

Read full topic

Effective & complex 1-month long contest; goal — actively develop selected categories, and share its topics in the Internet

$
0
0

@meglio wrote:

This topic describes my experience and gives all you need to run a complex one-month long contest, which will give boost to your forum overall, and especially focus on developing a few selected categories.

It is working so good that I feel the need to share this experience with you.


I run 4 contests before this one, so I got some experience and knowledge about what to do and what not to. I will go through all this in detail below.

You should adapt the point calculation formulas depending on your community size and activity. The formulas described below works very well for our community, which can be characterized by the following statistics:

  • 1000 registered users
  • 100 authorized users visit the forum daily
  • 200-400 new messages daily
  • 2-5 new topics daily
  • 120k views monthly in Google Analytics, 40% direct traffic, 60% search engine traffic

Step 1. Choose categories to boost

Our goat keepers community needed some more attention to a few categories related to cheeses. So we chose 3 categories for this contest.

I do not recommend choosing more than 3 — even with just 3 categories, people cannot easily figure out which ones are best to spend time on in order to win the contest. So I would say 2 or 3 is best. one is not fun — people love choice.

Step 2. Develop rules and formulas for points

The huge SQL query you will find below reflects our rules. But you should always adapt for your audience habits and community size.

Length. One month is enough. Too long — and people will lose their focus. Too short — and you will get few participants.

Points. We use the following formula:

  • 1 like = 1 point
  • 5 views = 1 point
  • 1 topic created = 2 points

Calculation is made only for topics, messages and views recorded during the contest period.

Messages that qualify for points must be made on topics created within the contest period.

Views are not as valuable as likes — because you can exploit it by posting and repeatedly open your topics every day (and ask your friends to do the same). Still, we need views to let people spread the world with the links to your topics. So far works very well. However, in the future contests I would switch to 6 views = 1 topic to balance between the importance of likes vs views better.

Who can participate

We care about our users a lot. We don't want newcomers to win valuable prizes. We also don't want for people to sign up for the contest only, grab prizes and then disappear. So we only allow the following users to participate:

  • was a writer in last 2 months
  • had gained trust level 2 before the contest started

You can easily adapt the criteria in SQL query below.

Whos likes are counted

Never count likes from everyone — people will create lots of fake accounts and exploit your contest. We failed this way once and had to disqualify likes from people registered for liking only. We did it manually and it was rigmarole.

This time we are only counting likes from people who had written at least once in 2 months period before the contest started. Another important requirement is that those likers must had gained level 1 before the contest started.

This criteria is included in the SQL query.

How likes are counted

In preview contests, we used to count all likes, but people exploited it quickly. This time we only choose one message per user per topic with most likes received, and only count those likes. I can already see it works great. People do not try to write many short replies. Instead, they try to create attractive and engaging comments, at least one per topic, and try to gain as much likes as possible by the quality is content. I'm extremely happy with this criterion.

Additional points

More ways to gain points is always fun. We developed 3 additional sources of points.

  1. 10 points for Popularity badge
    You can use any other existing badge.
    It is important to make it impossible to win a contest with badges only, so it will only consider up to 3 badges granted during the contest.

  2. 100 points for a Diary Keeper badge.
    This is a badge that is very difficult to achieve. You have to write a diary about something related to cheese making or goat keeping for 15 days, totalling 3000+ words.
    Once we see a new diary, we add a diary tag to it. Then, the badge is granted on auto when the criteria met. If there is at least one such a badge granted during the contest, the SQL query will add +100 points.

  3. 25 points for purchasing access to our online magazine. The magazine is a hidden category. Only a certain group has access to the category. Once someone makes a payment, their nickname is added to the group. This way the system can find out whether to grant 25 points or not. It is also important that these points can only be granted once, so that it is impossible to by once every day and "buy the first place" in the contest.

Tasks

Besides points, there are 5 tasks. These can be done at any time during the contest — even in the latest contest day. However, you should only choose winners among those completed all of them.

Develop your tasks in a way that will help your forum grow and build up the desired atmosphere and activity level in your community.

Here are out tasks

  1. Task 1. Create a topic in a particular category. Minimum length required is 500 words.

  2. Task 2. Write something in a particular topic, min 150 words length.
    Because our contest is a New Year contest, the topic is with people's New Year congrats and wishes. Put in some rules.
    This task is pretty easy. You need such a one to make people "tick this task" in their mind and say "easy peasy" as soon as they read about it. This engages big time. You cannot just do all 5 tasks difficult ones.
    We also added a requirement to make a New Year photo with a goat, and with "New Year Contest [FORUM NAME]" written on paper and seen in the photo.

  3. Task 3. Video transcription. Videos are great source of unique information, Google will like it. The task is to create a topic with a link to the video and a transcription for the video. The video must be at least 5m length. The topic must be created in a particular category. It can be anything that fits into the category

  4. Build a topic from any materials available online. Min 400 words length. It must be created in a particular category and be about a specific knowledge type. For this one, we go through all new topics and put a specific tag when the requirement is met. This way the system recognizes when the criteria is met.
    In our case, the tag is seasoning-in-cheese

  5. Write a story in a particular topic, min 400 words length.
    This is similar to (1), but a bit more difficult. Good formatting is required in this topic as well. We link to our Tutorial series, so that people can learn about formatting a bit while in contest.
    In this case, I wanted to build up the positive atmosphere, so I created a topic "community — our charity and helping people around us". The task is to create a story about you or your friend doing something good, helping people etc.

Disqualifying topics from contest

When a topic is "just copied" from the Internet with no modification and expansion, we disqualify it by adding a tag named topic-in-development. This tells to the user that the topic needs to be improved and will not be considered for points until the tag is removed.

Step 3. Write down your rules

Make a hidden topic 1 week before the contest starts. Read it and rewrite it every day. This is the only way to make the rules clear and easy to read. If you don't do so, you risk getting a lot of confusion — because the rules are not easy ones.

I spent 1 week writing out the rules, one hour every evening. It also took me a few hours of going through tutorials for journalists about how to write in a clear and readable way. Anyway, this is fun and you will learn a lot.

Give the rules to your friends and ask them to criticize them, and note every bit that is unclear.

If that helps, you can translate our rules from Russian with using Google translator or whatever, and see if you can adapt the translation. here is the message with rules.

Step 4. Create an SQL query.

Below is a complex and long SQL query that calculates all the criteria. Our goal is to display a table like this, so that every participant can check their score in detail:

The first 5 columns show ticks for tasks 1 to 5.
The next 3 columns show points for topics, likes and views respectively.
The next 3 columns show points for additional ways to gain them, as outlined above.
The last column shows the points total.

Note that the table is ordered by username, not by points. There are a few reasons why. Firstly, it is easier to find your username when it is always ordered the same way. Secondly, one will spend more seconds on the page because they will need to scroll (good for Google Analytics that is then shown to marketers). Finally, if one sees the best scores immediately at the top, it can be discouraging.

You can see this table in action by the following link:

It is built in WordPress with using my Twig Anything plugin. The principles are explained in a separate tutorial topic:

Another important thing is that the table is cached for 3 hours — so the numbers in the table will only update once every 3 hours. This is NOT for performance reasons, but rather to add excitement. Firstly, people will open the table more often "waiting for an update". Secondly, they will be able to focus on the contest itself rather than looking at their score after every single action. In other words, I tried to prevent the table from being a distraction.

SQL Query for Discourse Data Explorer

WITH

/* Find out who wrote in the forum at least once in October and November */
writers_oct_nov AS (
  SELECT DISTINCT (p.user_id) as user_id
  FROM posts p
  LEFT JOIN topics t ON t.id = p.topic_id
  WHERE p.created_at BETWEEN '2016-10-01'::date AND '2016-11-30'::date
    AND t.deleted_at IS NULL
    AND t.visible = TRUE
    AND t.archived = FALSE
    AND t.archetype = 'regular'
),


/* Whos likes are counted when calculating points for likes: must had been a writer in last 2 months and had gained level 1 before the contest started */

accepted_likers AS (
    SELECT ub.user_id as user_id
    FROM user_badges ub
    INNER JOIN users u ON u.id = ub.user_id
    INNER JOIN writers_oct_nov wr ON wr.user_id = ub.user_id
    WHERE badge_id = 1
      AND granted_at < '2016-12-01'::date
      AND u.active = TRUE
      AND u.suspended_at IS NULL
      AND u.blocked = FALSE
      AND u.staged = FALSE
),

/* Count likes by post from qualified likers only */

likes_by_post as (

  SELECT p.topic_id as topic_id,
    p.user_id as user_id,
    p.id as post_id,
    COUNT(pa.id) as likes
  FROM post_actions pa
  LEFT JOIN accepted_likers al ON al.user_id = pa.user_id
  LEFT JOIN posts p ON p.id = pa.post_id
  LEFT JOIN topics t ON t.id = p.topic_id
  LEFT OUTER JOIN topic_tags tt
    ON tt.topic_id = t.id AND tt.tag_id = 21 /* topic-in-development tag */
  WHERE post_action_type_id = 2 /*Action to like a post */
    AND pa.deleted_at IS NULL
    AND p.created_at BETWEEN '2016-12-01'::date AND '2016-12-31'::date /* contest period */
    AND t.category_id IN(
          28 /* id of contest category 1 */,
          55 /* id of contest category 2 */,
          14 /* id of contest category 3 */
        )
    AND t.created_at BETWEEN '2016-12-01'::date AND '2016-12-31'::date /* contest period */
    AND t.closed = FALSE
    AND t.archived = FALSE
    AND t.visible = TRUE
    AND t.deleted_at IS NULL
    AND tt.tag_id IS NULL
  GROUP BY p.id

),

/* Choose one message per topic per user with most likes */

best_likes_by_topic as (
  SELECT user_id as user_id,
    topic_id as topic_id,
    MAX(likes) as likes
  FROM likes_by_post
  GROUP BY user_id, topic_id
),

/* Who can participate in contest? */

participants AS (
  SELECT ub.user_id as user_id,
    u.username as username
  FROM user_badges ub
  INNER JOIN users u ON u.id = ub.user_id
  INNER JOIN writers_oct_nov wr ON wr.user_id = ub.user_id /* was a writer in last 2 months */
  WHERE badge_id = 2
    AND granted_at < '2016-12-01'::date /* had gained trust level 2 before contest started */
    AND u.active = TRUE
    AND u.suspended_at IS NULL
    AND u.blocked = FALSE
    AND u.staged = FALSE
    AND u.username NOT IN ('system', 'meg', 'Brovarchanka') /* exclude administrators */
),

/* TASK1 - read about it in detail above */
task1 AS (
  SELECT p.user_id as user_id,
    p.topic_id as topic_id,
    tt.tag_id as topic_tag_id,
    p.word_count as post_word_count
  FROM posts p
  INNER JOIN topics t ON t.id = p.topic_id
  LEFT OUTER JOIN topic_tags tt
    ON tt.topic_id = p.topic_id
      AND ( tt.tag_id = 21 /* tag topic-in-development */
          OR tt.tag_id = 43 /* tag seasoning-in-cheese - exclude it as it is required for another task */
        )
  WHERE p.post_number = 1
    AND t.category_id = 28 /* only cheese-making category accepted for task 1  */
    AND t.archetype = 'regular'
    AND t.created_at BETWEEN '2016-12-01'::date AND '2016-12-31'::date /* contest dates */
    AND t.closed = FALSE
    AND t.archived = FALSE
    AND t.visible = TRUE
    AND t.deleted_at IS NULL
    AND p.word_count >= 400 /* at least 400 words */
    AND tt.tag_id IS NULL
),

/* TASK 2 */
task2 as (
  SELECT p.user_id, p.id as post_id
  FROM posts p
  WHERE p.topic_id = 5582 /* topic ID for task 2 */
    AND p.word_count >= 150 /* at least 150 words */
    AND (
      position('<img' in p.cooked) > 0
      OR position('[img' in p.cooked) > 0
    )
),

/* TASK 3 */
task3 as (
  SELECT p.user_id as user_id,
    p.topic_id as topic_id
  FROM posts p
  INNER JOIN topics t ON t.id = p.topic_id
  LEFT OUTER JOIN topic_tags tt
    ON tt.topic_id = p.topic_id AND tt.tag_id = 44 /* seek for a specific tag */
  WHERE t.category_id = 28 /* only cheese-making category accepted */
    AND t.archetype = 'regular'
    AND t.created_at BETWEEN '2016-12-01'::date AND '2016-12-31'::date /* contest dates */
    AND t.closed = FALSE
    AND t.archived = FALSE
    AND t.visible = TRUE
    AND t.deleted_at IS NULL
    AND tt.tag_id IS NOT NULL
),

/* TASK 4 */
task4 as (
  SELECT p.user_id as user_id,
    p.topic_id as topic_id,
    p.word_count as post_word_count
  FROM posts p
  INNER JOIN topics t ON t.id = p.topic_id
  LEFT OUTER JOIN topic_tags tt
    ON tt.topic_id = p.topic_id AND tt.tag_id = 43 /* seek for a particular tag */
  WHERE p.post_number = 1
    AND t.category_id = 28 /* only cheese-making category accepted*/
    AND t.archetype = 'regular'
    AND t.created_at BETWEEN '2016-12-01'::date AND '2016-12-31'::date /* contest dates */
    AND t.closed = FALSE
    AND t.archived = FALSE
    AND t.visible = TRUE
    AND t.deleted_at IS NULL
    AND p.word_count >= 400 /* at least 400 words */
    AND tt.tag_id IS NOT NULL
),

/* TASK5 */
task5 as (
  SELECT p.user_id, p.id as post_id
  FROM posts p
  WHERE p.topic_id = 5583 /* message in a particular topic, use your own ID */
    AND p.word_count >= 250 /* at least 250 words */
),

points_for_topics as (
  SELECT
    t.user_id as user_id,
    COUNT(t.id) * 2 as points /* every new topic adds 2 points */
  FROM topics t
  LEFT OUTER JOIN topic_tags tt
    ON tt.topic_id = t.id AND tt.tag_id = 21 /* exclude topics with tag topic-in-development */
  WHERE t.category_id IN(
          28 /* accepted contest category 1 */,
          55 /* accepted contest category 2 */,
          14 /* accepted contest category 3 */
        )
    AND t.created_at BETWEEN '2016-12-01'::date AND '2016-12-31'::date /* contest dates */
    AND t.closed = FALSE
    AND t.archived = FALSE
    AND t.visible = TRUE
    AND t.deleted_at IS NULL
    AND tt.tag_id IS NULL
  GROUP BY t.user_id
),

points_for_views as (
  SELECT
    t.user_id as user_id,
    floor(COUNT(tw.topic_id) / 5) as points /* every 5 views add 1 point */
  FROM topic_views tw
  LEFT OUTER JOIN topics t ON t.id = tw.topic_id
  LEFT OUTER JOIN topic_tags tt
    ON (tt.topic_id = t.id AND tt.tag_id = 21) /* exclude topics with tag topic-in-development */
  WHERE t.category_id IN (
          28 /* accepted contest category 1 */,
          55 /* accepted contest category 2 */,
          14 /* accepted contest category 3 */
        )
    AND t.created_at BETWEEN '2016-12-01'::date AND '2016-12-31'::date /* contest dates */
    AND tw.viewed_at BETWEEN '2016-12-01'::date AND '2016-12-31'::date /* contest dates */
    AND t.closed = FALSE
    AND t.archived = FALSE
    AND t.visible = TRUE
    AND t.deleted_at IS NULL
    AND tt.tag_id IS NULL
  GROUP BY t.user_id
),

/*  SUM POINTS FOR LIKES RECEIVED, PER USER */
points_for_likes as (
  SELECT user_id,
  SUM(likes) as points /* 1 like adds 1 point, just add */
  FROM best_likes_by_topic
  GROUP BY user_id
),

/* Number of BADGE1 badges per user for additional points */

popularity_investment_badges as (
  SELECT user_id,
    COUNT(id) as num_badges
  FROM user_badges ub
  WHERE ub.badge_id = 21 /* for which badge ID additional points are given? use your ID */
    AND granted_at BETWEEN '2016-12-01'::date AND '2016-12-31'::date /* contest dates */
  GROUP BY user_id
),

/* Additional points for BADGE1 per user */

points_for_popularity as (
  SELECT user_id,
    (CASE WHEN num_badges > 3 THEN 3 ELSE num_badges END) * 10 as points /* up to 3 badges accepted, 10 points per badge*/
  FROM popularity_investment_badges
),

/* Number of BADGE2 badges per user for additional points */

diary_badges as (
  SELECT user_id,
    COUNT(id) as num_badges
  FROM user_badges ub
  WHERE ub.badge_id = 112 /* for which badge ID additional points are given? use your ID */
    AND granted_at BETWEEN '2016-12-01'::date AND '2016-12-31'::date /* contest dates */
  GROUP BY user_id
),

/* Additional points for BADGE2 per user */

points_for_diary as (
  SELECT user_id,
    (CASE WHEN num_badges > 1 THEN 1 ELSE num_badges END) * 100 as points /* no more than 1 badge accepted, +100 points if badge found */
  FROM diary_badges
),

/* Magazine subscriptions per user in the contest period */

magazine_subscriptions as (
  SELECT user_id,
    COUNT(group_id) as num
  FROM group_users
  WHERE group_id = 49 /* group ID granted to user when they subscribe to the journal */
    AND created_at BETWEEN '2016-12-01'::date AND '2016-12-31'::date /* contest dates */
  GROUP BY user_id, group_id
),

/* Points for magazine subscriptions per user */
points_for_magazine as (
  SELECT user_id,
    (CASE WHEN num > 1 THEN 1 ELSE num END) * 25 as points /* no more than 1 subscription accepted, +25 points if there was a subscription */
  FROM magazine_subscriptions
),

/* All points and task completion status in a single table  */

points_calculated as (

SELECT p.user_id as user_id,
  u.username as username,
  MIN(task1.topic_id) as task1_topic_id,
  MIN(task2.post_id) as task2_post_id,
  MIN(task3.topic_id) as tas3_topic_id,
  MIN(task4.topic_id) as task4_topic_id,
  MIN(task5.post_id) as task5_post_id,
  MIN(p_t.points) as points_for_topics,
  MIN(p_w.points) as points_for_views,
  MIN(p_l.points) as points_for_likes,
  MIN(p_p.points) as points_for_popularity,
  MIN(p_d.points) as points_for_diary,
  MIN(p_m.points) as points_for_magazine
FROM participants p
LEFT JOIN users u ON u.id = p.user_id
LEFT OUTER JOIN task1 ON task1.user_id = p.user_id
LEFT OUTER JOIN task2 ON task2.user_id = p.user_id
LEFT OUTER JOIN task3 ON task3.user_id = p.user_id
LEFT OUTER JOIN task4 ON task4.user_id = p.user_id
LEFT OUTER JOIN task5 ON task5.user_id = p.user_id
LEFT OUTER JOIN points_for_topics p_t ON p_t.user_id = p.user_id
LEFT OUTER JOIN points_for_views  p_w ON p_w.user_id = p.user_id
LEFT OUTER JOIN points_for_likes  p_l ON p_l.user_id = p.user_id
LEFT OUTER JOIN points_for_popularity p_p
  ON p_p.user_id = p.user_id
LEFT OUTER JOIN points_for_diary  p_d ON p_d.user_id = p.user_id
LEFT OUTER JOIN points_for_magazine p_m ON p_m.user_id = p.user_id
GROUP BY p.user_id, u.username
)


/* Same as above, but adds POINTS TOTAL  */

SELECT pc.*,
  ( COALESCE(points_for_topics, 0)
    + COALESCE(points_for_views, 0)
    + COALESCE(points_for_likes, 0)
    + COALESCE(points_for_popularity, 0)
    + COALESCE(points_for_diary, 0)
    + COALESCE(points_for_magazine, 0)
  ) as points_total

/* FINAL OUTPUT - order by username */

FROM points_calculated pc
ORDER BY pc.username

Step 5. Enjoy

Be kind and make the rules work for everyone the same way. No priorities. Help everyone to understand your rules. Allow them to edit their topics and improve. Make everyone happy. That is what it is all about.

I can only show statistics for 2 days as we started on 1st December.

Topics created:

Messages written:

Likes given:

Private messages:


If you like the idea, I can also be hired to help you setup all you need to run a similar contest with your Discourse setup.

Posts: 1

Participants: 1

Read full topic

Missing confirmation dialog when resetting password


Importing from MVCforum to Discourse

$
0
0

@Viir wrote:

I recently wrote some code to import from MVCforum, here I am going to explain how you can use it too. The import logic can be found at https://github.com/Viir/import-to-discourse, packaged as an easy to use commandline tool.

Overall process of importing

  • Use the Backup feature in discourse to create an sql dump of the discourse database.
  • Use the import tool to add the data to be imported to the sql dump file.
  • Use the Restore feature in discourse with the modified sql dump.

Import from mvcforum

Import from mvcforum supports users, categories, topics and posts.
The mvcforum database tables are exported into a single file using the sql script in the file MvcForum.Export.To.Xml.sql.

When running the import tool, supply the following arguments:

  • Path to the file containing the sql dump from discourse.
  • Path to the xml file containing the mvcforum export.

The tool then writes an sql script with the data merged from both databases into a new file.
After gzipping, you can apply it to your discourse instance using the restore function.

Posts: 3

Participants: 2

Read full topic

Sign Up/ Login Buttons replace with one icon

$
0
0

@madbox wrote:

Hello fellow Discourcers,

I have just started a community forum with your wonderful software. I am some sort of addicted to simple design.

My question is why we have 2 buttons for login and sign up, when only login button should be enough in my opinion.

Even it will look much better if these two buttons are replaced with human like icon, then we will have instead of two buttons and two icons, only three icons.

I think it will look wonderful.

Posts: 1

Participants: 1

Read full topic

Email traffic generated from Discourse

$
0
0

@akaAlso wrote:

Looking for a few user experiences to be able to gauge my expectations and goals please.

I've just rolled out the invites to the rest of the company having experimented with a few colleagues for a few weeks.
(<10 to around 70)
I appreciate that emails are a necessary medium to get the invites out, and to remind people that the platform is up and running and generating discussions. However I'm concerned that continued over reliance on email defeats the object of reducing inbox overload, and separating out internal discussions to leave email more focused on incoming customer communication.

Am I being unrealistic in this respect?

Is it possible, or advisable, to throttle back Discourse generated email without jeopardising the engagement of users?

I should add this is a private, invite only, company employee forum.
Two of the new users have already responded to seeded topics with replies to the notification email address. I need to find out how they were able, or minded, to reply that way - the whole point is to have public discussion for all to share. I anticipate challenging times ahead!

Posts: 3

Participants: 3

Read full topic

Facebook login not working

$
0
0

@Ham wrote:

So when I go to create an account with facebook it returns my name and username but asks for email all over again and to verify. Shouldnt the email be verified already if registering thru facebook? Or is there a setting somewhere else Im missing?

Posts: 5

Participants: 2

Read full topic

Clicking link to profile twice disables browser "back/previous page" function

$
0
0

@purldator wrote:

  1. Go to any topic.
  2. Click on any user's name (next to their avatar) twice, bypassing any sort of mouse activity to/upon the user card.
  3. Once on their profile, click the browser's back button.

Expected behavior: The browser skips back to the topic.
Actual behavior: browser stays on the profile.

I am guessing this is a regression. Possibly related:

Thank you for your time and attention.

Posts: 2

Participants: 2

Read full topic

Translating only user facing strings

$
0
0

@ibnesayeed wrote:

What is the best way to identify the translation strings that are user facing. In our case, we would prefer to keep the admin interface in English, but public interface and inline moderation stuff translated. This will minimize the effort of translation.

Also, is there a way to select a different locale for the admin interface from the public interface?

Posts: 1

Participants: 1

Read full topic

Export customized text from database into YML

$
0
0

@ibnesayeed wrote:

Admin interface allows overwriting any stranslations which is very healful not just for utilizing community translation while updating them with custom phrases that suit a specific community, but at the same time it is also a very good way to gradually translate a new language, without the need of updating the code, hence rebuilding the cache. However, it would be great if the customized translations can be exported from the database and somehoe merged back into the corresponding YAML files to make it available in the main repository. Is there a way of doing that which I am not aware of?

Posts: 1

Participants: 1

Read full topic


Logins with Google and Facebook

$
0
0

@adam_beers wrote:

If I allow Google and Facebook logins, how are those users created in the Discourse server using API calls?

Posts: 1

Participants: 1

Read full topic

Api_key and api_username for creating user via API

$
0
0

@adam_beers wrote:

The CURL for creating a user indicates that an api_key and api_username are required. What are those if a user is trying to create a new account and they don't have a key or username? They shouldn't be the admin values, but I can't figure out what they should be.

curl -X POST --data "name=dave&username=dave&email=dave@example.com&password=P@ssword&active=true" http://localhost:3000/users?api_key=test_d7fd0429940&api_username=test_user

Posts: 1

Participants: 1

Read full topic

Permalinks not working for some URLs

$
0
0

@Viir wrote:

I am working on a tool to import from MVCForum and trying to figure out how I can make Discourse permalink from some old URLs. Some URLs worked with the discourse permalink feature but some did not (I got the "Oops! That page doesn’t exist or is private." message for those)

The old URL can look like this:

 thread/forum-software-upgrade/?order=all#comment-e3c739ae-1b3c-494c-850c-a6cc00b81acc

For substrings truncated after the question mark, the permalink worked.
For example, permalinks worked for the following URLs:

thread/forum-software-upgrade
thread/forum-software-upgrade/
thread/forum-software-upgrade/?

But not for those:

thread/forum-software-upgrade/?order
thread/forum-software-upgrade/?order=all
thread/forum-software-upgrade/?order=all#comment-e3c739ae-1b3c-494c-850c-a6cc00b81acc

Posts: 2

Participants: 2

Read full topic

How to move list-controls to d-header?

Ability to select separate locales for public and admin interfaces

$
0
0

@ibnesayeed wrote:

In non-English communities it is often desired to keep the admin interface in English (as the admins are often technical people who know English), but the public interface is set to the languages related to the community.

Keeping the admin interface in English reduces the translation workload. However, in the current situation where many phrases are shared between public and admin interface, it is not possible to translate only public pacing strings. Being able to select a different locale for the admin interface from the public one would be very helpful.

Posts: 7

Participants: 5

Read full topic

Viewing all 60599 articles
Browse latest View live




Latest Images