Uutiset:

Wondering if this will always be free?  See why free is better.

Main Menu
Advertisement:

Inserting a quantcast script tag

Aloittaja swampy, helmikuu 26, 2009, 11:43:28 AP

« edellinen - seuraava »

swampy

Inserting a quantcast script tag

How would I go about inserting a Quantcast script take in the default theme please?

Thanks in advance.

karlbenson

Themes/default/index.template.php

(note if your script includes any single quotes, they will need escaping with a backslash to avoid a template parse error)

eg
' becomes \'

swampy

so how would I do that with this?

<script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script>
<script type="text/javascript">_qacct="p-afC_K6yY-mbos";quantserve();</script>
<noscript>
<a href="http://www.quantcast.com/p-afC_K6yY-mbos" target="_blank"><img src="http://pixel.quantserve.com/pixel/p-afC_K6yY-mbos.gif" style="display: none;" border="0" height="1" width="1" alt="Quantcast"/></a>
</noscript>

karlbenson

that that doesn't use any single quotes, so just add it in somewhere in index.template.php

it might need to be echoed as php

echo '{codehere}';

swampy

call me brain dead, all I ti is the following!

Template Parse Error!
There was a problem loading the /Themes/default/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

swampy

Would someone be kind enough to format this and tell me where to edit it into the index.template.php.  I have tried several times and juist keep screwing it up.

Much thanks in advance

<script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script>
<script type="text/javascript">_qacct="p-afC_K6yY-mbos";quantserve();</script>
<noscript>
<a href="http://www.quantcast.com/p-afC_K6yY-mbos" target="_blank"><img src="http://pixel.quantserve.com/pixel/p-afC_K6yY-mbos.gif" style="display: none;" border="0" height="1" width="1" alt="Quantcast"/></a>
</noscript>

JimM

Did you try inserting the code right before the </body> tag  in /Themes/default/index.template.php?
Jim "JimM" Moore
Former Support Specialist

Advertisement: