• Members 20 posts
    May 22, 2017, 3:29 a.m.

    Rafal-- I've tried this and while I can get Misago to recognize and use theme/templates/misago/base.html successfully, I can't get it to recognize the /theme/templates/threadslist/base.html. Which, btw you called "/theme/templates/threads" above?

    Any pointers would be great! Thanks!

  • May 22, 2017, 10:01 a.m.

    Try with /theme/templates/misago/threadslist/base.html. This is because all Misago's templates live under the misago directory to don't conflict with eventual 3rd party templates from other django apps installed.

    That's entirely possible. Misago's codebase is quite spacious, and its tricky to remember it all right ;)

  • Members 20 posts
    May 22, 2017, 2:28 p.m.

    Sorry Rafalp-- I actually mean to say I tried /theme/templates/misago/threadslist/base.html and it doesn't recognize it. But, it still recognizes changes to /theme/templates/misago/base.html and other files in that directory .. but not the subdirs from there.

  • May 22, 2017, 2:36 p.m.

    That would suggest a bug in Django's template loader, and thats super unlikely.

    There are two possibilities remaining:

    1. You are changing something that gets replaced by the JavaScript UI.
    2. You are changing something that gets replaced by inheriting template.

    But its hard to tell without seeing the change.

  • Members 20 posts
    May 22, 2017, 5:44 p.m.

    Here is the change, it's quite simple. Not sure why it's not being recognized since /theme/templates/misago/base.html has changes that are being picked up.

    <div class="page-header">
      <div class="container">
        <div id="threads-header-bg" style="background-image: url(/static/misago/img/logo-bg.png); background-repeat: no-repeat; background-position: 272px -76px; background-size: 640px 360px;"></div>
        <div class="row">
    

    Seems pretty straight forward.

  • May 22, 2017, 5:46 p.m.

    Test it with JavaScript disabled, and you should see your change.

    The thing is, becuase this html is within <div id="page-mount">, it gets overwriten by HTML generated by Misago's JavaScript UI.

    Only theme customizations within page-mount that can be done are via CSS, or forking and customizing JS.

  • Members 20 posts
    May 30, 2017, 10:43 p.m.

    So doing something like adding a new option on the navbar's user-menu would have to be done via customized JS. There is no template you can modify without forking and modifying JS, eh? :*(

  • May 30, 2017, 10:48 p.m.

    You can have dynamic UI via doing it in JS, or static pages with interactivity done by boatloads of fragile jQuery, magic css classes and data- attributes. The former is more reasonable IMHO.

  • May 30, 2017, 10:54 p.m.

    As for forking and modifying JS to add options to user-menu, I would like to eventually support plugin system in Misago's JS to save folk from having to do that, but that's distant future for now.

    If I may ask, what option are you trying to add?

  • Members 20 posts
    May 31, 2017, 12:40 a.m.

    I've got an app that provides for auth integration with Valve's Steam platform. Having a link on the user menu to manage which steam accounts you have linked to your forum account is what I'm after. Would rather not have in on the main nav (which I can modify with the templates).

  • May 31, 2017, 10:28 p.m.

    Thinking about it, it's likely that solution for pains of "forking the frontend" would be forking it and installing babel plugin that would let you override the imports with custom modules. That way you could define your own module in custom directory... or in future setup build script in a way that behaves like Django, and comes with empty directory that you could drop overriding modules in if you so wish.

  • Members 20 posts
    June 1, 2017, 3:17 a.m.

    That would be nice.