Commit Graph

465 Commits (14e46a87a63f5e983a58a73109710027297924f3)

Author SHA1 Message Date
barisusakli 8e8b678d40 small tweak
barisusakli 84aadc03fd fix filter condition
barisusakli 7ffad7e0d1 send callback directly
barisusakli 528ee335d5 optimize getTopicsByTids and getTeasers
barisusakli 90ac399f6d fix topics.loadMore so it checks read permission
Julian Lam 925cd99afb Merge branch 'master' into topic_searching
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.
barisusakli 0792731873 new hook filter:topics.get
Julian Lam 8296dc5630 beginning topic searching + new hook
psychobunny 1a37176a9d filter:topic.get, surprisingly never implemented till today
barisusakli 0362c1a3b0 show day/week/month/year popular topics
barisusakli 24aa166ed5 dont error when no teaser data
barisusakli d57f183f42 privileges.posts.get takes an array of pids now
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
barisusakli 9af12819e3 closes
barisusakli 7c84680b06 closes
barisusakli 9d4f1e18e1 removed length check
barisusakli cd5c24efe3 possible fix for
barisusakli 4c2765a79c closes
barisusakli 311a7ad5b9 topic purge
barisusakli a65d612907 post purge
barisusakli 7610c11cd1 closes
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.
barisusakli 55dbc5c823 closes
changed post links to "topic/<topic_id>/<topic_slug>/<post_id>"
barisusakli b8b482e287 closes
barisusakli 3f43db090b return topics tags
barisusakli df73ceaeb7 closes
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
barisusakli 472e6b5206 privilege cleanup
barisusakli b1aae05a08 closes
barisusakli 3e86bdb38f more work on
still needs more work, category is next
Julian Lam 34b522f36d missed a bunch of "editable" checks
Julian Lam 87f4566e06 more fixed to privs, and ACP modal
Julian Lam 7c8b442dcd more updates to privileges revamp
barisusakli 8afcf44732 gravatars will be generated on demand
changing the setting in ACP will affect all default gravatars now.
barisusakli 6f40393b99 added err check
barisusakli d05920ec78 refactor of thread tools
barisusakli 2ad715ead3 closes
barisusakli bca2755c3e possible fix for
Micheil Smith 3e82cab398 Add missing new lines at end of files.
barisusakli 1f77df794a added lots of error keys
barisusakli 3f44f4bb3a closes
barisusakli a3404d3d4f closes
barisusakli ca0dbf84be no need for exists check
if topic doesnt exist topicData will be null
barisusakli 7a1037dc11 moved posts and recent to new files
barisusakli 38733ef94b moved reply post create to topics/create.js
barisusakli 478429af3a moved fork to new file
barisusakli bac3cf03cb moved unread to new file
barisusakli f83b7ee972 renamed event
barisusakli 8efc33d6a1 closes
barisusakli 1354739d19 user deletion
user deletion NOT SKALABLE
psychobunny 9de21995c4 added category bgColor and color to topics api
barisusakli 3f5c51174d refactored user.js
took out notifications, email and reset code to separate files
barisusakli a0222b69bb closes
barisusakli 6e6c5688d9 more cleanup
Julian Lam b259c3d422 categoryData should return better topics (non-anon uid passed in now)
barisusakli 6496b91c29 closes
barisusakli ec86aafb48 return user object
barisusakli b4b9ed1841 optimized getTopicsByTids, single db call to get topicData, added cache for privilege/category/user data
Baris Soner Usakli be70b3de57 closes
Baris Soner Usakli fb691b23b4 moved topic locked check to topic.reply
Baris Soner Usakli 091723a8c5 closes
Baris Soner Usakli 6a962655e4 jshint for topics.js
Baris Soner Usakli 99bf882a1c removed cid from getTopicsByTids
Baris Soner Usakli 56bbeb9950 use disableSocialButtons from config
Baris Soner Usakli ea6cf3bbd5 more cleanup and changes to topics
Baris Soner Usakli 8da7a6f2f3 cleanup
Baris Soner Usakli 7c1a46f25d misc cleanup
Baris Soner Usakli fd8e7327f0 removed console.log
Baris Soner Usakli 7e5a7c53bd changes to templates
Baris Soner Usakli bbc2df11e1 fixed updateTopicCount
Baris Soner Usakli 8feac114c3 closes
Baris Soner Usakli ed8e76ebce added error check to getTopicDataWithUser
Baris Soner Usakli 6e5a6b8784 upgraded categories to sorted set, score is the order set from acp, check if category topic exists before posting
Baris Soner Usakli d6d9776cde added toPid to posts
Baris Soner Usakli bae76ebd70 fixed the redis error when going to unread/recent if nextStart is missing
Baris Soner Usakli dfe25d4bc0 only store thumb if is defined
Baris Soner Usakli 29ba015d69 fixed topic thumbs
Baris Soner Usakli 9eb4945415 Merge branch 'master' of https://github.com/designcreateplay/NodeBB
Baris Soner Usakli de34beaf6d closes
psychobunny 2ec6dd1d14 added filter:topic.thread_tools for creating custom admin functionality in topics view
Baris Soner Usakli eb3b240b04 some cleanup of unread
akhoury 63c9269240 merged composer and some other files with master
akhoury 25207852e8 added topics thumbnails support
Julian Lam 42d33f8338 first pass
Julian Lam f50d77bca0 resolved
Baris Soner Usakli 6140d76f76 fixed index of newly created posts, matched vanilla search form to lavender
Baris Soner Usakli 9d1a295b85 better topic delete restore
Baris Soner Usakli 1e44ca3a0f upgrade topics:tid to sorted set, topics:recent doesnt have deleted topics
Baris Soner Usakli 8506819a7d added back error check
Baris Soner Usakli c0e0da0f1d simplified getAllTopics
psychobunny fe2e86da81 added optional 'reverse' parameter to Posts.getPostsByTid and Topics.getTopicPosts (incoming signature adjustment for 0.4x)
Baris Soner Usakli ce4896f2c5 fixed read notifications
Baris Soner Usakli ccfa5bd618 copy pasta is bad for your health
Baris Soner Usakli a4fd972b2b fixed again fail
Baris Soner Usakli 2a41c3a312 crash fix
Baris Soner Usakli b5d31dd889 replace eachSeries with map
Baris Soner Usakli 400af61e12 fixed minor issue, removed unused postPerPage
Baris Soner Usakli 9f1e0187ee fixed settings
Baris Soner Usakli 1b5e44a763 fix unreplied on getTopic
Baris Soner Usakli a274a8cc12 more unread changes
Baris Soner Usakli d27ba5239e unread changes