Skip to content
  • 0 Votes
    2 Posts
    10 Views
    Open RiskO
    Conceptually, for a democratic society that respects its citizens and grants them #digitalprivacy and agency (#digitalsovereignty) we need to envision computing power becoming again more distributed. But neither the architecture that would achieve that, nor the economic forces that would make it happen are obvious. We have been travelling down the wrong path for so long, it is now difficult to discern alternatives. Yet the shape of digital society is really a matter of collective choice.2/2
  • How to use Third-Party libraries?

    Solved Plugin Development client error plugin script
    1
    2 Votes
    1 Posts
    1k Views
    dogsD
    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', { ... ... ... }) }
  • Client actions for posts

    Plugin Development client javascript plugin action
    5
    0 Votes
    5 Posts
    5k Views
    rbeerR
    @pitaj Boy, that was quick! Thanks
  • Client JavaScript in Templates

    Moved Technical Support javascript client theme
    6
    0 Votes
    6 Posts
    6k Views
    NicolasN
    @psychobunny nice, It's very helpful.

Looks like your connection to NodeBB Community was lost, please wait while we try to reconnect.