• HOME
    • PRODUCT
    • PRICING
    • ABOUT
    • COMMUNITY
    Menu
    • HOME
    • PRODUCT
    • PRICING
    • ABOUT
    • COMMUNITY
    Get in touch
    Get in touch
    Menu
    • HOME
    • PRODUCT
    • PRICING
    • ABOUT
    • COMMUNITY
    • Sign in
    • Start free trial
    • Get in touch
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags
    • Users
    • Groups
    • Documentation
      • Home
      • Read API
      • Write API
      • Plugin Development
    1. Home
    2. baris
    3. Posts
    • Profile
    • Following 5
    • Followers 128
    • Topics 85
    • Posts 4213
    • Best 1363
    • Controversial 0
    • Groups 5

    Posts made by baris

    • RE: Change orientation of tooltips

      The placement value is hardcoded in multiple places in core. If you search for placement: you should see multiple places where it's hardcoded to bottom. These need to updated so they read the value from a config or DOM.

      posted in Technical Support
      baris
      <baris>
    • RE: Using a client-side filter hook

      https://github.com/NodeBB/NodeBB/issues/10729

      barisusakli created this issue in NodeBB/NodeBB

      open add filter:chat.send to modify the message before sending #10729

      posted in NodeBB Development
      baris
      <baris>
    • RE: Using a client-side filter hook

      Ahh I think this happens because the change you make isn't picked up in core because of the way the message variable is passed to the hook.

      hooks.fire('action:chat.sent', { roomId, message, mid });

      We will have to make a change or add a filter hook there to allow that. I will make a issue on our GH.

      posted in NodeBB Development
      baris
      <baris>
    • RE: Using a client-side filter hook

      This will work in 2.x.

      const hooks = await app.require('hooks');
      hooks.on('action:chat.sent', function (hookData) {
        hookData.message = hookData.message.toUpperCase(); 
      });
      

      In 1.9.x and lower you can use requirejs.

      require(['hooks'], function (hooks) {
        hooks.on('action:chat.sent', function (hookData) {
          hookData.message = hookData.message.toUpperCase(); 
        });
      });
      
      posted in NodeBB Development
      baris
      <baris>
    • RE: Using a client-side filter hook

      @josef

      hooks.on('action:chat.sent', function (hookData) {
       hookData.message = hookData.message.toUpperCase(); 
      });
      
      posted in NodeBB Development
      baris
      <baris>
    • RE: app.user.groupTitle shows only one item in array

      That's not possible out of the box, you would have to write a plugin to set the groupTitle value to all the groups the user is a member of.

      posted in Plugin Development
      baris
      <baris>
    • RE: app.user.groupTitle shows only one item in array

      @Andrea-0 The groups need to be selected on the users profile page. I selected 2 groups now so it shows 2 of them.

      posted in Plugin Development
      baris
      <baris>
    • RE: groupTitleArray

      @Andrea-0 https://community.nodebb.org/post/88482

      posted in Bug Reports
      baris
      <baris>
    • RE: app.user.groupTitle shows only one item in array

      @Andrea-0 You need to enable multiple group titles in the ACP.

      54a58ff5-3fa8-44e9-9ec1-7f761185fdbc-image.png

      posted in Plugin Development
      baris
      <baris>
    • RE: Using a client-side filter hook

      Sure you can use hooks on the client side, but server side and client side hooks are separate. Something that fires on the server side doesn't automatically fire client side.

      You have to look in the client side code in the public folder to see if the hook you need exists. In the chat message case there is action:chat.sent which you can use to modify the message before being sent to the server. https://github.com/NodeBB/NodeBB/blob/master/public/src/client/chats/messages.js#L21

      posted in NodeBB Development
      baris
      <baris>
    • RE: 3 Category Levels (trimChildren helper)

      @Matthew-Price Yeah I've made this change on our develop branch, if category is marked as section then it won't trim it's second level children.

      posted in NodeBB Development
      baris
      <baris>
    • RE: 3 Category Levels (trimChildren helper)

      @Matthew-Price take a look at https://github.com/NodeBB/NodeBB/commit/0bec52bc19405fe0c6ef8cdcfd834518ac6b9b8f.

      Let me know if it handles your use case.

      0 barisusakli committed to NodeBB/NodeBB
      feat: closes #10719, don't trim children if category is marked section
      posted in NodeBB Development
      baris
      <baris>
    • RE: 3 Category Levels (trimChildren helper)

      @Matthew-Price are you using the section option on the welcome centre category?

      5d16da68-2aff-47f7-901a-24260d064ddc-image.png

      Maybe I can check this setting when trimming the depth and adjust accordingly.

      posted in NodeBB Development
      baris
      <baris>
    • RE: 3 Category Levels (trimChildren helper)

      I will take a look at this, maybe try to make the depth limit configurable so you can set it to 2 or more.

      Until I add that in you can override that function in your plugin or theme with

      const helpers = require.main.require('./src/controllers/helpers');
      helpers.trimChildren = function (category) {
      	if (Array.isArray(category.children)) {
      		category.children = category.children.slice(0, category.subCategoriesPerPage);
      	}
      };
      

      Keep in mind this will cause the entire category tree to be returned and might make your /categories page load slower if there are a lot of nested categories.

      https://github.com/NodeBB/NodeBB/issues/10719

      barisusakli created this issue in NodeBB/NodeBB

      open don't trim children of category if it's a section #10719

      posted in NodeBB Development
      baris
      <baris>
    • RE: plugin list of this forum

      @crazycells

      Active plugins
              * @nodebb/[email protected] (installed, enabled)
              * [email protected] (installed, enabled)
              * [email protected] (installed, enabled)
              * [email protected] (installed, enabled)
              * [email protected] (installed, enabled)
              * [email protected] (installed, enabled)
              * [email protected] (installed, enabled)
              * [email protected] (installed, enabled)
              * [email protected] (installed, enabled)
              * [email protected] (installed, enabled)
              * [email protected] (installed, enabled)
              * [email protected] (installed, enabled)
              * [email protected] (installed, enabled)
              * [email protected] (installed, enabled)
              * [email protected] (installed, enabled)
              * [email protected] (installed, enabled)
              * [email protected] (installed, enabled)
              * [email protected] (installed, enabled)
              * [email protected] (installed, enabled)
              * [email protected] (installed, enabled)
              * [email protected] (installed, enabled)
              * [email protected] (installed, enabled)
              * [email protected] (installed, enabled)
              * [email protected] (installed, enabled)
              * [email protected] (installed, enabled)
              * [email protected] (installed, enabled)
              * [email protected] (installed, enabled)
              * [email protected] (installed, enabled)
      
      posted in NodeBB Plugins
      baris
      <baris>
    • RE: Server side hook for loading recent posts/top posts for user

      Take a look at filter:account/profile.build That hook is called on the page forum.com/user/<username>

      posted in Technical Support
      baris
      <baris>
    • RE: Supported version of nodeJS

      14, 16, 18. 12 might still work but it's no longer supported.

      posted in Technical Support
      baris
      <baris>
    • RE: Global tags

      @razibal thanks for reporting, https://github.com/NodeBB/NodeBB/issues/10692

      This started happening after the refactor to change tag storage to be by category https://github.com/NodeBB/NodeBB/pull/8938/files

      barisusakli created this issue in NodeBB/NodeBB

      closed empty tag doesn't show up in composer #10692

      barisusakli created this issue in NodeBB/NodeBB

      closed Category tags #8938

      posted in Technical Support
      baris
      <baris>
    • RE: "tag list" to choose from?

      Yeah that's correct you would have to do them one by one in the UI. Alternatively if you are going to set all categories to the same 200 tags you can run the below script in your nodebb folder. Update the tags array to the the tags you wan't to allow. This script would delete all existing tag whitelists for all categories then set all categories to same list of allowed tags.

      /* globals require, console, process */
      
      'use strict';
      
      const nconf = require('nconf');
      
      nconf.file({
      	file: 'config.json',
      });
      
      nconf.defaults({
      	base_dir: __dirname,
      	views_dir: './build/public/templates',
      	upload_path: 'public/uploads',
      });
      
      var db = require('./src/database');
      
      // update to your own tags
      const tags = ['tag1', 'tag2', 'tag3'];
      
      db.init(function (err) {
      	if (err) {
      		console.log('NodeBB could not connect to your database. Error: ' + err.message);
      		process.exit();
      	}
      
      	setCategoryWhitelist(function (err) {
      		if (err) {
      			console.error(err);
      			process.exit();
      		}
      		console.log('done');
      		process.exit();
      	});
      });
      
      async function setCategoryWhitelist(callback) {
      	const cids = await db.getSortedSetRange('categories:cid', 0, -1);
      
      	// delete all existing tags
      	await db.deleteAll(cids.map(cid => `cid:${cid}:tag:whitelist`));
      
      	// set new tag whitelist for all categories
      	const bulkAdd = [];
      	cids.forEach((cid) => {
      		tags.forEach((tag, index) => {
      			bulkAdd.push([`cid:${cid}:tag:whitelist`, index, tag]);
      		});		
      	});
      
      	await db.sortedSetAddBulk(bulkAdd);
      	callback();
      }
      
      posted in Technical Support
      baris
      <baris>
    • RE: "tag list" to choose from?

      Yes but you need to do it for each category, under Tag whitelist input.

      posted in Technical Support
      baris
      <baris>

    Get Started

    • Product
    • Pricing

    Resources

    • Demo Site
    • Answers
    • Docs
    • Bug Bounty

    Company

    • About
    • Blog
    • Contact
    Start Free Trial
    Github Facebook Instagram Twitter
    © 2014 – 2022 NodeBB, Inc. — Made in Canada.
    • Terms
    • Privacy
    • GDPR
    • DMCA
    • Contact
    Menu
    • Terms
    • Privacy
    • GDPR
    • DMCA
    • Contact