Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags
    • Users
    • Groups
    1. Home
    2. alfazaz
    A
    • Profile
    • Following 0
    • Followers 2
    • Topics 23
    • Posts 83
    • Best 10
    • Groups 1

    alfazaz

    @alfazaz

    This a try with a line return just after this word.
    Here starts the new line.

    11
    Reputation
    213
    Profile views
    83
    Posts
    2
    Followers
    0
    Following
    Joined Last Online

    alfazaz Unfollow Follow
    Users with 50 posts

    Best posts made by alfazaz

    • RE: Download file with app.get problem

      Finally, I made it simpler...

      I made a link from /toto/myfiles to public/uploads/myfiles. Then, I wrote this app.get code in my plugin :

      app.get('/uploads/myfiles/:file(*?)', function (req, res) {
      		// Things TODO with req.params.file for permissions (after work on it)...
      		var longfilename = path.resolve('public' + req.url);
      		if (fs.existsSync(longfilename)) {
      			res.status(200);
      			res.sendFile(longfilename);
      		} else {
      			console.log('Fichier non trouvΓ©');
      			res.status(404);
      			res.render('404', {path: req.path});
      		}
      	});
      

      Now, there is no problem with the ajaxify thing... Ouf !

      I'm going to open another topic for another question about the 404 error rendering... πŸ˜‰

      posted in NodeBB Plugins
      A
      alfazaz
    • RE: Override template from plugin

      @PitaJ Ok ! I do it now.

      posted in NodeBB Development
      A
      alfazaz
    • RE: Missing sub-categories with my template

      Thanks ! I had tried this before but something else was wrong.

      Now, everything is ok !!! Thanks again !

      posted in General Discussion
      A
      alfazaz
    • RE: [nodebb-plugin-featured-topics-extended] Feature Topics in a News/Blog page and Widgets.

      Hello @yariplus,

      Is your plugin compatible with nodebb 1.10.1 ? I can't get widgets working on my site. Thanks in advance for your answer.

      posted in NodeBB Plugins
      A
      alfazaz
    • RE: Override template from plugin

      @PitaJ Thanks ! Success !!!

      composer.tpl needed to be in /node_modules/nodebb-theme-oxide-YA/templates/ and not in /node_modules/nodebb-theme-oxide-YA/templates/modules...

      Sorry πŸ˜‡

      Must I write a request for nodebb-plugin-composer-default for this :
      On small screens, it would be great to be able to replace the write-container with the preview-container on clicking "show preview" and revert to write-container on clicking "show editor" ?

      posted in NodeBB Development
      A
      alfazaz
    • Strange thing on unread page

      Hello !

      When I go on the unread page of this nodebb forum, I get this :

      be574bc8-0d40-4755-bb25-b182da2000bf-image.png

      When I click on the second link, I get a "forbidden access". It doesn't seem to be normal and, may be, it comes from a recent change made by @baris .

      Is it necessary to make a bug report on github ?

      A+
      alfazaz

      posted in Bug Reports
      A
      alfazaz
    • No pagination-block in /recent, /popular...

      Hello !

      On this forum (and also mine...), there is no pagination-block visible when we are on /recent or /popular for example.

      Is there a simple way to make it working on my forum ?

      Thanks in advance.

      posted in Technical Support
      A
      alfazaz
    • RE: [nodebb-plugin-custom-pages] Custom Static pages for NodeBB

      Hello !

      I need to change some bootstrap classes in custom-page.tpl (to change sidebar dynamical width for example as I have already done it in my own theme templates files). I can do it directly in nodebb-plugin-custom-pages/templates/custom-page.tpl but it will be replaced on each package upgrade... Not great !

      Is there another way to do it without this problem ?

      Thanks in advance !

      posted in NodeBB Plugins
      A
      alfazaz
    • RE: What to do with emails on Dev nodebb site ?

      Finally, I made my own plugin with hook filter:email.modify. I activate it when on Dev and it redirects all emails to a special email address (to control things).

      Sorry for the "noise"... 😊

      posted in Technical Support
      A
      alfazaz
    • Proper way to add LaTeX (with markdown-it-texmath and katex) to nodebb-plugin-markdown

      Hello !

      I succeeded in adding LaTeX on my nodebb forum but my solution is bad for maintenance (all plugin I found to do that had defaults so I made my own work)... I think there is a greater/more elegant way ; here is the reason for this message πŸ˜‰ .

      Here is my method for now :

      • I forked nodebb-plugin-markdown (named it nodebb-plugin-markdown-YA).
      • I added into package.json these dependencies : katex and markdown-it-texmath.
      • I copied katex.min.css from katex to nodebb-plugin-markdown-YA/public/less/katex.min.less.
      • I copied "fonts" dir from katex to "nodebb/public".
      • I changed nodebb-plugin-markdown/index.js (bof, bof... 😞 ). Here is the diff between nodebb-plugin-markdown/index.js and nodebb-plugin-markdown-YA/index.js :
      2a3,6
      > // YA add-on for LaTeX (markdown-it-texmath + katex)
      > var katex = require('katex');
      > var MarkdownItTexmath = require('markdown-it-texmath').use(katex);
      > 
      52c56,57
      <                       href: nconf.get('relative_path') + '/plugins/nodebb-plugin-markdown/styles/' + (Markdown.config.highlightTheme || 'railscasts.css'),
      ---
      > //  YA change for LaTeX (markdown-it-texmath + katex) - plugin renamed !
      >                       href: nconf.get('relative_path') + '/plugins/nodebb-plugin-markdown-YA/styles/' + (Markdown.config.highlightTheme || 'railscasts.css'),
      115c120,123
      <                       parser = new MarkdownIt(_self.config);
      ---
      > //  YA change for LaTeX (markdown-it-texmath + katex)
      > //                    parser = new MarkdownIt(_self.config);
      >                         parser = new MarkdownIt(_self.config).use(MarkdownItTexmath, {"delimiters" : 'dollars'});
      > 
      236a245,246
      > //  YA change for LaTeX (markdown-it-texmath + katex)
      > //  checkboxes make some bad things with LaTeX so desactivate it
      238,241c248,251
      <               parser.use(require('markdown-it-checkbox'), {
      <                       divWrap: true,
      <                       divClass: 'plugin-markdown',
      <               });
      ---
      > //            parser.use(require('markdown-it-checkbox'), {
      > //                    divWrap: true,
      > //                    divClass: 'plugin-markdown',
      > //            });
      

      Is there a greater way to do these things keeping nodebb-plugin-markdown unchanged and installed ? I can write another plugin to apply my changes (add LaTeX with markdown-it-texmath and katex and remove markdown-it-checkbox use) but is it really possible and, if yes, with which hooks ?

      It would be really simpler for maintenance (and also more beautiful... πŸ˜‰ )...

      Thanks in advance for help !

      posted in NodeBB Plugins
      A
      alfazaz

    Latest posts made by alfazaz

    • RE: Use response:router.page instead of filter:router.page (deprecated)

      @julian Yes. I saw it. Thanks !

      posted in Technical Support
      A
      alfazaz
    • RE: TreeError on build

      @pitaj I made two issues on benchpressjs related to this topic if it helps :

      https://github.com/benchpressjs/benchpressjs/issues/98

      https://github.com/benchpressjs/benchpressjs/issues/99

      alfazaz created this issue in benchpressjs/benchpressjs

      closed Give template which gives TreeError #98

      alfazaz created this issue in benchpressjs/benchpressjs

      closed Strange problem when going from old syntax to new syntax #99

      posted in Technical Support
      A
      alfazaz
    • RE: Use response:router.page instead of filter:router.page (deprecated)

      @pitaj Thanks ! It worked (without next in fact).

      posted in Technical Support
      A
      alfazaz
    • RE: TreeError on build

      @PitaJ

      Two things :

      • It could be great to have the filename of the template which raises the TreeError error (if possible). It could help debugging.

      • Found something that I don't know if it's desired... It seems that changing <!-- IF toto --> xxxx <!-- ENDIF toto --> to {{{ if toto }}} xxxx {{{ end }}}
        doesn't work for example for functions like in the <!-- IF function.displayMenuItem, @index --> in menu.tpl . It's a little strange or I understand things wrong ?

      posted in Technical Support
      A
      alfazaz
    • Use response:router.page instead of filter:router.page (deprecated)

      Hello !

      I'm upgrading my plugins and I have a problem. I get this message in my nodebb 1.15.5 logs :

      2021-01-01T17:32:47.395Z [5678/284882] - warn: [plugins/nodebb-plugin-forcelogin-YA] Hook "filter:router.page" is deprecated, please use "response:router.page" instead.
      

      so I want to change the hook I use in my plugin. I changed in plugin.json filter to response but it gives error on running after this change. How must I change the following function called by this hook ?

      plugin.YAfonction = function(req, res, next) {
      	if (!req.uid && !req.originalUrl.startsWith(nconf.get('relative_path') + '/login') && !req.originalUrl.startsWith(nconf.get('relative_path') + '/api/login') && !req.originalUrl.startsWith(nconf.get('relative_path') + '/api/reset') && !req.originalUrl.startsWith(nconf.get('relative_path') + '/reset')) {
      		helpers.notAllowed(req,res);
      	} else {
      		next();
      	}
      };
      

      May be it's simple... But I'm not a great programmer...
      Thanks in advance !

      posted in Technical Support
      A
      alfazaz
    • RE: TreeError on build

      @pitaj {{{ end toto }}} never worked effectively.

      In fact, I tried this because of warnings with the old <!-- ENDIF toto --> or <!-- END toto --> on build.

      Now, I changed everything with {{{ end }}} ; this problem is solved (I have different problems to solve now πŸ˜‰ ).

      posted in Technical Support
      A
      alfazaz
    • RE: TreeError on build

      @pasib said in TreeError on build:

      @alfazaz

      <!-- IF toto -->
      
      ...
      
      <!-- ENDIF toto -->
      

      Should work here.

      It's now an old thing which gives warnings (for me).

      posted in Technical Support
      A
      alfazaz
    • RE: TreeError on build

      Well it seems to come from things like

      {{{ if toto }}}
      many things
      {{{ end toto }}}
      

      I thought it was possible but the error messages disappears when using

      {{{ if toto }}}
      many things
      {{{ end }}}
      

      So it is not possible now to use the first version ? I found it greatest to have a clear code.

      posted in Technical Support
      A
      alfazaz
    • TreeError on build

      Hello !

      I'm trying to upgrade my nodebb 1.14.3 to 1.15.5 (before going on 1.16.0)... but it doesn't work for now.

      When I activate some of my plugins, I have bad build messages like this one :

      Failed at parse::tree::tree, TreeError
      

      I think it's related with changes in benchpressjs from @PitaJ but I don't know what kind of error(s) in my templates I must track to solve these problems. Do you have tricks to solve this ?

      Happy new year to everybody (hope it will be greater than 2020...) !

      posted in Technical Support
      A
      alfazaz
    • RE: 1.15.0 Breaking Changes

      @baris Thanks, that was this ! This problem is solved now. πŸ™‚

      posted in NodeBB Development
      A
      alfazaz