Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • yasmagic Friend
    #154236

    I want to add a custom JavaScript code before </head> and </body> of the website. Where can I put the code?

    Laura Rubino Friend
    #355220

    Go to layouts folder in the template/blocks and add it to the head.php

    yasmagic Friend
    #355227

    Thanks. I have already seen it. Here is the issue:

    1) Whatever I put in blocks/header.php doesn’t appear above </head> tag.
    2) Whatever I put in blocks/footer.php doesn’t appeat above </body> tag. It is appearing above </div></body> and so my Cometchat integration appears within the footer <div> tags, and disappears when I scroll up.

    There needs to be a solution for this.

    Laura Rubino Friend
    #355228

    i said head.php not header.php These are two different files. Add your javascript code below the css in head.php

    yasmagic Friend
    #355266

    Strange. I don’t see head.php file there.


    1. jasocial
    Laura Rubino Friend
    #355270

    check the plugins folder.

    Fabio Capogna Friend
    #355440

    Hello everyone I’m also using the template JA-social and can not find where to insert the code for the proper functioning of CometChat, if anyone has solved the problem and can help me thank you.

    Ciao a tutti anche io sto utilizzando il template JA-Social e non trovo dove inserire il codice per il corretto funzionamento di CometChat, se qualcuno ha risolto il problema e mi può aiutare grazie mille

    lpeet01 Friend
    #355446

    Try this 😉

    This works when the user logs in it will show the chat bar, when user logs out bar goes away.

    plugins/system/jat3/base-themes/default/blocks/head.php

    top of head.php
    <script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js”></script>
    <script>jqcc=jQuery.noConflict(true);</script>

    bottom of head.php
    <?php
    $my =& JFactory::getUser();
    if (!empty($my->id)) {
    ?>
    <!– CometChat Footer Code Start –>
    <link type=”text/css” rel=”stylesheet” media=”all” href=”/cometchat/cometchatcss.php” charset=”utf-8″ />
    <script type=”text/javascript” src=”/cometchat/cometchatjs.php” charset=”utf-8″></script>
    <!– CometChat Footer Code End –>
    <?php
    }
    ?>

    Fabio Capogna Friend
    #355449

    tank tank tank tank tank tank perfect veryyyyy goooddddd tanksssss

Viewing 9 posts - 1 through 9 (of 9 total)

This topic contains 9 replies, has 4 voices, and was last updated by  Fabio Capogna 14 years, 1 month ago.

We moved to new unified forum. Please post all new support queries in our New Forum