Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags
    • Users
    • Groups
    1. Home
    2. priapo
    P
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    priapo

    @priapo

    14
    Reputation
    50
    Posts
    1119
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    priapo Follow

    Best posts made by priapo

    • RE: How to get subcategories from home.tpl?

      Ok, this works

      <!-- IF categories.children.length -->
      <!-- BEGIN children -->
      <!-- IF @first -->(Sub-forums: <!-- ENDIF @first -->
      <a href="\{relative_path\}/category/{categories.children.slug}" itemprop="url">{categories.children.name}</a>
      <!-- IF !@last --> &middot; <!-- ENDIF !@last -->
      <!-- IF @last -->)<!-- ENDIF @last -->
      <!-- END children -->
      <!-- ENDIF categories.children.length -->
      

      Just put it somewhere between <!-- BEGIN categories --> and <!--END categories --> in home.tpl

      And take both \ from {relative_path}.. it seems that nodebb parses it... so I had to type...

      posted in NodeBB Themes
      P
      priapo
    • Nodebb Theme Aspic

      Hello, I have changing a vartiation of Lavender theme for some time called Aspic. As I am not able to ensure the regularity that I will continue updating it, I am leaving it as a git repo. I am still using 0.9.3 currently and don't know if it would work with 1.0.0.

      Maybe I post screenshots later, but it is online at https://forum.thewizards.club

      posted in NodeBB Themes
      P
      priapo
    • Admin authorization for registration

      Hello, I would like to suggest a feature to avoid spam bots that is like the yahoo groups feature, a text box that the new user would ask with his own words for admins when registering, admin gets notified maybe via email as well, and then when the registration is authorized, the user gets notified via email.

      posted in Feature Requests
      P
      priapo
    • RE: How to show sub-categories as home page?

      Hello, I've changed lavender's category.tpl file, changed 2 things,

      • Sidebar is In line, like in home, and subcategories and current category are both at left.
      • Added a class to category stuff that allows to hide buttons and posts via css. It is quite workaround but is working.

      file is here:

      Ubuntu Pastebin

      The class name is: .category-stuff-id-{cid} where {cid} is the number of category to be hidden (you can see category id in the browser's address bar after /category/), via admin panel, exemple, like in my test if one wants to hide category 22 , the person goes to "admin panel" -> "appearance" - > "custom css & html", and add a line at the end:

      .category-stuff-id-22 { display: none; }
      

      To use the file change /nodebb/node_modules/nodebb-theme-lavender/templates/category.tpl for it and then restart nodebb.

      edit: if it is not working maybe you need to clear your browser's cache or use incognito mode to test it!!

      posted in NodeBB Themes
      P
      priapo
    • RE: How to upgrade from 0.5.7 to 0.6.0 - Now there are Error of Installation.

      you should checkout the branch v0.6.x

      ./nodebb stop
      git pull
      git checkout v0.6.x
      git pull
      ./nodebb upgrade
      ./nodebb start
      
      posted in General Discussion
      P
      priapo
    • Threaded posts

      I would like to suggest threaded topics fb like, in addition to quoting a post. This would make possible for users to create multidimensional discussions and easier to read replies to certain specific posts inside the topics

      Example:

      TOPIC
      -----
      POST 1
      -----
       |-> POST 3 in reply to POST 1
      -----
         |----> POST 5 in reply to POST 3
      -----
       |-> POST 4 in reply to POST 1
      -----
       |-> ANOTHER POST in reply to POST 1
      -----
      POST 2
      -----
      
      posted in Feature Requests
      P
      priapo
    • My Variation to Lavender

      Hello, I dared (hope past of verb is this) to make a little variation of Lavender theme, it is published here

      https://github.com/kassius/nodebb-theme-aspic

      Later I post screenshots, but they are on Github above,

      hope you like it.

      posted in NodeBB Themes
      P
      priapo
    • RE: How to upgrade from 0.5.7 to 0.6.0 - Now there are Error of Installation.

      I didn 't got this error but the python in my system is version 2.7.6.. the error is complaining that the version of python (version 3) is not supported. I see arch documentation here

      Python - ArchWiki

      please try this, see if python2 is installed in your system, use the command: whereis python, it should display /usr/bin/python2, if not, install it (i don't know the procedures in arch but the package is named python2), then do this as seen in the link above

      mkdir ~/bin
      ln -s /usr/bin/python2 ~/bin/python
      ln -s /usr/bin/python2-config ~/bin/python-config
      export PATH=~/bin:$PATH
      ./nodebb upgrade
      

      the export path command will remain only for the session

      posted in General Discussion
      P
      priapo
    • RE: Updating ( refresh ) embedly plugin on page display

      Hello, I was sucessfull using this https://github.com/nfl/jquery-oembed-all

      Just add to Admin CP -> Appearance - > Custom HTML & CSS then add to Custom Header and enable it.

      <script src="https://rawgit.com/nfl/jquery-oembed-all/master/jquery.oembed.js"></script>
      <link rel="stylesheet" href="https://rawgit.com/nfl/jquery-oembed-all/master/jquery.oembed.css"  />
      
      <script>
      $(function(){
         $("div.topic-text a").oembed();
      });
      </script>
      

      It doesn't embed all links, but if you use https you can have error by loading via http, i'm still seeing it. : )

      edit. using this:

      <script src="https://rawgit.com/kassius/jquery-oembed-all/master/jquery.oembed.js"></script>
      <link rel="stylesheet" href="https://rawgit.com/kassius/jquery-oembed-all/master/jquery.oembed.css"  />
      
      <script>
      $(document).ajaxComplete(function() {
         $("div.topic-text a").oembed();
      });
      </script>
      

      With this code I was able to embed wikipedia articles through https and also pdf through scribd. Very cool!!

      sources:

      oEmbed

      Open Graph protocol

      Open Graph protocol

      The Open Graph protocol enables any web page to become a rich object in a social graph.

      Link and execute external JavaScript file hosted on GitHub

      Link and execute external JavaScript file hosted on GitHub

      When I try to change the linked reference of a local JavaScript file to a GitHub raw version my test file stops working. The error is: Refused to execute script from ... because its MIME type (...

      posted in NodeBB Plugins
      P
      priapo
    • RE: How to show sub-categories as home page?

      Please use this instead

      https://github.com/kassius/nodebb-theme-aspic/blob/master/templates/category.tpl

      The other will not expand if you have no widgets.

      category.tpl

      posted in NodeBB Themes
      P
      priapo

    Latest posts made by priapo

    • RE: [SOLVED] Custom language in admin panel

      Well, I have no time for discuting bs with js;

      The admin language files are inside [nodebb]/public/language/YOURFORUMLANGUAGE/admin/

      I have made a python3 script to make an organized admin/ directory from the files downloaded from transifex. (You should download all files one by one, should be 30 or 40, takes 7~10 minutes)

      1. Make a new directory
      2. Dowload all translated .json files to that directory
      3. They have names like for_use_nodebb_admin-advanced-events_pt_BR.json.
      4. Save this script in a file called freak.python3 in the directory you created.
      #!/usr/bin/env python3
      
      import os
      import glob
      # use os.system("") to do it lil boy
      import subprocess
      
      # Files downloaded from transifex has this string in filename.
      # This should be removed from them; change with yours.
      language_str = "_pt_BR"
      
      json_files = glob.glob('*.json', recursive=False)
      
      dirs_created = list()
      
      for file in json_files:
          ripped = file.split('-', 2) # 2 here is a hack to avoid splitting ip-blacklist.json and web-crawler.json
      
          json_filename = ripped[-1].replace(language_str,'')
          print(ripped)
      
          if len(ripped) == 3:
              directory = "admin/{0}/".format(ripped[1])
          elif len(ripped) == 2:
              directory = "admin/"
          else:
              directory = "ERROR/" # if this directory appears something went wrong
      
          if not directory in dirs_created:
              dirs_created.append(directory)
              print(directory)
              os.system("mkdir -p {0}".format(directory))
      
          print(json_filename)
          os.system("cp {0} {1}{2}".format(file, directory, json_filename))
      
      1. CHANGE THE LINE language_str = "_pt_BR" WITH YOUR LANGUAGE KEEPING THE _ before..
      2. Make it executable: chmod +x freak.python3
      3. Execute it: ./freak.python3
      4. This will create an admin/ directory inside the directory, tar it and send to server: tar zcvf admin.tgz admin/
      5. scp admin.tgz SSHUSER@SSHSERVER: or whetever you use.
      posted in NodeBB Development
      P
      priapo
    • RE: [SOLVED] Custom language in admin panel

      The javascript programmers (rofl) think people doesn't deserve a reply. Open $ource. 🙂 🙂 🙂 (really hard to find github link in nodebb.org)

      posted in NodeBB Development
      P
      priapo
    • RE: Issue with Admin Panel since upgrade to 1.4.2

      @teh_g Very good, that's why I always say, post your config files removing sensitive data. We would have helped you resolving this simple issue of removing the slash better. 🙂

      posted in Technical Support
      P
      priapo
    • RE: Issue with Admin Panel since upgrade to 1.4.2

      @teh_g I think if you google something like nginx proxy escaping you can find solutions on stackexchange/stackoverflow so you can update your nginx config..

      posted in Technical Support
      P
      priapo
    • [SOLVED] Custom language in admin panel

      Hello, recently I finished the translation of the admin control panel files at transifex to my language (pt-BR). Is it possible to currently put that translation to work on my nodebb so I can fine tune/improve it?

      posted in NodeBB Development
      P
      priapo
    • RE: Issue with Admin Panel since upgrade to 1.4.2

      Please post your apache/nginx config (after hiding sensitive data). If you're using linux it should be at /etc/apache2/sites-avaliable or /etc/nginx/sites-avaliable.

      posted in Technical Support
      P
      priapo
    • RE: [SOLVED] Some pages on Admin CPanel not working on Apache Proxy

      It was solved; here is my working Apache's nodebb.conf:

      <VirtualHost *:80>
      
              ServerName thewizards.club
              Redirect permanent / https://thewizards.club
      
      </VirtualHost>
      
      <VirtualHost *:443>
      
              ServerName thewizards.club
      
              SSLEngine on
              SSLProtocol all -SSLv2
              SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM
      
              SSLCertificateFile /etc/apache2/ssl/thewizards-club/2_thewizards.club.crt
              SSLCertificateKeyFile /etc/apache2/ssl/server.key.insecure
              SSLCertificateChainFile /etc/apache2/ssl/thewizards-club/1_root_bundle.crt
      
      #       ServerAdmin webmaster@localhost
      
      
              <Proxy *>
                      Require all granted
              </Proxy>
      
              ProxyRequests off
              #ProxyVia on
              AllowEncodedSlashes On
      
      
              #ProxyPreserveHost on
              RequestHeader set X-Forwarded-Proto "https"
      
              RewriteEngine On
              RewriteCond %{REQUEST_URI}  ^/socket.io            [NC]
              RewriteCond %{QUERY_STRING} transport=websocket    [NC]
              RewriteRule /(.*)           ws://127.0.0.1:4567/$1 [P,NE,L]
              # NE flag == noescape
      
              ProxyPass        /socket.io http://127.0.0.1:4567/socket.io nocanon retry=0
              ProxyPassReverse /socket.io http://127.0.0.1:4567/socket.io
      
              ProxyPass / http://127.0.0.1:4567/ nocanon retry=0
              ProxyPassReverse / http://127.0.0.1:4567/
      
              ErrorLog /home/web/logs/apache/forum-error.log
              CustomLog /home/web/logs/apache/forum-access.log combined
      
      </VirtualHost>
      

      It was fixed it based on these resources:

      Apache ProxyPassReverse escaping special characters

      Apache ProxyPassReverse escaping special characters

      I have this very simple reverse proxy rule in Apache 2.2.19: ProxyPass /test http://other.local.machine/test ProxyPassReverse /test http://other.local.machine/test The problem is...

      can't get mod_proxy to correctly forward encoded slash (/) characters (%2f)

      can't get mod_proxy to correctly forward encoded slash (/) characters (%2f)

      I have a virtual host set up to redirect ntung-gitblit.localhost --> myserver:1279. However, it's not working with forward encoded slashes (%2f). The URL I'm trying to access is, http://ntung-gitb...

      posted in Technical Support
      P
      priapo
    • RE: Issue with Admin Panel since upgrade to 1.4.2

      It was solved; here is my working Apache's nodebb.conf:

      <VirtualHost *:80>
      
              ServerName thewizards.club
              Redirect permanent / https://thewizards.club
      
      </VirtualHost>
      
      <VirtualHost *:443>
      
              ServerName thewizards.club
      
              SSLEngine on
              SSLProtocol all -SSLv2
              SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM
      
              SSLCertificateFile /etc/apache2/ssl/thewizards-club/2_thewizards.club.crt
              SSLCertificateKeyFile /etc/apache2/ssl/server.key.insecure
              SSLCertificateChainFile /etc/apache2/ssl/thewizards-club/1_root_bundle.crt
      
      #       ServerAdmin webmaster@localhost
      
      
              <Proxy *>
                      Require all granted
              </Proxy>
      
              ProxyRequests off
              #ProxyVia on
              AllowEncodedSlashes On
      
      
              #ProxyPreserveHost on
              RequestHeader set X-Forwarded-Proto "https"
      
              RewriteEngine On
              RewriteCond %{REQUEST_URI}  ^/socket.io            [NC]
              RewriteCond %{QUERY_STRING} transport=websocket    [NC]
              RewriteRule /(.*)           ws://127.0.0.1:4567/$1 [P,NE,L]
              # NE flag == noescape
      
              ProxyPass        /socket.io http://127.0.0.1:4567/socket.io nocanon retry=0
              ProxyPassReverse /socket.io http://127.0.0.1:4567/socket.io
      
              ProxyPass / http://127.0.0.1:4567/ nocanon retry=0
              ProxyPassReverse / http://127.0.0.1:4567/
      
              ErrorLog /home/web/logs/apache/forum-error.log
              CustomLog /home/web/logs/apache/forum-access.log combined
      
      </VirtualHost>
      

      I fixed it based on these resources:

      Apache ProxyPassReverse escaping special characters

      Apache ProxyPassReverse escaping special characters

      I have this very simple reverse proxy rule in Apache 2.2.19: ProxyPass /test http://other.local.machine/test ProxyPassReverse /test http://other.local.machine/test The problem is...

      can't get mod_proxy to correctly forward encoded slash (/) characters (%2f)

      can't get mod_proxy to correctly forward encoded slash (/) characters (%2f)

      I have a virtual host set up to redirect ntung-gitblit.localhost --> myserver:1279. However, it's not working with forward encoded slashes (%2f). The URL I'm trying to access is, http://ntung-gitb...

      posted in Technical Support
      P
      priapo
    • RE: Issue with Admin Panel since upgrade to 1.4.2

      @PitaJ connecting direct it works..

      posted in Technical Support
      P
      priapo