Posts with widgets

Unsolved Plugin Development

Suggested Topics


  • 6 Votes
    3 Posts
    779 Views

    @kadmy , sure: upload the file controls.png from the plugin folder \node_modules\bxslider\dist into NodeBB assets. The file looks like the bitmap below.

    controls.png
    Then change the LESS to

    .my-wrapper { box-shadow: none; border: none; .bx-prev { background: url(/assets/uploads/controls.png) no-repeat 0px -32px; } .bx-next { background: url(/assets/uploads/controls.png) no-repeat -43px -32px; } }

    This file contains the standard bxSlider. But you can use any other icon. Just upload it or point to the url of your preference.

    Please update to v0.1.2 for more fixes.

  • 0 Votes
    1 Posts
    227 Views

    Hello, I modified the post.tpl to my liking and added some more elements and stuff.

    When I use composer to make a new post in a topic, it works just fine, I get the post.tpl I modified, but when I try to edit any of the posts in the topic, it looks like the default post.tpl file.

    What am I doing wrong here?

  • 0 Votes
    3 Posts
    2k Views

    @baris thanks. I realised there's some issues with redactor munging the data.
    When code is insered inside a <pre/> block, switching between HTML and WYSIWYG views will munge the content to HTML entitites.
    You can recreate this issue on this page:
    http://imperavi.com/redactor/examples/typography/

    Switch to code view and add some HTML inside the <pre/> block. I entered:
    <p>test</p>
    Switch to WYSIWYG and back to code and it has been replaced by:

    &lt;p&gt;test&lt;/p&gt;

    This breaks the ability to parse that code later with syntax highlighters.

    I've raised it with Imperavi.

  • 0 Votes
    5 Posts
    3k Views

    I just removed nodebb-theme-rocket and now the widgets are working. It seems like there was some kind of problem with that theme which screwed up the whole thing. Wierd.

  • 0 Votes
    2 Posts
    2k Views

    Depends, if you're doing largely front-end code (like embedding an iFrame to some chat application) then a widget works best. If you want to modify the API or save things into the database, then a plugin is right for you.

    I think your best bet is to figure out what you need to do, and then find a plugin that does something similar, and modify that plugin, or take code from it (it's open source afterall ;))