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

Community

Z

zethon

@zethon
About
Posts
15
Topics
3
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

    RE: Restricting a single user from a category
  • Z zethon

    Well, phooey.

    What would be a good way (Mongo statement, I suppose) to add every user to a group?


  • RE: Restricting a single user from a category
  • Z zethon

    @yariplus said in Restricting a single user from a category:

    Couldn't the user just create a new account?

    fyi, this could be done with a simple plugin.

    Of course, but that is not the point. The admin could have closed registration but would still be required to add/remove every single user to/from a group.


  • Restricting a single user from a category
  • Z zethon

    There seems to be no easy way to restrict a single user from a single category.

    For example, say I have "General" category that I want everyone to have access to, even new users, but I want "UserX" to only have read-only access to it. It seems the only way to accomplish this would be to create group for EVERYONE on the board EXCEPT UserX. This, of course, would also mean manually adding new users to this group as well.

    Is there a better way to do this?


  • RE: Avoiding the post_bar.tpl after the first post
  • Z zethon

    Another interesting quirk I've realized this morning. We use pagination (since most of us can't stand infinite scrolling) and with my changes, the post-bar only shows at the top of the first page. If I navigate to page 2 (or higher) of the same thread, the post-bar only shows on the bottom. Thoughts?


  • RE: Avoiding the post_bar.tpl after the first post
  • Z zethon

    Ok, just for my own understanding, the <div class="post-bar"> element has two functions (so to speak):

    • first it defines the elements in that div, "post-bar" (ie. any child elements it may have) and then
    • second it displays them in the place they're being defined

    Then later on if you need to display the items again you can just use: <div class="post-bar-placeholder"></div> instead of duplicating the code.

    Does this sound about right?


  • RE: Avoiding the post_bar.tpl after the first post
  • Z zethon

    @pichalite I've forked the persona theme and am working with my own copy here: https://github.com/zethon/nodebb-theme-persona

    You can see post_bar.tpl here: https://github.com/zethon/nodebb-theme-persona/blob/master/templates/partials/post_bar.tpl

    I've removed the tags, but they still show. My "OMG" comment to verify that my changes are live appears in the page's source.


  • RE: Avoiding the post_bar.tpl after the first post
  • Z zethon

    Are the tags hardcoded into the post-bar? I tried removing them from the post_bar.tpl (and added them to the bottom of topic.tpl, right above the include for post_bar.tpl) but they still show at the top post_bar (which is in the place I want it, now).


  • RE: Avoiding the post_bar.tpl after the first post
  • Z zethon

    @pichalite said in Avoiding the post_bar.tpl after the first post:

    @zethon if you want it to work until core is fixed... replace these two lines https://github.com/NodeBB/NodeBB/blob/master/public/src/client/topic/posts.js#L350-L351

    with this...

    $('.post-bar-placeholder').replaceWith($('.post-bar').clone());
    

    That did the trick. Thank you!


  • RE: Avoiding the post_bar.tpl after the first post
  • Z zethon

    I've updated to master and modified the topic.tpl accordingly, however the bar hasn't moved!

    I've changed my .tpl to look like:

    0_1467755092137_upload-68f1c7fe-c65f-4877-ac3a-d37e103938e6

    And this is even reflected in the page's source...

    0_1467755155432_upload-d70f0b64-59b3-4802-a6ff-1ccb749a3282

    However, the menu still gets rendered in the same place:

    0_1467755260640_upload-d2316725-f1ba-4430-a355-1875f7a5aeaf

    (I blocked out some text, so this screenshot may look odd.)
    Suggestions?


  • RE: Avoiding the post_bar.tpl after the first post
  • Z zethon

    If I want to use the HEAD from master, would it be enough to update the nodebb-theme-persona version in package.json?


  • RE: Avoiding the post_bar.tpl after the first post
  • Z zethon

    Ahh.. looks like I can't just clone and replace what was there. I get dependencies errors and what-not.


  • RE: Avoiding the post_bar.tpl after the first post
  • Z zethon

    Interesting. My topic.tpl looks different.

    When I installed I did the import I did the steps that said to checkout 1.0.0, do the upgrade and then checkout of 1.x.x. Could this be why my Persona theme looks different than what's on github? Should I just reclone the theme into /node_modules/templates (obviously losing any changes I've made)?


  • Avoiding the post_bar.tpl after the first post
  • Z zethon

    I've looked through the template system (of the default theme) and I don't see how to change it so that the post_bar.tpl is not printed at the bottom of the first post. Ideally I would like to move that bar to the top of the first post, or remove it altogether.

    Is this functionality hardcoded? Or is there somewhere in the template system I'm missing?


  • RE: Deleting all User Signatures
  • Z zethon

    @baris Thank you. I'm pretty new to Mongo and after a little tinkering I figured out I had to run the following to get it work correctly:

    db.objects.update({_key: {$regex: /^user:\d+$/}}, {$set: {"signature": ""}}, {multi: true});


  • Deleting all User Signatures
  • Z zethon

    Using NodeBB or Mongo's CLI, what would be the best way to delete all user signatures?

  • Login

  • Don't have an account? Register

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

  • Don't have an account? Register

  • Login or register to search.