<?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>Pressography &#187; Theme Riders</title>
	<atom:link href="http://pressography.com/category/theme-riders/feed/" rel="self" type="application/rss+xml" />
	<link>http://pressography.com</link>
	<description>The Art Of Customizing Wordpress</description>
	<lastBuildDate>Fri, 10 Sep 2010 20:52:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Premium Customizer Plugin/Theme Rider</title>
		<link>http://pressography.com/wordpress/premium-customizer/</link>
		<comments>http://pressography.com/wordpress/premium-customizer/#comments</comments>
		<pubDate>Thu, 31 Jan 2008 20:09:52 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[Free Plugins]]></category>
		<category><![CDATA[Theme Riders]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Customizable Themes]]></category>
		<category><![CDATA[Premium Theme Plugin]]></category>
		<category><![CDATA[Premium Themes]]></category>
		<category><![CDATA[Premium Wordpress Themes]]></category>
		<category><![CDATA[Theme Customizer]]></category>
		<category><![CDATA[Wordpress Theme Customizer]]></category>

		<guid isPermaLink="false">http://pressography.com/wordpress/premium-customizer-easy-theme-customization-helper/</guid>
		<description><![CDATA[The Premium Customizer is a php file that allows theme designers to easily add customization features for their designs, so the users of the designs can quickly make a few simple changes to change the look of the blog. It&#8217;s not really a &#8220;plugin&#8221; per se, so I&#8217;m calling it a &#8220;theme rider&#8221; since it rides along [...]]]></description>
			<content:encoded><![CDATA[<p>The Premium Customizer is a php file that allows theme designers to easily add customization features for their designs, so the users of the designs can quickly make a few simple changes to change the look of the blog. It&#8217;s not really a &#8220;plugin&#8221; per se, so I&#8217;m calling it a &#8220;theme rider&#8221; since it rides along with your theme to do its job.<span id="more-14"></span></p>
<p><strong>Current Version</strong>: 1.0 (January 31st 2008)</p>
<p><strong>Download:</strong> <a target="_blank" href="/plugins/premiumcustomizer1.zip">Download Premium Customizer Here</a></p>
<p><strong>WordPress Compatibility</strong>: Tested on 2.3.2, but should work on 2+</p>
<p><strong>History</strong>:</p>
<p>When I was writing the <a target="_blank" href="http://pressography.com/wordpress/what-makes-a-premium-theme-premium/">What Makes A Premium Theme Premium?</a> post, I started thinking about the fact that most designs are not easy to customize if you&#8217;re not a designer, or if you don&#8217;t know HTML. Then, I thought I could make a plugin that would help make it easier for users to change the designs (colors, layout, anything)</p>
<p>I was also concerned about the simplicity factor here &#8211; I didn&#8217;t want to create a WYSIWYG editor, and I definitely didn&#8217;t want to make users learn how to use one of those, so I decided that I&#8217;d leave the customizability up to the designers.</p>
<p>What I came up with was a pseudo plugin/theme code that you don&#8217;t have to activate, but you do have to include in your theme directory.</p>
<p>The best part? Once it&#8217;s set up, it&#8217;s KILLER easy to use <img src='http://pressography.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Installation Instructions</strong>:</p>
<p>When you&#8217;re designing your theme, you&#8217;ll need to download Premium Customizer and put the premiumcustomizer.php file in your theme directory (the same directory as the functions.php file). Then, add the following lines to your functions.php file:</p>
<p><code>require_once('premiumcustomizer.php');<br />
$themeName = "YourThemeNameHere"; //No spaces allowed<br />
if ($_GET['activated'] == 'true') {<br />
    //Add Theme Options Here<br />
}</code></p>
<p>Once you do that, PC will be up and running, but won&#8217;t do much of anything yet.</p>
<p><strong>Usage</strong>:</p>
<p>Now that you have PC installed, you need to add your customization variables to it. You do that by adding the following code under where it says &#8220;//Add Theme Options Here&#8221; in the code you just pasted into the functions.php file:</p>
<p><code>$newOption = array('Name'=&gt;'[Option Name]','Type'=&gt;'[Input Type]','Style'=&gt;'[Styling]',[Option Choices]);<br />
    addThemeOption('optionName', $newOption, '[Default Value]');</code></p>
<p>In the code above, you&#8217;ll have to replace the following things: (In all of these values, the [ and ] aren&#8217;t needed in your code, you should remove them)</p>
<p><strong>[Option Name]</strong> = The name you want displayed in the options page to describe this option. (IE: Text Color)<br />
<strong>[Input Type]</strong> = The type of input you want to use. Available options include: Text, Select, Checkbox, and TextArea<br />
    &#8211; Text displays a textbox, Select displays a drop down box, CheckBox displays a checkbox, and TextArea displays a text area (for entering lots of text)<br />
<strong>[Styling]</strong> = Any CSS you want to use to display the Input box. IE &#8211; for TextArea, you will want to set a height and width here, so the box isn&#8217;t tiny.<br />
<strong>[Option Choices]</strong> = If the Input Type is set to Select, then you can keep adding array items here to fill the drop down with choices for your users<br />
<strong>[Default Value]</strong> = The default value for this option (the value it&#8217;s automatically set to when the user first activates the theme)</p>
<p><u>Example 1:<br />
</u><code>$textColors = array('Name'=&gt;'Text Color','Type'=&gt;'Select','White'=&gt;'white','Black'=&gt;'black','Blue'=&gt;'blue');<br />
addThemeOption('textcolor', $textColors, 'blue');</code></p>
<p>Will display a drop down box on the options page like this: </p>
<select>
<option>White</option>
<option>Black</option>
<option>Blue</option>
</select>
<p><u>Example 2:</u><br />
<code>$Blogtitle = array('Name'=&gt;'Titlebar Text','Type'=&gt;'Text');<br />
addThemeOption('title', $Blogtitle, 'Classic Blog'); </code></p>
<p>Will display a text box on the options page like this:</p>
<input />
<p><u>Example 3:</u><br />
<code>$copyright = array('Name'=&gt;'Copyright Info','Type'=&gt;'textarea', 'Style'=&gt;'height: 50px; width: 200px;');<br />
addThemeOption('copyright', $copyright, 'Copyright © 2008 - Your Name');</code></p>
<p><code></code>Will display a text area on the options page like this: (I&#8217;m displaying the HTML here because of the limitations of the WordPress WYSIWYG editor in displaying the textarea tag)&lt;textarea style=&#8221;width: 200px; height: 50px&#8221;&gt;Copyright © 2008 &#8211; Your Name&lt;/textarea&gt;</p>
<p><strong>Using The Options In Your Theme</strong></p>
<p>When you have the options set up, now it&#8217;s time to use them in your theme! Using these values in your theme is very easy, but the usage will depend on what you need. Here are a few options:</p>
<p>(In all of the code below, [Option Name] should be replace with the name of the option you want to use &#8211; the [ and ] aren&#8217;t needed in your code)</p>
<p><strong>Echo Text<br />
</strong>    &#8211; You can easily display the text using the following code:</p>
<p><code>&lt;?php echo getThemeOption('[Option Name]'); ?&gt;</code></p>
<p>This is great for the text, select, and textarea types</p>
<p><strong>If Statements<br />
</strong>    &#8211; You can use your option in an if statement using the following code:</p>
<p><code>&lt;?php<br />
if (getThemeOption('[Option Name]') == 'someValue') {<br />
    //Code for when the option is true goes here<br />
}<br />
?&gt;</code></p>
<p>This is great for the checkbox and select option types.</p>
<p><strong>Switch<br />
</strong>    &#8211; If you&#8217;re using the select drop down box, you can either echo the text out, or you could use the value in a &#8220;switch statement&#8221; if you need to know which value the user selected</p>
<p><code>&lt;?php<br />
switch (strtolower(getThemeOption('[Option Name]'))) {<br />
             Case 'value1':<br />
                //What to do when the case is value1 goes here<br />
                break;<br />
             Case 'value2':<br />
                //What to do when  the case is value2 goes here<br />
                break;<br />
             Case 'value3':<br />
                //What to do when the case is value3 goes here<br />
                break;<br />
        }<br />
?&gt;</code></p>
<p>You can use this for any number of Case statements, just add another one to the end, like I did for value2 and value3. Make sure you include the &#8220;break;&#8221; line before going on to the next Case statement, though, or you&#8217;ll have some problems!</p>
<p><strong>The True Power of Premium Customizer</strong></p>
<p>There are a number of things you can do with the options. I&#8217;m going to try to keep an all-encompasing list of them here, so you can benefit from the thoughts and ideas of others when you&#8217;re opening your design up with these customizations.</p>
<p>1) Customizable text areas, headers, titles, footers, etc.<br />
     &#8211; Some themes have text areas, headers, and titles that aren&#8217;t directly related to current blog options. You can include custom options that the user can edit in the theme options page, without having them edit your theme at all &#8211; Use Echo Text for this</p>
<p>2) Changes to CSS styles, without changing the .css file (This is the real power of Premium Customizer)<br />
    &#8211; Use the If or Switch statements to allow the user to choose certain aspects of your design. For instance, text color, background color, sidebar widths, sidebar location/placement, nubmer of sidebars, etc</p>
<p>3) AdSense areas<br />
    - Use the textarea to let the user enter his/her own AdSense code quickly and easily</p>
<p><em>Leave a comment with your own ideas/experiences, and I&#8217;ll try to add them here on a regular basis!</em></p>
<p><strong>For Your Users</strong>:</p>
<p>Your users simply activate your theme, then edit the options on the &#8220;ThemeName Theme Options&#8221; page under the Presentation Tab (it only shows up when the theme is activated)</p>
<p>The Options page will include all of your variables for them to edit to their hearts&#8217; content!<strong> </strong></p>
<p><strong>Known Bugs</strong>:<br />
None</p>
]]></content:encoded>
			<wfw:commentRss>http://pressography.com/wordpress/premium-customizer/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
