Roundcube Community Forum

Release Support => Requests => Topic started by: worm75011 on July 07, 2013, 06:52:51 AM

Title: awstats : awstats_misc_tracker.js integraztion in roundcube ?
Post by: worm75011 on July 07, 2013, 06:52:51 AM
Hello

I don't know if is in this category to post my request ...

I try to integrate the js named awstats_misc_tracker.js of awstats ( http://www.awstats.org/ || http://www.awstats.org/docs/awstats_config.html ) in roundcube
when i see my apache log i see :
93.19.10.50 - - [07/Jul/2013:12:34:32 +0200] "GET /program/js/awstats_misc_tracker.js HTTP/1.1" 200 3140 "https://webmail.leworm.eu/?_task=mail" "Mozilla/5.0 (X11; Linux x86_64; rv:22.0) Gecko/20100101 Firefox/22.0"

i put the js in DocumentRoot/program/js
i put <script language=javascript src="../../../program/js/awstats_misc_tracker.js"></script> in DocumentRoot/skins/larry/includes/header.html

in a site who is working :
"GET /js/awstats_misc_tracker.js?screen=640x360&win=980x439&cdi=32&java=true&shk=n&svg=y&fla=n&rp=n&mov=n&wma=n&pdf=n&uid=awsuser_id1369966688447r2340&sid=awssession_id1373192601965r5087 HTTP/1.1" 304 196 "http://other.site.com/" "Mozilla/5.0 (Linux; Android 4.1.2; GT-N7100 Build/JZO54K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.90 Mobile Safari/537.36"

it's seem the js is not executed

have you a idea?
thx

philippe
Title: Re: awstats : awstats_misc_tracker.js integraztion in roundcube ?
Post by: SKaero on July 07, 2013, 02:19:53 PM
I'm not familiar with the awstats_misc_tracker.js but it might help if you posted where you included it. Also is there anything in the JS console?
Title: Re: awstats : awstats_misc_tracker.js integraztion in roundcube ?
Post by: worm75011 on July 07, 2013, 02:47:30 PM
Thank you SKaero,

i put the js file in DocumentRoot/program/js/ :
 =>ls program/js/
app.js      awstats_misc_tracker.js  common.js.src  googiespell.js      jquery.min.js  list.js      tiny_mce
app.js.src  common.js                editor.js      googiespell.js.src  jstz.min.js    list.js.src

i put the line in ocumentRoot/skins/larry/includes/header.html in the first line :
<script language=javascript src="../../../program/js/awstats_misc_tracker.js"></script>

<script language=javascript src="../../../program/js/awstats_misc_tracker.js"></script>                                                 
<div id="header">
<div id="topline">
    <div class="topleft">
        <roundcube:container name="topline-left" id="topline-left" />
        <roundcube:button name="about" type="link" label="about" class="about-link" onclick="UI.show_about(this);return false" />
        <roundcube:if condition="config:support_url" />
        <a href="<roundcube:var name='config:support_url' />" target="_blank" class="support-link" id="supportlink"><roundcube:label name="support" /></a>

my tree aborescence in roundcube in attachment



Title: Re: awstats : awstats_misc_tracker.js integraztion in roundcube ?
Post by: SKaero on July 07, 2013, 02:56:50 PM
Well technically your path to the js file is wrong, even though the file header file is in <RC root>/skins/larry/includes/ once processed (when you load a page) its at <RC root> so the path should be "program/js/awstats_misc_tracker.js". That said I see from your earlier post that the server is saying it loaded it fine but I'm not sure why. Can you verify that the correct js file is actually being loaded?
Title: Re: awstats : awstats_misc_tracker.js integraztion in roundcube ?
Post by: worm75011 on July 08, 2013, 02:35:18 AM
Hello

I think it s loaded because in apache log i have :
62.210.161.232 - - [08/Jul/2013:08:24:53 +0200] "GET /program/js/awstats_misc_tracker.js HTTP/1.1" 200 3204 "https://webmail.leworm.eu/?_task=mail" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36"

but where i must put it? in the same directory ? : <RC root>/skins/larry/includes/

thank you for your help

philippe
Title: Re: awstats : awstats_misc_tracker.js integraztion in roundcube ?
Post by: SKaero on July 09, 2013, 01:53:29 AM
Check if the file is being loaded using Chrome's inspector or similar tool, not just relying on the response code.
Title: Re: awstats : awstats_misc_tracker.js integraztion in roundcube ?
Post by: worm75011 on July 09, 2013, 12:54:37 PM
i see in chrome :
<script language="javascript" src="skins/larry/includes/awstats_misc_tracker.js?s=1373265438"></script>

in the r'esponse i see the awstats script network / response) :

98 requests  ❘  452.44KB transferred  ❘  11.1min (onload: 1.23s, DOMContentLoaded: 1.19s)
awstats_misc_tracker.js
/skins/larry/includes
GET
200
OK
application/javascript
/?_task=mail:27
Parser
3.07KB
7.32KB
235ms
235ms


this.add_message_row(22296,{"subject":"Topic reply: awstats : awstats_misc_tracker.js integraztion in roundcube ?","fromto":"<span class=\"adr\"><span title=\"no-reply@roundcubeforum.net\" class=\"rcmContactAddress\">Roundcube Community Forum<\/span><\/span>","date":"Aujourd'hui 07:53","size":"4 ko"},{"seen":1,"nonjunk":1,"ctype":"multipart\/alternative","mbox":"INBOX"},false);
Title: Re: awstats : awstats_misc_tracker.js integraztion in roundcube ?
Post by: SKaero on July 09, 2013, 01:17:54 PM
So its not loading the js file, since its trying to load it from <RC root>/skins/larry/includes/
Title: Re: awstats : awstats_misc_tracker.js integraztion in roundcube ?
Post by: worm75011 on July 09, 2013, 01:22:15 PM
oh sorry i change when you say :
'
Well technically your path to the js file is wrong, even though the file header file is in <RC root>/skins/larry/includes/ once processed (when you load a page) its at <RC root> so the path should be "program/js/awstats_misc_tracker.js". That said I see from your earlier post that the server is saying it loaded it fine but I'm not sure why. Can you verify that the correct js file is actually being loaded?
'
i put all in skins/larry/includes/ :
 =>ls skins/larry/includes/
awstats_misc_tracker.js  footer.html  header.html  links.html  mailtoolbar.html  settingstabs.html

sorry again i forget to say you the change.
Title: Re: awstats : awstats_misc_tracker.js integraztion in roundcube ?
Post by: SKaero on July 10, 2013, 06:26:41 PM
Well then it should be loading it, is there anything in the JS console?
Title: [resolved] Re: awstats : awstats_misc_tracker.js integraztion in roundcube ?
Post by: worm75011 on July 18, 2013, 02:47:37 PM
hello
sorry for my long silience

result is better with include it in footer.
we can close the topic