<?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>Ilia Draznin Online &#187; tips</title>
	<atom:link href="http://iliadraznin.com/tag/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://iliadraznin.com</link>
	<description>javascript • css • html5 &#38; ajax • art &#38; design • technology</description>
	<lastBuildDate>Fri, 30 Jul 2010 01:52:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Custom AddThis share button</title>
		<link>http://iliadraznin.com/2010/07/custom-addthis-share-button/</link>
		<comments>http://iliadraznin.com/2010/07/custom-addthis-share-button/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 01:46:21 +0000</pubDate>
		<dc:creator>Ilia</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://iliadraznin.com/?p=272</guid>
		<description><![CDATA[I wanted to have an AddThis share button that would fit better with the site’s design, and if you’re reading this post on its own page you can scroll down and see what I mean. While AddThis provides plenty of ways to customize their buttons, there is no way to assign your own image to [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to have an AddThis share button that would fit better with the site’s design, and if you’re reading this post on its own page you can scroll down and see what I mean. While AddThis provides plenty of ways to customize their buttons, there is no way to assign your own image to the icon, which means doing it the hard way… well, relatively speaking of course.</p>
<p>There are three main steps to creating a customized share button. There’s some javascript to include in the footer.php, few lines of html to add at the end of your posts, and of course some styles and the icon itself.<br />
<span id="more-272"></span></p>
<h3>JavaScript</h3>
<p>You’ll want to add this js code in the footer file as probably the last piece of code. This means it won’t be loading until everything else is done. You can read detailed explanation of what you can do on <a href="http://www.addthis.com/help/client-api" target="_blank" rel="external nofollow">AddThis’ API page</a> but the short of it is — include this script file <b>“http://s7.addthis.com/js/250/addthis_widget.js”</b>. If you want to keep track of various stats AddThis provides, you’ll need to provide your username. This is done with the “addthis_config” variable. So for example, what I have is</p>
<pre class="brush:js">
&lt;script type=&quot;text/javascript&quot;&gt;
var addthis_config = { username:&quot;2late2die&quot;, data_track_clickback:true };
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://s7.addthis.com/js/250/addthis_widget.js&quot;&gt;&lt;/script&gt;
</pre>
<h3>HTML</h3>
<p>The HTML is pretty much just a regular link, but with certain href target, class and a couple of special addthis attributes. You can style it anyway you want, as you would any other link. Here’s how said link might look</p>
<pre class="brush:php; html-script:true; gutter:false">
&lt;a href=&quot;http://www.addthis.com/bookmark.php?v=250&amp;amp;username=[username]&quot;
  class=&quot;addthis_button&quot; addthis:url=&quot;&lt;?php the_permalink() ?&gt;&quot;
  addthis:title=&quot;&lt;?php the_title_attribute() ?&gt;&quot;&gt;Share&lt;/a&gt;
</pre>
<p><b>“http://www.addthis.com/bookmark.php?v=250&amp;username=[your username here]”</b> is the url the link should be pointing to. It must have the “addthis_button” class, otherwise AddThis js won’t recognize it, and then the <b>addthis:url</b> and <b>addthis:title</b> attributes. These attributes are self explanatory, just remember to use PHP so that they are assigned dynamic values. If you have any code, or plugins, that insert tags with attributes or class names into the title (like in my case, wp-typography, which puts <code>&lt;span class=&quot;caps&quot;&gt;</code> around any caps-only words, like acronyms and such) then use the “the_title_attribute()” function, instead of the typical “the_title()”. It strips the tags and escapes any problematic characters.</p>
<h3>CSS</h3>
<p>This is really all up to you, depending on how you want to style the button and the tooltips with the various sites. By default the AddThis scripts provides its own style, so if you don’t mind the white tooltip box, all you’ll need to style is the link itself. If you want to style the tooltips as well, then you’ll need to dig into the generated code for them and the styles used by default, and figure out which ones you want to change. (You can check out my styles to see how I gave it a dark theme by switching a few colors.)</p>
<p>If you like optimizing your code you might decide to not include the AddThis styles file at all. You can do this by adding “ui_use_css:false” to “addthis_config”, i.e.</p>
<pre class="brush:js; gutter:false">
var addthis_config = { ui_use_css:false };
</pre>
<p>That CSS file weighs in at about 52k, which is actually quite hefty. There are, however, two reasons to keep, instead of removing it.<br />
First of all, by removing it, you will have to provide all the styles to AddThis widget from scratch, as it were, including all those icons for the various services, which are backgrounds of the links, not image tags in the HTML. It’s certainly doable but it’s a hastle that might be not worth it at the end (depending on how anal you are about optimizing your code). The other reason is that, because AddThis is a fairly popular widget, many of your users are likely to have already downloaded that css file when they encountered the AddThis button on other sites. This means it’s cached in the browser and takes little to no time to download.</p>
<p>Now, as for that FB “like” button, looks like it might be tricky…</p>
]]></content:encoded>
			<wfw:commentRss>http://iliadraznin.com/2010/07/custom-addthis-share-button/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Space saving, permanent Gmail and Google Reader Tabs in Firefox</title>
		<link>http://iliadraznin.com/2009/08/space-saving-permanent-gmail-google-reader-tabs-firefox/</link>
		<comments>http://iliadraznin.com/2009/08/space-saving-permanent-gmail-google-reader-tabs-firefox/#comments</comments>
		<pubDate>Sat, 22 Aug 2009 13:38:11 +0000</pubDate>
		<dc:creator>Ilia</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[tabs]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[ui]]></category>

		<guid isPermaLink="false">http://iliadraznin.com/?p=119</guid>
		<description><![CDATA[This very useful tip was sent by Harsha Kotcherlakota to Lifehacker.com. The idea is to set up tabs for Gmail and Google reader that will always be open, but with a few extensions will have minimal impact on the interface while providing the information relevant to each app (site). For a full guide see the [...]]]></description>
			<content:encoded><![CDATA[<p>This very useful tip was sent by Harsha Kotcherlakota to Lifehacker.com.</p>
<p>The idea is to set up tabs for Gmail and Google reader that will always be open, but with a few extensions will have minimal impact on the interface while providing the information relevant to each app (site). For a full guide see the link at the bottom, but here’s the gist of it.<br />
Using the <a href="https://addons.mozilla.org/en-US/firefox/addon/6076" target="_blank" rel="external nofollow">Better Gmail 2 add-on</a> turn on unread count display in the favicon. Then get the <a href="https://addons.mozilla.org/en-US/firefox/addon/3780" target="_blank" rel="external nofollow">Faviconize Tab</a> and the <a href="https://addons.mozilla.org/en-US/firefox/addon/7816" target="_blank" rel="external nofollow">PermaTabs Mod</a> add-ons. The Faviconize add-on will add an option in the right-click menu of the tab to “Faviconize” it, i.e. remove the text and only leave the favicon visible. The PermaTab add-on gives you an option (right-click tab) to make a tab permanent. This will prevent it from accidently closing and will leave it on even after Firefox is closed (to close the tab you’ll need to “un-perma” it). And apparently permatabs don’t load their content until they’re first selected, in other words, this setup will not cause Firefox to load up 2 extra tabs every time you open it.</p>
<p>This is extremely useful. I check both gmail and reader multiple times a day but don’t like leaving them open all the time because the tabs take space, but with this I can have the best of both worlds.</p>
<p>[<a href="http://lifehacker.com/5342149/set-up-space+saving-permanent-gmail-and-reader-tabs-in-firefox" target="_blank" rel="external nofollow">Original Lifehacker Post</a>]</p>
]]></content:encoded>
			<wfw:commentRss>http://iliadraznin.com/2009/08/space-saving-permanent-gmail-google-reader-tabs-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
