Giter Club home page Giter Club logo

nodebb-plugin-dropbox-chooser's Introduction

nodebb-plugin-dropbox-chooser

NodeBB plugin that adds a button to Composer. This button allows the user to select a file from their dropbox account and add its link to the post.

Installation

  • Install this plugin via the "Plugins" page in the ACP
  • Then enable the plugin in NodeBB's Admin Control Panel in the Plugins tab.
  • Got Dropbox and create a dropin app and get the key.
  • In the ACP add the api key and create a template if you want.
  • Restart NodeBB

Configuration

  • Go to Dropbox, create a dropins app and get the key
  • Open NodeBB's Admin Control Panel
  • Click on the Dropbox Chooser item in the Plugins section
  • Enter the api key you got in step one
  • Optiionally create a template
  • Go to ACP - Apperance - Custom HTML & CSS
  • And in the Custom Header box enter (wish I knew how to avoid this bit)....
    <script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs"></script>
    The templating isnt the inbuilt stuff (dont know how/if I can use it yet), just something real simple. You can add the variables returned from the dropin wrapped in "{}"....
file = {

    // Name of the file.
    name: "filename.txt",

    // URL to access the file, which varies depending on the linkType specified when the
    // Chooser was triggered.
    link: "https://...",

    // Size of the file in bytes.
    bytes: 464,

    // URL to a 64x64px icon for the file based on the file's extension.
    icon: "https://...",

    // A thumbnail URL generated when the user selects images and videos.
    // If the user didn't select an image or video, no thumbnail will be included.
    thumbnailLink: "https://...?bounding_box=75&mode=fit",
};

For makdown this works good... [{name}]({link})

Credits

Although these people didnt directly add to this, their code was used to figure out what the hell I should be doing ;)
nodebb-plugin-emailer-local
Used to figure out how to do the admin page.
nodebb-plugin-code-button
How to create a button.
Retrieve setting value from the client side
How get settings from the server, from the client.

nodebb-plugin-dropbox-chooser's People

Contributors

paez avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.