Forgot?

How to Override NinjaBoard HTML, JS, CSS, and Images

Ben Hornedo on 30 August, 2010

ninjaboard-override-article-pic

This article gives a brief introduction on layout overrides, and explains the additional assets overrides support found in Ninjaboard.

All Joomla! 1.5 native components and modules supports something called template layout overrides.

Template layout overrides allow you to copy the files that generate the HTML in a component, into your template. The component will then use the files found in your template instead of its own.

There are times when you just want to load another image, change a little bit of css or customize a piece of javascript.

So you don't want or need to override an entire PHP file just for doing that.

Good news is that Ninjaboard supports overrides by path for all of its assets.

Every image, css file, js script and php layout can be overridden at your hearts content.

That includes front-end and back-end.

Template Layout Override

Ninjaboard:
/components/com_ninjaboard/views/person/tmpl/default.php
Your template:
/templates/yourtemplate/html/com_ninjaboard/person/default.php

Stylesheet Override

Ninjaboard:
/media/com_ninjaboard/css/site.form.css
Your template:
/templates/yourtemplate/css/com_ninjaboard/site.form.css

Javascript Override

Ninjaboard:
/media/com_ninjaboard/js/jquery/site.js
Your template:
/templates/yourtemplate/js/com_ninjaboard/jquery/site.js

Image Override

Ninjaboard:
/media/com_ninjaboard/images/forums/default.png
Your template:
/templates/yourtemplate/images/com_ninjaboard/forums/default.png

Thanks for reading! Download Ninjaboard now and give it a try.

Your Response

  • Hi Stian,

    Thanks a lot for this fine tutorial.
    Very handy and just what I needed.

    Greetings,
    John
    Reply
  • /templates/yourtemplate/css/com_ninjaboard/site.form.css
    This file doesn't exist, obviously i mean within my template directory, but it's still not there.

    Having quite a bit of trouble and getting kind of frustrated and curious why such an incomplete extension was released with so many inconsistent support topics.
    Reply
    • Hi ericwx,

      I'm sorry to hear you're having trouble with Ninjaboard. We have a support forum for Ninjaboard where you can get help with your issue. Don't wait till you get frustrated, because then you end up just being rude to the kind folks on our forum who've built some software and given it to you for free, and with unlimited free support to boot! :)

      > curious why such an incomplete extension was released with so many inconsistent support topics.

      I'm not quite sure what you mean by "inconsistent support topics", so I will ignore that and answer the first part... a piece of free software can be released at any time. It can be released as an idea, as an idea with some drawings, as some basic code, it can be released half-built, or 3/4 built, or completely built and ready. Or it could never be ready, as seen with Google products that are perpetually in beta.

      Coming back to Ninjaboard specifically, there are certainly some things lacking if you compare it to forum software like phpBB which has been in development 5yrs more than Ninjaboard has. However, the response from Ninjaboard users has been overwhelmingly positive, so we must be doing something right.

      Anyway, we would love your input on how to complete Ninjaboard. Just calling it an "incomplete extension" isn't really specific enough, and doesn't tell us what we could improve. Further, it sounds like you believe you have found a bug with the template override system. Please do consider helping the Ninjaboard community and development team by reporting this on our forum. We have had no other reports of template problems, and can't fix a problem that we don't know exists :)

      Cheers
      Reply
      • Hi ! First of all, thank you, ninjas, for all the good work you do !

        I have a small issue here. the forum works like a charm but the quickpanel module, when activated, cancel one of the nice "title pans" feature of my rocktettheme template (the thing that makes the first word of the title an other color). Any idea where I have to dig ? Is it related to template overriding ?

        Thanks again !
        Reply
        • Hi Nikos,

          Sorry to hear that. We provide support on the Ninjaboard Support forum. Log in and post your issue there, and someone will help you.

          When you do, please post a link to your forum, since this is new behaviour and seeing it on a live site will help us pinpoint the problem.

          Thanks
          Reply
  • /templates/yourtemplate/html/com_ninjaboard/person/default.php
    /templates/yourtemplate/css/com_ninjaboard/site.form.css
    /templates/yourtemplate/js/com_ninjaboard/jquery/site.js
    /templates/yourtemplate/images/com_ninjaboard/forums/default.png
    This files doesn't exist . ... and in Forum-menu (in Joomla)
    I don't have mootools (only forum, forums, messages, person, watches)

    so... the "Ninjaboard" on my site, is not working properly,
    www.sfinaki.info/forum2.html
    I think it is not consistent with the Greek language !!!
    When I log-in with Greek in Joomla is not appear many things settings
    Reply
    • Hi mitsos,

      Yes, those files don't exist by default of course. This blog post is about overrides, and it explains how to put those files there if you want to override the default behaviour.

      Your issue is completely unrelated to this, and I suggest you seek help on the Ninjaboard Support Forum ninjaforge.com/forum/54-ninjaboard

      Thanks for commenting :)
      Reply
  • I am having trouble getting the over-rides to work with the Morph Framework.

    Is there anything special one needs to do to make over-rides work with Morph (a pre nooku version)?
    Reply
    • Hi Daniel,

      Sorry to hear about your trouble with Ninjaboard+Nooku.

      Your best bet would be to ask on the Ninjaboard Support Forum, where John and Stian can help you.

      When you do post there, please mention exactly what problem you are having ie. do the overrides not get detected at all, or do you receive error messages?

      Thanks
      Reply

Your Response

Submit Comment
Home Blog How to Override NinjaBoard HTML, JS, CSS, and Images