Changes to Lavender theme - few issues.

Moved NodeBB Development
  • HI guys, I really like the Lavender theme, so have decided to modify it. One issue I'm having is with embeds appearing on the forum home page. I have the soundcloud embed tool active on a forum where people post mixes.

    In home.tpl file:


    The issue I'm having is that the embed is adding it's own paragraph tags. This causes the rest of the thread (the tracklisting) to fall outside of the paragraph tags inside home.tpl, and as such the max-height class associate with .post-preview p {} doesn't apply, I've looked in the soundcloud plugin, and it only adds the iframe from what I can see, so something else must be adding the paragraph tags.

    In addition, is there anyway to actually have the soundcloud widget embed on this homescreen, rather than just showing the URL? 🙂 Or any other alternatives?

  • The paragraph tags probably come from the markdown plugin -- the order in which the post.parse filter is applied:

    1. Markdown
    2. Embed plugins

    So markdown sees the raw url, and adds <p> tags around it, and then the embed plugin turns it into the <iframe... code.

    If it's bleeding through the container, have you tried setting wmode on the container to opaque? Not sure if that would do it...

  • Hey @julian

    I can confirm it is something in the essentials plugins pack that's causing it. I've tried a few changes, but nothing I've done has helped. Everything after the embedded iframe falls outside of p tags, so I can't do anything with it.

    From what I can work out, my options are to either stop the markdown from wrapping the raw URL in <p> tags. Or I add {categories.slug} to the div class and create a custom css rule for the mixes recent posts to not show the preview on the homepage. 2nd option sounds easy enough, but the 1st would be preferred.

    I should really learn markdown. I'm struggling to do anything. 😆 I'm so used to BBcode coming from SMF.

  • Can you post a screenshot of what happens when you try embedding video on a home page?

  • HI @julian,

    I have attached the screenshot below, the mixes category is the one that's causing me issues. I have also included the raw HTML below so you can see how it's affecting the p tags. General discussion is how it should look. Ideally with the soundcloud embedded. But that's another issue I can deal with later.

Suggested Topics

  • 0 Votes
    3 Posts

    @julian Thank you for the quick response!

  • 0 Votes
    3 Posts

    You could try this in the custom JS:

    if ( === '/') { document.title = 'Welcome | NodeBB'; }
  • 0 Votes
    1 Posts


    I'm a completely new developer in NodeBB and I have started developing a custom theme with Vanilla as base theme but I have two main doubts that are probably linked.

    First of all, I would like to modify the default value of "Custom Class" attribute in theme configuration related with category view.

    Admin > Manage > Category Settings:

    0_1483372017464_Screen Shot 2017-01-02 at 16.40.55.png

    But I think it's not theme related but global variable related.
    Anyone can help me to find out where those values are coming from and how can I change the default behaviour?

    The second one is also related. I would like to add a new custom field in the config screen:

    0_1483372227886_Screen Shot 2017-01-02 at 16.40.45.png

    Similar to the "Category Image" one, but with other name, in order to use it as category background image for instance...

    I really appreciate your help!


  • 2 Votes
    17 Posts

    I correctly assumed (and this has been validated through actual plugin upgrades) that the latest hash in npm points to the most recently published version, and not the highest version.

    That is, given your plugin nodebb-plugin-example

    If v1.0.0 is compatible with v0.5.4 If v1.1.0 is compatible only with v0.6.0 The latter is published first A user typing npm install nodebb-plugin-example will receive v1.0.0 of the plugin, irrespective of what NodeBB version he/she is running, even though v1.1.0 is technically newer

    Now, special note: The NodeBB Package Manager doesn't do this. When the ACP calls nbbpm to request a suggested package, we query npm for the plugin data, and sort the versions before checking compatibility, so this issue is moot.

  • 0 Votes
    13 Posts

    I believe he published it, or at least uploaded it to github... should ask him.... @trevor ?