<?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>scribu &#187; scbFramework</title>
	<atom:link href="http://scribu.net/wordpress/scb-framework/feed" rel="self" type="application/rss+xml" />
	<link>http://scribu.net</link>
	<description>Hello, this is where scribu geeks out</description>
	<lastBuildDate>Mon, 08 Mar 2010 07:40:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Version 1.4</title>
		<link>http://scribu.net/wordpress/scb-framework/sf-1-4.html</link>
		<comments>http://scribu.net/wordpress/scb-framework/sf-1-4.html#comments</comments>
		<pubDate>Thu, 17 Dec 2009 20:14:58 +0000</pubDate>
		<dc:creator>scribu</dc:creator>
				<category><![CDATA[scbFramework]]></category>
		<category><![CDATA[rewrite]]></category>

		<guid isPermaLink="false">http://scribu.net/?p=600</guid>
		<description><![CDATA[The plugin toolkit has been getting a lot of useful classes recently, so I though a version bump was in order. 

scbUtil is a collection of useful little functions that I was using in a lot of my plugins. My favourite is the debug() function. Then there&#8217;s html() and html_link() for HTML generation.]]></description>
			<content:encoded><![CDATA[<p>The plugin toolkit has been getting a lot of useful classes recently, so I though a version bump was in order. </p>
<h3>scbUtil</h3>
<p>scbUtil is a collection of useful little functions that I was using in a lot of my plugins. My favourite is the <code>debug()</code> function. Then there&#8217;s <code>html()</code> and <code>html_link()</code> for HTML generation. There are several other useful bits in there, but you&#8217;ll have to discover them yourself. </p>
<h3>scbRewrite</h3>
<p>One of the areas I wasn&#8217;t comfortable working with was the Rewrite API. The scbRewrite class was distilled from a <a href="http://lists.automattic.com/pipermail/wp-hackers/2009-December/029164.html">discussion</a> on wp-hackers. It&#8217;s only job is to take the rewrite rules you specify and hook them in all the right places. </p>
<p>If you would like to &#8220;try before you buy&#8221;, you can browse the source <a href="http://plugins.trac.wordpress.org/browser/scb-framework/tags/1.4/classes">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://scribu.net/wordpress/scb-framework/sf-1-4.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Version 1.3</title>
		<link>http://scribu.net/wordpress/scb-framework/sf-1-3.html</link>
		<comments>http://scribu.net/wordpress/scb-framework/sf-1-3.html#comments</comments>
		<pubDate>Tue, 13 Oct 2009 14:02:16 +0000</pubDate>
		<dc:creator>scribu</dc:creator>
				<category><![CDATA[scbFramework]]></category>

		<guid isPermaLink="false">http://scribu.net/?p=565</guid>
		<description><![CDATA[Here are the changes from the earlier version of the plugin.]]></description>
			<content:encoded><![CDATA[<p>Here are the changes from the earlier version:</p>
<p>Admin pages generated with AdminPage or BoxesPage will be slightly faster because data is sent through AJAX.</p>
<p>The scbCron class has two new methods:</p>
<ul>
<li>do_now() &#8211; executes the callback immediately</li>
<li>do_once() &#8211; executes the callback once, using wp_cron (with optional delay)</li>
</ul>
<p>The scbOptions class has a new method set() that replaces update_part(). It also has a new <a href="http://scribu.net/wordpress/scb-framework/scb-options.html">documentation page</a>.</p>
<p>Finally, version 1.3 of scbFramework only works with WordPress 2.8 or older.</p>
<p>Here is the <a href="http://plugins.trac.wordpress.org/changeset?new=163017%40scb-framework&amp;old=146242%40scb-framework">list of changes</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://scribu.net/wordpress/scb-framework/sf-1-3.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>scbOptions Reference</title>
		<link>http://scribu.net/wordpress/scb-framework/scb-options.html</link>
		<comments>http://scribu.net/wordpress/scb-framework/scb-options.html#comments</comments>
		<pubDate>Tue, 13 Oct 2009 14:00:28 +0000</pubDate>
		<dc:creator>scribu</dc:creator>
				<category><![CDATA[scbFramework]]></category>
		<category><![CDATA[documentation]]></category>

		<guid isPermaLink="false">http://scribu.net/?p=564</guid>
		<description><![CDATA[Every plugin that&#8217;s more than 100 lines of code has at least one setting stored in the database. The functions that come with WordPress for managing options are ok, but they can be used better.

Here&#8217;s how the scbOptions class makes your life easier as a plugin developer.]]></description>
			<content:encoded><![CDATA[<p>Every plugin that&#8217;s more than 100 lines of code has at least one setting stored in the database. The functions that come with WordPress for managing options are ok, but they can be used better.</p>
<p>Here&#8217;s how the scbOptions class makes your life easier as a plugin developer:</p>
<h3>Advantages</h3>
<h4>All in one place</h4>
<p>scbOptions stores all fields in a single database row. Ask any WP plugin author worth his salt and he will agree that that&#8217;s the way to go.</p>
<h4>Clean up on your way out</h4>
<p>When the plugin is uninstalled, the options will also be deleted to keep the database clean.</p>
<p><span id="more-564"></span></p>
<h3>Usage</h3>
<h4>Creating a set of options</h4>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$defaults</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
	<span style="color: #0000ff;">'color'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'orange'</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'size'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'large'</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'version'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'1.5'</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$options</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> scbOptions<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'pumpkin_settings'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #339933;">,</span> <span style="color: #000088;">$defaults</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The first argument is the option name.</p>
<p>The second arg. is a reference to the <em>main plugin file</em>.</p>
<p>The third argument is an array with default values (optional).</p>
<h4>Accessing fields</h4>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Get a single setting</span>
<span style="color: #000088;">$options</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">color</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Result: 'orange'</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Get a single setting (traditional)</span>
<span style="color: #000088;">$options</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'color'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Result: 'orange'</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Get a selection of fields</span>
<span style="color: #000088;">$options</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'color'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'size'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Result: array([color] =&gt; orange, [size] =&gt; large)</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Get all fields</span>
<span style="color: #000088;">$options</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Result: Array([color] =&gt; orange, [size] =&gt; large, [version] =&gt; 1.5)</span></pre></div></div>

<h4>Modifying fields</h4>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Modify a single setting</span>
<span style="color: #000088;">$options</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">color</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'blue'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Modify a single setting (traditional)</span>
<span style="color: #000088;">$options</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'color'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'blue'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Modify one or more fields</span>
<span style="color: #000088;">$options</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
	<span style="color: #0000ff;">'color'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'blue'</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'size'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'medium'</span>
<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Reset all fields to default values</span>
<span style="color: #000088;">$options</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">reset</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://scribu.net/wordpress/scb-framework/scb-options.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Version 1.2</title>
		<link>http://scribu.net/wordpress/scb-framework/sf-1-2.html</link>
		<comments>http://scribu.net/wordpress/scb-framework/sf-1-2.html#comments</comments>
		<pubDate>Wed, 12 Aug 2009 19:58:02 +0000</pubDate>
		<dc:creator>scribu</dc:creator>
				<category><![CDATA[scbFramework]]></category>

		<guid isPermaLink="false">http://scribu.net/?p=533</guid>
		<description><![CDATA[When you need to create a new database table, all you should be thinking about are the table columns, right? Well, with the new scbTable class added in version 1.2, you can.]]></description>
			<content:encoded><![CDATA[<p>When you need to create a new database table, all you should be thinking about are the table columns, right? Well, with the new <a href="http://plugins.trac.wordpress.org/browser/scb-framework/trunk/classes/Table.php">scbTable</a> class added in version 1.2, you can. </p>
<p>Creating a table is as easy as:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">new</span> scbTable<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'my_table'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;
	id bigint(20) unsigned NOT NULL default 0,
	foobar varchar(100) NOT NULL,
	PRIMARY KEY  (id),
&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The class takes care of creating or updating the table structure, as necessary.</p>
<p>Also, you can access it with <code>$wpdb->my_table</code>, just like you would any other WordPress table.</p>
]]></content:encoded>
			<wfw:commentRss>http://scribu.net/wordpress/scb-framework/sf-1-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Version 1.1</title>
		<link>http://scribu.net/wordpress/scb-framework/sf-1-1.html</link>
		<comments>http://scribu.net/wordpress/scb-framework/sf-1-1.html#comments</comments>
		<pubDate>Thu, 18 Jun 2009 12:44:12 +0000</pubDate>
		<dc:creator>scribu</dc:creator>
				<category><![CDATA[scbFramework]]></category>

		<guid isPermaLink="false">http://scribu.net/?p=502</guid>
		<description><![CDATA[The first update for scbFramework has an important bugfix in the scbOptions class.
The scbBoxesPage now creates perfect WP 2.8 style dashboard-like admin pages.
Also, several methods have been added and revised in scbAdminPage. Because of this, version 1.1 is not fully backwards compatible.
You can see all the changes from version 1.0.1 here.
]]></description>
			<content:encoded><![CDATA[<p>The first update for scbFramework has an important bugfix in the scbOptions class.</p>
<p>The scbBoxesPage now creates perfect WP 2.8 style dashboard-like admin pages.</p>
<p>Also, several methods have been added and revised in scbAdminPage. Because of this, version 1.1 is not fully backwards compatible.</p>
<p>You can see all the changes from version 1.0.1 <a href="http://plugins.trac.wordpress.org/changeset?new=127017%40scb-framework&#038;old=123826%40scb-framework">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://scribu.net/wordpress/scb-framework/sf-1-1.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use scbFramework in your plugins</title>
		<link>http://scribu.net/wordpress/scb-framework/how-to-use-scbframework-in-your-plugins.html</link>
		<comments>http://scribu.net/wordpress/scb-framework/how-to-use-scbframework-in-your-plugins.html#comments</comments>
		<pubDate>Sun, 31 May 2009 13:46:29 +0000</pubDate>
		<dc:creator>scribu</dc:creator>
				<category><![CDATA[scbFramework]]></category>
		<category><![CDATA[framework]]></category>

		<guid isPermaLink="false">http://scribu.net/?p=491</guid>
		<description><![CDATA[Before making this framework public, I used to include the files with each plugin. As the number of plugins increased, I had to update each one every time I modified the framework.
After a while, I found a way to make all plugins on an instalation use the most recent framework version installed. This didn&#8217;t help [...]]]></description>
			<content:encoded><![CDATA[<p>Before making this framework public, I used to include the files with each plugin. As the number of plugins increased, I had to update each one every time I modified the framework.</p>
<p>After a while, I found a way to make all plugins on an instalation use the most recent framework version installed. This didn&#8217;t help much.</p>
<p>Finally, I made it a standalone plugin which you only need to install once.</p>
<p>So, currently, there are two possibilities:</p>
<p><strong>Standalone plugin<br />
</strong></p>
<p>As long as the scbFramework plugin is activated, your plugin will work perfectly. If you want to spare users from ugly error messages, you can include a small file, called <a href="http://plugins.trac.wordpress.org/browser/scb-framework/trunk/scb-check.php">scb-check.php</a>. It will check that scbFramework is installed and if not, it will deactivate your plugin and display a friendly notice with an install link.</p>
<p><strong>Including class files</strong></p>
<p>If you don&#8217;t want to require users to install the standalone plugin, you can include all the class files with your plugin. You will also want to include another file, called <a href="http://plugins.trac.wordpress.org/browser/scb-framework/trunk/load.php">load.php</a> that takes care of autoloading classes as needed. (It will have to be placed in the same directory as the class files)</p>
<p>You can see a usage example by looking at the <a href="http://scribu.net/wordpress/front-end-editor">Front-end Editor</a> plugin.</p>
]]></content:encoded>
			<wfw:commentRss>http://scribu.net/wordpress/scb-framework/how-to-use-scbframework-in-your-plugins.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing scbFramework</title>
		<link>http://scribu.net/wordpress/scb-framework/introducing-scbframework.html</link>
		<comments>http://scribu.net/wordpress/scb-framework/introducing-scbframework.html#comments</comments>
		<pubDate>Sun, 31 May 2009 13:25:42 +0000</pubDate>
		<dc:creator>scribu</dc:creator>
				<category><![CDATA[scbFramework]]></category>
		<category><![CDATA[framework]]></category>

		<guid isPermaLink="false">http://scribu.net/?p=490</guid>
		<description><![CDATA[While developing plugins for WordPress, I found that one of the most time-consuming and error prone tasks was creating user-friendly settings pages.
That is how this framework was born. It&#8217;s basically a set of extensible classes that make plugin development faster. I already use it in most of my plugins.
It requires PHP5 and WordPress 2.5 or [...]]]></description>
			<content:encoded><![CDATA[<p>While developing plugins for WordPress, I found that one of the most time-consuming and error prone tasks was creating user-friendly settings pages.</p>
<p>That is how this framework was born. It&#8217;s basically a set of extensible classes that make plugin development faster. I already use it in most of my plugins.</p>
<p>It requires PHP5 and WordPress 2.5 or newer.</p>
<h4>scbForms</h4>
<p>This by far the most useful class. With it, you can create any type of form element without writing a single line of HTML.</p>
<h4>scbOptions</h4>
<p>This is a class that handles storing and updating plugin settings in a single field in the wp_options table.</p>
<h4>scbAdminPage</h4>
<p>This class extends scbForms to provide an easy way to create custom admin pages.</p>
<h4>scbBoxesPage</h4>
<p>This is an extension to the scbOptionsPage class that lets you easily create dashboard-like pages with collapsible boxes.</p>
<h4>scbCron</h4>
<p>This is a class that lets you create wp-cron schedules easier.</p>
<h4>scbWidget</h4>
<p>This class makes scbForms work with the new WP_widget class in WP 2.8.</p>
]]></content:encoded>
			<wfw:commentRss>http://scribu.net/wordpress/scb-framework/introducing-scbframework.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
