env undefine

NodeBB Development
  • i find the composer in my website can't suit the screen..
    so i just check out the js code and try to add alert(env) in
    if (percentage) {
    if ( env === 'md' || env === 'lg') {
    postContainer.css('height', Math.floor($(window).height() * percentage) + 'px');
    }
    }
    what i get is undefine. seems that the function findBootstrapEnvironment() doesn't work
    who can tell me what is my lack


Suggested Topics


  • 5 Votes
    1 Posts
    307 Views

    We recently received some inquiries about how long we will support 1.x and 2.x with security fixes.

    1.x will be supported for another 12 months up until August 2024 2.x will be supported for another 24 months up until August 2025

    We also released https://github.com/NodeBB/NodeBB/releases/tag/v2.8.16 and https://github.com/NodeBB/NodeBB/releases/tag/v1.19.12 containing some of the fixes from the 3.x line. If you are not able to upgrade to 3.x we encourage you to upgrade to these releases.

  • 8 Votes
    7 Posts
    3k Views

    @phenomlab very true. A lot of talented people have done some surprisingly cool things with just the custom css panel.

  • 9 Votes
    40 Posts
    3k Views

    @julian said in What's next after v3?:

    I've said it there and I'll say it here. NodeBB will follow the ActivityPub spec and, if possible, will be tested against both Flarum and Discourse integrations because doing so makes federated forums a force to be reckoned with.

    This is good. More and more development efforts too are focusing so little on the Mastodon API and instead focusing on the actual standards - S2S & C2S as they should.

    Building Federation for the Fediverse is of paramount consideration, while making sure one federates with a single Fediverse platform whose significance is waning as the bellweather for social communications. Even entire Mastodon communities have left that platform and migrated en masse to other, more capable platforms - some outright forks like Glitch-Soc or Hometown, and many more to other more promising Fediverse platforms that have enjoyed greater adoption due to their more accommodating utility for their userbases.

    In the End, it's not really about communities built on an instance and provided to the user base - it's about users across the entire #Fediverse building communities that span the myriad platforms and instances; especially as smolweb / smallweb and single user platforms continue to build critical mass in terms of installed instances.

    #Friendica, being one of the great-grandaddy's of, and staples in, the Fediverse, is a great platform chosen by many projects to effectively represent the branding, marketing, and social communications needs - blogs, announcements, changelogs, newsletters, and public dialog... Things a limited microblogging software cannot deliver.

  • 0 Votes
    5 Posts
    664 Views

    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!

  • 0 Votes
    6 Posts
    2k Views

    You'll want to listen to the filter:categories.build hook. You can remove all of the code creating the route override.