• 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. yariplus
    • Profile
    • Following 1
    • Followers 34
    • Topics 14
    • Posts 1354
    • Best 512
    • Controversial 0
    • Groups 3

    yariplus

    @yariplus

    Community Rep

    Senior Splunk Engineer, Optiv Security Inc.

    842
    Reputation
    8691
    Profile views
    1354
    Posts
    34
    Followers
    1
    Following
    Joined Last Online
    Email [email protected] Location US Age 37

    yariplus Unfollow Follow
    Users with 50 posts Community Rep Global Moderator

    Best posts made by yariplus

    • [nodebb-plugin-newsletter] Send e-mail newsletters to your users.

      NodeBB Plugin Newsletter

      The newsletter plugin allows NodeBB forum administrators to send e-mail newsletters to all users or groups of users.

      Latest version v0.7.x is compatible with NodeBB v1.5.0 and up.

      Setup

      Before using this plugin you will need to install an emailer plugin. I recommend nodebb-plugin-emailer-mailgun, but any plugin with nodebb-plugin-emailer-* should work.

      Usage

      This plugin uses a WYSIWYG editor tinyMCE located within the admin panel plugins menu.

      Newsletters can be sent to multiple user groups. Options are also given for subscription overrides and blacklists.

      Users can unsubscribe from newsletters via the user settings menu. New users will automatically receive newsletters.

      In addition to using the WYSIWYG editor, admins can also send newsletters directly from the composer when creating a new topic.

      TODOs

      • Translations.
      • Emoji-Extended integration.
      • Save email templates.
      • Save previous newsletter stats and recipients.

      Fork Me on GitHub!

      posted in NodeBB Plugins
      yariplus
      yariplus
    • [nodebb-plugin-user-invitations] Allow users to invite new users!

      NodeBB User Invitations

      source: https://github.com/yariplus/nodebb-plugin-user-invitations
      This NodeBB plugin allows current users to send email invitations to potential new users.

      Sending Invitations

      Users can send invitations from the 'Invitations' page listed on their profile links menu.

      user profile menu

      Admins can also send invitations from the 'User Invitations' page in the ACP.

      admin link

      Configuration

      Admins can configure additional settings from the 'User Invitations' page in the ACP. All settings are saved automagically.

      Installation

      Install the plugin using the "Install Plugins" page in the ACP. The package name is nodebb-plugin-newuser-invitation

      Screenshots

      Additional info

      CC0 or MIT license.

      This project started as a fork of nodebb-plugin-newuser-approval by pichalite. I have since detached the fork because the plugins no longer have anything in common.

      posted in NodeBB Plugins
      yariplus
      yariplus
    • [nodebb-plugin-camo] Make embedded images look secure!

      [nodebb-plugin-camo] Make your embeded images look secure!

      nodebb-plugin-camo uses a Camo SSL image proxy to make insecure assets such as posted images look secure. By using Camo, users can post insecure (http) images, and Camo will prevent mixed content warnings on your secure NodeBB forum. This keeps your site secure and your visitors' SSL lock on!

      Configuring the plugin

      Before you are ready to use the plugin, you will to need create a camo subdomain, e.g., camo.domain.tld, and create an SSL certificate for that subdomain. This domain should point to the server IP your forum is located on, or the server IP where you have an existing standalone Camo Proxy. If you are using the internal Camo Proxy (recommended), you will also need to configure your webserver to direct requests to the port configured below in the Internal Camo Proxy settings.

      Plugin Settings

      alt text

      Camo Host
      Enter the full domain of your Camo Proxy.

      Camo Key
      Leave blank to generate a secure key if using the internal proxy OR enter the key for your standalone Camo proxy.

      URL Type
      Encoded Path will generate links with the original link encypted. Useful for hiding the source of linked images.
      Query String will leave source of linked images intact.

      Proxy https images
      Using this option in addition to Encoded Path will encrypt the original source for all linked images.

      Internal Camo Proxy

      alt text

      Using the internal proxy option will start a new process and run a Camo Proxy server on the selected port. This is the recommended option in most cases.

      NGINX Server Block

      alt text

      This section is a helpful utility that will generate correctly formatted NGINX server blocks required for using the Internal Camo Proxy.

      Issues
      Fork Me!

      posted in NodeBB Plugins
      yariplus
      yariplus
    • [nodebb-plugin-minecraft-integration] Minecraft Integration!

      ABANDONED

      I am putting this plugin on haitaus as I do not have time to maintain it and no idea if I ever will. You can contact me directly if there is a feature you need for your forum and I'll make a best effort to help you out. Cheers.



      .

      Minecraft Integration

      The Minecraft Integration project aims to reproduce and enhance widgets and features found on sites such as Enjin (XenForo-based) for use on a NodeBB forum.

      Compatible with NodeBB v1.5.0 and up.

      Requirements

      • At least one Minecraft server with:
        • The plugin nodebb-integration installed.
        • Java 8u101 or greater
        • Supported server versions include: Spigot/Paper, Forge, Sponge, GlowStone BungeeCord, Waterfall, RedisBungee, or PocketMine.
        • (K/Cauldron, MCPC+, and Thermos supported via the legacy jar and do not require Java 8)

      Setup

      After installing the plugin and restarting your NodeBB forum, go to the Plugins->Minecraft Integration page in the Admin control panel and add a new server.

      Copy the server's API key.

      On your Minecraft server console, enter the command /nodebb key {APIkey}

      The server will now connect to your forum and send it information every minute or when an event occurs.

      Server Configuration

      Server Name

      This name is used by the plugin to identify the server.

      Server Address

      This is the address users use in game to connect to the server.

      API Key

      This key is used to connect your Minecraft server to the forum.

      Widgets

      Server Status Widget

      Shows MOTD, min/max players, version, online player avatars, and other information about the Minecraft server. Displays everything in a pretty table. Custom rows can be added for things such as Mod Pack downloads, donation links, or any other html you wish to add.

      Server Status Widget Sample Image

      Mini Map Widget

      Displays a Dynmap or Overviewer mini-map with configurable start location. (World/MapType/Coordinate).

      Dynmap Mini Map Sample Image

      Online Players Graph Widget

      A graph showing the number of player on the server recently. (Last 30 pings)

      Online Players Graph Sample Image

      Online Players Grid Widget

      A grid of avatars of players currently on the server.

      Online Players Grid Sample Image

      Top Players List Widget

      Displays user avatars in a list representing the top players' approximate play time.

      Top Players List Sample Image

      Top Players Graph Widget

      A graphic chart (Pie) representing the top players' approximate play time.

      Top Players Graph Sample Image

      TPS Graph Widget

      A graph showing the servers' recent Ticks per Second.

      Chat Widget

      Show the in-game chat in a shoutbox-like widget. Send messages if your forum user is registered.

      Plugin API

      Other apps can read data the plugin has collected via it's API.

      Features in Development

      • Character Profiles - A mini profile for your character.
      • Gallery Widget - A selection of user-uploaded screen-shots.
      • Server Page - A page just for server data.
      • Directory Widget - Display notable character profiles.
      • Ping Graph Widget - Display recent server pings.
      posted in NodeBB Plugins
      yariplus
      yariplus
    • RE: Need a working example of grabbing post data

      Glad to help.

      Pretty simple to do those things. Here's a whole plugin. Put in as many comments as I could think of.

      library.js

      (function(module){
      	"use strict";
      
      	// The modules we need.
      	var User   = module.parent.require("./user");
      	var Topics = module.parent.require("./topics");
      	var nconf  = require('nconf');
      
      	var Plugin = {};
      
      	// This event is fired whenever a post is created. (reply or new topic)
      	Plugin.postSave = function (postData) {
      
      		// If you wanted to see what's inside use
      		// console.log(postData);
      
      		// Get the topic info...
      		// We only need the title and slug, so we use getTopicFields, but you could call getTopicData if you wanted all the topic fields.
      		Topics.getTopicFields(postData.tid, ['title', 'slug'], function (err, topicData) {
      
      			// If there is an error or missing data, bail out and log it.
      			if (err || !topicData.title || !topicData.slug) return console.log("Couldn't find topic data.");
      
      			// Save the data we need.
      			var topic = topicData.title;
      			var topicSlug = topicData.slug;
      			
      			// Get the user info...
      			// We only need the name, but again we could use getUserData if we wanted all fields.
      			User.getUserField(postData.uid, 'username', function (err, name) {
      
      				// If there is an error or missing data, bail out and log it.
      				if (err || !name) return console.log("Couldn't find username.");
      		
      				// Links always follow this same structure.
      				// the site url + "topic/" + the topic slug + "/" + the post id
      				var link = nconf.get('url') + "topic/" + topicSlug + "/" + postData.pid;
      
      				// Now do whatever we want with the data.
      				someCoolThing({
      					name: name,
      					topic: topic,
      					link: link
      				});
      			});
      		});
      	};
      
      	function someCoolThing(data) {
      		console.log("We get signal!!!");
      		console.log("Username: " + data.name);
      		console.log("Topic: " + data.topic);
      		console.log("Link: " + data.link);
      	}
      
      	module.exports = Plugin;
      
      }(module));
      

      Most of the nodebb modules follow the same 'get' structure.

      • getThingData() takes the Thing ID. Then returns an object with all fields.
      • getThingFields() takes the Thing ID and an array with the fields wanted. Then returns an object with the fields wanted.
      • getThingField() the Thing ID and a field name string. Then returns the field value.

      All of them return an Error object as the first parameter, which is null if no error occured.

      For completeness, here are the plugin.json and package.json:

      {
      	"id": "nodebb-plugin-test",
      	"name": "NodeBB Test",
      	"description": "Test",
      	"url": "https://github.com/yariplus/nodebb-plugin-test",
      	"library": "./library.js",
      	"hooks": [
      		{ "hook": "action:post.save", "method": "postSave" }
      	]
      }
      
      {
        "name": "nodebb-plugin-test",
        "version": "1.0.0"
      }
      

      If you have trouble with hooks:

      The 'action' hooks will typically return nothing or an object with the fields used to process that action.

      Ex.

            Plugin.someAction = function (someObject) {
                 console.log(someObject);
            }
      

      The 'filter' hooks will typically return an object and a callback function. You must call the callback function or bad things happen. The callback function typically needs an Error object (or null if no error) and the sent object as it's parameters.

      Ex.

            Plugin.someFilter = function (objectToFilter, callback) {
                 callback(null, objectToFilter);
            }
      
      posted in NodeBB Plugins
      yariplus
      yariplus
    • RE: How to change website HOME page ?

      Got this working.

      cathps.png

      Noticed a problem though. The Breadcrumb 'Home' always points to the root, when it should always point to the 'categories', IMO.

      posted in Technical Support
      yariplus
      yariplus
    • [nodebb-plugin-audio-control] Control audio playback

      NodeBB Plugin Audio Control

      A simple plugin that allows ACP control of an audio player. Uses an html5 audio shim (audio.js) for browser compatibility and socket.io to update client players in real-time without reloads.

      Compatible with NodeBB v0.7.0 (Backwards compatibility coming.).

      Fork on GitHub
      https://github.com/yariplus/nodebb-plugin-audio-control

      Installation

      Use npm from the command line in your NodeBB base directory:

      npm install nodebb-plugin-audio-control
      

      Usage

      1. After installation, go to the ACP and enable the plugin.
      2. Go to General=>Navigation, add a custom route to your navbar with an id of "navplayer" and a route of "#", then Save Changes.

      audnav.png

      1. Go to Installed Plugins=>Audio Control and set the Audio Source.


      audacp.png

      Example

      audex.png

      posted in NodeBB Plugins
      yariplus
      yariplus
    • RE: Custom Dialogue or Message Box (Modal Popup) in home page..

      Ahhhh, Why would you want to do something so evil!!

      Anyway, just call bootbox in the Custom HTML section of the ACP. (Make sure you check the box at the bottom.)

      <script>
      $(function(){
          bootbox.alert("Welcome");
      });
      </script>
      

      Bootbox docs for more info: http://bootboxjs.com/

      posted in General Discussion
      yariplus
      yariplus
    • [nodebb-plugin-rainbows] Add beautiful rainbows to your posts. Smile!

      Rainbows

      This was one of the first plugins I made for NodeBB. Just recently updated it for 0.7.x and prettied it up.

      Install

      Install the usual way, either using the ACP "Extend=>Plugins" page or using npm from your NodeBB home directory:

      npm i nodebb-plugin-rainbows
      

      Usage

      Surround text with "-= =-" to make rainbows.

      -=Rainbow Text=-

      Add options with parenthesis like so:

      -=(red,yellow,blue,range:3)Rainbow Text=-

      Options include:

      • Any CSS valid color
        • Adds that color to the spectrum used in the rainbow.
      • range:{number}
        • Repeats the spectrum after {number} characters, instead of stretching it over the whole text.
      • bg:{color}
        • Puts a background color {color} behind the text.
      • theme:{name}
        • Uses the theme {name} to make the rainbow. Themes are created in the ACP.

      Examples

      Normal Rainbows:

      -=Smile! With the power of smiles, the world becomes connected.=-

      Multi-line with options:

      -=(blue,lightblue,blue,range:12)If you can keep your head when all about you
      Are losing theirs and blaming it on you,
      If you can trust yourself when all men doubt you,
      But make allowance for their doubting too;=-

      Multi-line with theme and embed link:

      -=(theme:flutter)Here is a video in the middle of the rainbow
      https://youtu.be/ukCYa6BbyYA
      and the rainbow continues after...=-

      ACP and Themes

      Themes are controlled inside the fancy ACP page (With awesome colored nav!!😞

      Fork me!!

      https://github.com/yariplus/nodebb-plugin-rainbows

      posted in NodeBB Plugins
      yariplus
      yariplus
    • RE: how modify user profle page with a response in a plugin

      Adding new divs and things can be difficult, because you can't be sure of the specific theme the forum is using. The best way to add custom profile information is to create a custom route using a custom template with the information you want, and then add a link to that page into the user profile page using the filter:user.profileLinks hook. This adds a link with an icon to the dropdown in the user's profile page. In the custom template you are making, you can make it look like part of the profile page by using <!-- IMPORT partials/account/header.tpl --> near the start of your template.

      The object structure for the hook looks like this:

      Plugin.profileLinks = function (links, next) {
      	links.push({
      		id: 'minecraft',	// This is the html id added for styling with css.
      		public: true,		// Set this to false and the link will only
      							// appear if the user is viewing their own profile.
      		route: 'minecraft',	// Added to the route below.
      		icon: 'fa-cube',	// FontAwesome icon displayed next to the link.
      		name: 'Minecraft Profile' // Text displayed for the link.
      	});
      	next(null, links);
      };
      

      Your custom routes should look similar to this:

      router.get('/api/user/:user/minecraft', renderMinecraftProfile);
      router.get('/user/:user/minecraft', NodeBB.middleware.buildHeader, renderMinecraftProfile);
      

      This is the best way to add information to the profile page since it will work flawlessly(TM) with any theme.

      If you actually want to change the main profile page using a plugin, there's two basic ways I know of.

      On the client, using jQuery. Or on the server, by directly appending the template file and using the filter:user.account hook.

      Use jQuery by adding the ajaxify hook to your client script, checking that the right page has loaded.

      $(function(){
        $(window).on('action:ajaxify.contentLoaded', function(event, data) {
          if (data.tpl === "account/profile") {
             // Add your jQuery here.
             $('.account-stats').after('<div class="cool">Your cool new div.</div>');
             // You could get variables here by calling a socket method.
          }
        });
      });
      

      If you're having difficulty in making jQuery insert data where you want it, there are many good tutorials, and the jQuery docs are quite robust.

      Another more risky way to add data is by manually modifying the template. I use this method in my minecraft plugin, and I actually copied it from another plugin I can't remeber the name of. It works good for any information that you only need to get once per page load, since it renders all the information before the page gets to the browser, and you don't have to mess with socket calls to add data.

      In your plugins library file, (in the gloabl scope, not in your init function) I call the emitter like this.

      var fs = require('fs');
      var path = require('path');
      var nconf = require.main.require('nconf');
      var emitter = require.main.require('./src/emitter');
      
      emitter.once('nodebb:ready', function (callback) {
      	callback = callback || function() {};
      
      	var	tplPath = path.join(nconf.get('base_dir'), 'public/templates/account/profile.tpl');
      
      	fs.readFile(tplPath, function(err, tpl) {
      		if (err) { return callback(err); }
      
      		tpl = tpl.toString();
      
      		if (!tpl.match('{prefix}'))
      		{
      			if (tpl.match('<!-- IF fullname -->{fullname}<!-- ELSE -->{username}<!-- ENDIF fullname -->')) {
      				// Persona
      				tpl = tpl.replace('<!-- IF fullname -->{fullname}<!-- ELSE -->{username}<!-- ENDIF fullname -->', '{prefix}');
      			}else{
      				// Vanilla/Lavender
      				tpl = tpl.replace('<i component="user/status" class="fa fa-circle status {status}" title="[[global:{status}]]"></i>', '<span class="h4">{prefix}</span><br><i component="user/status" class="fa fa-circle status {status}" title="[[global:{status}]]"></i>');
      			}
      		}
      
      		fs.writeFile(tplPath, tpl, callback);
      	});
      });
      

      I add the variable {prefix} in the filter:user.account hook.

      Plugin.userAccount = function (data, callback) {
      	getPrefix(data.userData.uid, function (err, prefix) {
      		data.userData.prefix = prefix || "";
      		callback(null, data);
      	});
      }
      

      This works fantastic for me, but as you can tell, it's super-dependent on specific themes.

      Hope that helps.

      posted in NodeBB Plugins
      yariplus
      yariplus

    Latest posts made by yariplus

    • RE: New install of 1.19.5 error

      0.10.1 should fix I think.

      posted in Technical Support
      yariplus
      yariplus
    • RE: [nodebb-plugin-featured-topics-extended] Feature Topics in a News/Blog page and Widgets.

      @phenomlab Sorry for that! I'm in the middle of updating everything for v2.0.

      What version of NodeBB are you running?

      posted in NodeBB Plugins
      yariplus
      yariplus
    • RE: 20i FOSS awards - Why no NodeBB ?

      They had more money. 🙂

      posted in General Discussion
      yariplus
      yariplus
    • RE: 2.0 Compatible Plugins

      @baris oooooooh I see now. 🙂

      posted in NodeBB Plugins
      yariplus
      yariplus
    • RE: 2.0 Compatible Plugins

      @baris having the same issue with bootbox.

      I can call it globally, but it says that's deprecated.

      posted in NodeBB Plugins
      yariplus
      yariplus
    • RE: 2.0 Compatible Plugins

      @baris Thanks, just parsing a template, so app.parseAndTranslate worked.

      posted in NodeBB Plugins
      yariplus
      yariplus
    • RE: 2.0 Compatible Plugins

      app.require('benchpress')

      Error: Cannot find module './benchpress'

      posted in NodeBB Plugins
      yariplus
      yariplus
    • RE: 2.0 Compatible Plugins

      Is there a branch we can test against?

      posted in NodeBB Plugins
      yariplus
      yariplus
    • RE: 2.0 Compatible Plugins

      @julian

      Not really a breaking change (yet), but the module definitions in plugin.json are kinda, odd...

      I would expect the key to be the module name, but it's actually the filename. That makes sense in RJS world, where the file name needs to end in .js, but not so much in plugin.json world. You end up with this weirdness:
      https://github.com/NodeBB/NodeBB/blob/master/src/meta/js.js#L90-L113

      Where you could just use the module name and add the .js in the build step:
      https://github.com/NodeBB/NodeBB/blob/master/src/meta/js.js#L178

      destPath: path.join(__dirname, '../../build/public/src/modules', relPath + ".js"),

      It would make this more readable too since both the json and js would use the string 'jquery'.

      Using Third-Party Libraries - NodeBB Documentation

      Yes, I am very nit-picky. 🙂

      posted in NodeBB Plugins
      yariplus
      yariplus
    • RE: 2.0 Compatible Plugins

      @phit You got it boss!

      posted in NodeBB Plugins
      yariplus
      yariplus

    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