Data API and hook
-
Hi,
first request
on the home page, the API is like :{ "categories": [{ "posts": [{ "user": { }, "topic": { "tid": "x", "title": "myTitle", "cid": "x", "slug": "x/myTitle", "deleted": "0", "aid": "Author uid" }, "category": { }, }] }], }
The
author uid
field (which is the uid of the user who created the topic) is actually missing. Could you add it to the API?Second request
This one will probably require some more work.
I'd like to parse topics title (not only on the topic page, but everywhere they are displayed). There's already afilter:post.parse
hook which is just great for the posts, and afilter:title.parse
would be really appreciated (passing at leat 2 args to the callback: title string, and author uid).Thanks for the good work.
-
@Xevious I've counter the problem by calling the topic/tid API.
But I agree it's needed.
Second point too and need to say it should concern title in breadcrump too.Thanks for your work for the future version of nodebb-plugin-topic-color mate greatly appreciated but you already know this
Ping @baris, @julian and @psychobunny for this to be seen.
-
@Xevious The author uid seems to be in the API return, no?
Example: https://community.nodebb.org/api/
"posts": [ { "pid": "17438", "tid": "2021", "content": "<p>Added <a class=\"plugin-mentions-a\" href=\"/user/akoch\">@akoch</a> to the translation team for Norwegian <img class=\"emoji\" title=\":grinning:\" alt=\"grinning\" src=\"https://community.nodebb.org/plugins/nodebb-plugin-emoji-extended/images/grinning.png\" /></p>\n\n \n", "uid": "3",