Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags
    • Users
    • Groups
    1. Home
    2. Danial Malik
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 4
    • Best 0
    • Groups 0

    Danial Malik

    @Danial Malik

    0
    Reputation
    17
    Profile views
    4
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Danial Malik Unfollow Follow

    Latest posts made by Danial Malik

    • Save/Load plugin's settings to/from a config file instead of mongoDB

      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 ?

      posted in NodeBB Development
      Danial Malik
      Danial Malik
    • 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 the categories 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.

      posted in NodeBB Development
      Danial Malik
      Danial Malik
    • RE: 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.

      posted in NodeBB Development
      Danial Malik
      Danial Malik
    • 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 and showCategoryLink=true by changing the controller for Topic.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 and showCategoryLink as I want, or using the res object, I could redirect user to the view that I have overridden (i.e. /embed?category_id:<id>).
      posted in NodeBB Development
      Danial Malik
      Danial Malik