New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nodebb-plugin-import-discuzx15

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodebb-plugin-import-discuzx15

a Discuz! X1.5 forum exporter to import-ready files

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

nodebb-plugin-import-discuzx15

a Discuz! X1.5 forum exporter to be required by nodebb-plugin-import.

What is this?

It's just an exporter of Discuz! X1.5, that provides an API that nodebb-plugin-import can use to exporter source forum data and import it to NodeBB's database. So, it's not really a conventional nodebb-plugin.

Why is it even a NodeBB plugin?

it doesn't really need to be, nor that you can use it within NodeBB it self, but, having this as a plugin have few benefits:

  • a nodebb- namespace, since you can't really use it for anything else
  • it can easily require NodeBB useful tools, currently

Usage within NodeJS only

// you don't have to do this, nodebb-plugin-import will require this plugin and use its api
// but if you want a run a test

var exporter = require('nodebb-plugin-import-');

exporter.testrun({
    dbhost: '127.0.0.1',
    dbport: 3306,
    dbname: 'ubb',
    dbuser: 'user',
    dbpass: 'password',

    tablePrefix: 'ubbt_'
}, function(err, results) {

    /*
        results[0] > config
        results[1] > [usersMap, usersArray]
        results[2] > [categoriesMap, categoriesArray]
        results[3] > [topicsMap, topicsArray]
        results[4] > [postsMap, postsArray]
    */
});

What does it export?

read carefully:

  • ####Users:

    • _username YES. UBB for some reason allows duplicate users with same emails? so the first ones by ID orders will be saved, the rest will be skipped. (UBB appends [username]_dup[Number] next to the dups.. so those will be skipped too if the email is already used)
    • _alternativeUsername YES. as the UBB.User.UserDisplayName, which nodebb-plugin-import will try to use if the username validation fails
    • _password NO. UBB uses MD5, NodeBB uses base64 I think, so can't do, but if you use nodebb-plugin-import it will generate random passwords and hand them to you so can email them.
    • _level (administrator and moderator) YES. Admins will stay Admins, and Moderators will stay Moderators, the catch here though is that each moderator is a moderator on ALL of the categories
    • _joindate YES, UBB uses Seconds, the exported will convert to Milliseconds
    • _website YES. if URL looks valid, it is exported, but it's not checked if 404s
    • _picture YES. if URL looks valid, it is exported, but it's not checked if 404s, if not valid, it's set to "" and NodeBB will generate a gravatar URl for the user
    • _reputation SORT-OF. assumed as the UBB.User.raking
    • _profileviews SORT-OF. assumed as the UBB.User.totalRanks I didn't find anything closer
    • _location YES. migrated as is, clear text
    • _signature YES. migrated as is (HTML -- read the Markdown note below)
    • _banned YES. it will stay banned, by username
    • Oh and UBB have a weird User with ID == 1, DONOTDELETE <= that's like the first user created, and somehow, in my UBB installation, it does own few topics and posts, this one will not be migrated, BUT nodebb-plugin-import will assigned these post to the to the NodeBB initial Admin created.
  • ####Categories (AKA Forums per UBB Speak):

    • _name YES
    • _description YES
  • ####Topics:

    • _cid (or its UBB category aka Forum id) YES (but if its parent Category is skipped, this topic gets skipped)
    • _uid (or its UBB user id) YES (but if its user is skipped, this topic gets skipped)
    • _title YES
    • _content (or the 'parent-post` content of this topic) YES (HTML - read the Markdown Note below)
    • _timestamp YES, UBB uses Seconds, the exporter will convert to Milliseconds
    • _pinned YES (0 or 1) (I don't know how many you can pin in NodeBB)
    • _viewcount YES
  • ####Posts:

    • _pid (or its UBB post id)
    • _tid (or its UBB parent topic id) YES (but if its parent topic is skipped, this post gets skipped)
    • _uid (or its UBB user id) YES (but if its user is skipped, this post is skipped)
    • _content YES (HTML - read the Markdown Note below)
    • _timestamp YES, UBB uses Seconds, the exporter will convert to Milliseconds

UBB Versions tested on:

  • UBB 7.5.7

Markdown note

read nodebb-plugin-import#markdown-note

It's an exporter, why does it have 'import' in its title

To keep the namespacing accurate, this exporter is designed to export data for nodebb-plugin-import only, also for a 1 time use, so why do you care.

Keywords

FAQs

Package last updated on 26 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc