Hey guys? im newbie on node so i want to make a custom file uploader button to upload for example ".pdf" extensions at the main page not into replies/topics. you guys know if there are any guide o plugin than i take as guide?, second question is if i able to do this just with the nodebb core or its not possible and i need to use dependencies? Thanks in advance 🙂
Hi, I have following:
My purpose is to use my own sort method for sorting topics in a category, automatically modifying visible "Sort By" html element with a special sorting method that I implemented, and make it selected automatically.
I tried many hooks but "filter:config.get" was only one that is called before rendering or sending anything to client side. Other hooks such as "filter:categories.buildTopicsSortedSet", "filter:categories.getSortedSetRangeDirection","filter:category.topics.prepare", they all didn't work.
For example, if I changed like following in a method for "filter:categories.buildTopicsSortedSet":
data.settings.categoryTopicSort = 'most_myown';
but in client side, it only shows the previous value of "data.settings.categoryTopicSort", not the value "most_myown".
So I had to use "filter:config.get" because changing config there actually reflects to client side.
To implement it, I first need to check information about category that the user just entered, and append it to config, and send it to client. They are supposed to be done in "configGet" method, which you see above. But I do not know how to get information about category that the user is in. I need to know about category info because my own sorting will only work for certain categories.