Thank you Andreas! It works now. Apparently the curly brackets in the js interfere with the brackets from Smarty. 

Kind regards,
Bas


2010/2/5 Andreas Goetz <cpuidle@gmx.de>
Check the smarty docs- you need to escape your js using {literal} as I seem to remember.

Best regards,
Andreas



On 05.02.2010 00:10, Bas de Vleeschhouwer wrote:
Hi, I have a website where I use VideoDB, and I want to use Google Analytics (GA) to track my visitors. I created the code via the GA admin panel, and tried to install it in the template file (footer.tpl). As this has worked before with my Statcounter code, I assumed it works too with this GA code, but it doesn't. If I add this code, the page breaks off at the end and thus misses the footer. If I view the source code in my browser, the page doesn't contain the HTML of the footer. Can anyone help me with this? Thanks in advance! My install of VideoDB is located at www.n0cturne.nl/video and the test with GA is at www.n0cturne.nl/video/test. I use the modified elegant-template, and this is how my footer.tpl looks like:

{*
  This is the footer which is displayed on bottom of every page
  $Id: footer.tpl,v 1.4 2008/01/08 08:56:16 andig2 Exp $
*}

<!-- {$smarty.template} -->

<div id="footer">

    <div id="footerimage">
        {if $pdf}
            <a href="{$pdf}export=pdf&amp;ext=.pdf"><img src="images/pdfexport.png" /></a>
        {/if}
        {if $xls}
            <a href="{$xls}export=xls&amp;ext=.xls"><img src="images/xlsexport.png" /></a>
        {/if}
        {if $xml}
            <a href="{$xml}export=xml" target="_blank"><img src="images/xmlexport.png" /></a>
        {/if}
        {if $rss}
            <a href="{$rss}export=rss" target="_blank"><img src="images/rssexport.png" /></a>
        {/if}
    </div>

    <div id="footerversion">
        <a href="http://www.splitbrain.org/go/videodb">v{$version|strip|replace:"_":"."}</a>
    </div>

    <div id="footerpages">
        <a href="#top"><img src="images/top.gif" alt=""/></a>

        {if $pageno && $maxpageno}
            {if $pageno != 1}<a href="?pageno={$pageno-1}">&#171;</a>{/if}
            Page {$pageno} of {$maxpageno}
            {if $pageno != $maxpageno}<a href="?pageno={$pageno+1}">&#187;</a>{/if}
            &nbsp;
            {$totalresults} {$lang.records}.
        {/if}
        {if $number && !$totalresults}
            <span id="count">{$number}</span> {$lang.displayed}.
        {/if}
    </div>
{*
    {if $loggedin}<span> {$lang.loggedinas} {$loggedin}</span>{/if}
*}
</div>
<!-- /footer -->

</div>
<!-- /container -->

{$DEBUG}

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-12846595-1");
pageTracker._trackPageview();
} catch(err) {}</script>
</body>
</html>
------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com
_______________________________________________ videodb-devel mailing list videodb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/videodb-devel

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
videodb-devel mailing list
videodb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/videodb-devel