Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags
    • Users
    • Groups
    1. Home
    2. Doppy
    • Profile
    • Following 5
    • Followers 0
    • Topics 104
    • Posts 171
    • Best 5
    • Groups 1

    Doppy

    @Doppy

    GNU/Linux

    5
    Reputation
    2295
    Profile views
    171
    Posts
    0
    Followers
    5
    Following
    Joined Last Online

    Doppy Unfollow Follow
    GNU/Linux

    Best posts made by Doppy

    • RE: ERROR listen eaddrinuse when I reload for the second time the forum

      @Giggiux I resolve. My problem is that I close the console with ctrl+z and I must close the console with ctrl+c. I think that the first doesn't close all ports of nodebb !

      posted in Technical Support
      Doppy
      Doppy
    • What do you mean like "moderator"?

      I need to became an user into "categories moderator". So I go in my:

      http://192.168.56.101:4567/admin/manage/categories/1#privileges

      and I add new user for the first category and I check the checkbox under moderate so I think the user become moderator of the first category. Now I my code I need to understand if a user is a moderator of any category.

      categories.getAllCategories(data.uid, function(err, category) {
      	if (err) {
      		return callback(err);
      	}
      
      	privileges.users.isModerator(category, data.uid, function(err, isModerator) {
      		if (err) {
      			return callback(err);
      		}
      		console.log("IS MODERATOR "+JSON.stringify(isModerator));
      	});
      });
      
      

      When I print the value "isModerator" I see all false for all categories in the forum. Anyone can help to understand how I user can became "moderator"?And a groups moderator exists?

      posted in Plugin Development
      Doppy
      Doppy
    • RE: How add another route with another .tpl file

      @frissdiegurke said:

      params.router.get('/user/plugins/answer/home', params.middleware.buildHeader, controllers.renderTest);

      @frissdiegurke thanks!!!! It workss fine!

      posted in NodeBB Plugins
      Doppy
      Doppy
    • RE: number is not a function in async

      @julian and @baris I resolve thanks for your support and your advice! The problem is that I put in my code an username too long!

      posted in Plugin Development
      Doppy
      Doppy
    • How get all Users when the plugins is installed

      I need to get all users when that plugin is installed so I used this hook ( in my plugin.json):

      "hook": "action:plugin.activate", "method": "caricaVecchiBookmark"
      

      In my library.js

      
      converter.caricaVecchiBookmark = function(data, callback) {
      	console.log("ENTRARE QUI DENTRO");
      	async.waterfall([
      		function(next) {
      			
      			db.getSortedSetRangeWithScores('username:uid', start, stop, next);
      		}
      	], function(err, array_uid) {
      		if (err) {
      			return callback(err);
      		}
      		console.log("ARRAY UDI " + JSON.stringify(array_uid));
      		return callback(null,data);
      	});
      };
      

      The problem is that in the shell I can't read the console.log and I don't know why. When I click the activate button in my admin panel, I don't read the console.log. Anyone can help me?

      posted in NodeBB Plugins
      Doppy
      Doppy

    Latest posts made by Doppy

    • RE: I want to change language but I don't know how I can do

      @baris I want chage the language in admin panel (if the language can be changed in admin panel) .

      0_1525361769946_cambio_italiano.png

      I don't know how I must do to do it.

      posted in Technical Support
      Doppy
      Doppy
    • I want to change language but I don't know how I can do

      I want change language in IT but I don't know where I must do to change this settting. Anyone can help me to resolve this problem?

      posted in Technical Support
      Doppy
      Doppy
    • I want use my flag.json or error.json in my plugin

      I want to use my flag.json or my error.json in my plugin and not the files that are in public/language/en-GB/flags.json. My plugin's structure folder is this:

      languages
      ----->flag.json
      ----->error.json

      I want read my text in these files, How can I do that?

      Example

      <div class="col-md-4 col-xs-12 ">
       <button class="btn btn-default flag-reason" disabled="true" name="bottone_flag">[[flags:modal-reason-offensive]]</button>
      </div>
      

      In this way I read the default value but I want to customize with my file so something like this:

      [[languages flags:modal-reason-offensive]]
      
      

      But this it doesn't work. Anyone can help me?

      posted in NodeBB Development
      Doppy
      Doppy
    • How put a default text in a HTML component with javascript

      Suppose to have the default text that it is the value of:

      [[user:bookmarks]]

      I want put this text in html component that I create with a function:

      function createElement(pid) {
      return '<a name="pid' + pid + '" role="menuitem" tabindex="-1" href="#" data-favourited="false"><span class="favourite-text">[[user:bookmarks]]</span>&nbsp;<i component="post/bookmark/on" class="fa fa-heart hidden"></i><i component="post/bookmark/off" class="fa fa-heart-o"></i></a>' }
      

      The problem is when the link appears, the text is "[[user:bookmarks]]" and not the real text that [[user:bookmarks]] refers. Anyone can help me?

      posted in NodeBB Development
      Doppy
      Doppy
    • "Invalid date" replaced the correct date value in my showsingle.tpl

      The problem is that when I reload tpl page, I view the correct data for one instant and after the date value are replaced about "invalid date" . It not a problem about my controller.js because it sends the correct values to my tpl page.
      This is the hmtl code problem is:

      <small class="hidden-xs"><span class="timeago" title="{element.title}" datetime="{element.datatime}">{element.text}</span></small>
      
      posted in NodeBB Development
      Doppy
      Doppy
    • RE: How schedule topic in future with node-cron?

      @julian I have a timestamp and I need to schedule the topic at this timestamp. So suppose that I want schedule topic at 01/12/2017(only) how can I modify the code to schedule the topic at these date?

      posted in NodeBB Development
      Doppy
      Doppy
    • How schedule topic in future with node-cron?

      I want schedule topic in the future with node-cron module. In details I want delay the topic creation at some timestamp. So in my plugin.jso I put this hook:

      {
      "hook": "filter:topic.create", "method": "editTopic"
      }
      		
      

      and in my library.js I do:

      converter.editTopic = function(data, callback) {
      	var task = cron.schedule('* * * * *', function() {
      		
      		return callback(null, data);
      
      	}, false);
      
      	task.start();
      };
      

      If I execute my code, the topic creation is schedule after a minute but in this minute the composer to write topics and posts is blocked. After that node-cron executes its task the composer become unblocked.

      I don't know if I can schedule topic in the future with node-cron, Anyone can help me to understand or I can do that?

      posted in NodeBB Development
      Doppy
      Doppy
    • how to figure out where the hook is launched

      Suppose to have this hook:

      "hook": "filter:topics.get", "method": "orderTopics"
      

      I know that when the hook is called the method is execute, but I don't want always execute the method. For some url like this:

      /station

      I don't want that the hook is throwed and I want specify this in the method:

      //server side library.js
      converter.orderTopics = function(data, callback) {
      //Something like this
      
      var url_station=url.getUrl() // give me the current url 
      
      }
      

      Anyone can help me?

      posted in NodeBB Development
      Doppy
      Doppy
    • ERROR /usr/bin/node : relocation error

      in my centos console, after that I start nodebb , I read this error:

      /usr/bin/node: relocation error: /usr/bin/node: symbol SSL_set_cert_cb, version libssl.so.10 not defined in file libssl.so.10 with link time reference
      [cluster] Child Process (8285) has exited (code: 127, signal: null)
      [cluster] Spinning up another process...

      Anyone can help me to resolve this error?

      posted in NodeBB Development
      Doppy
      Doppy
    • RE: Is it possible schedulate notifications in the future?

      @PitaJ can you write me the steps that I must do to obtain my purpose?

      posted in NodeBB Development
      Doppy
      Doppy