• Home
  • Categories
  • Recent
  • Popular
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Default
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Quartz
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Slate
  • Solar
  • Superhero
  • Vapor
Collapse

Community

manolinoM

manolino

@manolino
About
Posts
6
Topics
3
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

    RE: [nodebb-widget-html-extended] Enhanced HTML Slider Widget
  • manolinoM manolino

    @kadmy , sure: upload the file controls.png from the plugin folder \node_modules\bxslider\dist into NodeBB assets. The file looks like the bitmap below.

    controls.png
    Then change the LESS to

    .my-wrapper {
        box-shadow: none;
        border: none;
        .bx-prev {
            background: url(/assets/uploads/controls.png) no-repeat 0px -32px;
        }
        .bx-next {
            background: url(/assets/uploads/controls.png) no-repeat -43px -32px;
        }
    }
    

    This file contains the standard bxSlider. But you can use any other icon. Just upload it or point to the url of your preference.

    Please update to v0.1.2 for more fixes.


  • [nodebb-widget-html-extended] Enhanced HTML Slider Widget
  • manolinoM manolino

    Hello everyone, I want to share with you my first plugin in the hope that it can be useful. It's almost 5 years that we use NodeBB with many hours of development for the verticalization needed for our NGO online platform. So I decided to pull out some code and turn it into a useful widget for HTML publishing.
    I improved the HTML editing through ACE Editor, integrating a LESS stylesheet and a JSON datasheet.
    JQuery bxSlider plugin is inserted as a module and is loaded only when needed. To optimize resources and performance, the editor creates only three instances of ACE dynamically so you can have several widgets per page. To compact the UI interface I used the Selectize plugin. Moreover, categories are preloaded in order to facilitate the insertion.
    Activating the widget will create some examples in the global drafts area.
    I invite you to try it. I recommend you rebuild the forum after the installation or in case of error. To reinstall the examples, you have to deactivate and reactivate the plugin.

    npm install nodebb-widget-html-extended
    

    Enjoy it
    Settings panel


  • RE: v1.6.0 Suspected Nginx Problem
  • manolinoM manolino

    Have you read my post Tips to get 1.6.0 running after updating from 1.5.x ?
    What you write is one of the problems I had. I solved adding two extra rules to nginx configuration.


  • Tips to get 1.6.0 running after updating from 1.5.x
  • manolinoM manolino

    Hi guys, here some tips for who experimented problems after 1.5.x -> 1.6.0 upgrade.

    Symtoms client-side:

    • .jst generated only after a page refresh
    • .jst not generated at all
    • "Uncaught SyntaxError: Unexpected token < " message in browser console.
    • Various failures messages in browser console loading from /assets/... routes.
    • General requirejs errors like "require.js:34 GET https://yourdomain.com/ net::ERR_ABORTED".
    • JS modules loading errors like "tag_assistant_compiled.js:119 GET https://yourdomain.com/ 503 (Service Unavailable)".

    After various attempts and settings, I've identified that problems comes from NGINX settings. Reading nginx logs, in particular the error.log file, I found a clue.

    The settings suggested in documentation or here in the forum doesn't work for me, some modifications and adjustments are required.

    The key change is the adding of this to rules:

     proxy_headers_hash_bucket_size  64;
     proxy_headers_hash_max_size  512;
    

    and other little modification was the re-arrangement of configuration blocks that now looks like:

    #
    # HTTPS server
    #
    
    server {
    	listen 80;
    
    	root /path/to/NodeBB;
    	index index.html index.htm;
    
    	server_name    yourdomain.com;
    	return         302 https://$server_name$request_uri;
    }
    
    server {
    	listen 443 ssl spdy;
    	server_name yourdomain.com;
    
    	ssl_certificate /etc/nginx/ssl/cert_chain.crt;
    	ssl_certificate_key /etc/nginx/ssl/server.key;
    
    	ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    	ssl_ciphers 'AES128+EECDH:AES128+EDH';
    	ssl_prefer_server_ciphers on;
    
    	# This rules was moved here from location object 
    	proxy_set_header X-Real-IP $remote_addr;
    	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    	proxy_set_header X-Forwarded-Proto $scheme;
    	proxy_set_header Host $http_host;
    	proxy_set_header X-NginX-Proxy true;
    	proxy_redirect off;
    
    	# New fixes. Values are powers of 2, this works for me, you can increase.
    	proxy_headers_hash_bucket_size  128;
    	proxy_headers_hash_max_size  1024;
    
    	# Socket.IO Support
    	proxy_http_version 1.1;
    	proxy_set_header Upgrade $http_upgrade;
    	proxy_set_header Connection "upgrade";
    
    	location @nodebb {
    		proxy_pass http://127.0.0.1:4567;
    	}
    
    	location ~ ^/assets/(.*) {
    		root /path/to/NodeBB/;
    		try_files /build/public/$1 /public/$1 @nodebb;
    	}
    
    	location /plugins/ {
    		root /path/to/NodeBB/build/public/;
    		try_files $uri @nodebb;
    	}
    
    	location / {
                    proxy_pass http://127.0.0.1:4567;
    	}
    }
    

    Hopings this helps someone of you.

    Pura Vida!


  • RE: Who is using NodeBB?
  • manolinoM manolino

    Mapping the Commons and fostering Civil Participation from Costa Rica to the world.

    Look ÁgoraPIC webapp at https://agora.picapp.org

    A NodeBB verticalization with full Civil Society GPS contextualization of political discussion and a WYSIWIG content editor.

    Here some screenshots.

    0_1503948522192_screenshot0.png
    3_1503948409484_screenshot3.png
    2_1503948409484_screenshot2.png
    1_1503948409483_screenshot1.png


  • invalid csrf token & forbidden login errors
  • manolinoM manolino

    Hi guys, I'm writing this topic hoping this will help other user that like me encountered this frustrating issue when upgrading NodeBB.

    First of all I have local development server, a Windows10 PC with NodeBB listening at http://192.168.1.100:4567, and a production server at Digital Ocean listening at a full qualified SSL domain at https://agora.picapp.org. (note that port is masked by Nginx server)

    Well, for some reason, probably for my intervention, port number disappeared from url parameter, leaving only the IP in config.json looking like this:

    {
        "url": "http://192.168.1.100",
        "port": 4567
    
    

    So checking in various files in particular in line 123 of /src/controllers/index.js and in line of 97 of /src/start.js

    //    /src/controllers/index.js 
    .
    var returnTo = (req.headers['x-return-to'] || '').replace(nconf.get('base_url'), '');
    .
    
    //    /src/start.js
    .
    nconf.set('base_url', urlObject.protocol + '//' + urlObject.host);
    .
    

    I discovered that trailing port is mandatory in url config parameter.

    If you debug login.js you'll view that returnTo variable contains :4567/ value causing invalid csrf token server-side and forbidden client-side.

    For me make sense to omit port value on url parameter line because the presence of a port parameter. But I was wrong.

  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
  • Login

  • Don't have an account? Register

  • Login or register to search.