<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>bellafaith graphic &#38; web design studio &#187; techie geek code stuff</title>
	<atom:link href="http://www.bellafaithdesign.com/category/techie-geek-code-stuff/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bellafaithdesign.com</link>
	<description></description>
	<lastBuildDate>Thu, 02 Feb 2012 04:35:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Quantcast Badge Code Fix From A Nerd</title>
		<link>http://www.bellafaithdesign.com/2011/08/quantcast-badge-code-fix-from-a-nerd/</link>
		<comments>http://www.bellafaithdesign.com/2011/08/quantcast-badge-code-fix-from-a-nerd/#comments</comments>
		<pubDate>Mon, 15 Aug 2011 23:23:14 +0000</pubDate>
		<dc:creator>Kayla</dc:creator>
				<category><![CDATA[ramblings, recommendations & miscellany]]></category>
		<category><![CDATA[techie geek code stuff]]></category>
		<category><![CDATA[Quantcast badge]]></category>

		<guid isPermaLink="false">http://www.bellafaithdesign.com/?p=1354</guid>
		<description><![CDATA[Are you trying to add the Quantcast badge code to your website, but having problems getting it to show up for you? Then read this post for the solution, if you can make it through my nerd tech talk. I&#8217;m a nerd. There, I&#8217;ve declared it to the world. No, I don&#8217;t wear glasses with [...]]]></description>
			<content:encoded><![CDATA[<p></p><div style="margin:0px 0px 0px 0px" id="linksalpha_tag_1596881766" class="linksalpha-email-button" data-url="http://www.bellafaithdesign.com/2011/08/quantcast-badge-code-fix-from-a-nerd/" data-text="Quantcast Badge Code Fix From A Nerd" data-desc="Are you trying to add the Quantcast badge code to your website, but having problems getting it to show up for you? Then read this post for the solution, if you can make it through my nerd tech talk.


I'm a nerd. There, I've declared it to the world. No, I don't wear glasses with tape in the middle, or even have a pocket protector. {Now a pocket projector - that would be cool. Something you could carry in your pocket - or purse - that would project movies onto any solid surface. That would ro" data-image="http://www.bellafaithdesign.com/wp-content/uploads/2011/08/kayla-nerd.png" data-site="bellafaith graphic &amp; web design studio"></div><script type="text/javascript" src="http://www.linksalpha.com/social/loader?script_type=buttons_counters&tag_id=linksalpha_tag_1596881766&link=http%3A%2F%2Fwww.bellafaithdesign.com%2F2011%2F08%2Fquantcast-badge-code-fix-from-a-nerd%2F&gplus=1&twitter=1&fbsend=1&linkedin=1&gbuzz=0&tumblr=0&reddit=0&pinterest=1&digg=0&stumbleupon=1&gpluslang=en-US&twitterlang=en&fbsendlang=en_US&gbuzzlang=en&twittermention=bellafaith&twitterrelated1=bellafaith&twitterrelated2=&halign=center"></script><div style="margin:5px 0px 5px 0px" id="linksalpha_tag_1521029944" class="linksalpha-email-button" data-url="http://www.bellafaithdesign.com/2011/08/quantcast-badge-code-fix-from-a-nerd/" data-text="Quantcast Badge Code Fix From A Nerd" data-desc="Are you trying to add the Quantcast badge code to your website, but having problems getting it to show up for you? Then read this post for the solution, if you can make it through my nerd tech talk.


I'm a nerd. There, I've declared it to the world. No, I don't wear glasses with tape in the middle, or even have a pocket protector. {Now a pocket projector - that would be cool. Something you could carry in your pocket - or purse - that would project movies onto any solid surface. That would ro" data-image="http://www.bellafaithdesign.com/wp-content/uploads/2011/08/kayla-nerd.png" data-site="bellafaith graphic &amp; web design studio"></div><script type="text/javascript" src="http://www.linksalpha.com/social/loader?script_type=buttons_counters&tag_id=linksalpha_tag_1521029944&link=http%3A%2F%2Fwww.bellafaithdesign.com%2F2011%2F08%2Fquantcast-badge-code-fix-from-a-nerd%2F&gplus=0&twitter=0&fblike=0&linkedin=0&gbuzz=0&tumblr=0&reddit=0&pinterest=0&digg=0&stumbleupon=0&gpluslang=en-US&twitterlang=en&fblikelang=en_US&gbuzzlang=en&fblikeverb=like&fblikefont=arial&fblikeref=linksalpha&gplusctr=1&twitterctr=1&linkedinctr=1&gbuzzctr=1&redditctr=1&pinterestctr=1&diggctr=1&stumbleuponctr=1&twittermention=bellafaith&twitterrelated1=bellafaith&twitterrelated2=&halign=center"></script><p><strong>Are you trying to add the Quantcast badge code to your website, but having problems getting it to show up for you?</strong> Then read this post for the solution, <em>if you can make it through my nerd tech talk</em>.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-1378 noborder" title="kayla-nerd" src="http://www.bellafaithdesign.com/wp-content/uploads/2011/08/kayla-nerd.png" alt="I am a nerd" width="250" height="237" /></p>
<p>I&#8217;m a nerd. There, I&#8217;ve declared it to the world. No, I don&#8217;t wear glasses with tape in the middle, or even have a pocket protector. {Now a pocket projector &#8211; that would be cool. Something you could carry in your pocket &#8211; or purse &#8211; that would project movies onto any solid surface. That would rock my world. I&#8217;m sure something similar exists, but I digress.}</p>
<p>In school, my subjects were math &amp; science. It wasn&#8217;t that they were my favorite subjects, but I &#8220;got&#8221; them. They just made sense to me. I couldn&#8217;t teach and explain math to others {trust me, I tried tutoring &amp; failed}, but somehow I knew the answers. On my ACT, I got a 34 in the Science section. And that excited me. See? Told ya, I&#8217;m a nerd.</p>
<p>So why do I share this with you? Because one of my favorite things to do is troubleshoot. And if you want to know why I like troubleshooting so much, the reason is because I&#8217;m a nerd.</p>
<p>Yesterday, I had a colleague email that she was having trouble getting the <a href="http://www.quantcast.com/learning-center/guides/creating-a-customized-badge/">Quantcast badge</a> to appear on her site &amp; wanted to know if I could take a look. If you don&#8217;t know, <a href="http://www.quantcast.com">Quantcast</a> provides audience measurements by collecting data from your site&#8217;s visitors, and then gives you a breakdown of your visitors&#8217; demographics.</p>
<p><a href="http://www.quantcast.com">Quantcast</a> provides different badges you can display on your site with some information on your visitors (like how many visit each month). It&#8217;s supposed to be a simple copy &amp; paste job. You copy the HTML code that Quantcast provides you &amp; then paste it into your site. And the simple badges work just like that. However, there are a couple customizable badges with Sparkline, and the HTML code from Quantcast was not working for those. Instead of displaying the badge, it was showing an iframe of the Quantcast website with the Quantcast logo, slogan &amp; a big rectangle link that said &#8220;Home&#8221; in it:</p>
<div id="attachment_1356" class="wp-caption aligncenter" style="width: 174px">
	<img class="size-full wp-image-1356" title="quantcast-instead-of-widget" src="http://www.bellafaithdesign.com/wp-content/uploads/2011/08/quantcast-instead-of-widget.png" alt="Quantcast logo instead of widget" width="174" height="106" />
	<p class="wp-caption-text">So, where&#39;s the widget?</p>
</div>
<p>So, I went to my first place to look for a solution → Google. Surprisingly, I wasn&#8217;t able to find any fixes. So, I started troubleshooting. I won&#8217;t bore you with the details of what didn&#8217;t work &amp; how I came up with the solution. All that matters is that there is a fix. I&#8217;m sharing it here in case anybody else is having this problem &amp; goes searching for an answer. The problem was in the source (src) link in the HTML iframe code provided by Quantcast.</p>
<p><em>{Please note that every time you see <strong>yourdomain.com</strong> in the following code examples, this should be replaced with the domain of the site for which you are wanting to display audience metrics.}</em></p>
<p>The default widget code for US People per month with Sparkline is:
<pre class="brush: xml; title: ; notranslate">
&lt;iframe src=&quot;http://widget.quantcast.com/yourdomain.com/9&quot; frameborder=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; scrolling=&quot;no&quot; width=&quot;160&quot; height=&quot;120&quot;&gt;&lt;/iframe&gt;
</pre>
<p>The code above will display the right widget. The widgets with Sparkline allow you to set some custom variables for the widget&#8217;s display, and this is where it gets tricky.</p>
<p>To show the number of visitors per month, for the previous 90 days, the code from Quantcast looks like this: {note: this is what is not working}
<pre class="brush: xml; title: ; notranslate">
&lt;iframe src=&quot;http://widget.quantcast.com/yourdomain.com/9&amp;timeWidth=30&amp;daysOfData=90&quot; frameborder=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; scrolling=&quot;no&quot; width=&quot;160&quot; height=&quot;120&quot;&gt;&lt;/iframe&gt;
</pre>
<p>Notice that the difference between this code and the one above it {that works} is the src url. The customized widget adds the following to the end of the widget url:
<pre class="brush: xml; title: ; notranslate">
&amp;timeWidth=30&amp;daysOfData=90
</pre>
<p>This specific section needs to be moved to before the &#8220;/9&#8243; in the url {9 being the identifier for the type of widget}.</p>
<p>So instead of this:
<pre class="brush: xml; title: ; notranslate">
src=&quot;http://widget.quantcast.com/yourdomain.com/9&amp;timeWidth=30&amp;daysOfData=90&quot;
</pre>
<p>You should use this:
<pre class="brush: xml; title: ; notranslate">
src=&quot;http://widget.quantcast.com/yourdomain.com&amp;timeWidth=30&amp;daysOfData=90/9&quot;
</pre>
<p>The final, working HTML code you should paste into your site should look like this:
<pre class="brush: xml; title: ; notranslate">
&lt;iframe src=&quot;http://widget.quantcast.com/yourdomain.com&amp;timeWidth=30&amp;daysOfData=90/9&quot; frameborder=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; scrolling=&quot;no&quot; width=&quot;160&quot; height=&quot;120&quot;&gt;&lt;/iframe&gt;
</pre>
<p style="text-align: center;">If this solution works for you, your widget will look similar to this:<br /><iframe src="http://widget.quantcast.com/quantcast.com&amp;timeWidth=30&amp;daysOfData=90/9" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" width="160" height="120"></iframe><br /><em>{this is the badge using audience data for quantcast.com}</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bellafaithdesign.com/2011/08/quantcast-badge-code-fix-from-a-nerd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enabling :hover for Cufon in Prestashop</title>
		<link>http://www.bellafaithdesign.com/2010/07/enabling-hover-for-cufon-in-prestashop/</link>
		<comments>http://www.bellafaithdesign.com/2010/07/enabling-hover-for-cufon-in-prestashop/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 17:24:17 +0000</pubDate>
		<dc:creator>Kayla</dc:creator>
				<category><![CDATA[techie geek code stuff]]></category>
		<category><![CDATA[code fixes]]></category>
		<category><![CDATA[code snippets]]></category>
		<category><![CDATA[Cufon and PrestaShop]]></category>
		<category><![CDATA[JavaScript in PrestaShop]]></category>

		<guid isPermaLink="false">http://www.bellafaithdesign.com/?p=729</guid>
		<description><![CDATA[In the midst of creating an online store, using the Prestashop e-commerce shopping cart, I ran into a little error while using Cufon (which generates fonts &#38; renders them in the browser with JavaScript). Using Cufon, at it&#8217;s very basic level (of replacing text with graphics), was fairly simple to set up in a Prestashop [...]]]></description>
			<content:encoded><![CDATA[<p></p><div style="margin:0px 0px 0px 0px" id="linksalpha_tag_881515533" class="linksalpha-email-button" data-url="http://www.bellafaithdesign.com/2010/07/enabling-hover-for-cufon-in-prestashop/" data-text="Enabling :hover for Cufon in Prestashop" data-desc="In the midst of creating an online store, using the Prestashop e-commerce shopping cart, I ran into a little error while using Cufon (which generates fonts &amp; renders them in the browser with JavaScript). Using Cufon, at it's very basic level (of replacing text with graphics), was fairly simple to set up in a Prestashop theme. However, when I went to enable the :hover option for a replaced element, with the normal code structure, the e-commerce site would load a blank page.

Normal usage:
" data-image="http://www.bellafaithdesign.com/wp-content/uploads/2010/07/bellafaith-default-thumb.png" data-site="bellafaith graphic &amp; web design studio"></div><script type="text/javascript" src="http://www.linksalpha.com/social/loader?script_type=buttons_counters&tag_id=linksalpha_tag_881515533&link=http%3A%2F%2Fwww.bellafaithdesign.com%2F2010%2F07%2Fenabling-hover-for-cufon-in-prestashop%2F&gplus=1&twitter=1&fbsend=1&linkedin=1&gbuzz=0&tumblr=0&reddit=0&pinterest=1&digg=0&stumbleupon=1&gpluslang=en-US&twitterlang=en&fbsendlang=en_US&gbuzzlang=en&twittermention=bellafaith&twitterrelated1=bellafaith&twitterrelated2=&halign=center"></script><div style="margin:5px 0px 5px 0px" id="linksalpha_tag_430966795" class="linksalpha-email-button" data-url="http://www.bellafaithdesign.com/2010/07/enabling-hover-for-cufon-in-prestashop/" data-text="Enabling :hover for Cufon in Prestashop" data-desc="In the midst of creating an online store, using the Prestashop e-commerce shopping cart, I ran into a little error while using Cufon (which generates fonts &amp; renders them in the browser with JavaScript). Using Cufon, at it's very basic level (of replacing text with graphics), was fairly simple to set up in a Prestashop theme. However, when I went to enable the :hover option for a replaced element, with the normal code structure, the e-commerce site would load a blank page.

Normal usage:
" data-image="http://www.bellafaithdesign.com/wp-content/uploads/2010/07/bellafaith-default-thumb.png" data-site="bellafaith graphic &amp; web design studio"></div><script type="text/javascript" src="http://www.linksalpha.com/social/loader?script_type=buttons_counters&tag_id=linksalpha_tag_430966795&link=http%3A%2F%2Fwww.bellafaithdesign.com%2F2010%2F07%2Fenabling-hover-for-cufon-in-prestashop%2F&gplus=0&twitter=0&fblike=0&linkedin=0&gbuzz=0&tumblr=0&reddit=0&pinterest=0&digg=0&stumbleupon=0&gpluslang=en-US&twitterlang=en&fblikelang=en_US&gbuzzlang=en&fblikeverb=like&fblikefont=arial&fblikeref=linksalpha&gplusctr=1&twitterctr=1&linkedinctr=1&gbuzzctr=1&redditctr=1&pinterestctr=1&diggctr=1&stumbleuponctr=1&twittermention=bellafaith&twitterrelated1=bellafaith&twitterrelated2=&halign=center"></script><p>In the midst of creating an online store, using the <a href="http://www.prestashop.com/">Prestashop</a> e-commerce shopping cart, I ran into a little error while using <a href="http://cufon.shoqolate.com/generate/">Cufon</a> (which generates fonts &amp; renders them in the browser with JavaScript). Using <a href="http://cufon.shoqolate.com/generate/">Cufon</a>, at it&#8217;s very basic level (of replacing text with graphics), was fairly simple to set up in a Prestashop theme. However, when I went to enable the :hover option for a replaced element, with the normal code structure, the e-commerce site would load a blank page.</p>
<p>Normal usage:</p>
<pre class="brush: jscript; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot;&gt;
Cufon.set('fontFamily', 'Vintage');
Cufon.replace('h4');
Cufon.replace('h2 a', {
	hover: true
});
 &lt;/script&gt;
</pre>
<p>I struggled with finding a solution to this last night. I tried removing the line breaks around <strong>hover:true</strong>, adding quotes around different areas, deleting the brackets, but nothing worked. Then, this morning, I decided to google the problem, and within minutes, I found the solution in the <a href="http://www.prestashop.com/forums/">Prestashop forums</a>. It was an <em>ah-ha</em> moment, when I found the solution. It was so simple, yet nothing I would have tried on my own&#8230;</p>
<p><strong>The Solution:</strong> Surround the JavaScript code with <strong>{literal}</strong> tags.</p>
<p>Like so:</p>
<pre class="brush: jscript; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot;&gt;
{literal}
Cufon.set('fontFamily', 'Vintage');
Cufon.replace('h4');
Cufon.replace('h2 a', {
	hover: true
});
{/literal}
 &lt;/script&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.bellafaithdesign.com/2010/07/enabling-hover-for-cufon-in-prestashop/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.533 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-05 05:48:01 -->

