• 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. Joi
    3. Posts
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 4
    • Best 1
    • Controversial 0
    • Groups 0

    Posts made by Joi

    • RE: Problem displaying new internal link content

      @baris It is good? https://github.com/NodeBB/NodeBB/issues/10096

      ShlomoCode created this issue in NodeBB/NodeBB

      closed Problem displaying new internal link content #10096

      posted in Technical Support
      Joi
      Joi
    • Problem displaying new internal link content

      In version NODEBB 18.6 (latest) a feature has been added that hovers over an internal link within the forum
      A panel with the contents of the post is displayed
      The problem is that if you put a link to another NODEBB site, it looks for the post number in the current forum, and displays incorrect content.
      example (Hover over the link to see):

      Jul 10, 2017  /  General Discussion

      Creating tables in NodeBB

      Creating tables in NodeBB

      Hey, did you know you can create tables? It's true! Item 1 Item 2 Item 3 Next item Another item Yet another Getting closer Almost there... And -- done! See?

      Hovering over the link, he tries to display:
      https://community.nodebb.org/topic/2/test
      @baris

      posted in Technical Support
      Joi
      Joi
    • RE: Broken script starting from version 18.3

      I was told the problem is in:
      topicElem.find
      I do not understand this, I just want the code to work again ...
      Thank you!

      posted in Technical Support
      Joi
      Joi
    • Broken script starting from version 18.3

      I have a script for previewing topics from a recent or unread topic page.
      As of version 1.18.3 of NodeBB, the script does not work.
      Can you help?
      This is the script:

      (function() {
          'use strict';
          function onhover() {
              /* globals require, $, socket, app */
              var self = $(this);
              if (!self.data('preview-loaded')) {
                  socket.emit('topics.loadMore', {
                      tid: self.data('my-tid'),
                      after: 0,
                      count: 1,
                      direction: 1
                  }, (e, d) => {
                      self.data('preview-loaded', 1);
                      require('translator').translate(e ? '<span style="color:red;">error: </span>' + e.message : d.mainPost.content,
                                                      (d) => {
                          if (app.user.uid === 0) {
                              d = d.replace(/\|\|.*\|\|/g,'<a href="https://domain.com/login">You must be logged in to view this link.</a>');
                          } else {
                              d = d.replace(/\|\|/g,'');
                          }
                          $('#preview-' + self.data('my-tid')).children().html(d.replace(/\|\|/g,''));
                      });
                  }
                             );
              }
              $('#preview-' + self.data('my-tid')).stop(true).delay(500).fadeIn();
          }
      
          function onunhover() {
              $('#preview-' + $(this).data('my-tid')).stop(true).fadeOut();
          }
      
          $(window).on('action:topics.loaded', (event, data) => {
              for (let topic of data.topics) {
                  let topicElem = $('[data-tid="' + topic.tid + '"]');
                  createPreview(topicElem);
              }
          });
      
          function addTopicTools() {
              let topicelems = $('[component="category/topic"]');
              topicelems.each((i, elem) => {
                  createPreview($(elem));
              });
          }
      
          function createPreview(topicElem) {
              let tid = parseInt(topicElem.attr('data-tid'));
              if (!$('#preview-' + tid).length) {
                  topicElem.find('.content').append('<div class="post-preview" id="preview-' + tid + '"><div class="wrap-post-preview">טוען...</div></div>');
                  topicElem.find('.post-preview').hover(function(){$(this).stop(true).fadeIn();},function(){$(this).delay(600).fadeOut();});
                  topicElem.find('[itemprop="url"]').data('my-tid', tid).hover(
                      onhover,
                      onunhover
                  );
              }
          }
      
          $(window).on('action:ajaxify.end', addTopicTools);
      
      })();
      

      (The script also exchanges for guests each link to a login page, to encourage registration)
      @baris 🤔

      posted in Technical Support
      Joi
      Joi

    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