It seems that (at least at the time of writing), there isn't support of Google AdSense within Joomla Kunena Forum, which I find strange since this was supported in FireBoard forums. Anyway, for those of you who want Google AdSense in their Kunena forum, here is how. 

    • Go to Components > Kunena Forum > Kunena Configuration and find the name of the template you are using
    • kunenatemplate.jpg
    • You will now need to change the view.php file. Using FTP software, or anything else which you use to edit Joomla files, find the view.php of the template you are using (MAKE A BACKUP OF THE FILE, in case something goes wrong and you need to get the original file!)

    e.g. /components/com_kunena/template/defualt/view.php

    If you are not using the default template, you will need to change /components/com_kunena/template/{TEMPLATE_NAME_HERE}/view.php to the name of the template you are using 

    • Find the following code:

                                    if (file_exists(KUNENA_ABSTMPLTPATH .                                  '/message.php')) {
                                        include (KUNENA_ABSTMPLTPATH .                                      '/message.php');
                                    else {
                                        include (KUNENA_ABSPATH . 




    and replace and insert your Google AdSense code include also the if ($mmm == 1) { and the end } bracket. You need to add an echo '{adsense code line}' to each line. You can also add a div align=center to center the AdSense code. Your end result should look similar to the following:


     if (file_exists(KUNENA_ABSTMPLTPATH . '/message.php')) {
                                        include (KUNENA_ABSTMPLTPATH . '/message.php');
                                    else {
                                        include (KUNENA_ABSPATH . '/template/default/message.php'); 
                         if ( $mmm == 1 ) {                       
                         echo '<div align="center">'."\n";
                                    echo '<script type="text/javascript"><!--' . "\n";
                                    echo 'google_ad_client = "pub-2218323024863973";' . "\n";
                                    echo '/* 468x60, DCForums */' . "\n";
                                    echo 'google_ad_slot = "0489013212";' . "\n";
                                    echo 'google_ad_width = 468;' . "\n";
                                    echo 'google_ad_height = 60;'. "\n";
                                    echo '//-->'. "\n";
                                    echo '</script>' . "\n";
                                    echo '<script type="text/javascript"' . "\n";
                                    echo 'src="">'. "\n";
                                    echo '</script>' . "\n";
                                    echo '</div>'."\n";

    That's basically it!


    One more thing... Did you know that people who share useful stuff like this post look AWESOME too? ;-)
    Please leave a useful comment with your thoughts, then share this on your Facebook group(s) who would find this useful and let's reap the benefits together. Thank you for sharing and being nice!

    Featured On

    Inc Magazine Logo  

    Sitepoint logo  

    CSS Tricks logo   

    webdesignerdepot logo   WPMU DEV logo   

    and many more!

    Where are we hosted?

    This site is proudly powered by FAST VPS InMotion Servers and given an insane speed thanks to MaxCDN!

    Web Hosting MaxCDN - Speed up your website

    New! DIVI 3.1 WordPress Template + PageBuilder

    You'll surely create a perfect website with Divi 3.1!

    Get an exclusive 10% OFF for CollectiveRay visitors until

    Divi 3


    WordPress Elementor Sale

    Themes for the most popular WordPress page builder from TemplateMonster!

    We've got an exclusive 10% OFF for CollectiveRay visitor until - use Coupon Code: collectiveray

    TemplateMonster Elementor sale


    TemplateMonster Bundles

    Awesome bundles for awesome websites. $1300 worth of products for $49 only!

    We've got an exclusive 10% OFF for CollectiveRay visitors until - use Coupon Code: collectiveray

    TemplateMonster Bundles

    How to make your website FAST!

    Step-by-step - free email course, how to make your website load in less than 1 second 

    The Outstanding HungryJPEG Bundles

    AWESOMENESS! Bundles of premium font + graphic packs at more than 96% OFF!  Get a bundle for just $9 - ONLY!

    The Hungry JPEG Awesome font bundles


    Advertise on

    CollectiveRay (formerly known as DART Creations) is interested in developing partnerships with mutual benefit. If you like the stuff we publish and would like to develop a relationship, we'd be happy to hear from you. Go on - drop us a line - we'd love to hear from you :-)



    Disclosure: CollectiveRay is funded personally out of pure passion for helping people working with websites. We do however generate some income through recommendations of products. This means if you click on a link and purchase an item we link to, we will receive a small sum out of that sale. We usually partner with vendors to make your purchase cheaper than buying direct.

    Popular Content

    Joomla extensions to take your website to the NEXT level

    Is your Joomla website reaching its full potential? We install many of these extensions on almost ALL of our Joomla sites - why don't you check them out our list of Joomla Extensions and see whether you can take your site to the next level?

    who are we?

    CollectiveRay is run by David Attard - working in and around the web design niche for more than 12 years, we provide actionable tips for people who work with and on websites. We also run - a website for drone hobbyists.

    David attard

    Follow us on Social

    Follow us on Facebook   Follow us on Google+   Subscribe to our RSS Feed   Follow us on Twitter