How to change custom user variables?

Plugin Development

Suggested Topics


  • 1 Votes
    2 Posts
    101 Views

    I was able to achieve the desired functionality by adding a custom "Share" button to the template for the private topics. This button triggers the move to predesignated categories based on the type of post.
    Cheers

  • 0 Votes
    2 Posts
    113 Views

    Update:

    Was able to sort this with a client script.
    Example usage:
    plugin.json -> { "hook": "filter:navigation.available", "method": "addNavigation" }
    plugin.json -> "scripts": [ "static/lib/client-script.js",... ],

    library.js addNavigation:
    append the following to the hookData object:

    { route: '<some route>', title: <some title>, id: 'unread-count', iconClass: '<some icon> custom-class-name', text: <some title> }

    client-script.js:
    $("#unread-count .custom-class-name").attr("data-content",<unread count>)

  • 0 Votes
    1 Posts
    138 Views

    Hi all!
    I was wondering if there's a simple way to add my custom fields (from the ns-custom-fields plugin) to the regular edit.tpl. I'm making a private forum aimed at professionals and would really love it if I could have everything in one place.

    What I'm currently looking to add is Company, Title and possible some more in the future.

    An idea I have is to just put them in the available form and then using the custom-fields "API" in the backend (on save) to store them separately.

    Any ideas are welcome.

    Sorry to tag you (@Nicolas, the creator) but I believe you can answer this question quite easily.

    Thanks!

  • Users skins

    Plugin Development
    0 Votes
    2 Posts
    1k Views

    You might be able to use config.bootswatchSkin

  • 0 Votes
    3 Posts
    2k Views

    For anyone looking to do this for a plugin, it's easy enough using getObjectValues()

    var db = require.main.require('./src/database') var User = require.main.require('./src/user') db.getObjectValues('steamid:uid', function (err, uids) { if (err) return console.log(err) uids = uids.sort().filter(function(item, pos, ary) { return !pos || item != ary[pos - 1] }) User.getUsersFields(uids, ['username', 'email', 'steamid', 'profileurl'], function (err, users) { if (err) return console.log(err) users.forEach(function (user) { // Do a thing here. console.dir(user) }) }) })