[nodebb-plugin-storj-upload] Storj Upload

NodeBB Plugins

Suggested Topics


  • 5 Votes
    1 Posts
    146 Views

    Hi everybody 🌴

    Today I show you how to make a sticky brand header and avatars in Harmony.

    preview

    Step-by-step

    We need modify 6 files: library.js, harmony.json, theme.tpl, harmony.tpl, brand.tpl, post.tpl to add 3 new settings:

    Sticky avatars (user avatars in the posts) Sticky header (brand header) Setting to show sticky header on mobile devices

    First we add a new settings in library.js

    Paste this code after this line stickyAvatars: 'on', stickyHeader: 'off', stickyHeaderMobile: 'off', Paste this code after this line config.stickyAvatars = config.stickyAvatars === 'on'; config.stickyHeader = config.stickyHeader === 'on'; config.stickyHeaderMobile = config.stickyHeaderMobile === 'on';

    Now we need add translation for the new settings in harmony.json

    Paste this code after this line "settings.stickyAvatars": "Sticky user avatars in posts", "settings.stickyHeader": "Sticky header on desktop", "settings.stickyHeaderMobile": "Show sticky header on mobile",

    Next step, create controls of new settings in ACP and user profile in harmony.tpl and theme.tpl

    Paste this code after this line in harmony.tpl <div class="form-check form-switch"> <input type="checkbox" class="form-check-input" id="stickyAvatars" name="stickyAvatars" /> <label for="stickyAvatars" class="form-check-label">settings.stickyAvatars</label> </div> <div class="form-check form-switch"> <input type="checkbox" class="form-check-input" id="stickyHeader" name="stickyHeader" /> <label for="stickyHeader" class="form-check-label">settings.stickyHeader</label> </div> <div class="form-check form-switch"> <input type="checkbox" class="form-check-input" id="stickyHeaderMobile" name="stickyHeaderMobile" /> <label for="stickyHeaderMobile" class="form-check-label">settings.stickyHeaderMobile</label> </div> Paste this code after this line in theme.tpl <div class="form-check mb-3"> <input class="form-check-input" type="checkbox" id="stickyAvatars" name="stickyAvatars" {{{ if config.theme.stickyAvatars }}}checked{{{ end }}}> <label class="form-check-label" for="stickyAvatars">settings.stickyAvatars</label> </div> <div class="form-check mb-3"> <input class="form-check-input" type="checkbox" id="stickyHeader" name="stickyHeader" {{{ if config.theme.stickyHeader }}}checked{{{ end }}}> <label class="form-check-label" for="stickyHeader">settings.stickyHeader</label> </div> <div class="form-check mb-3"> <input class="form-check-input" type="checkbox" id="stickyHeaderMobile" name="stickyHeaderMobile" {{{ if config.theme.stickyHeaderMobile }}}checked{{{ end }}}> <label class="form-check-label" for="stickyHeaderMobile">settings.stickyHeaderMobile</label> </div>

    The finally we modify a theme files post.tpl and brand.tpl

    Replace the code in this line with a new code in post.tpl <div class="icon py-1 bg-body d-none d-sm-block {{{ if config.theme.stickyAvatars }}}position-sticky{{{end}}}" {{{ if config.theme.stickyAvatars }}}style="top:7.5rem;"{{{end}}}> Replace the code in this line with a new code in brand.tpl <div class="container px-md-4 brand-container {{{ if config.theme.stickyHeaderMobile }}}sticky-top{{{end}}} {{{ if config.theme.stickyHeader }}}sticky-lg-top bg-body pt-3{{{end}}}" {{{ if config.theme.stickyHeader }}}style="margin-top:-1rem;"{{{end}}}>

    /.nodebb build

    🖖 Happy Dev

  • 8 Votes
    3 Posts
    362 Views

    🍍 New Release: 1.0.4

    Feat

    New syntax for create a custom buttons

    [btn=URL=ICON]TITLE[/btn]

    [btn=https://example.com=fa-solid fa-star]Download[/btn]

    Custom Buttons.png

    All custom buttons have a name class (button title), so you can set custom style, for example:

    /* style for Download btn */ a[name="Download"] { border-radius: 1rem; background-color: #373737; color: white; padding: 1rem; font-size: 1.20rem; border: 2px solid #6c757d !important; } /* color icon */ a[name="Download"] > i { color: red !important; }
  • 0 Votes
    4 Posts
    417 Views

    @raj-0 Can you show me an example of the call you are making, using curl? That would be the easiest way for me to debug

  • 11 Votes
    92 Posts
    12k Views

    Published a new version(2.1.6) of this plugin for NodeBB 3.3.0

    Changes:

    Update acp with the new design Add chat message reactions Ability to toggle reaction support on posts/chats from the ACP Optimized loading of data, tooltips are only created if you mouseover a reaction instead of loading every single user who reacted on page load.
  • 4 Votes
    6 Posts
    2k Views

    @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