<?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>Thesis Hacker &#187; avatars</title>
	<atom:link href="http://www.thesishacker.com/category/avatars/feed" rel="self" type="application/rss+xml" />
	<link>http://www.thesishacker.com</link>
	<description>Customize Thesis</description>
	<lastBuildDate>Thu, 21 May 2009 16:22:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Add avatar to wordpress default</title>
		<link>http://www.thesishacker.com/add-avatar-to-wordpress-default</link>
		<comments>http://www.thesishacker.com/add-avatar-to-wordpress-default#comments</comments>
		<pubDate>Thu, 19 Mar 2009 03:13:52 +0000</pubDate>
		<dc:creator>Nasty</dc:creator>
				<category><![CDATA[avatars]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[default]]></category>
		<category><![CDATA[gravatars]]></category>
		<category><![CDATA[thesis]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.thesishacker.com/?p=1559</guid>
		<description><![CDATA[You can add your own image to the default list of avatars listed in Dashboard &#8212;-&#62; Settings &#8212;-&#62; Discussion&#8230;.


I came across this code and it works perfectly. Add the following code to your custom_functions.php file&#8230;
/*add avatar to wordpress default list*/
add_filter( &#8216;avatar_defaults&#8217;, &#8216;newgravatar&#8217; );
function newgravatar ($avatar_defaults) {
$myavatar = get_bloginfo(&#8217;template_directory&#8217;) . &#8216;/images/name-your-gravatar-image.jpg&#8217;;
$avatar_defaults[$myavatar] = &#8220;administrator&#8221;;
return $avatar_defaults;
}
The add_filter function [...]]]></description>
			<content:encoded><![CDATA[<p>You can add your own image to the default list of avatars listed in Dashboard &#8212;-&gt; Settings &#8212;-&gt; Discussion&#8230;.</p>
<p><img class="alignnone size-full wp-image-1560" title="136" src="http://www.thesishacker.com/wp-content/uploads/2009/03/136.png" alt="136" width="457" height="523" /></p>
<p><img class="alignnone size-full wp-image-1561" title="135" src="http://www.thesishacker.com/wp-content/uploads/2009/03/135.png" alt="135" width="454" height="553" /></p>
<p>I came across this code and it works perfectly. Add the following code to your custom_functions.php file&#8230;</p>
<p class="alert">/*add avatar to wordpress default list*/<br />
add_filter( &#8216;avatar_defaults&#8217;, &#8216;newgravatar&#8217; );<br />
function newgravatar ($avatar_defaults) {<br />
$myavatar = get_bloginfo(&#8217;template_directory&#8217;) . &#8216;/images/name-your-gravatar-image.jpg&#8217;;<br />
$avatar_defaults[$myavatar] = &#8220;administrator&#8221;;<br />
return $avatar_defaults;<br />
}</p>
<p>The <a href="http://codex.wordpress.org/Function_Reference/add_filter">add_filter</a> function says that we’ll be editing the avatar_defaults array using our custom function “newgravatar<strong>” </strong></p>
<p>The newgravatar function details the location and title of our additional gravatar option</p>
<p><em>$myavatar = get_bloginfo(&#8217;template_directory&#8217;) . &#8216;/images/name-your-gravatar-image.jpg&#8217;; </em> points to the new gravatar in the images folder of the template directory</p>
<p>The line after that designates the name that will be displayed next to the image dashboard options. I just happened to name mine administrator, you can name it whatever you want</p>
<p>The third line sends back the results to the avatar_defaults array to be included in the theme</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thesishacker.com/add-avatar-to-wordpress-default/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Change space between the avatar and the beginning of the post</title>
		<link>http://www.thesishacker.com/change-space-between-avatar-and-the-beginning-of-the-post</link>
		<comments>http://www.thesishacker.com/change-space-between-avatar-and-the-beginning-of-the-post#comments</comments>
		<pubDate>Tue, 20 Jan 2009 08:21:52 +0000</pubDate>
		<dc:creator>Nasty</dc:creator>
				<category><![CDATA[avatars]]></category>
		<category><![CDATA[headline and title]]></category>
		<category><![CDATA[posts]]></category>
		<category><![CDATA[spacing]]></category>
		<category><![CDATA[avatar]]></category>
		<category><![CDATA[beginning]]></category>
		<category><![CDATA[headline]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[space]]></category>

		<guid isPermaLink="false">http://www.thesishacker.com/?p=482</guid>
		<description><![CDATA[Change space between the avatar and the beginning of the post]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-483" style="border: 1px solid black;" title="291" src="http://www.thesishacker.com/wp-content/uploads/2009/01/291.png" alt="291" width="553" height="156" /></p>
<p>You can put as much space between the avatar or headline and the beginning of it&#8217;s following post&#8230;</p>
<p>In your custom.ss file add the following code. You can put it anywhere you want but I recommend putting it at the top. Remember, once you make the change, save it, and upload the new file to your server. Always describe what you&#8217;re doing by putting your descripton between the comment tags /*  */ at the beginning shown below in green. The comments aren’t shown on your rendered page and it just makes things easier for you to remember…</p>
<p class="alert"><span style="color: #339966;">/*space between avatar and post*/</span><br />
.custom .format_text { margin-top: 3em ; }</p>
<p>Set the em&#8217;s to whatever suites your needs</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thesishacker.com/change-space-between-avatar-and-the-beginning-of-the-post/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove an avatar from selected pages</title>
		<link>http://www.thesishacker.com/remove-an-avatar-from-selected-pages</link>
		<comments>http://www.thesishacker.com/remove-an-avatar-from-selected-pages#comments</comments>
		<pubDate>Fri, 16 Jan 2009 02:20:11 +0000</pubDate>
		<dc:creator>Nasty</dc:creator>
				<category><![CDATA[avatars]]></category>
		<category><![CDATA[removing avatars]]></category>
		<category><![CDATA[selected pages]]></category>
		<category><![CDATA[thesis]]></category>
		<category><![CDATA[wp]]></category>

		<guid isPermaLink="false">http://www.thesishacker.com/?p=332</guid>
		<description><![CDATA[Say you want to take the avatar off certain pages.]]></description>
			<content:encoded><![CDATA[<p>Check out the tutorial on placing avatars next to a post or page title <a href="http://www.thesishacker.com/?p=208">here.</a> When you do this you&#8217;ll get an avatar on every single page you have.  Say you want to take the avatar off certain pages.  Take the code you have from the function you already created and add the following code in red&#8230;</p>
<p class="alert"><span style="color: #339966;">/*removing an avatar from selected pages*/</span><br />
function author_avatar() {<br />
<span style="color: #ff0000;">if (!is_page(304) &amp;&amp; !is_page(173))</span><br />
echo &#8216;&lt;img src=&#8221;http://www.thesishacker.com/wp-content/themes/thesis/custom/images/nastycanasta.jpg&#8221; class=&#8221;title-avatar&#8221; /&gt;&#8217;;<br />
}<br />
add_action(&#8217;thesis_hook_before_headline&#8217;, &#8216;author_avatar&#8217;);</p>
<p>Basically you&#8217;re taking a simple <strong>if (is_page())</strong> statement and adding&#8230;</p>
<p>An exlamation point, <strong>!, </strong>which in PHP makes whatever is in front of it, <em>negative</em>.  What you&#8217;re doing is saying <em>&#8220;if the page <strong>isn&#8217;t</strong> ()&#8221;</em></p>
<p>In the () you put whatever page id you want.  You find the page id by going to the page you want and in the address bar it&#8217;s the last number in the address.  If you go to the tutorial page in this site the URL is ..</p>
<h3>http://www.thesishacker.com/?page_id=173</h3>
<p>The page id is 173, thus that&#8217;s the number I put in the function</p>
<p>Also you need 2 &#8220;<strong>&amp;</strong>&#8221; together to say &#8220;and&#8221; in PHP.  I decided to negate two pages, thus I needed the &amp;&amp; between the two identifiers</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thesishacker.com/remove-an-avatar-from-selected-pages/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add an avatar or picture next to your title and byline</title>
		<link>http://www.thesishacker.com/add-an-avatar-or-picture-next-to-your-title-and-byline</link>
		<comments>http://www.thesishacker.com/add-an-avatar-or-picture-next-to-your-title-and-byline#comments</comments>
		<pubDate>Thu, 08 Jan 2009 08:10:31 +0000</pubDate>
		<dc:creator>Nasty</dc:creator>
				<category><![CDATA[avatars]]></category>
		<category><![CDATA[byline]]></category>
		<category><![CDATA[title]]></category>
		<category><![CDATA[avatar]]></category>
		<category><![CDATA[avatar next to title byline]]></category>

		<guid isPermaLink="false">http://www.thesishacker.com/?p=208</guid>
		<description><![CDATA[You can put any image you want next to your posts.  Here's how...]]></description>
			<content:encoded><![CDATA[<p>Before each post that I write on this site there&#8217;s a picture of the man, the legend, my fav,  the ass-kickin&#8217; NastyCanasta.  You can put any image you want next to your posts.  Here&#8217;s how&#8230;</p>
<p>In your custom_functions.php file add this code. You can put it anywhere you want but I recommend putting it at the top after the &lt;?php tag. Always describe the function and put it between the comment tags /*  */ at the beginning shown below in green. The comments aren’t shown on your rendered page and it just makes things easier for you to remember…</p>
<p class="alert"><span style="color: #339966;">/*avatar next to title and byline*/</span><br />
function <span style="color: #ff0000;">FunctionName</span>() {<br />
echo &#8216;&lt;img src=&#8221;the directory where your image is located/nastycanasta.jpg&#8221; <span style="color: #ff0000;">class=&#8221;pick a name</span>&#8221; /&gt;&#8217;;<br />
}<br />
add_action(&#8217;<span style="color: #ff0000;">thesis_hook_before_headline</span>&#8216;, &#8216;<span style="color: #ff0000;">FunctionName</span>&#8216;);</p>
<p>Note some key points here:</p>
<p>Name your function</p>
<p>Assign it a class name whatever you want</p>
<p>Place your function with a hook, this case before the headline, and hang on the hook what function you want there</p>
<p>Now you want to style the image so in your custom.ss file add the following code. You can put it anywhere you want but I recommend putting it at the top. Always describe what you&#8217;re doing by putting your descripton between the comment tags /*  */ at the beginning shown below in green. The comments aren’t shown on your rendered page and it just makes things easier for you to remember…</p>
<p class="alert"><span style="color: #339966;">/*avatar styles*/</span><br />
.<span style="color: #0000ff;">custom</span> .&#8221;<span style="color: #ff0000;">the class name you gave it</span>&#8221; { float: left; }</p>
<p>Some points here:</p>
<p>You want to float the image to the left so its moved over as far as possible and the title and byline wrap around it</p>
<p>If you want to move the image down a little or give more space between the image and the title and byline you can add a margin-top Xem, margin-right Xem,  where X=numerical value of whatever you want.</p>
<p>You can add margins, borders, colors, anything else you want to style it within those brackets</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thesishacker.com/add-an-avatar-or-picture-next-to-your-title-and-byline/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

