Commit Graph

421 Commits

Author SHA1 Message Date
barisusakli
05fdc945f3 closes #1993 2014-08-17 00:14:45 -04:00
barisusakli
ca90afd544 #1992
(drunk) not even done yet
2014-08-16 21:33:42 -04:00
barisusakli
b16932a676 check mainPid 2014-08-12 15:08:42 -04:00
barisusakli
1cf5c3145a doing it properly this time
mainPost always has index 0
2014-08-12 12:32:38 -04:00
barisusakli
8584da75f2 reverted main post change, breaks indices 2014-08-12 11:49:28 -04:00
barisusakli
c07d9121df small optimizations
user.isOnline works with an array of uids
do not make 2 trips to db to get main post and first 10 posts
2014-08-12 11:19:17 -04:00
barisusakli
46398fa924 removed unused require 2014-08-07 16:20:50 -04:00
barisusakli
cb519d53a1 isArray check 2014-08-07 00:06:13 -04:00
barisusakli
8e8b678d40 small tweak 2014-08-07 00:02:20 -04:00
barisusakli
84aadc03fd fix filter condition 2014-08-06 22:04:35 -04:00
barisusakli
7ffad7e0d1 send callback directly 2014-08-06 21:30:41 -04:00
barisusakli
528ee335d5 optimize getTopicsByTids and getTeasers 2014-08-06 21:30:11 -04:00
barisusakli
90ac399f6d fix topics.loadMore so it checks read permission 2014-08-05 23:22:21 -04:00
barisusakli
fed8cc6d53 optimize privileges and assorted fixes.
* new methods
privileges.categories.filter
privileges.topics.filter
privileges.posts.filter

they take a list of ids and a privilege, and return the filtered list of
ids, faster than doing  async.filter and calling the db for each id.

* remove event listeners on recent page before adding
* group.exists works for both single group names and arrays
* helpers.allowedTo works for both a single cid and an array of cids
* moved filter:topic.post hook right before topic creation.
* moved filter:topic.reply hook right before topic reply.
2014-07-29 21:51:46 -04:00
barisusakli
0792731873 new hook filter:topics.get 2014-07-25 19:58:44 -04:00
psychobunny
1a37176a9d filter:topic.get, surprisingly never implemented till today 2014-07-24 14:16:41 -04:00
barisusakli
0362c1a3b0 show day/week/month/year popular topics 2014-07-11 18:43:26 -04:00
barisusakli
24aa166ed5 dont error when no teaser data 2014-06-28 16:18:29 -04:00
barisusakli
d57f183f42 privileges.posts.get takes an array of pids now 2014-06-28 14:59:01 -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
barisusakli
9af12819e3 closes #1731 2014-06-23 17:26:02 -04:00
barisusakli
7c84680b06 closes #1709 2014-06-17 13:11:13 -04:00
barisusakli
9d4f1e18e1 #1688 removed length check 2014-06-13 15:58:32 -04:00
barisusakli
cd5c24efe3 possible fix for #1688 2014-06-13 15:35:35 -04:00
barisusakli
4c2765a79c closes #1679 2014-06-13 15:33:22 -04:00
barisusakli
311a7ad5b9 #1281 topic purge 2014-06-10 16:57:00 -04:00
barisusakli
a65d612907 #1281 post purge 2014-06-10 14:24:56 -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
55dbc5c823 closes #1612
changed post links to "topic/<topic_id>/<topic_slug>/<post_id>"
2014-06-02 17:31:14 -04:00
barisusakli
b8b482e287 closes #1555 2014-05-22 14:56:15 -04:00
barisusakli
3f43db090b return topics tags #1557 2014-05-21 21:15:11 -04:00
barisusakli
df73ceaeb7 closes #1556
added tag input box to composer when creating a topic
added new routes for viewing tags 'tags' and 'tags/:tagname'
respectively
post_bar.tpl shows the tags of the topic
can edit the main post to remove or add new tags
added a new menu item to header to go to the tags page
2014-05-21 16:13:51 -04:00
barisusakli
472e6b5206 privilege cleanup 2014-05-17 18:59:34 -04:00
barisusakli
b1aae05a08 closes #1518 2014-05-15 20:49:47 -04:00
barisusakli
3e86bdb38f more work on #1518
still needs more work, category is next
2014-05-15 10:38:02 -04:00
Julian Lam
34b522f36d missed a bunch of "editable" checks 2014-05-13 21:21:24 -04:00
Julian Lam
87f4566e06 more fixed to privs, and ACP modal 2014-05-13 17:06:58 -04:00
Julian Lam
7c8b442dcd more updates to privileges revamp 2014-05-13 17:06:58 -04:00
barisusakli
8afcf44732 gravatars will be generated on demand
changing the setting in ACP will affect all default gravatars now.
2014-05-04 17:27:00 -04:00
barisusakli
6f40393b99 added err check 2014-05-04 14:33:12 -04:00
barisusakli
d05920ec78 refactor of thread tools 2014-04-24 20:05:05 -04:00
barisusakli
2ad715ead3 closes #1412 2014-04-20 15:07:53 -04:00
barisusakli
bca2755c3e possible fix for #1410 2014-04-20 01:31:17 -04:00
Micheil Smith
3e82cab398 Add missing new lines at end of files. 2014-04-10 20:56:53 +01:00
barisusakli
1f77df794a added lots of error keys 2014-04-09 22:26:23 -04:00
barisusakli
3f44f4bb3a closes #1319 2014-04-02 16:55:01 -04:00
barisusakli
a3404d3d4f closes #1253 2014-03-23 14:25:16 -04:00
barisusakli
ca0dbf84be no need for exists check
if topic doesnt exist topicData will be null
2014-03-21 18:20:06 -04:00
barisusakli
7a1037dc11 moved posts and recent to new files 2014-03-21 17:04:15 -04:00
barisusakli
38733ef94b moved reply post create to topics/create.js 2014-03-21 15:55:03 -04:00