Is there some way to save and load the settings of a plugin (or the whole nodeBB) to/from a config file instead of mongoDB ?
![Danial Malik Danial Malik](https://lh5.googleusercontent.com/-foY-i69zFCg/AAAAAAAAAAI/AAAAAAAAADA/Z8G_EfH6RvU/photo.jpg)
Danial Malik
Posts
-
Save/Load plugin's settings to/from a config file instead of mongoDB -
How to make calls to web sockets?Hi there,
I have a nodeBB instance running and want to load test it. I understand that nodeBB has
/api/
calls for every page request. I want to profile thecategories
page. When I hit/api/categories
page on localhost it runs as expected and returns all categories' data but when I hit the same endpoint on deployed instance, it returns very limited data{"loggedIn":true,"relative_path":"","template":{"name":"categories","categories":true},"url":"/categories","bodyClass":"page-categories page-status-200","widgets":{}}
After looking in networks tab, I understand that it's using web sockets to get categories data. Is there someway or API that I can use to get all categories JSON data? or if somehow I could make calls to websockets myself?
I am using nodeBB version
1.10.2
. -
How to remove/change the value for breadcrumbs after creating a new Topic?Great . Exactly what I needed. Just couldn't find it in the documentation.
-
How to remove/change the value for breadcrumbs after creating a new Topic?I am using nodebb in an iframe for my application. The architecture of the application is such that I have to show a specific category topics only in any certain view. Therefore I cannot show users the breadcrumbs in the "Topic" view. I have overcome this problem by overriding
breadcrumbs.tpl
in following way:<!-- IF breadcrumbs.length --> <ol class="breadcrumb"> <!-- BEGIN breadcrumbs --> <li<!-- IF @last --> component="breadcrumb/current"<!-- ENDIF @last --> itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb" <!-- IF @last -->class="active"<!-- ENDIF @last -->> <!-- IF !@last --><a href="{breadcrumbs.url}" itemprop="url"><!-- ENDIF !@last --> <span itemprop="title"> {breadcrumbs.text} <!-- IF @last --> <!-- IF !feeds:disableRSS --> <!-- IF rssFeedUrl --><a target="_blank" href="{rssFeedUrl}"><i class="fa fa-rss-square"></i></a><!-- ENDIF rssFeedUrl --><!-- ENDIF !feeds:disableRSS --> <!-- ENDIF @last --> </span> <!-- IF !@last --></a><!-- ENDIF !@last --> </li> <!-- END breadcrumbs --> </ol> <!-- ENDIF breadcrumbs.length --> <!-- IF showCategoryLink --> <ol class="breadcrumb"> <li component="breadcrumb/current"itemscope="itemscope" > <a href="{config.relativePath}/embed?category_id={cid}" itemprop="url"> <span itemprop="title"> Go Back </s an> </a> </li> </ol> <!-- ENDIF breadcrumbsAlternateLink -->
and set the value for relevant variables (
breadcrumbs=null
andshowCategoryLink=true
by changing the controller forTopic.get
).But the problem occurs when a user creates a new topic. Upon creation, the user is redirected to the Topic View that he has just created, and there are thumbnails being shown in that view.
Is there anywhere that I can prevent those thumbnails from being shown? e.g.:
- by avoiding that redirection and just creating the topic,
- by using some plugin hook, If I could set the values for
breadcrumbs
andshowCategoryLink
as I want, or using theres
object, I could redirect user to the view that I have overridden (i.e./embed?category_id:<id>
).