• 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. Roman Kulik
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 5
    • Best 1
    • Controversial 0
    • Groups 0

    Roman Kulik

    @Roman Kulik

    1
    Reputation
    6
    Profile views
    5
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Roman Kulik Unfollow Follow

    Best posts made by Roman Kulik

    • RE: Custom route

      no errors in logs.
      I have found the issue. After digging into the nodebb routing and rendering I found this line in ajaxify.js

      $('#content').html(translatedTemplate);
      

      and understood that I am using my custom theme without element with id = content, that was a problem.
      After adding 'id=content' to my body tag in header template everything become Ok)
      @PitaJ Thanks for support

      posted in NodeBB Development
      Roman Kulik
      Roman Kulik

    Latest posts made by Roman Kulik

    • RE: Custom route

      no errors in logs.
      I have found the issue. After digging into the nodebb routing and rendering I found this line in ajaxify.js

      $('#content').html(translatedTemplate);
      

      and understood that I am using my custom theme without element with id = content, that was a problem.
      After adding 'id=content' to my body tag in header template everything become Ok)
      @PitaJ Thanks for support

      posted in NodeBB Development
      Roman Kulik
      Roman Kulik
    • RE: Custom route

      part of another page rendered html with a link
      <a class="c-slideset__photo" href="/build/34">
      <img src=/assets/plugins/nodebb-plugin-custom-auth-questions/images/photo/5.png" alt="image">

      posted in NodeBB Development
      Roman Kulik
      Roman Kulik
    • RE: Custom route
      Builds.init = function (data, callback) {
      
      	function renderPage(req, res, next) {
      		const buildData = {};
      		let data = {
      			title: "TMM",
      			build: buildData,
      			front: true,
      			relative_path: nconf.get("relative_path")
      		};
      		var template = 'front/build';
      		res.render(template, data);
      	};
      	data.router.get('/api/build/:bid', renderPage);
      	data.router.get('/build/:bid', data.middleware.buildHeader, renderPage);
      }
      

      Even when I manually call from browser /api/build/:bid route - it returns me data for render, so route works, but on click for the link - no results

      posted in NodeBB Development
      Roman Kulik
      Roman Kulik
    • Custom route

      Are there any additional rules for routing custom routes?
      I have read and tried create-custom-route-in-plugin to add /api route but it still didn't work when link is not opened but clicked on another page.
      Maybe someone has a full example of this routing

      posted in NodeBB Development
      Roman Kulik
      Roman Kulik
    • Upload files via API

      Hi guys, I am doing some experiments with NodeBB and I'd like to load files to nodeBB, using API, not ACP.
      Right now I am using route /api/admin/upload/file and it works good, but only for the Admin user. Are there any other endpoints or methods to upload files for any registered and logged in user, not only for admin.

      posted in NodeBB Development
      Roman Kulik
      Roman Kulik

    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