Commit Graph

80 Commits

Author SHA1 Message Date
Andrea Cardinale
92c1d6712b Uniform action:post.* hook 2015-07-09 13:17:49 +02:00
Andrea Cardinale
b33a482226 Restore favourites.js 2015-07-03 14:14:21 +02:00
Andrea Cardinale
3e21f26d0d Restore favourites.js 2015-07-03 14:10:40 +02:00
Andrea Cardinale
3b1582915e Restore favourites.js 2015-07-03 14:00:22 +02:00
Andrea Cardinale
da800a9016 Merge remote-tracking branch 'upstream/master'
Conflicts:
	src/favourites.js
2015-07-03 13:55:32 +02:00
Julian Lam
8bc5330e89 some minor cleanup in the async tree... 2015-05-18 16:01:40 -04:00
Andrea Cardinale
7c5ba9b7b1 Revert "Add hooks: action:post.favourite and action:post.unfavourite"
This reverts commit 1d22a2d46b.
2015-05-12 23:52:48 +02:00
Andrea Cardinale
1d22a2d46b Add hooks: action:post.favourite and action:post.unfavourite 2015-05-12 23:41:15 +02:00
Barış Soner Uşaklı
5ce72f4920 dont add guests to users:repuration zset 2015-03-26 13:03:23 -04:00
Barış Soner Uşaklı
30104b898c dont allow vote spam 2015-03-26 12:22:39 -04:00
psychobunny
2ba1363e12 results.owner* 2015-02-20 14:23:57 -05:00
psychobunny
7e9095b21b added "owner" to action:post.upvote/downvote/unvote 2015-02-20 14:21:33 -05:00
Julian Lam
957415463f Merge branch '0.7.0'
Conflicts:
	package.json
	src/search.js
2015-02-07 17:07:48 -05:00
barisusakli
2c8e8a1f1c closes #2550, closes #2518 2015-02-01 19:12:03 -05:00
psychobunny
d47cd270df some random favourite typo 2015-01-27 23:37:47 -05:00
Julian Lam
86a6979606 added comments to explain the voting logic 2015-01-14 11:18:45 -05:00
barisusakli
a8de1c1465 properly fix #2586 2015-01-08 18:24:05 -05:00
barisusakli
d7c27b35ab closes #2586 2015-01-08 17:47:20 -05:00
barisusakli
ce24c6dc04 pass callback directly 2014-12-23 23:53:26 -05:00
barisusakli
3d93a76508 removed command param made unvote wrapper 2014-11-17 21:45:52 -05:00
psychobunny
8c98f47688 action:post.upvote / action:post.downvote now sends current status; new: action:post.unvote 2014-11-17 19:24:41 -05:00
barisusakli
bd388f727c src/favourites.js 2014-11-12 16:40:06 -05:00
barisusakli
06f66337fb anon checks
less db calls for uid 0
2014-11-04 19:06:01 -05:00
barisusakli
e93398b647 use currentTime when someone up/down votes 2014-10-30 19:37:22 -04:00
barisusakli
a8760cd2bc only ban once for low rep
also only check on downvotes
2014-10-23 18:05:40 -04:00
barisusakli
7d9054c2cf derp 2014-09-20 23:57:33 -04:00
psychobunny
61871fae77 merging #2077 2014-09-10 16:14:01 -04:00
Evan Lucas
3360752c5c Added action:post.downvote hook 2014-09-03 22:31:09 -04:00
Julian Lam
c56a7bf475 Merge branch 'GAWMiners-feature/favourite-hook' into 0.5.1 2014-09-02 14:31:18 -04:00
Evan Lucas
440c78c949 match object.action nomenclature 2014-09-02 13:26:56 -05:00
Evan Lucas
fb45aa92fd Add upvote hook
adhere to similar project style
2014-09-02 13:20:00 -05:00
barisusakli
603cddc687 closes #1934 2014-08-30 15:19:18 -04:00
barisusakli
dae3ef49be show user names who upvoted a post on mouse over 2014-08-13 13:35:55 -04:00
barisusakli
049d7f766e use getSetsMembers instead of async.map 2014-08-07 13:48:07 -04:00
barisusakli
c3a9767bf6 late night optimizations
-isMemberOfSets returns true/false instead of 1/0
-when loading the posts of a topic only get the userdata for each user
once, before this commit if a topic had 10 posts from 2 different users
we were getting the user data for each user 5 times (drunk)
-getVoteStatusByPostIDs and getFavouritesByPostIDs no longer make
pids.length calls to the db, they use isMemberOfSets now
-getUserInfoForPost renamed to getUserInfoForPosts and doesnt make
uids.length calls to db, uses getMultipleUserFields instead
2014-06-28 01:03:26 -04:00
psychobunny
92c0bd07c9 Ability to enable/disable the upvote/downvote system, closes #1672 2014-06-27 13:05:05 -04:00
psychobunny
b040201764 prevent hax voting via websockets if system disabled 2014-06-27 13:05:04 -04:00
psychobunny
b3c9323026 use admin setting for downvote privileges, closes #1757 2014-06-26 13:37:34 -04:00
psychobunny
8a03b42d62 prevent a user from downvoting if at negative rep 2014-06-26 13:28:58 -04:00
barisusakli
7610c11cd1 closes #450
backup database before upgrade!
upgrade script will take the first post of each topic and set the
`mainPid` property on the topic. then it will remove that pid from the
sorted sets for that topic, this was done to make alternative sorting
work.

added a new sorted set called `tid:<id>:posts:votes` that is used to
sort topic posts by vote count, the original sorted set `tid:<id>:posts`
is used to sort by oldest first or newest first.

the main post is added to the returned posts array on topic load and is
always at the top.
theme changes are minimal just a few new data properties on the posts
and the sorting dropdown.
hopefully didn't miss anything too critical.
2014-06-06 22:12:19 -04:00
barisusakli
d43d363a7a refactored topics.js
removed ajaxify.register_events using removeListener now
2014-05-03 20:56:26 -04:00
psychobunny
e5486db1ae Merge branch 'code-quality' of https://github.com/miksago/NodeBB into miksago-code-quality
Conflicts:
	src/database.js
2014-04-14 17:36:10 -04:00
barisusakli
90540f64cf removed some unused translator requires 2014-04-13 15:05:17 -04:00
Micheil Smith
3e82cab398 Add missing new lines at end of files. 2014-04-10 20:56:53 +01:00
barisusakli
95972209f4 favourite changes
favourites.js no longer makes socket calls, moved that code into
socket.io/posts.js. it also makes a single socket call when you downvote
a post that you previously upvoted.
2014-04-09 20:55:53 -04:00
barisusakli
8b6f701246 removd dupe 2014-03-21 14:57:38 -04:00
barisusakli
1354739d19 user deletion #746
user deletion NOT SKALABLE
2014-03-14 19:07:50 -04:00
Baris Soner Usakli
8da7a6f2f3 cleanup 2014-02-26 15:32:32 -05:00
Baris Soner Usakli
2630a72f81 closes #965 2014-02-08 13:58:40 -05:00
psychobunny
37affe2489 no need to use mget, app.alert already translates 2014-02-06 16:50:38 -05:00