Actually, it was a backend issue 😁 we update the forum fairly often, but not always for smaller issues like this one.
I'll try to update it again today
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 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.
@Tanner You can change the default post order in ACP.
@Tanner Wouldn't that require the ability to upvote topics? Unless you just displayed the number of votes that the first post has.
{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.
being able to specify certain parts of an api in different pages.
you could $.get('/api/another/page')
@psychobunny Good thinking Batman.
Thanks @a_5mith for pointing me to this topic. So I have a question:
$.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
Just append /api at the start, and you can get it's data like so:
So 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).
This 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.
@Jelena, for further reading you might find this set of articles useful. Hope I make sense here, GL
@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 ^^
Thanks @psychobunny @baris!
@psychobunny @baris Btw, how to make this hook work on recent topics, or profile page? I tried to add in my plugin.json this:
{ "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
I still need to know Is there any Q&A CMS with a modern design?
Is it possible to design a theme for nodeBB to make it a Q&A system?
Someone's tried it before: http://www.nutritionask.com/
With 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