1 (edited by hoang83vu 2011-12-22 06:47)

Topic: How to add a <stript> into the forum?

Hi, for example I have a link like this:

<script src="http://www.example.com/script.js"></script>

All I want is to add this script to my forum either in header or footer. Usually I look inside the HTML code and put it there; however, I could not find it. I guess because I do not understand the structure. Please help me how to do this the proper way.


Re: How to add a <stript> into the forum?

You can add a .js to the header via an extension....

<extension engine="1.0">
    <title>Javascript Caller</title>
    <description>Calling the javascript</description>

            <hook id="hd_head" priority="4"><![CDATA[
            $forum_head['javascript_caller'] = '<script type="text/javascript" src="'.$ext_info['url'].'/myscript.js"></script>';

Also look at in /include/template/main.tpl

Re: How to add a <stript> into the forum?

Thank you for the response, but can you please be more specific where I should put the code into? Much appreciate.

Re: How to add a <stript> into the forum?

I have found it, but I am not sure if it is the right way of doing it. I go into footer.php and use