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

  • Default (No Skin)
  • No Skin
Collapse
v3.5.1 Latest
Buy Hosting

[nodebb-widget-singlepost] Ever wanted to embed a post in a widget?

Scheduled Pinned Locked Moved NodeBB Plugins
6 Posts 4 Posters 2.1k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • jongarrisonJ Offline
    jongarrisonJ Offline
    jongarrison Plugin & Theme Dev
    wrote on last edited by
    #1

    I created this widget for a client that wanted to be able to manage some widget content on various pages as if it were a post. So I created this widget that allows you to embed a post by its ID number as a widget.

    You can use this to create fully custom static(ish) pages in conjunction with the plugin nodebb-plugin-custom-static-pages. And then you can manage that page as if it were a post with the familiar capabilities.

    To use this widget install the plugin via npm nodebb-widget-singlepost (https://www.npmjs.com/package/nodebb-widget-singlepost)

    WARNING: Feature. I wanted to have the general site content posts hidden in a category that users wouldn't normally see. The widget does not respect normal access privileges and will render any post that you tell it to, including posts that the user doesn't normally have access to. As far as I can tell, the widget params never touch the client and so this shouldn't be a security hole. If you think this is incorrect, please let me know.

    1 Reply Last reply
    4
  • bitspookB Offline
    bitspookB Offline
    bitspook Gamers
    wrote on last edited by
    #2

    Cool idea 🙂

    1 Reply Last reply
    1
  • exodoE Offline
    exodoE Offline
    exodo Plugin & Theme Dev
    wrote on last edited by
    #3

    Really cool

    1 Reply Last reply
    1
  • jongarrisonJ Offline
    jongarrisonJ Offline
    jongarrison Plugin & Theme Dev
    wrote on last edited by
    #4

    Thanks! 🙂

    1 Reply Last reply
    0
  • psychobunnyP Offline
    psychobunnyP Offline
    psychobunny
    wrote on last edited by
    #5

    This is nice. It can be used as a MoTD that users can reply to 🙂

    jongarrisonJ 1 Reply Last reply
    1
  • jongarrisonJ Offline
    jongarrisonJ Offline
    jongarrison Plugin & Theme Dev
    replied to psychobunny on last edited by
    #6

    @psychobunny It has options to show/hide the title and render the title as a link to the post itself. So, yeah you can let people go comment on it, or really just make it look like a static piece of content on the site.

    0_1447168085882_Screen Shot 2015-11-10 at 7.04.49 AM.png

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

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