{"viewcount":8862,"title":"Which CMS would you choose if you wanted to create a Q&A forum?","lastposttime":1410885493469,"timestamp":1406790292447,"mainPid":16401,"tid":2142,"teaserPid":18878,"cid":2,"uid":539,"slug":"2142/which-cms-would-you-choose-if-you-wanted-to-create-a-q-a-forum","postcount":15,"upvotes":0,"downvotes":0,"postercount":7,"tags":[{"value":"cms","valueEscaped":"cms","valueEncoded":"cms","class":"cms"},{"value":"q&a","valueEscaped":"q&a","valueEncoded":"q%26amp%3Bampa","class":"q&a"},{"value":"comparision","valueEscaped":"comparision","valueEncoded":"comparision","class":"comparision"},{"value":"qanda","valueEscaped":"qanda","valueEncoded":"qanda","class":"qanda"}],"deleted":0,"locked":0,"pinned":0,"pinExpiry":0,"deleterUid":0,"titleRaw":"Which CMS would you choose if you wanted to create a Q&A forum?","timestampISO":"2014-07-31T07:04:52.447Z","scheduled":false,"lastposttimeISO":"2014-09-16T16:38:13.469Z","pinExpiryISO":"","votes":0,"thumbs":[],"posts":[{"votes":0,"timestamp":1406790292454,"tid":2142,"content":"
What is the most modern and feature-rich Q&A-Creator?
\nEX:
\nDiscussing forums such as: nodeBB
\nQandA forums such as askbot
\nWhat is a Q&A: I mean something like stackexchange services: stackoverflow, superuser, askubuntu, etc.
I wonder if there's a way to set viewing posts by order of reputation as default on NodeBB, because if that were the case, and if the OP stayed on top, then NodeBB would be the winner in a heartbeat.
\n","pid":16429,"uid":2195,"replies":{"hasMore":false,"hasSingleImmediateReply":true,"users":[{"uid":1,"username":"baris","userslug":"baris","picture":"/assets/uploads/profile/1-profileavatar-1709393009391.jpeg","fullname":"@Tanner You can change the default post order in ACP.
\n\n","pid":16431,"toPid":16429,"uid":1,"upvotes":1,"deleted":0,"downvotes":0,"deleterUid":0,"edited":0,"replies":{"hasMore":false,"hasSingleImmediateReply":false,"users":[],"text":"[[topic:one-reply-to-this-post]]","count":0},"bookmarks":0,"timestampISO":"2014-07-31T19:32:32.503Z","editedISO":"","index":2,"parent":{"username":"Tanner","displayname":"Tanner"},"user":{"uid":1,"username":"baris","fullname":"<baris>","userslug":"baris","reputation":3618,"postcount":5991,"topiccount":146,"picture":"/assets/uploads/profile/1-profileavatar-1709393009391.jpeg","signature":"","banned":false,"banned:expire":0,"status":"offline","lastonline":1711636381866,"groupTitle":"[\"Staff\"]","mutedUntil":0,"displayname":"<baris>","groupTitleArray":["Staff"],"icon:text":"B","icon:bgColor":"#2196f3","lastonlineISO":"2024-03-28T14:33:01.866Z","banned_until":0,"banned_until_readable":"Not Banned","muted":false,"selectedGroups":[{"name":"Staff","slug":"staff","labelColor":"#1852be","textColor":"#ffffff","icon":"","userTitle":"NodeBB"}],"custom_profile_info":[]},"editor":null,"bookmarked":false,"upvoted":false,"downvoted":false,"selfPost":false,"events":[],"topicOwnerPost":false,"display_edit_tools":false,"display_delete_tools":false,"display_moderator_tools":false,"display_move_tools":false,"display_post_menu":true},{"votes":0,"timestamp":1406837031955,"tid":2142,"content":"@Tanner Wouldn't that require the ability to upvote topics? Unless you just displayed the number of votes that the first post has.
\n{posts.index}
returns 0 for the first poster inside a topic. You could then get the {posts.votes}
of that post and display it, however this information would need to be parsed into the api that topiclist uses (which it currently isn't), perhaps as a feature request, being able to specify certain parts of an api in different pages. Pipes and dreams.
\n\nbeing able to specify certain parts of an api in different pages.
\n
you could $.get('/api/another/page')
@psychobunny Good thinking Batman.
\n","timestamp":1406846245484,"votes":0,"toPid":16449,"deleted":0,"upvotes":0,"downvotes":0,"deleterUid":0,"edited":0,"replies":{"hasMore":false,"hasSingleImmediateReply":false,"users":[],"text":"[[topic:one-reply-to-this-post]]","count":0},"bookmarks":0,"timestampISO":"2014-07-31T22:37:25.484Z","editedISO":"","index":5,"parent":{"username":"psychobunny","displayname":"psychobunny"},"user":{"uid":970,"username":"a_5mith","userslug":"a_5mith","reputation":1082,"postcount":3136,"topiccount":184,"picture":null,"signature":"","banned":false,"banned:expire":0,"status":"offline","lastonline":1482277364236,"groupTitle":null,"mutedUntil":0,"displayname":"a_5mith","groupTitleArray":[],"icon:text":"A","icon:bgColor":"#1b5e20","lastonlineISO":"2016-12-20T23:42:44.236Z","banned_until":0,"banned_until_readable":"Not Banned","muted":false,"selectedGroups":[],"custom_profile_info":[]},"editor":null,"bookmarked":false,"upvoted":false,"downvoted":false,"selfPost":false,"events":[],"topicOwnerPost":false,"display_edit_tools":false,"display_delete_tools":false,"display_moderator_tools":false,"display_move_tools":false,"display_post_menu":true},{"votes":0,"timestamp":1407274684842,"tid":2142,"content":"Thanks @a_5mith for pointing me to this topic. So I have a question:
\n$.get('/api/another/page')
? ( If yes, it would be nice if someone could explain that a bit deeper. ) Or I need some other solution?So to answer your question specifically - so every page has a designated API route as well. Take for example this page, which is
\nWhat is the most modern and feature-rich Q&A-Creator? EX: Discussing forums such as: nodeBB QandA forums such as askbot What is a Q&A: I mean something like...
\n\tNodeBB Community (community.nodebb.org)
\n\t\nJust append /api at the start, and you can get it's data like so:
\n\nSo from your plugin/theme, it's fairly simple to just do an API call to get it's data with $.get
For your case, it's a bit more complicated because then you'd be making 20 API calls per page, so I actually wouldn't recommend this method. Here's a sample library.js
for your theme (make sure that your NodeBB is completely up-to-date, as I only just added this hook).
NodeBB plugin - adding main post data to category view - library.js
\n\tGist (gist.github.com)
\n\t\nThis will add the mainPost
data directly into the category view - so in your template you'd be able to do something like {topics.mainPost.content}
@trevor you might find this useful as well.
\n@Jelena, for further reading you might find this set of articles useful. Hope I make sense here, GL
\n","pid":16827,"edited":1407349002863,"uid":3,"upvotes":4,"bookmarks":1,"replies":{"hasMore":false,"hasSingleImmediateReply":true,"users":[{"uid":2720,"username":"Jelena","userslug":"jelena","picture":null,"fullname":null,"displayname":"Jelena","icon:text":"J","icon:bgColor":"#673ab7"}],"text":"[[topic:one-reply-to-this-post]]","count":1,"timestampISO":"2014-08-10T18:08:31.667Z"},"deleted":0,"downvotes":0,"deleterUid":0,"timestampISO":"2014-08-06T18:16:27.211Z","editedISO":"2014-08-06T18:16:42.863Z","index":7,"user":{"uid":3,"username":"psychobunny","fullname":"psychobunny","userslug":"psychobunny","reputation":1576,"postcount":2932,"topiccount":176,"picture":"","signature":"","banned":false,"banned:expire":0,"status":"offline","lastonline":1632464283856,"groupTitle":null,"mutedUntil":0,"displayname":"psychobunny","groupTitleArray":[],"icon:text":"P","icon:bgColor":"#f44336","lastonlineISO":"2021-09-24T06:18:03.856Z","banned_until":0,"banned_until_readable":"Not Banned","muted":false,"selectedGroups":[],"custom_profile_info":[]},"bookmarked":false,"upvoted":false,"downvoted":false,"selfPost":false,"events":[],"topicOwnerPost":false,"display_edit_tools":false,"display_delete_tools":false,"display_moderator_tools":false,"display_move_tools":false,"display_post_menu":true},{"votes":0,"timestamp":1407694111667,"tid":2142,"content":"@psychobunny I followed your instructions above and as you can see here http://screencast.com/t/2sNjFqWK I succeeded to add mainPost
data in my category view api. Then In category.tpl I added this code <div class=\"topicContent\">{topics.mainPost.content}</div>
and the rest of the code is like in vanilla theme category.tpl .Still something isn't right, I got this as a result of what I did http://screencast.com/t/T7AYotKM .
Change this line to topic.mainPost = mainPost[0];
and I think it should work.
@baris Thanks! That worked ^^
\n","timestamp":1407697308894,"votes":1,"toPid":17005,"upvotes":1,"deleted":0,"downvotes":0,"deleterUid":0,"edited":0,"replies":{"hasMore":false,"hasSingleImmediateReply":false,"users":[],"text":"[[topic:one-reply-to-this-post]]","count":0},"bookmarks":0,"timestampISO":"2014-08-10T19:01:48.894Z","editedISO":"","index":10,"parent":{"username":"baris","displayname":"<baris>"},"user":{"uid":2720,"username":"Jelena","userslug":"jelena","reputation":6,"postcount":22,"topiccount":7,"picture":null,"signature":"","banned":false,"banned:expire":0,"status":"offline","lastonline":1410542350388,"groupTitle":null,"mutedUntil":0,"displayname":"Jelena","groupTitleArray":[],"icon:text":"J","icon:bgColor":"#673ab7","lastonlineISO":"2014-09-12T17:19:10.388Z","banned_until":0,"banned_until_readable":"Not Banned","muted":false,"selectedGroups":[],"custom_profile_info":[]},"editor":null,"bookmarked":false,"upvoted":false,"downvoted":false,"selfPost":false,"events":[],"topicOwnerPost":false,"display_edit_tools":false,"display_delete_tools":false,"display_moderator_tools":false,"display_move_tools":false,"display_post_menu":true},{"pid":17007,"uid":11,"tid":2142,"content":"Thanks @psychobunny @baris!
\n","timestamp":1407697472018,"votes":1,"upvotes":1,"deleted":0,"downvotes":0,"deleterUid":0,"edited":0,"replies":{"hasMore":false,"hasSingleImmediateReply":false,"users":[],"text":"[[topic:one-reply-to-this-post]]","count":0},"bookmarks":0,"timestampISO":"2014-08-10T19:04:32.018Z","editedISO":"","index":11,"user":{"uid":11,"username":"trevor","userslug":"trevor","reputation":269,"postcount":762,"topiccount":94,"picture":"","signature":"","banned":false,"banned:expire":0,"status":"offline","lastonline":1624295888787,"groupTitle":"[\"3rd Party Developers\",\"Anime Lovers\",\"GNU/Linux User\"]","mutedUntil":0,"displayname":"trevor","groupTitleArray":["3rd Party Developers","Anime Lovers","GNU/Linux User"],"icon:text":"T","icon:bgColor":"#9c27b0","lastonlineISO":"2021-06-21T17:18:08.787Z","banned_until":0,"banned_until_readable":"Not Banned","muted":false,"selectedGroups":[{"name":"3rd Party Developers","slug":"3rd-party-developers","labelColor":"#ffffff","textColor":"#000000","icon":"fa-cogs","userTitle":"Plugin & Theme Dev"},{"name":"Anime Lovers","slug":"anime-lovers","labelColor":"#c90e78","textColor":"#ffffff","icon":"fa-heart-o","userTitle":"Anime Lovers"},{"name":"GNU/Linux User","slug":"gnu-linux-user","labelColor":"#ebad32","textColor":"#262626","icon":"fa-linux","userTitle":"GNU/Linux"}],"custom_profile_info":[]},"editor":null,"bookmarked":false,"upvoted":false,"downvoted":false,"selfPost":false,"events":[],"topicOwnerPost":false,"display_edit_tools":false,"display_delete_tools":false,"display_moderator_tools":false,"display_move_tools":false,"display_post_menu":true},{"editor":{"uid":2720,"username":"Jelena","userslug":"jelena","displayname":"Jelena"},"votes":0,"timestamp":1407876267614,"tid":2142,"content":"@psychobunny @baris Btw, how to make this hook work on recent topics, or profile page? I tried to add in my plugin.json this:
\n{ \"hook\": \"filter:recent.get\", \"method\": \"addPostData\" }
but it didn't worked. Can I apply this hook to any page I need just with changing those filters or it is not that easy?
And what about the Q&A?! the topic has been hijacked
\nI still need to know Is there any Q&A CMS with a modern design?
\nIs it possible to design a theme for nodeBB to make it a Q&A system?
Someone's tried it before: http://www.nutritionask.com/
\nWith a bunch of widgets, changes in the design. And now you can sort by upvotes too so it's probably much more possible to do a Q&A style site than it was a month ago when you first asked
\n","pid":18878,"uid":3,"deleted":0,"upvotes":0,"downvotes":0,"deleterUid":0,"edited":0,"replies":{"hasMore":false,"hasSingleImmediateReply":false,"users":[],"text":"[[topic:one-reply-to-this-post]]","count":0},"bookmarks":0,"timestampISO":"2014-09-16T16:38:13.469Z","editedISO":"","index":14,"user":{"uid":3,"username":"psychobunny","fullname":"psychobunny","userslug":"psychobunny","reputation":1576,"postcount":2932,"topiccount":176,"picture":"","signature":"","banned":false,"banned:expire":0,"status":"offline","lastonline":1632464283856,"groupTitle":null,"mutedUntil":0,"displayname":"psychobunny","groupTitleArray":[],"icon:text":"P","icon:bgColor":"#f44336","lastonlineISO":"2021-09-24T06:18:03.856Z","banned_until":0,"banned_until_readable":"Not Banned","muted":false,"selectedGroups":[],"custom_profile_info":[]},"editor":null,"bookmarked":false,"upvoted":false,"downvoted":false,"selfPost":false,"events":[],"topicOwnerPost":false,"display_edit_tools":false,"display_delete_tools":false,"display_moderator_tools":false,"display_move_tools":false,"display_post_menu":true}],"events":[],"category":{"cid":2,"name":"General Discussion","description":"A place to talk about whatever you want","icon":"fa-comment","slug":"2/general-discussion","topic_count":3784,"order":2,"bgColor":"#ad4bbe","link":"","class":"col-lg-4 col-md-6 col-xs-12","numRecentReplies":1,"color":"#ffffff","post_count":23116,"descriptionParsed":"A place to talk about whatever you want
\n","subCategoriesPerPage":10,"handle":"general-discussion","minTags":0,"maxTags":5,"postQueue":1,"parentCid":0,"disabled":0,"isSection":0,"totalPostCount":23116,"totalTopicCount":3784},"tagWhitelist":[],"minTags":0,"maxTags":5,"thread_tools":[{"class":"toggleQuestionStatus","title":"[[qanda:thread.tool.as_question]]","icon":"fa-question-circle"}],"isFollowing":false,"isNotFollowing":true,"isIgnoring":false,"bookmark":null,"postSharing":[{"id":"facebook","name":"Facebook","class":"fa-brands fa-facebook","activated":true},{"id":"twitter","name":"X (Twitter)","class":"fa-brands fa-x-twitter","activated":true},{"id":"whatsapp","name":"Whatsapp","class":"fa-brands fa-whatsapp","activated":true},{"id":"telegram","name":"Telegram","class":"fa-brands fa-telegram","activated":true},{"id":"linkedin","name":"LinkedIn","class":"fa-brands fa-linkedin","activated":true}],"deleter":null,"merger":null,"forker":null,"related":[],"unreplied":false,"icons":[],"privileges":{"topics:reply":false,"topics:read":true,"topics:schedule":false,"topics:tag":false,"topics:delete":false,"posts:edit":false,"posts:history":false,"posts:upvote":false,"posts:downvote":false,"posts:delete":false,"posts:view_deleted":false,"read":true,"purge":false,"view_thread_tools":false,"editable":false,"deletable":false,"view_deleted":false,"view_scheduled":false,"isAdminOrMod":false,"disabled":0,"tid":"2142","uid":-1},"topicStaleDays":60,"reputation:disabled":0,"downvote:disabled":0,"feeds:disableRSS":0,"signatures:hideDuplicates":0,"bookmarkThreshold":5,"necroThreshold":7,"postEditDuration":0,"postDeleteDuration":0,"scrollToMyPost":true,"updateUrlWithPostIndex":true,"allowMultipleBadges":true,"privateUploads":false,"showPostPreviewsOnHover":true,"sortOptionLabel":"[[topic:oldest-to-newest]]","rssFeedUrl":"/topic/2142.rss","postIndex":1,"breadcrumbs":[{"text":"[[global:home]]","url":"https://community.nodebb.org"},{"text":"General Discussion","url":"https://community.nodebb.org/category/2/general-discussion","cid":2},{"text":"Which CMS would you choose if you wanted to create a Q&A forum?"}],"author":{"username":"reaon","userslug":"reaon","uid":539,"displayname":"reaon"},"pagination":{"prev":{"page":1,"active":false},"next":{"page":1,"active":false},"first":{"page":1,"active":true},"last":{"page":1,"active":true},"rel":[],"pages":[],"currentPage":1,"pageCount":1},"loggedIn":false,"loggedInUser":{"uid":0,"username":"[[global:guest]]","picture":"","icon:text":"?","icon:bgColor":"#aaa"},"relative_path":"","template":{"name":"topic","topic":true},"url":"/topic/2142/which-cms-would-you-choose-if-you-wanted-to-create-a-q-a-forum/","bodyClass":"page-topic page-topic-2142 page-topic-which-cms-would-you-choose-if-you-wanted-to-create-a-q-a-forum template-topic page-topic-category-2 page-topic-category-general-discussion parent-category-2 page-status-200 theme-harmony user-guest","browsingUsers":true,"_header":{"tags":{"meta":[{"name":"viewport","content":"width=device-width, initial-scale=1.0"},{"name":"content-type","content":"text/html; charset=UTF-8","noEscape":true},{"name":"apple-mobile-web-app-capable","content":"yes"},{"name":"mobile-web-app-capable","content":"yes"},{"property":"og:site_name","content":"NodeBB Community"},{"name":"msapplication-badge","content":"frequency=30; polling-uri=https://community.nodebb.org/sitemap.xml","noEscape":true},{"name":"theme-color","content":"#0471ff"},{"name":"keywords","content":"nodebb,forum,community,discussion,javascript,nodejs,mongodb,redis,websockets"},{"name":"msapplication-square150x150logo","content":"/assets/uploads/system/site-logo.png","noEscape":true},{"name":"title","content":"Which CMS would you choose if you wanted to create a Q&A forum?"},{"property":"og:title","content":"Which CMS would you choose if you wanted to create a Q&A forum?"},{"property":"og:type","content":"article"},{"property":"article:published_time","content":"2014-07-31T07:04:52.447Z"},{"property":"article:modified_time","content":"2014-09-16T16:38:13.469Z"},{"property":"article:section","content":"General Discussion"},{"name":"description","content":"What is the most modern and feature-rich Q&A-Creator? EX: Discussing forums such as: nodeBB QandA forums such as askbot What is a Q&A: I mean something like..."},{"property":"og:description","content":"What is the most modern and feature-rich Q&A-Creator? EX: Discussing forums such as: nodeBB QandA forums such as askbot What is a Q&A: I mean something like..."},{"property":"og:image","content":"https://i.imgur.com/QN2BSK7.png","noEscape":true},{"property":"og:image:url","content":"https://i.imgur.com/QN2BSK7.png","noEscape":true},{"property":"og:image","content":"https://community.nodebb.org/assets/uploads/system/site-logo.png","noEscape":true},{"property":"og:image:url","content":"https://community.nodebb.org/assets/uploads/system/site-logo.png","noEscape":true},{"property":"og:image:width","content":"376"},{"property":"og:image:height","content":"132"},{"content":"https://community.nodebb.org/api/topic/2142/which-cms-would-you-choose-if-you-wanted-to-create-a-q-a-forum/","property":"og:url"}],"link":[{"rel":"icon","type":"image/x-icon","href":"/assets/uploads/system/favicon.ico?v=af2f86gdel8"},{"rel":"manifest","href":"/manifest.webmanifest","crossorigin":"use-credentials"},{"rel":"search","type":"application/opensearchdescription+xml","title":"NodeBB Community","href":"/osd.xml"},{"rel":"apple-touch-icon","href":"/assets/uploads/system/touchicon-orig.png"},{"rel":"icon","sizes":"36x36","href":"/assets/uploads/system/touchicon-36.png"},{"rel":"icon","sizes":"48x48","href":"/assets/uploads/system/touchicon-48.png"},{"rel":"icon","sizes":"72x72","href":"/assets/uploads/system/touchicon-72.png"},{"rel":"icon","sizes":"96x96","href":"/assets/uploads/system/touchicon-96.png"},{"rel":"icon","sizes":"144x144","href":"/assets/uploads/system/touchicon-144.png"},{"rel":"icon","sizes":"192x192","href":"/assets/uploads/system/touchicon-192.png"},{"rel":"prefetch stylesheet","type":"","href":"/assets/plugins/nodebb-plugin-markdown/styles/github.css"},{"rel":"prefetch","href":"/assets/language/en-GB/markdown.json?v=af2f86gdel8"},{"rel":"prefetch","href":"/assets/src/modules/composer.js?v=af2f86gdel8"},{"rel":"prefetch","href":"/assets/src/modules/composer/uploads.js?v=af2f86gdel8"},{"rel":"prefetch","href":"/assets/src/modules/composer/drafts.js?v=af2f86gdel8"},{"rel":"prefetch","href":"/assets/src/modules/composer/tags.js?v=af2f86gdel8"},{"rel":"prefetch","href":"/assets/src/modules/composer/categoryList.js?v=af2f86gdel8"},{"rel":"prefetch","href":"/assets/src/modules/composer/resize.js?v=af2f86gdel8"},{"rel":"prefetch","href":"/assets/src/modules/composer/autocomplete.js?v=af2f86gdel8"},{"rel":"prefetch","href":"/assets/templates/composer.tpl?v=af2f86gdel8"},{"rel":"prefetch","href":"/assets/language/en-GB/topic.json?v=af2f86gdel8"},{"rel":"prefetch","href":"/assets/language/en-GB/modules.json?v=af2f86gdel8"},{"rel":"prefetch","href":"/assets/language/en-GB/tags.json?v=af2f86gdel8"},{"rel":"stylesheet","href":"https://community.nodebb.org/assets/plugins/nodebb-plugin-emoji/emoji/styles.css?v=af2f86gdel8"},{"rel":"canonical","href":"https://community.nodebb.org/topic/2142/which-cms-would-you-choose-if-you-wanted-to-create-a-q-a-forum","noEscape":true},{"rel":"alternate","type":"application/rss+xml","href":"/topic/2142.rss"},{"rel":"up","href":"https://community.nodebb.org/category/2/general-discussion"},{"rel":"author","href":"https://community.nodebb.org/user/reaon"}]}},"widgets":{"footer":[{"html":"\r\n\r\n