Gamification

General Discussion

Suggested Topics


  • 2 Votes
    1 Posts
    331 Views

    Whats the right way to use third party libraries?

    I tried to do it descriped in the docs:
    https://docs.nodebb.org/development/plugins/libraries/

    But it doenst work.

    I want to use Swiper in my Theme:
    https://swiperjs.com/get-started/

    I tried it with

    "modules": { "swiper.js": "node_modules/swiper/swiper-bundle.min.js" }

    in client.js i used:

    require(['swiper'], function (Swiper) { var mySwiper = new Swiper('.swiper-container', { // Optional parameters direction: 'vertical', loop: true, // If we need pagination pagination: { el: '.swiper-pagination', }, // Navigation arrows navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, // And if we need scrollbar scrollbar: { el: '.swiper-scrollbar', }, }) });

    The Javascript from Swiper does not load.

    Can you help me?

    I also treid to import it directly via html

    <link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.min.css"> <script src="https://unpkg.com/swiper/swiper-bundle.min.js"></script>

    and I also copied the contents of:
    https://unpkg.com/[email protected]/swiper-bundle.js

    and createt a file unter /lib/swiper-bundle.min.js. Nothing worked for me. The JS is still not loading...

    Looking forward to your answers! 🙂

    I fixed it.

    I am sorry. In my development I use grunt. But it seems that I doesnt load new libraries if installen. So I determinated the process Ctrl+C and restarted it using grunt. The librariers are loaded and the third party library works well now using:

    "modules": { "swiper.js": "node_modules/swiper/swiper-bundle.min.js" } require(['swiper'], function (Swiper) { var mySwiper = new Swiper('.swiper-container', { ... ... ... }) }
  • 1 Votes
    1 Posts
    1k Views

    Mystery man/woman made a pull request that we merged into the Redactor plugin:
    https://community.nodebb.org/topic/6093/official-plugin-redactor-composer-now-available-in-0-7-1/

    They're the first developer to make a pull request against the plugin and deserves some props! Thank you philburr! =D

    Here is footage of them (or someone who looks like them, or someone that doesn't) coding:
    philburr

    Do you know who (on our forum) this is?
    https://github.com/philburr

    If you're able to contribute to the plugin please hack away 😃
    The github:
    https://github.com/NodeBB/nodebb-plugin-composer-redactor
    The npm:
    https://www.npmjs.com/package/nodebb-plugin-composer-redactor

  • 0 Votes
    13 Posts
    6k Views

    @ChaosYamYT This plugin is incompatible with current versions of NodeBB. You could try opening an issue at the Github repo for the plugin, and asking the developer to fix it.

  • 2 Votes
    17 Posts
    7k Views

    I correctly assumed (and this has been validated through actual plugin upgrades) that the latest hash in npm points to the most recently published version, and not the highest version.

    That is, given your plugin nodebb-plugin-example

    If v1.0.0 is compatible with v0.5.4 If v1.1.0 is compatible only with v0.6.0 The latter is published first A user typing npm install nodebb-plugin-example will receive v1.0.0 of the plugin, irrespective of what NodeBB version he/she is running, even though v1.1.0 is technically newer

    Now, special note: The NodeBB Package Manager doesn't do this. When the ACP calls nbbpm to request a suggested package, we query npm for the plugin data, and sort the versions before checking compatibility, so this issue is moot.

  • Server list

    NodeBB Plugins
    0 Votes
    10 Posts
    5k Views

    i`ve tried to install this plugin, but dosent show in widgets... what the problem can be?