<?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>bavotasan.com</title>
	<atom:link href="http://bavotasan.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://bavotasan.com</link>
	<description>by c.bavota</description>
	<lastBuildDate>Thu, 04 Feb 2010 18:18:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Intergrating bbPress with WordPress and Making it Work</title>
		<link>http://bavotasan.com/tutorials/intergrating-bbpress-wordpress/</link>
		<comments>http://bavotasan.com/tutorials/intergrating-bbpress-wordpress/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 18:10:03 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[activation]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[admin user]]></category>
		<category><![CDATA[bb users]]></category>
		<category><![CDATA[blah]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[csv]]></category>
		<category><![CDATA[csv file]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Ed]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[field]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[Forum]]></category>
		<category><![CDATA[forum thread]]></category>
		<category><![CDATA[hell]]></category>
		<category><![CDATA[KEY]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[name]]></category>
		<category><![CDATA[nicename]]></category>
		<category><![CDATA[order]]></category>
		<category><![CDATA[pass]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[prefix]]></category>
		<category><![CDATA[status]]></category>
		<category><![CDATA[Support Forum]]></category>
		<category><![CDATA[theme directory]]></category>
		<category><![CDATA[threads]]></category>
		<category><![CDATA[timeout]]></category>
		<category><![CDATA[trial and error]]></category>
		<category><![CDATA[unison]]></category>
		<category><![CDATA[Url]]></category>
		<category><![CDATA[user]]></category>
		<category><![CDATA[v1]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=1699</guid>
		<description><![CDATA[As it stands right now, bbPress and WordPress are two separate pieces of software. Last month, it was announced that a bbPress plugin might end up replacing the stand alone version but that is still in development. You can read about it on WordCast. When the plugin comes out it will trump the need to [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://bavotasan.com/wp-content/uploads/2010/02/wpbb.jpg" alt="wpbb Intergrating bbPress with WordPress and Making it Work" title="wpbb" width="300" height="225" class="alignright size-full wp-image-1718" />As it stands right now, <a href="http://bbpress.org/">bbPress</a> and <a href="http://wordpress.org">WordPress</a> are two separate pieces of software. Last month, it was announced that a bbPress plugin might end up replacing the stand alone version but that is still in development. You can read about it on <a href="http://wordcast.bitwiremedia.com/2010/01/18/official-bbpress-plugin-surfaces-speculation-abounds/">WordCast</a>. When the plugin comes out it will trump the need to do the following but for now, integrating an existing bbPress forum into a WordPress install is not as easy as you would think.<br />
<span id="more-1699"></span><br />
I spent all day yesterday getting things to work and it literally took me all day. But it the end I got it done and now everything is working in sweet unison. The hardest part was figuring out how to be able to log in through one site and be automatically logged in to both. Luckily I was able to piece together tidbits of information from every article and WP forum thread to find out how to do it properly.</p>
<p><strong>WordPress</strong>: v2.9.1<br />
<strong>bbPress</strong>: v1.0.2</p>
<p>First thing I had to do was migrate over the users. My <a href="http://support.bavotasan.com">Support Forum</a> has over 1200 users and in order to make sure that the threads on the forum didn&#8217;t get all messed up, I needed to ensure that the user ID numbers matched the bbPress database when I moved them over. I accessed the database through <a href="http://www.phpmyadmin.net/home_page/index.php">PHPMyAdmin</a> and exported the bb_users database as a CSV For Excel file. If you changed your bbPress database prefix then your user database will have a different prefix instead of the <em>bb</em>. </p>
<p>More than likely, the first user in your bbPress database will be your admin, and the ID should be 1. Same thing goes for your WordPress database. I just deleted the first user from my CSV file so that I could use my WP admin user for both.</p>
<p>With the CSV file ready, I had to create a script that would take the users and their info and insert them into the WordPress user database. It took a bit of trial and error but in the end I prevailed. Upload the CSV file to your theme directory. In the code below I use a CSV file named <code>users.csv</code>. </p>
<p><strong>NOTE</strong>: Your server probably has a timeout set for processing so you might have to break your CSV file in to many smaller files. My server cut out at around user number 400 so I suggest creating CSV files with only about 300 users in them.</p>
<p><strong>ALSO NOTE</strong>: If you have more than one user in your WordPress install this will probably not work for you. It works best on fresh installs of WP or installs with only one main user.</p>
<p>The following code will copy over your users into the WordPress database and it will also give them a role of subscriber. Please backup your database before attempting any of this.</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">require</span> <span style="color: #009900;">&#40;</span> ABSPATH <span style="color: #339933;">.</span> WPINC <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/registration.php'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$file_handle</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span>TEMPLATEPATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;/users.csv&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;r&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">feof</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file_handle</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$field</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fgetcsv</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file_handle</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1024</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$ID</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$field</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$user_login</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$field</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$user_pass</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$field</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$user_nicename</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$field</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$user_email</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$field</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">4</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$user_URL</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$field</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">5</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$user_registered</span> <span style="color: #339933;">=</span>  <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Y-m-d H:i:s&quot;</span><span style="color: #339933;">,</span> <span style="color: #990000;">strtotime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$field</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">6</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$user_status</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$field</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">7</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$display_name</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$field</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">8</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>	
&nbsp;
  <span style="color: #000088;">$adduser</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;
  INSERT INTO <span style="color: #006699; font-weight: bold;">$wpdb-&gt;users</span> 
    (ID, user_login, user_pass, user_nicename, user_email, user_URL, user_registered, user_status, display_name) 
  VALUES 
    ('<span style="color: #006699; font-weight: bold;">$ID</span>', '<span style="color: #006699; font-weight: bold;">$user_login</span>', '<span style="color: #006699; font-weight: bold;">$user_pass</span>', '<span style="color: #006699; font-weight: bold;">$user_nicename</span>', '<span style="color: #006699; font-weight: bold;">$user_email</span>', '<span style="color: #006699; font-weight: bold;">$user_URL</span>', '<span style="color: #006699; font-weight: bold;">$user_registered</span>', '<span style="color: #006699; font-weight: bold;">$user_status</span>', '<span style="color: #006699; font-weight: bold;">$display_name</span>') 
  &quot;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$results</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$adduser</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
    <span style="color: #0000ff;">&quot;ID&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$ID</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">&quot;role&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'subscriber'</span>
  <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  wp_update_user<span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file_handle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Add the above code to your <code>functions.php</code> file. Reload your page and it will execute. I know that is a little sloppy but what can you do? If you have multiple CSV files, just go back into the code and change the filename in line 4 to the next file&#8217;s name. Repeat until all your users have been uploaded.</p>
<p>To make sure it worked take a look at your Users page in the WordPress admin. If you see your users listed then it worked. Now on to step number 2, integrating the two to work in unison.</p>
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/tutorials/intergrating-bbpress-wordpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Magazine Premium is Out!</title>
		<link>http://bavotasan.com/articles/magazine-premium-is-out/</link>
		<comments>http://bavotasan.com/articles/magazine-premium-is-out/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 22:02:12 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[action]]></category>
		<category><![CDATA[Demo]]></category>
		<category><![CDATA[Forum]]></category>
		<category><![CDATA[look]]></category>
		<category><![CDATA[magazine]]></category>
		<category><![CDATA[point]]></category>
		<category><![CDATA[premium]]></category>
		<category><![CDATA[Premium theme]]></category>
		<category><![CDATA[support]]></category>
		<category><![CDATA[Support Forum]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Wordpress Theme]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=1692</guid>
		<description><![CDATA[Get it while it&#8217;s hot, people! I have finally reached a point where I think Magazine Premium is ready for the masses. Take a look at the demo to see it in action. If you have any questions, please ask them in the Support Forum.

]]></description>
			<content:encoded><![CDATA[<p>Get it while it&#8217;s hot, people! I have finally reached a point where I think <a href="http://themes.bavotasan.com/our-themes/premium-themes/magazine-premium">Magazine Premium</a> is ready for the masses. Take a look at the <a href="http://demos.bavotasan.com/?wptheme=Magazine%20Premium">demo</a> to see it in action. If you have any questions, please ask them in the <a href="http://support.bavotasan.com/">Support Forum</a>.</p>
<p><a href="http://themes.bavotasan.com/our-themes/premium-themes/magazine-premium"><img src="http://bavotasan.com/wp-content/uploads/2010/01/magpremfinal-464x1023.jpg" alt="magpremfinal 464x1023 Magazine Premium is Out!" title="magpremfinal" width="464" height="1023" class="aligncenter size-large wp-image-1693" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/articles/magazine-premium-is-out/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New Video Demonstrations in the Support Forum</title>
		<link>http://bavotasan.com/articles/new-video-demonstrations-in-the-support-forum/</link>
		<comments>http://bavotasan.com/articles/new-video-demonstrations-in-the-support-forum/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 22:22:31 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[Arturo Theme]]></category>
		<category><![CDATA[bavotasan]]></category>
		<category><![CDATA[com]]></category>
		<category><![CDATA[css editor]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[custom css]]></category>
		<category><![CDATA[engine]]></category>
		<category><![CDATA[engine v2]]></category>
		<category><![CDATA[fingers]]></category>
		<category><![CDATA[Forum]]></category>
		<category><![CDATA[Interface]]></category>
		<category><![CDATA[kinks]]></category>
		<category><![CDATA[magazine]]></category>
		<category><![CDATA[mp]]></category>
		<category><![CDATA[MP.   After]]></category>
		<category><![CDATA[Nav Menu]]></category>
		<category><![CDATA[New Features]]></category>
		<category><![CDATA[premium]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[support]]></category>
		<category><![CDATA[Support Forum]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[tomorrow]]></category>
		<category><![CDATA[ui]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[video demonstrations]]></category>
		<category><![CDATA[video demos]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=1682</guid>
		<description><![CDATA[I put together some video demonstrations in the Support Forum to get people ready for the release of Magazine Premium. If all goes as planned, MP will be out tomorrow (fingers crossed). I&#8217;m going to do my best to release new video demos as often as possible to help users adapt to the new features [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://bavotasan.com/wp-content/uploads/2010/01/demos.jpg" alt="demos New Video Demonstrations in the Support Forum" title="demos" width="200" height="150" class="alignright size-full wp-image-1684" />I put together some video demonstrations in the <a href="http://support.bavotasan.com">Support Forum</a> to get people ready for the release of Magazine Premium. If all goes as planned, MP will be out tomorrow (fingers crossed). I&#8217;m going to do my best to release new video demos as often as possible to help users adapt to the new features available in MP.<br />
<span id="more-1682"></span><br />
After all the kinks are ironed out of the new UI I will update every theme developed by <a href="http://themes.bavotasan.com">Themes by bavotasan.com</a> to include the <a href="http://themes.bavotasan.com/features">Arturo Theme Engine v2.0</a> admin interface.</p>
<p>Here are the latest video demos:</p>
<ul>
<li><a href="http://support.bavotasan.com/topic/setting-up-the-custom-css-editor">Setting Up the Custom CSS Editor</a></li>
<li><a href="http://support.bavotasan.com/topic/adding-a-logo-to-the-header">Adding a Logo to the Header</a></li>
<li><a href="http://support.bavotasan.com/topic/how-to-add-categories-pages-and-links-to-the-nav-menu">How to add Categories, Pages and Links to the Nav Menu</a></li>
<p></uL></p>
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/articles/new-video-demonstrations-in-the-support-forum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Embedding Fonts in your Web Site with CSS and @font-face</title>
		<link>http://bavotasan.com/tutorials/embedding-fonts-web-site-css-font-face/</link>
		<comments>http://bavotasan.com/tutorials/embedding-fonts-web-site-css-font-face/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 20:19:23 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[bright ideas]]></category>
		<category><![CDATA[eot]]></category>
		<category><![CDATA[folder]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[Fonts]]></category>
		<category><![CDATA[magazine]]></category>
		<category><![CDATA[one thing]]></category>
		<category><![CDATA[Paragraph]]></category>
		<category><![CDATA[premium]]></category>
		<category><![CDATA[Riesling]]></category>
		<category><![CDATA[RieslingRegular]]></category>
		<category><![CDATA[sans serif]]></category>
		<category><![CDATA[sheet]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[Squirrel]]></category>
		<category><![CDATA[src]]></category>
		<category><![CDATA[Style]]></category>
		<category><![CDATA[style sheet]]></category>
		<category><![CDATA[ttf]]></category>
		<category><![CDATA[ttf files]]></category>
		<category><![CDATA[ttf format]]></category>
		<category><![CDATA[Url]]></category>
		<category><![CDATA[vendor]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=1671</guid>
		<description><![CDATA[One of the winners of a free copy of Magazine Premium (see this article) suggested implementing @font-face kits to the theme. I had read about @font-face but never actually attempted to use it before. I did a bit more research and finally figured it out. Now 10 @font-face kits are available with Magazine Premium and [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://bavotasan.com/wp-content/uploads/2010/01/fontface.jpg" alt="fontface Embedding Fonts in your Web Site with CSS and @font face" title="Riesling font " width="200" height="150" class="alignright size-full wp-image-1677" />One of the winners of a free copy of Magazine Premium (<a href="http://bavotasan.com/?p=1634">see this article</a>) suggested implementing @font-face kits to the theme. I had read about @font-face but never actually attempted to use it before. I did a bit more research and finally figured it out. Now 10 @font-face kits are available with Magazine Premium and I thought it would be a good idea to show you how I did it.<br />
<span id="more-1671"></span><br />
Adding @font-face fonts to your Web site is not that difficult. It just takes a few steps.</p>
<p>First, you need to download some @font-face kits. I like to use kits supplied by <a href="http://www.fontsquirrel.com/fontface">Font Squirrel</a> because they have an awesome library and all their fonts are 100% free for commercial use. For this example I&#8217;m going to use <a href="http://www.fontsquirrel.com/fonts/Riesling">Riesling</a>.</p>
<p>Once you have the files downloaded you need to add them to your Web site. Create a folder named &#8220;fonts&#8221; and place the riesling.eot and riesling.ttf files into the folder. Upload that to your site, in to the same directory as your style sheet.</p>
<p>Now open your style sheet and add the following:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/*
 *
 * The fonts included are copyrighted by the vendor listed below.
 *
 * @vendor:     Bright Ideas
 * @licenseurl: http://www.fontsquirrel.com/license/Riesling
 *
 *
 */</span>
&nbsp;
<span style="color: #a1a100;">@font-face {</span>
	<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">'RieslingRegular'</span><span style="color: #00AA00;">;</span>
	src<span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'fonts/riesling.eot'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
	src<span style="color: #00AA00;">:</span> local<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'Riesling Regular'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> local<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'Riesling'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'fonts/riesling.ttf'</span><span style="color: #00AA00;">&#41;</span> format<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'truetype'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></td></tr></table></div>

<p>Everything is in place for you to use Riesling as a font on your Web site. Just add it to your CSS like you would any other font-family:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="css" style="font-family:monospace;">h1 <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">'RieslingRegular'</span><span style="color: #00AA00;">,</span> Arial<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></td></tr></table></div>

<p>The one thing you need to realize when using @font-face kits is that only modern browsers recognize it. </p>
<p class="riesling">
This is a sample paragraph that uses @font-face kits and CSS. If you see this paragraph in Riesling then your browser supports @font-face. If not, you might need to upgrade your browser to take advantage of @font-face kits.</p>
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/tutorials/embedding-fonts-web-site-css-font-face/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Making Cookies with PHP</title>
		<link>http://bavotasan.com/tutorials/making-cookies-with-php/</link>
		<comments>http://bavotasan.com/tutorials/making-cookies-with-php/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 17:25:01 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[advantage]]></category>
		<category><![CDATA[blank note]]></category>
		<category><![CDATA[challenges]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[cookie]]></category>
		<category><![CDATA[cookie records]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[Domain]]></category>
		<category><![CDATA[expiration]]></category>
		<category><![CDATA[Expiration Date]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[Lt]]></category>
		<category><![CDATA[month]]></category>
		<category><![CDATA[new ways]]></category>
		<category><![CDATA[nuts]]></category>
		<category><![CDATA[path]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[request]]></category>
		<category><![CDATA[retail store]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[someone]]></category>
		<category><![CDATA[something]]></category>
		<category><![CDATA[store]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=1661</guid>
		<description><![CDATA[I&#8217;ve been going nuts over the past month trying to complete a project for a large retail store and it seems like every new request they make requires me to learn something new about PHP. Coding challenges are always great because they lead you to discover new ways to take advantage of what your coding [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://bavotasan.com/wp-content/uploads/2010/01/php.jpg" alt="php Making Cookies with PHP" title="php" width="200" height="150" class="alignright size-full wp-image-1663" />I&#8217;ve been going nuts over the past month trying to complete a project for a large retail store and it seems like every new request they make requires me to learn something new about PHP. Coding challenges are always great because they lead you to discover new ways to take advantage of what your coding language has to offer. This one is pretty straightforward but great to know.<br />
<span id="more-1661"></span><br />
First we need to set the cookie:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
  <span style="color: #666666; font-style: italic;">// basic setting</span>
  <span style="color: #666666; font-style: italic;">// setcookie(name, value, expire, path, domain); </span>
  <span style="color: #000088;">$expire</span> <span style="color: #339933;">=</span> <span style="color: #990000;">time</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #cc66cc;">60</span> <span style="color: #339933;">*</span> <span style="color: #cc66cc;">60</span> <span style="color: #339933;">*</span> <span style="color: #cc66cc;">24</span> <span style="color: #339933;">*</span> <span style="color: #cc66cc;">30</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// expires in one month</span>
  <span style="color: #990000;">setcookie</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'visited'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'yes'</span><span style="color: #339933;">,</span><span style="color: #000088;">$expire</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></td></tr></table></div>

<p>The above cookie records that someone has already visited the site. It will expire in one month and the path and domain are set automatically if left blank. If you do not include an expiration time, the cookie will only be stored for the current session.</p>
<p><strong>NOTE:</strong> Cookies must always be set before anything else, so be sure to place it above the &lt;html&gt; tag at the top of your file.</p>
<p>Here is how you would retrieve a cookie:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
  <span style="color: #666666; font-style: italic;">// display one cookie with the name &quot;visited&quot;</span>
  <span style="color: #000088;">$the_cookie</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_COOKIE</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'visited'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">// see all cookies</span>
  <span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_COOKIE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></td></tr></table></div>

<p>To delete a cookie we need to take advantage of the <em>expire</em> variable:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
  <span style="color: #666666; font-style: italic;">// set the cookie to expire one hour in the past</span>
  <span style="color: #000088;">$expire</span> <span style="color: #339933;">=</span> <span style="color: #990000;">time</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">3600</span><span style="color: #339933;">;</span>
  <span style="color: #990000;">setcookie</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'visited'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$expire</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></td></tr></table></div>

<p><strong>Resource:</strong> <a href="http://php.net/manual/en/function.setcookie.php">PHP: setcookie &#8211; Manual</a></p>
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/tutorials/making-cookies-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magazine Premium is Almost Ready and I Want to Give Away 5 Free Copies</title>
		<link>http://bavotasan.com/articles/magazine-premium-is-almost-ready-and-i-want-to-give-away-5-free-copies/</link>
		<comments>http://bavotasan.com/articles/magazine-premium-is-almost-ready-and-i-want-to-give-away-5-free-copies/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 18:08:08 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[bar]]></category>
		<category><![CDATA[Boris]]></category>
		<category><![CDATA[category]]></category>
		<category><![CDATA[checkboxes]]></category>
		<category><![CDATA[color selection]]></category>
		<category><![CDATA[css editor]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[custom css]]></category>
		<category><![CDATA[design layout]]></category>
		<category><![CDATA[face kits]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[footer]]></category>
		<category><![CDATA[footer bar]]></category>
		<category><![CDATA[footer text]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[List]]></category>
		<category><![CDATA[magazine]]></category>
		<category><![CDATA[Marcus]]></category>
		<category><![CDATA[Matt]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[nav]]></category>
		<category><![CDATA[optional search]]></category>
		<category><![CDATA[options panel]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[page options]]></category>
		<category><![CDATA[page template]]></category>
		<category><![CDATA[panel]]></category>
		<category><![CDATA[premium]]></category>
		<category><![CDATA[Read More]]></category>
		<category><![CDATA[reloading]]></category>
		<category><![CDATA[Scott]]></category>
		<category><![CDATA[search bar]]></category>
		<category><![CDATA[section]]></category>
		<category><![CDATA[Sidebar]]></category>
		<category><![CDATA[sneak peak]]></category>
		<category><![CDATA[subscript]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[thumbnail image]]></category>
		<category><![CDATA[Widget]]></category>
		<category><![CDATA[Width]]></category>
		<category><![CDATA[winner]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=1634</guid>
		<description><![CDATA[I&#8217;m almost finished Magazine Premium and I thought it would be a good idea to open up a discussion to see what features people would like to see available. Now don&#8217;t go crazy, and please don&#8217;t repeat the same requests. I&#8217;ll take the top 5 best requests (that aren&#8217;t a part of the theme already) [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-1636" title="magprem_themesby" src="http://bavotasan.com/wp-content/uploads/2010/01/magprem_themesby.jpg" alt="magprem themesby Magazine Premium is Almost Ready and I Want to Give Away 5 Free Copies" width="300" height="225" />I&#8217;m almost finished Magazine Premium and I thought it would be a good idea to open up a discussion to see what features people would like to see available. Now don&#8217;t go crazy, and please don&#8217;t repeat the same requests. I&#8217;ll take the top 5 best requests (that aren&#8217;t a part of the theme already) and I&#8217;ll add them to Magazine Premium. I&#8217;ll also give a free copy to those who suggested the top 5.<br />
<span id="more-1634"></span><br />
Add your suggestions in the comments below. If someone already suggested a feature you wanted, don&#8217;t fret, just think of something else you might want to see in Magazine Premium.</p>
<p>Here is a quick list of features that I have already added:</p>
<ul>
<li>widgetized footer bar</li>
<li>custom footer text</li>
<li>optional &#8220;Powered by WordPress&#8221; link</li>
<li>checkboxes for cats and pages to include in nav menu</li>
<li>optional secondary nav menu</li>
<li>optional search bar or home link in main nav menu</li>
<li>4 front page section with selectable category feed</li>
<li>variable site and sidebar width</li>
<li>featured slideshow with selectable category feed</li>
<li>optional images for each front page section</li>
<li>font selection</li>
<li>color selection</li>
<li>sidebar ads widget</li>
<li>sidebar tabs widget (recent comments, popular posts and subscribe)</li>
<li>simple mailing list/subscribe to our mailing list function</li>
<li>custom CSS editor</li>
<li>full width page template (no sidebars)</li>
<li>new single page options panel with Ajax save function (no more page reloading to save)</li>
<li>drop-down login panel</li>
</ul>
<p>Those are all of the features I can think of right now.</p>
<p>Here is a sneak peak of the new options panel:</p>
<p><a class="highslide" href="http://bavotasan.com/wp-content/uploads/2010/01/magpremadmin.jpg"><img class="aligncenter size-medium wp-image-1633" title="magpremadmin" src="http://bavotasan.com/wp-content/uploads/2010/01/magpremadmin-570x300.jpg" alt="magpremadmin 570x300 Magazine Premium is Almost Ready and I Want to Give Away 5 Free Copies" width="570" height="300" /></a></p>
<p>Here is sample of the new design layout:</p>
<p><a class="highslide" href="http://bavotasan.com/wp-content/uploads/2010/01/magprem.jpg"><img class="aligncenter size-medium wp-image-1635" title="magprem" src="http://bavotasan.com/wp-content/uploads/2010/01/magprem-302x600.jpg" alt="magprem 302x600 Magazine Premium is Almost Ready and I Want to Give Away 5 Free Copies" width="302" height="600" /></a>It still has a little ways to go so don&#8217;t be too judgmental.</p>
<hr />
<p style="font-size: 18px;">
<strong>WINNER #1</strong>: Matt &#8211; a more elaborate author page<br />
<strong>WINNER #2</strong>: tinym &#8211; presets and @font-face kits<br />
<strong>WINNER #3</strong>: Marcus &#8211; more control of the Read More link<br />
<strong>WINNER #4</strong>: Boris &#8211; choose the post&#8217;s thumbnail image<br />
<strong>WINNER #5</strong>: Scott &#8211; easily add links to the nav and sub-nav menus</p>
<hr />
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/articles/magazine-premium-is-almost-ready-and-i-want-to-give-away-5-free-copies/feed/</wfw:commentRss>
		<slash:comments>45</slash:comments>
		</item>
		<item>
		<title>Creating a jQuery Plugin to Increase Font Size</title>
		<link>http://bavotasan.com/tutorials/creating-a-jquery-plugin-to-increase-font-size/</link>
		<comments>http://bavotasan.com/tutorials/creating-a-jquery-plugin-to-increase-font-size/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 22:32:47 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[bit]]></category>
		<category><![CDATA[callback]]></category>
		<category><![CDATA[Click]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[diam]]></category>
		<category><![CDATA[div]]></category>
		<category><![CDATA[dui]]></category>
		<category><![CDATA[erat]]></category>
		<category><![CDATA[everyone]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[fn]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[fontsize]]></category>
		<category><![CDATA[Function]]></category>
		<category><![CDATA[guts]]></category>
		<category><![CDATA[hac]]></category>
		<category><![CDATA[idea]]></category>
		<category><![CDATA[INCREASE]]></category>
		<category><![CDATA[increaseFontsize]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[javascript libraries]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[mattis]]></category>
		<category><![CDATA[nbs]]></category>
		<category><![CDATA[nbsp]]></category>
		<category><![CDATA[nisi]]></category>
		<category><![CDATA[non]]></category>
		<category><![CDATA[Nunc]]></category>
		<category><![CDATA[Paragraph]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[Plugin Code]]></category>
		<category><![CDATA[proin]]></category>
		<category><![CDATA[quis]]></category>
		<category><![CDATA[semper]]></category>
		<category><![CDATA[size]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wrapper]]></category>
		<category><![CDATA[wrapper function]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=1613</guid>
		<description><![CDATA[I have been spending a bit of time lately figuring out how to create my own plugins for jQuery. It doesn&#8217;t take much to accomplish and I thought it would be a good idea to put together a small tutorial to show everyone just how easy it can be. For this example, I will create [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://bavotasan.com/wp-content/uploads/2009/07/jquery.png" alt="jquery Creating a jQuery Plugin to Increase Font Size" title="jquery" width="200" height="150" class="alignright size-full wp-image-726" />I have been spending a bit of time lately figuring out how to create my own plugins for jQuery. It doesn&#8217;t take much to accomplish and I thought it would be a good idea to put together a small tutorial to show everyone just how easy it can be. For this example, I will create a plugin to increase the font size of a selected div when a link is clicked.<br />
<span id="more-1613"></span><br />
To start, we are going to create a wrapper function which will allow us to use <code>$</code> without conflicting with other JavaScript libraries:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #006600; font-style: italic;">// our plugin goes here</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>jQuery<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></td></tr></table></div>

<p>Next we need to let jQuery know we are creating a new plugin by using <code>$.fn</code>. Let&#8217;s call our function <code>increaseFontsize</code> and give it a few variable, such as size, speed, easing and callback, so it works just like other jQuery functions.</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  $.<span style="color: #660066;">fn</span>.<span style="color: #660066;">increaseFontsize</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>size<span style="color: #339933;">,</span> speed<span style="color: #339933;">,</span> easing<span style="color: #339933;">,</span> callback<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #006600; font-style: italic;">// the guts of our plugin goes here</span>
  <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>jQuery<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></td></tr></table></div>

<p>Once you have done that, you can create the code that will make our plugin do what we want it to, which is increase the font size of a selected div.</p>
<p>The final plugin code looks like this:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  $.<span style="color: #660066;">fn</span>.<span style="color: #660066;">increaseFontsize</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>size<span style="color: #339933;">,</span> speed<span style="color: #339933;">,</span> easing<span style="color: #339933;">,</span> callback<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>fontSize<span style="color: #339933;">:</span> size<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> speed<span style="color: #339933;">,</span> easing<span style="color: #339933;">,</span> callback<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>jQuery<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></td></tr></table></div>

<p>Now we can use our plugin just like any other jQuery function.</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="javascript" style="font-family:monospace;">jQuery<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'a.increase'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'div.paragraph'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">increaseFontsize</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">16</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'fast'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
  <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></td></tr></table></div>

<p>Try it out below to see it work.</p>
<p><script type="text/javascript">
(function($) {
  $.fn.increaseFontsize = function(size, speed, easing, callback) {
    return this.animate({fontSize: size}, speed, easing, callback);
  };
})(jQuery);
jQuery(function() {
  jQuery('a.increase').click(function() {
    jQuery('div.paragraph').increaseFontsize(16, 800);	
  });
});
jQuery(function() {
  jQuery('a.decrease').click(function() {
    jQuery('div.paragraph').increaseFontsize(14, 800);	
  });
});
</script></p>
<p><a href="javascript: void(0)" class="increase">Increase Font Size</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="javascript: void(0)" class="decrease">Decrease Font Size</a></p>
<div class="paragraph">Fusce eget diam purus, quis mattis dui. Proin volutpat velit at mi viverra id condimentum erat rhoncus. Aliquam eu nibh nisi. In hac habitasse platea dictumst. Nulla vel neque nulla, at lobortis nisl. Donec et erat orci. Mauris non semper libero. Curabitur euismod semper mi, at ornare ante sagittis eu. Nunc massa lacus, auctor facilisis tincidunt eu, euismod et massa. Nunc sit amet purus purus, non porttitor quam. In pulvinar erat sed libero vestibulum cursus. Nunc lobortis semper pellentesque. Nullam ut ligula non eros congue vestibulum.
</div>
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/tutorials/creating-a-jquery-plugin-to-increase-font-size/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Find the Category ID using the Category Slug in WordPress</title>
		<link>http://bavotasan.com/tutorials/find-the-category-id-using-the-category-slug-in-wordpress/</link>
		<comments>http://bavotasan.com/tutorials/find-the-category-id-using-the-category-slug-in-wordpress/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 17:40:52 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Array]]></category>
		<category><![CDATA[category]]></category>
		<category><![CDATA[category id]]></category>
		<category><![CDATA[default object]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[filter string]]></category>
		<category><![CDATA[Function]]></category>
		<category><![CDATA[information]]></category>
		<category><![CDATA[lot]]></category>
		<category><![CDATA[N. Default]]></category>
		<category><![CDATA[name]]></category>
		<category><![CDATA[none]]></category>
		<category><![CDATA[OBJECT]]></category>
		<category><![CDATA[output string]]></category>
		<category><![CDATA[piece]]></category>
		<category><![CDATA[slug]]></category>
		<category><![CDATA[square brackets]]></category>
		<category><![CDATA[string]]></category>
		<category><![CDATA[taxonomy]]></category>
		<category><![CDATA[term]]></category>
		<category><![CDATA[value]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=1610</guid>
		<description><![CDATA[This is a quick little piece of code that I have been using a lot lately. I needed to get the category ID but all I had to work with was the category slug. Luckily WordPress has a neat little function called get_term_by() which makes it super easy. The function can be used to get [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://bavotasan.com/wp-content/uploads/2009/08/wp.png" alt="wp Find the Category ID using the Category Slug in WordPress" title="WordPress" width="200" height="150" class="alignright size-full wp-image-1057" />This is a quick little piece of code that I have been using a lot lately. I needed to get the category ID but all I had to work with was the category slug. Luckily WordPress has a neat little function called <code>get_term_by()</code> which makes it super easy. The function can be used to get a lot more information but for this example I am just going to extract the ID.<br />
<span id="more-1610"></span><br />
The function works like this:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> get_term_by<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$field</span><span style="color: #339933;">,</span> <span style="color: #000088;">$value</span><span style="color: #339933;">,</span> <span style="color: #000088;">$taxonomy</span><span style="color: #339933;">,</span> <span style="color: #000088;">$output</span><span style="color: #339933;">,</span> <span style="color: #000088;">$filter</span> <span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></td></tr></table></div>

<p><strong>$field</strong>: (string) (required) Either &#8217;slug&#8217;, &#8216;name&#8217;, or &#8216;id&#8217;. Default: None<br />
<strong>$value</strong>: (string|integer) (required) Search for this term value. Default: None<br />
<strong>$taxonomy</strong>: (string) (required) Taxonomy Name. Default: None<br />
<strong>$output</strong>: (string) (optional) Constant OBJECT, ARRAY_A, or ARRAY_N. Default: OBJECT<br />
<strong>$filter</strong>: (string) (optional) default is raw or no WordPress defined filter will applied. Default: &#8216;raw&#8217; </p>
<p>We are going to use it like this to get the ID with the category slug &#8216;tutorials&#8217;:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
<span style="color: #000088;">$theCatId</span> <span style="color: #339933;">=</span> get_term_by<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'slug'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'tutorials'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'category'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$theCatId</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$theCatId</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">term_id</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></td></tr></table></div>

<p>If you insert a <code>print_r()</code> function you can echo out all the information that the <code>get_term_by()</code> function contains. Use something like this and see if there is other information that you might want to extract:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
<span style="color: #000088;">$theCatId</span> <span style="color: #339933;">=</span> get_term_by<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'slug'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'tutorials'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'category'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$theCatId</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></td></tr></table></div>

<p>Then all you would have to do is use whichever term your see between those square brackets like so:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
<span style="color: #000088;">$theCatId</span> <span style="color: #339933;">=</span> get_term_by<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'slug'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'tutorials'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'category'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$theCatId</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$theCatId</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">description</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/tutorials/find-the-category-id-using-the-category-slug-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A Clever and Safe Way to Display your Email Address</title>
		<link>http://bavotasan.com/tutorials/a-clever-and-safe-way-to-display-your-email-address/</link>
		<comments>http://bavotasan.com/tutorials/a-clever-and-safe-way-to-display-your-email-address/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 01:31:14 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[address]]></category>
		<category><![CDATA[bidi]]></category>
		<category><![CDATA[bombard]]></category>
		<category><![CDATA[contact]]></category>
		<category><![CDATA[course]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css code]]></category>
		<category><![CDATA[direction]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[lot]]></category>
		<category><![CDATA[mailbox]]></category>
		<category><![CDATA[moc]]></category>
		<category><![CDATA[number]]></category>
		<category><![CDATA[overload]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[reason]]></category>
		<category><![CDATA[redirection]]></category>
		<category><![CDATA[rtl]]></category>
		<category><![CDATA[safe way]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[span]]></category>
		<category><![CDATA[Style]]></category>
		<category><![CDATA[symbol]]></category>
		<category><![CDATA[way]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[Web Page]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=1602</guid>
		<description><![CDATA[There are many reason why you shouldn&#8217;t place your email address on a Web page; the number one being spambots. There are tons a spambots running around the Web looking for that &#8220;@&#8221; symbol so that they can bombard you with as much spam as possible. Instead of displaying my email address, I use a [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://bavotasan.com/wp-content/uploads/2009/12/email.jpg" alt="email A Clever and Safe Way to Display your Email Address" title="email" width="200" height="150" class="alignright size-full wp-image-1607" />There are many reason why you shouldn&#8217;t place your email address on a Web page; the number one being spambots. There are tons a spambots running around the Web looking for that &#8220;@&#8221; symbol so that they can bombard you with as much spam as possible.<span id="more-1602"></span> Instead of displaying my email address, I use a contact form. Lately though, I have been reading about many reasons why you should display your email address so that it is easier for visitors to contact you.</p>
<p>Here is a clever and safe way to display your email address using CSS redirection.</p>
<p>First we need to create a style in your header or in your stylesheet:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="css" style="font-family:monospace;">&lt;style type<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span><span style="color: #00AA00;">&gt;</span>
span<span style="color: #6666ff;">.redirect</span> <span style="color: #00AA00;">&#123;</span> 
<span style="color: #000000; font-weight: bold;">unicode-bidi</span><span style="color: #3333ff;">:bidi-</span>override<span style="color: #00AA00;">;</span> 
<span style="color: #000000; font-weight: bold;">direction</span><span style="color: #00AA00;">:</span> rtl<span style="color: #00AA00;">;</span> 
<span style="color: #00AA00;">&#125;</span>
&lt;/style<span style="color: #00AA00;">&gt;</span></pre></div></td></tr></table></div>

<p>Now all you need to do is write your email address backwards and use the style like this:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>span <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;redirect&quot;</span><span style="color: #339933;">&gt;</span>moc<span style="color: #339933;">.</span>liamg<span style="color: #339933;">@</span>emanruoy<span style="color: #339933;">&lt;/</span>span<span style="color: #339933;">&gt;</span></pre></div></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/tutorials/a-clever-and-safe-way-to-display-your-email-address/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>WordPress 2.9 is Out!</title>
		<link>http://bavotasan.com/articles/wordpress-2-9-is-out/</link>
		<comments>http://bavotasan.com/articles/wordpress-2-9-is-out/#comments</comments>
		<pubDate>Sat, 19 Dec 2009 16:32:49 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Batch]]></category>
		<category><![CDATA[bunch]]></category>
		<category><![CDATA[chance]]></category>
		<category><![CDATA[compatibility]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[feature]]></category>
		<category><![CDATA[figure]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[image editor]]></category>
		<category><![CDATA[improvements]]></category>
		<category><![CDATA[New Features]]></category>
		<category><![CDATA[org]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[trash]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=1597</guid>
		<description><![CDATA[I haven&#8217;t had a chance to go through Wordpress 2.9 and figure out all the improvements just yet, but I am excited to do so. A few items they have been boasting about are a global undo/”trash” feature, a built-in image editor, a batch plugin update/compatibility checking and easier video embeds.

Here is a little video [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://bavotasan.com/wp-content/uploads/2009/11/wordpress-logo-shine.jpg" alt="wordpress logo shine WordPress 2.9 is Out!" title="wordpress-logo-shine" width="200" height="150" class="alignright size-full wp-image-1482" />I haven&#8217;t had a chance to go through Wordpress 2.9 and figure out all the improvements just yet, but I am excited to do so. A few items they have been boasting about are a global undo/”trash” feature, a built-in image editor, a batch plugin update/compatibility checking and easier video embeds.<br />
<span id="more-1597"></span><br />
Here is a little video from WordPress.org that goes through a bunch of the new features in 2.9.</p>
<p><embed src="http://v.wordpress.com/wp-content/plugins/video/flvplayer.swf?ver=1.11" type="application/x-shockwave-flash" width="580" height="326" allowscriptaccess="always" allowfullscreen="true" flashvars="guid=NBZ853Xn&amp;width=580&amp;height=326" title="Introducing WordPress 2.9 Carmen"></embed></p>
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/articles/wordpress-2-9-is-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
