• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.4.3 Latest
Buy Hosting
    • All categories
    Load new posts
Log in to post
  • magnusvhendinM

    Template helpers not working in in NodeBB v2

    Scheduled Pinned Locked Moved Solved Plugin Development 2.0 benchpressjs template functions
    0 Votes
    7 Posts
    536 Views
    magnusvhendinM

    @baris This worked like a charm. Thank you!

  • NoduleJSN

    external scripts does not load on the client side

    Scheduled Pinned Locked Moved NodeBB Development benchpressjs error
    0 Votes
    5 Posts
    602 Views
    NoduleJSN

    problem solved. i have to import external script with

    require([script], function(name) { })

    It seems that importing scripts in a classic way creates conflicts in nodebb

  • magnusvhendinM

    Benchpress is undefined clien side

    Scheduled Pinned Locked Moved NodeBB Development benchpressjs theme
    0 Votes
    5 Posts
    664 Views
    magnusvhendinM

    Thank you @PitaJ for pointing me in the right direction. I adapted my code to the link you sent me.

    (function (factory) { if (typeof module === 'object' && module.exports) { factory(require.main.require('benchpressjs')); } else { require(['benchpress'], factory); } }(function (Benchpress) { const logger = (data) => { console.log('Logger helper', data); return ''; }; const customHelpers = { register, logger, }; function register() { Object.keys(customHelpers).forEach(function (helperName) { Benchpress.registerHelper(helperName, customHelpers[helperName]); }); } register(); if (typeof module === 'object' && module.exports) { module.exports = customHelpers; } }));

    Just by doing this made it work client side. But then it stopped working server side. That was easily fixed though by running helpers.register in my library file.

    const helpers = require('./lib/helpers'); helpers.register();

    Hope this helpes someone!

  • A

    Missing sub-categories with my template

    Scheduled Pinned Locked Moved General Discussion dropdown sub-categories template benchpressjs
    0 Votes
    5 Posts
    437 Views
    A

    Thanks ! I had tried this before but something else was wrong.

    Now, everything is ok !!! Thanks again !

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
  • Login

  • Don't have an account? Register

  • Login or register to search.