Skip to content

Topic voting plugin

Plugin Requests
2 2 2.2k 1
  • We are considering using your software for a few schoolfriends. We have checked the plugins you offer and compared with other software and you come very close to what we need. The only thing we can not find and what is decisive for us is a plugin that allows users to vote on a topic like that on reddit. Are there plans to release this plugin in the future or is that not possible with your software?

    the problem is that we do not have money because we are 14 and 15 years old and have little knowledge to write a plugin ourselves. Our budget currently amounts to exactly 128 euros. We do not know if that is sufficient for this plugin if it has to be written.

    If it does not work with our budget, can you give advice on what else we can try?

    Greetings Bram, Nina & Marco

  • I believe this is possible with some minor theme changes.

    Prior discussion:


Suggested Topics


  • 8 Votes
    54 Posts
    26k Views
    <baris>B
    Published 1.1.0, update for nodebb 3.2.0 and up, also got rid of some warning messages on startup.
  • 0 Votes
    1 Posts
    1k Views
    dogsD
    This is just a little snippet. This is about the question How can I add custom data to a post? a small tutorial How to add custom data permanently to a post It will be saved into the object: You need the following hook: { "hook": "filter:post.create", "method": "postCreate" } This hook is fired, when a Post is created. So it contains RAW Data. A filter:hook like "hook": "filter:post.create" can be edited before beeing proceeded. plugin.postCreate = function(data, callback){ // Edit data here callback(null, data); } You can access all Data you can work with via the data object. All those filter-hooks needs callbacks. The callback contains the modified / added / removed data. Whats inside the data object? The data object contains two main objects. this.post this.data post: { pid: 259, uid: 2, tid: 111, content: '### This is just a little snippet.', timestamp: 1617150411838 }, data: { uuid: '7277s31-6d23-43sa-1284-ad27e42yx879', title: 'How to add custom data to post serverside - in a nutshell', content: '### This is just a little snippet.', thumb: '', cid: '2', tags: [], uid: 2, req: { [...] }, timestamp: 1617150411838, fromQueue: false, tid: 111, ip: '111.123.2123.21', isMain: true } } With all the data you can work with. But only this.post is directly effected (lol) to the post Object. If you add data here. It will be attached to the post forever and you can access it any time. Even after plugin disable. So now add custom data: plugin.postCreate = function(data, callback){ // adds data **PERMANENT** to post // before any other procession -> RAW DATA (markdown) //data.post.myData = "directly effected to post you can work with it in next step"; //data.data.myData = "other data for other things I don't know"; var myData = {}; myData.name = "Schmock"; myData.signature = "raz0rn"; // Stick myData to post object data.post.myData = myData; // Debug? // console.log("POST CREATE", data); // finish the process() - passes on modified data callback(null, data); } So myData has added to post: post: { pid: 259, uid: 2, tid: 111, content: '### This is just a little snippet.', timestamp: 1617150411838, myData: { name = "Schmock", signature = "raz0rn", } } The data is stored. Everybody is happy. [image: tenor.gif] How to add dynamic data before render a post in template It wont be saved to the object. You can use this for dynamic things or logic before rendering the page.: You need the following hook: { "hook": "filter:topics.addPostData", "method": "addPostData" } This hook is fired before engine renders the template. It also needs a callback because its a filter-hook. plugin.addPostData = function(data, callback){ // modify data temporarily before it gets passed on to next step callback(null, data); } Same thing as above. Only the hook is different. And the data we are changing is temporarily. Data contains all data we can use for the dynamicness lol: . plugin.addPostData = function(data, callback){ // You can work with pre-parsed and already saved data .... // or put in something very flexible without saving to db like jquery-like dynamic etc etc // Debug? // console.log("addPostData?", data) var _posts = data.posts; _posts.forEach(function(post){ if(post.myData){ // add data to post if "myData" is there post.content = "THIS POST HAS MY OWN DATA -> CONTENT IS OVERWRITTEN"; } // this here affects all posts post.user.signature = "Ihr seid alle Schmocks!"; }); // Overwrite data and pass modified data on to the template engine data.posts = _posts; callback(null, data); } Now you can work with posts like a boss. [image: 1617153057423-bildschirmfoto-2021-03-31-um-03.10.32.png] [image: tenor.gif] Thanks and bye Important Note: Remind, that myData is available via API. https://nodebb.development.fail/api/topic/114/new-post returns your added data "content": "THIS POST AS MY OWN DATA -> CONTENT IS OVERWRITTEN", "myData": { "name": "Schmock", "signature": "raz0rn" }
  • 0 Votes
    1 Posts
    943 Views
    F
    We use NodeBB 3+ years at https://chatrooms.talkwithstranger.com and some more sites and love NodeBB. We use NodeBB also as a CMS containing English definitions on a dictionary. Our users are loving it. but we are struggling in increasing our Google rankings as all our competitors are using AMP pages to outrank us. We would need an official Google AMP plugin that would enable any node bb topic page , like the 1 I'll post my topic on, to have an alternative Accelerated Mobile Page. https://amp.dev/ Since when each topic will have a corresponding AMP version then it will help us rank much more easily in Google SEO search results and increase our rankings. With this plugin, our users can help us discover our sites and node bb itself site much more easily because Google ranks AMP pages better and higher over normal html pages. Please see all top news sites and forum sites use AMP https://www-searchenginejournal-com.cdn.ampproject.org/v/s/www.searchenginejournal.com/google-amp-ranking-factor/157785/amp/?amp_js_v=a2&amp_gsa=1&usqp=mq331AQFKAGwASA%3D#aoh=15897444560799&referrer=https%3A%2F%2Fwww.google.com&amp_tf=From %251%24s&ampshare=https%3A%2F%2Fwww.searchenginejournal.com%2Fgoogle-amp-ranking-factor%2F157785%2F This will help users coming from mobile to load much more faster giving a better and faster UX. Any node bb devs or any one else willing to take this, please reply or pm me. @Global-Moderators @Staff Thanks
  • Video Plugin

    Plugin Requests
    1
    1 Votes
    1 Posts
    2k Views
    V
    Does anyone know of a plugin to embed uploaded videos? I enabled file uploads on my forum, but they just show up as links. Would like an embedded video player. Tried the plugin search, but the 2 it found did not work.
  • Reputation plugin

    Plugin Requests
    7
    0 Votes
    7 Posts
    4k Views
    julianJ
    Well, @pichalite made the reactions plugin, perhaps that's closer?

Looks like your connection to NodeBB Community was lost, please wait while we try to reconnect.