<?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>Developer Blog</title>
	<atom:link href="http://ericrichers.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://ericrichers.com/blog</link>
	<description>New Adventures in Web Applications</description>
	<lastBuildDate>Wed, 14 Dec 2011 05:52:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>List of U.S. states pipe delimited</title>
		<link>http://ericrichers.com/blog/2011/11/list-of-u-s-states-pipe-delimited/</link>
		<comments>http://ericrichers.com/blog/2011/11/list-of-u-s-states-pipe-delimited/#comments</comments>
		<pubDate>Wed, 23 Nov 2011 00:40:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[Drupal 6]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://ericrichers.com/blog/?p=1127</guid>
		<description><![CDATA[Note that newer versions of Webform already include a built-in list of US States as a predefined list. AL&#124;Alabama AK&#124;Alaska AZ&#124;Arizona AR&#124;Arkansas CA&#124;California CO&#124;Colorado CT&#124;Connecticut DE&#124;Delaware DC&#124;District Of Columbia FL&#124;Florida GA&#124;Georgia HI&#124;Hawaii ID&#124;Idaho IL&#124;Illinois IN&#124;Indiana IA&#124;Iowa KS&#124;Kansas KY&#124;Kentucky LA&#124;Louisiana ME&#124;Maine &#8230; <a href="http://ericrichers.com/blog/2011/11/list-of-u-s-states-pipe-delimited/">Read More.. <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Note that <strong>newer versions of Webform already include a built-in list of US States</strong> as a predefined list.</p>
<div id="node-332575">
<div>
<div><code>AL|Alabama<br />
AK|Alaska<br />
AZ|Arizona<br />
AR|Arkansas<br />
CA|California<br />
CO|Colorado<br />
CT|Connecticut<br />
DE|Delaware<br />
DC|District Of Columbia<br />
FL|Florida<br />
GA|Georgia<br />
HI|Hawaii<br />
ID|Idaho<br />
IL|Illinois<br />
IN|Indiana<br />
IA|Iowa<br />
KS|Kansas<br />
KY|Kentucky<br />
LA|Louisiana<br />
ME|Maine<br />
MD|Maryland<br />
MA|Massachusetts<br />
MI|Michigan<br />
MN|Minnesota<br />
MS|Mississippi<br />
MO|Missouri<br />
MT|Montana<br />
NE|Nebraska<br />
NV|Nevada<br />
NH|New Hampshire<br />
NJ|New Jersey<br />
NM|New Mexico<br />
NY|New York<br />
NC|North Carolina<br />
ND|North Dakota<br />
OH|Ohio<br />
OK|Oklahoma<br />
OR|Oregon<br />
PA|Pennsylvania<br />
RI|Rhode Island<br />
SC|South Carolina<br />
SD|South Dakota<br />
TN|Tennessee<br />
TX|Texas<br />
UT|Utah<br />
VT|Vermont<br />
VA|Virginia<br />
WA|Washington<br />
WV|West Virginia<br />
WI|Wisconsin<br />
WY|Wyoming</code></div>
<p>United States Postal Service Link <a href="http://www.usps.com/ncsc/lookups/usps_abbreviations.html" rel="nofollow"></p>
<p>http://www.usps.com/ncsc/lookups/usps_abbreviations.html</a></p>
<h2>Country LInks</h2>
<p>Country List Link <a href="http://drupal.org/node/221490" rel="nofollow">http://drupal.org/node/221490</a><br />
Includes territories and possessions.</p>
<h2>Canadian Provinces</h2>
<p>Here&#8217;s Canadian provinces from Wikipedia Link<a href="http://en.wikipedia.org/wiki/Provinces_and_territories_of_Canada" rel="nofollow">http://en.wikipedia.org/wiki/Provinces_and_territories_of_Canada</a></p>
<div><code>AB|Alberta<br />
BC|British Columbia<br />
MB|Manitoba<br />
NB|New Brunswick<br />
NL|Newfoundland and Labrador<br />
NS|Nova Scotia<br />
NT|Northwest Territories<br />
NU|Nunavut<br />
ON|Ontario<br />
PE|Prince Edward Island<br />
QC|Quebec<br />
SK|Saskatchewan<br />
YT|Yukon</code></div>
<p>[Scroll to see Territories, or you'll miss Yukon, Nunavut and NT. ]</p>
<div id="book-navigation-257">
<div><a title="Go to previous page" href="http://drupal.org/node/944430">‹ Creating Inline Labels with CSS</a> <a title="Go to parent page" href="http://drupal.org/node/1186556">up</a> <a title="Go to next page" href="http://drupal.org/node/716996">Theming the confirmation page ›</a></div>
</div>
</div>
<div><a href="http://drupal.org/user/login?destination=comment%2Freply%2F332575%23comment-form">Login</a> or <a href="http://drupal.org/user/register?destination=comment%2Freply%2F332575%23comment-form">register</a> to post comments</div>
</div>
<h2>Comments</h2>
<div>
<div>
<div>
<h3><a href="http://drupal.org/node/332575#comment-2833792">For a custom Drupal form &#8211; Single Quote, Comma-delimited</a></h3>
<div>Posted by <a title="View user profile." href="http://drupal.org/user/213574">fmitchell</a> on <em>April 11, 2010 at 11:21pm</em></div>
</div>
<div>
<div>
<div><code>'AL' =&gt; 'Alabama',<br />
'AK' =&gt; 'Alaska',<br />
'AZ' =&gt; 'Arizona',<br />
'AR' =&gt; 'Arkansas',<br />
'CA' =&gt; 'California',<br />
'CO' =&gt; 'Colorado',<br />
'CT' =&gt; 'Connecticut',<br />
'DE' =&gt; 'Delaware',<br />
'DC' =&gt; 'District Of Columbia',<br />
'FL' =&gt; 'Florida',<br />
'GA' =&gt; 'Georgia',<br />
'HI' =&gt; 'Hawaii',<br />
'ID' =&gt; 'Idaho',<br />
'IL' =&gt; 'Illinois',<br />
'IN' =&gt; 'Indiana',<br />
'IA' =&gt; 'Iowa',<br />
'KS' =&gt; 'Kansas',<br />
'KY' =&gt; 'Kentucky',<br />
'LA' =&gt; 'Louisiana',<br />
'ME' =&gt; 'Maine',<br />
'MD' =&gt; 'Maryland',<br />
'MA' =&gt; 'Massachusetts',<br />
'MI' =&gt; 'Michigan',<br />
'MN' =&gt; 'Minnesota',<br />
'MS' =&gt; 'Mississippi',<br />
'MO' =&gt; 'Missouri',<br />
'MT' =&gt; 'Montana',<br />
'NE' =&gt; 'Nebraska',<br />
'NV' =&gt; 'Nevada',<br />
'NH' =&gt; 'New Hampshire',<br />
'NJ' =&gt; 'New Jersey',<br />
'NM' =&gt; 'New Mexico',<br />
'NY' =&gt; 'New York',<br />
'NC' =&gt; 'North Carolina',<br />
'ND' =&gt; 'North Dakota',<br />
'OH' =&gt; 'Ohio',<br />
'OK' =&gt; 'Oklahoma',<br />
'OR' =&gt; 'Oregon',<br />
'PA' =&gt; 'Pennsylvania',<br />
'RI' =&gt; 'Rhode Island',<br />
'SC' =&gt; 'South Carolina',<br />
'SD' =&gt; 'South Dakota',<br />
'TN' =&gt; 'Tennessee',<br />
'TX' =&gt; 'Texas',<br />
'UT' =&gt; 'Utah',<br />
'VT' =&gt; 'Vermont',<br />
'VA' =&gt; 'Virginia',<br />
'WA' =&gt; 'Washington',<br />
'WV' =&gt; 'West Virginia',<br />
'WI' =&gt; 'Wisconsin',<br />
'WY' =&gt; 'Wyoming',</code></div>
</div>
<div>
<p>&#8211;<br />
Fredric</p>
</div>
<ul>
<li><a href="http://drupal.org/user/login?destination=comment%2Freply%2F332575%23comment-form">Login</a> or <a href="http://drupal.org/user/register?destination=comment%2Freply%2F332575%23comment-form">register</a> to post comments</li>
</ul>
</div>
</div>
</div>
<div>
<h3><a href="http://drupal.org/node/332575#comment-3411460">List of states with full spelling as both key and label</a></h3>
<div>Posted by <a title="View user profile." href="http://drupal.org/user/133572">kappaluppa</a> on <em>September 5, 2010 at 3:25pm</em></div>
</div>
<div>
<p>Alabama|Alabama<br />
Alaska|Alaska<br />
Arizona|Arizona<br />
Arkansas|Arkansas<br />
California|California<br />
Colorado|Colorado<br />
Connecticut|Connecticut<br />
Delaware|Delaware<br />
District Of Columbia|District Of Columbia<br />
Florida|Florida<br />
Georgia|Georgia<br />
Hawaii|Hawaii<br />
Idaho|Idaho<br />
Illinois|Illinois<br />
Indiana|Indiana<br />
Iowa|Iowa<br />
Kansas|Kansas<br />
Kentucky|Kentucky<br />
Louisiana|Louisiana<br />
Maine|Maine<br />
Maryland|Maryland<br />
Massachusetts|Massachusetts<br />
Michigan|Michigan<br />
Minnesota|Minnesota<br />
Mississippi|Mississippi<br />
Missouri|Missouri<br />
Montana|Montana<br />
Nebraska|Nebraska<br />
Nevada|Nevada<br />
New Hampshire|New Hampshire<br />
New Jersey|New Jersey<br />
New Mexico|New Mexico<br />
New York|New York<br />
North Carolina|North Carolina<br />
North Dakota|North Dakota<br />
Ohio|Ohio<br />
Oklahoma|Oklahoma<br />
Oregon|Oregon<br />
Pennsylvania|Pennsylvania<br />
Rhode Island|Rhode Island<br />
South Carolina|South Carolina<br />
South Dakota|South Dakota<br />
Tennessee|Tennessee<br />
Texas|Texas<br />
Utah|Utah<br />
Vermont|Vermont<br />
Virginia|Virginia<br />
Washington|Washington<br />
West Virginia|West Virginia<br />
Wisconsin|Wisconsin<br />
Wyoming|Wyoming</p>
</div>
<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fericrichers.com%2Fblog%2F2011%2F11%2Flist-of-u-s-states-pipe-delimited%2F&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div class="rw-left"><div class="rw-ui-container rw-class-blog-post rw-urid-11280"></div></div>]]></content:encoded>
			<wfw:commentRss>http://ericrichers.com/blog/2011/11/list-of-u-s-states-pipe-delimited/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>21 Easy To Customize Premium PHP Contact Forms</title>
		<link>http://ericrichers.com/blog/2011/10/21-easy-to-customize-premium-php-contact-forms/</link>
		<comments>http://ericrichers.com/blog/2011/10/21-easy-to-customize-premium-php-contact-forms/#comments</comments>
		<pubDate>Sat, 29 Oct 2011 13:23:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[CSS & HTML]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[PHP & MySQL]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[tuts]]></category>

		<guid isPermaLink="false">http://ericrichers.com/blog/?p=1120</guid>
		<description><![CDATA[One of the most hardest jobs in web development processes definitely is form creation. Coding behind these forms are painless enough, but then you need to think also about Spam filters, usability, interface and functions should work in all cases. &#8230; <a href="http://ericrichers.com/blog/2011/10/21-easy-to-customize-premium-php-contact-forms/">Read More.. <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the most hardest jobs in web development processes definitely is form creation. Coding behind these forms are painless enough, but then you need to think also about Spam filters, usability, interface and functions should work in all cases.</p>
<p>Keeping this in mind, I gathered here 21 various premium Php forms created for all the cases you should ever need – sign-up forms, advanced contact forms powered with Ajax, jQuery, e-mail signup forms, file uploads and much more. All of these forms also come with good user interface and design, so you don’t have to worry about those little things, but just focus on big tasks! How cool is that?</p>
<p><a title="21 Easy To Customize Premium PHP Contact Forms" href="http://www.1stwebdesigner.com/css/premium-php-contact-forms/"><img src="http://www.1stwebdesigner.com/wp-content/uploads/bigthumbs/300-400/preview-easy-to-customize-premium-php-contact-forms.jpg" alt="21 Easy To Customize Premium PHP Contact Forms" width="570" /></a></p>
<p>These forms also are pretty cheap – 5–12$, which is just a small reward to original authors I think! Before we get started I also gathered few great sources to get inspiration from and educate you how to create user-friendly and unique contact forms.</p>
<h2><a href="http://patterntap.com/tap/collection/forms" target="_blank">Patterntap</a></h2>
<p>Here you will find various small sections in web-design – forms, buttons, headers, footers, tabs, typography and much, much more. There you will find also big collection of quality forms – now there are 351 forms available for inspiration!</p>
<p><a href="http://patterntap.com/tap/collection/forms"><img src="http://www.1stwebdesigner.com/wp-content/uploads/2010/04/codecanyon-php-forms/pattern-tap-web-design-inspiration-foms.jpg" alt="Pattern-tap-web-design-inspiration-foms" border="0" /></a></p>
<p>Here are some more sources:</p>
<ul>
<li><a href="http://www.1stwebdesigner.com/inspiration/91-trendy-contact-and-web-forms-for-creative-inspiration/" target="_blank">91 Trendy Contact And Web Forms For Creative Inspiration</a> – I wrote myself very comprehensive article about contact and web forms some time ago! If this will not get you inspired – nothing else will!</li>
<li><a href="http://www.noupe.com/php/beautiful-forms.html" target="_blank">Beautiful Forms – Design, Style, &amp; make it work with PHP &amp; Ajax</a> – excellent article from Noupe featuring a lot of unique tutorials and tips there!</li>
<li><a href="http://designshack.co.uk/articles/inspiration/10-useful-tips-for-a-captivating-contact-form" target="_blank">10 Useful Tips for a Captivating Contact Form</a> – self explaining article title, learn how to create contact form in good way!</li>
<li><a href="http://www.smashingmagazine.com/2008/04/17/web-form-design-modern-solutions-and-creative-ideas/" target="_blank">Web Form Design: Modern Solutions and Creative Ideas</a> – huge inspirational article from SmashingMag – quality never disappoint only maybe examples could be a little bit outdated since article has been created in year 2008.</li>
</ul>
<h2>1. <a href="http://codecanyon.net/item/ajax-contact-form/50846?ref=1stwebdesigner" target="_blank">AJAX Contact Form</a> ($6)</h2>
<p>This AJAX jQuery website component allows you to easily place a self-contained Contact Form on any HTML or PHP page of your existing website.<br />
It uses just 1 file to Validate, Process and Send the completed contact form to your e-mail address and best of all, does not reload the page to validate or send the form!</p>
<p>Features include:</p>
<ul>
<li>AJAX backend (no page reloads!) Save your bandwidth!</li>
<li>Uses Javascript jQuery Slide for an amazing UI, Try the Demo!</li>
<li>Very easy to integrate into any existing HTML or PHP page on your website.</li>
<li>The form style can be integrated into your existing website Stylesheet or you can use the Default Style.</li>
<li>All fields have a validation script so you get the * required info you need.</li>
<li>and much more (read full description).</li>
</ul>
<p><a href="http://codecanyon.net/item/ajax-contact-form/50846?ref=1stwebdesigner"><img src="http://www.1stwebdesigner.com/wp-content/uploads/2010/04/codecanyon-php-forms/ajax-php-jquery-premium-contact-form.jpg" alt="Ajax-php-jquery-premium-contact-form" border="0" /></a></p>
<p>&nbsp;</p>
<p><a href="http://codecanyon.net/item/ajax-contact-form/full_screen_preview/50846?ref=1stwebdesigner" target="_blank">View Live Demo</a></p>
<h2>2. <a href="http://codecanyon.net/item/simple-php-contact-form/46679?ref=1stwebdesigner" target="_blank">Simple PHP Contact Form</a> ($5)</h2>
<p>This website component allows you to easily place a self-contained Contact Page on any PHP page of your website.</p>
<p>Features include:</p>
<ul>
<li>Very easy to integrate into any existing PHP page on your website.</li>
<li>The form style can be integrated into your existing website Stylesheet.</li>
<li>All fields have a validation script so you get the *required info you need.</li>
<li>Anti spam, are you human? filter.</li>
<li>Only 1 option to configure (your email address) to make the script function.</li>
<li>and more features.</li>
</ul>
<p><a href="http://codecanyon.net/item/simple-php-contact-form/46679?ref=1stwebdesigner"><img src="http://www.1stwebdesigner.com/wp-content/uploads/2010/04/codecanyon-php-forms/simple-php-jquery-premium-contact-form.jpg" alt="Simple-php-jquery-premium-contact-form" border="0" /></a></p>
<p>&nbsp;</p>
<p><a href="http://codecanyon.net/item/simple-php-contact-form/full_screen_preview/46679?ref=1stwebdesigner" target="_blank">View Live Demo</a></p>
<p>&nbsp;</p>
<h2>3. <a href="http://codecanyon.net/item/beta-splash-page-email-signup-form/55646?ref=1stwebdesigner" target="_blank">Beta Splash Page Email Signup Form</a> ($5)</h2>
<p>This is a very simple, yet stylish, form for your website where visitors can enter their email address (and name if desired) to be added to a contact list. It uses AJAX to submit and validate email and will also function if the user has JavaScript disabled.</p>
<p>Installation is quick and painless. This form does not require a database to function as it will create and store input into a CSV file.</p>
<p><a href="http://codecanyon.net/item/beta-splash-page-email-signup-form/55646?ref=1stwebdesigner"><img src="http://www.1stwebdesigner.com/wp-content/uploads/2010/04/codecanyon-php-forms/email-signup-php-jquery-premium-contact-form.jpg" alt="Email-signup-php-jquery-premium-contact-form" border="0" /></a></p>
<p><a href="http://codecanyon.net/item/beta-splash-page-email-signup-form/full_screen_preview/55646?ref=1stwebdesigner" target="_blank">View Live Demo</a></p>
<h2>4. <a href="http://codecanyon.net/item/contact-form-with-custom-auto-responder/67084?ref=1stwebdesigner" target="_blank">Contact Form With Custom Auto Responder</a> ($5)</h2>
<p>Main Features:</p>
<ul>
<li>Simple form easy to edit and add to your PHP or HTML pages.</li>
<li>Phone field added</li>
<li>Dropdown Subject Selection with different emails.</li>
<li>Auto Responder Enable / Disable</li>
<li>Dropdown Subject Selection with additional emails.</li>
<li>Custom Auto Responder Message</li>
<li>Custom Auto Responder Message with Attachment of any file type</li>
<li>Custom Catpcha Filter (you can create your own filter question and set the answer in contact.php file)</li>
<li>No separate page needed for thank you message.</li>
<li>Message will be displayed on the same block.</li>
</ul>
<p><a href="http://codecanyon.net/item/contact-form-with-custom-auto-responder/67084?ref=1stwebdesigner"><img src="http://www.1stwebdesigner.com/wp-content/uploads/2010/04/codecanyon-php-forms/custom-php-scrip-auto-responder-premium-contact-form.jpg" alt="Custom-php-scrip-auto-responder-premium-contact-form" border="0" /></a></p>
<p><a href="http://codecanyon.net/item/contact-form-with-custom-auto-responder/full_screen_preview/67084?ref=1stwebdesigner" target="_blank">View Live Demo</a></p>
<h2>5. <a href="http://codecanyon.net/item/simple-website-comments/46483?ref=1stwebdesigner" target="_blank">Simple Website Comments</a> ($7)</h2>
<p>This website component allows you to easily place a “comment block” on any page of your website.</p>
<p>Features:</p>
<ul>
<li>Allow users to post comments on any page of your website</li>
<li>Really handy for PHP websites that don’t support comments</li>
<li>Easy to setup and customise</li>
<li>Works out of the box, comes with copy/paste examples</li>
<li>Sends admin an email with a summary of the comment when a new comment is posted, links to approve / deny.</li>
<li>SPAM prevention</li>
<li>Can be styled using your own CSS</li>
<li>and much more.</li>
</ul>
<p><a href="http://codecanyon.net/item/simple-website-comments/46483?ref=1stwebdesigner"><img src="http://www.1stwebdesigner.com/wp-content/uploads/2010/04/codecanyon-php-forms/website-comments-php-jquery-premium-contact-form.jpg" alt="Website-comments-php-jquery-premium-contact-form" border="0" /></a></p>
<p><a href="http://codecanyon.net/item/simple-website-comments/full_screen_preview/46483?ref=1stwebdesigner" target="_blank">View Live Demo</a></p>
<h2>6. <a href="http://codecanyon.net/item/easy-forms/64352?ref=1stwebdesigner" target="_blank">Easy Forms</a> ($10)</h2>
<p>EasyForms is a PHP library that helps you create forms on a fast and easy way including input validation.</p>
<p>Together with the EasyForm library, you get 4 examples forms that are created using this library:</p>
<ul>
<li>Contact form</li>
<li>Image upload with extension and image size validation</li>
<li>Quote request form</li>
<li>Subscribe form that adds the email address and name to a CSV file</li>
</ul>
<p><a href="http://codecanyon.net/item/easy-forms/64352?ref=1stwebdesigner"><img src="http://www.1stwebdesigner.com/wp-content/uploads/2010/04/codecanyon-php-forms/easy-form-ajax-php-jquery-premium-contact-form.jpg" alt="Easy-form-ajax-php-jquery-premium-contact-form" border="0" /></a></p>
<p><a href="http://codecanyon.net/item/easy-forms/full_screen_preview/64352?ref=1stwebdesigner" target="_blank">View Live Demo</a></p>
<h2>7. <a href="http://codecanyon.net/item/super-ajax-contact-form/71799?ref=1stwebdesigner" target="_blank">Super AJAX Contact Form ($6)</a></h2>
<p>This is a ajax contact form made with PHP and jQuery. The script already include rules of validations fields and with errors messages. This script allows you to perform SMTP authentications, so do not need a personal SMTP server, you can, for example, use Live or Google (Gmail). This way you can send mail locally too!</p>
<p>Features:</p>
<ul>
<li>Cross-browser compatible</li>
<li>Load with ajax</li>
<li>Security captcha</li>
<li>Allow send for multiple adresses according to the subject chosen by the user</li>
<li>and much more.</li>
</ul>
<p>&nbsp;</p>
<p><a href="http://codecanyon.net/item/super-ajax-contact-form/71799?ref=1stwebdesigner"><img src="http://www.1stwebdesigner.com/wp-content/uploads/2010/04/codecanyon-php-forms/super-ajax-php-jquery-premium-contact-form.jpg" alt="Super-ajax-php-jquery-premium-contact-form" border="0" /></a></p>
<p><a href="http://codecanyon.net/item/super-ajax-contact-form/full_screen_preview/71799?ref=1stwebdesigner" target="_blank">View Live Demo</a></p>
<h2>8. <a href="http://codecanyon.net/item/simple-multiple-file-upload/50484?ref=1stwebdesigner" target="_blank">Simple Multiple File Upload</a> ($7)</h2>
<p>This component allows users to upload multiple files from a single form. Uses the jQuery Javascript library to add more file input fields so that the page doesn’t need to be refreshed.</p>
<p>Features:</p>
<ul>
<li>Simple to include</li>
<li>Allows multiple files to be uploaded at once</li>
<li>Highly configurable</li>
<li>Only allow certain file types</li>
<li>Attaches uploaded files to an email</li>
</ul>
<p>&nbsp;</p>
<p><a href="http://codecanyon.net/item/simple-multiple-file-upload/50484?ref=1stwebdesigner"><img src="http://www.1stwebdesigner.com/wp-content/uploads/2010/04/codecanyon-php-forms/simple-php-jquery-premium-multiple-file-upload.jpg" alt="Simple-php-jquery-premium-multiple-file-upload" border="0" /></a></p>
<p>&nbsp;</p>
<p><a href="http://codecanyon.net/item/simple-multiple-file-upload/full_screen_preview/50484?ref=1stwebdesigner" target="_blank">View Live Demo</a></p>
<h2>9. <a href="http://codecanyon.net/item/contact-form-generator/75234?ref=1stwebdesigner" target="_blank">Contact Form Generator</a> ($8)</h2>
<p>Contact Form Generator is a easy way to make your own custom form! You can control the validation rules, input types, icones and errors messages of a easy way.</p>
<p>This script allows you to perform SMTP authentications, so do not need a personal SMTP server, you can, for example, use Live or Google (Gmail). This way you can send mail locally too, this and much more without touch in a line of code!</p>
<p><a href="http://codecanyon.net/item/contact-form-generator/75234?ref=1stwebdesigner"><img src="http://www.1stwebdesigner.com/wp-content/uploads/2010/04/codecanyon-php-forms/generator-php-jquery-premium-contact-form.jpg" alt="Generator-php-jquery-premium-contact-form" border="0" /></a></p>
<p><a href="http://codecanyon.net/item/contact-form-generator/full_screen_preview/75234?ref=1stwebdesigner" target="_blank">View Live Demo</a></p>
<h2>10. <a href="http://codecanyon.net/item/awesome-contact-form/83358?ref=1stwebdesigner" target="_blank">Awesome Contact Form</a> ($8)</h2>
<p>Now supports PHP 4 , full support for dropdown menus, radio buttons and checkboxes, and multiple forms from one installation. Upgrade instructions can be found in the user guide.</p>
<p>This script is a class-based, fully-featured PHP Contact Form with a focus on ease-of-use and extensibility. Includes an autoresponder and custom fields.</p>
<p>It is simple to install and comes packaged with many optional features which can be turned on simply by editing the config file – so no editing of the main source code is needed.</p>
<p><a href="http://codecanyon.net/item/awesome-contact-form/83358?ref=1stwebdesigner"><img src="http://www.1stwebdesigner.com/wp-content/uploads/2010/04/codecanyon-php-forms/awesome-php-jquery-premium-contact-form.jpg" alt="Awesome-php-jquery-premium-contact-form" border="0" /></a></p>
<p><a href="http://codecanyon.net/item/awesome-contact-form/full_screen_preview/83358?ref=1stwebdesigner" target="_blank">View Live Demo</a></p>
<h2>11. <a href="http://codecanyon.net/item/ajax-contact-form-with-google-map-pointer/93949?ref=1stwebdesigner" target="_blank">Ajax Contact Form with Google Map Pointer</a> ($4)</h2>
<p>This script could be a fundamental part of almost any website. It consists of three parts: the map component (javascript), the form component (javascript) and the back-end php script that sends the actual email. Any of these three components could be used separately.</p>
<p><a href="http://codecanyon.net/item/ajax-contact-form-with-google-map-pointer/93949?ref=1stwebdesigner"><img src="http://www.1stwebdesigner.com/wp-content/uploads/2010/04/codecanyon-php-forms/google-map-php-jquery-premium-contact-form.jpg" alt="Google-map-php-jquery-premium-contact-form" border="0" /></a></p>
<p><a href="http://codecanyon.net/item/ajax-contact-form-with-google-map-pointer/full_screen_preview/93949?ref=1stwebdesigner" target="_blank">View Live Demo </a></p>
<h2>12. <a href="http://codecanyon.net/item/send-to-friend-form/89494?ref=1stwebdesigner" target="_blank">Send to Friend Form</a> ($7)</h2>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="http://codecanyon.net/item/send-to-friend-form/89494?ref=1stwebdesigner"><img src="http://www.1stwebdesigner.com/wp-content/uploads/2010/04/codecanyon-php-forms/send-to-friend-php-jquery-premium-contact-form.jpg" alt="Send-to-friend-php-jquery-premium-contact-form" border="0" /></a></p>
<p>Features:</p>
<ul>
<li>Add a link to any website and allow visitors to easily “share” the page with their friends via email.</li>
<li>User can customise the page title and description.</li>
<li>Optional comment that is emailed along with page.</li>
<li>You have control over the format of the email that gets sent, style it with your website branding!</li>
<li>Normal javascript popup mode, or a nice lightbox popover mode so the user doesn’t leave your website.</li>
</ul>
<p><a href="http://codecanyon.net/item/send-to-friend-form/full_screen_preview/89494?ref=1stwebdesigner" target="_blank">View Live Demo </a></p>
<h2>13. <a href="http://codecanyon.net/item/drag-drop-form-manager-with-email-attachments/92911?ref=1stwebdesigner" target="_blank">Drag &amp; Drop Form Manager with E-mail Attachments</a> ($7)</h2>
<p>Features:</p>
<ul>
<li>Embed forms to your php or html files,</li>
<li>Admin Login</li>
<li>Determine your form and field details easily</li>
<li>Add, edit or delete forms and fields to the forms easily</li>
<li>Drag and drop to change the order of fields, forms or options of dropdown, multiselect, checkbox lists and radio groups.</li>
<li>Edit form name and description easily</li>
<li>Determine the e-mail address that you want the form to be sent.</li>
<li>The form automatically creates attachments to e-mails when file fields are added.</li>
</ul>
<p><a href="http://codecanyon.net/item/drag-drop-form-manager-with-email-attachments/92911?ref=1stwebdesigner"><img src="http://www.1stwebdesigner.com/wp-content/uploads/2010/04/codecanyon-php-forms/drag-drop-php-jquery-premium-contact-form.jpg" alt="Drag-drop-php-jquery-premium-contact-form" border="0" /></a></p>
<p><a href="http://codecanyon.net/item/drag-drop-form-manager-with-email-attachments/full_screen_preview/92911?ref=1stwebdesigner" target="_blank">View Live Demo </a></p>
<h2>14. <a href="http://codecanyon.net/item/feedback/89091?ref=1stwebdesigner" target="_blank">FeedBack</a> ($9)</h2>
<p>Feedback provides easy to use, customisable feedback forms for your website visitors to provide you with their comments, suggestions and bug reports. Feedback comes with a special widget which can easily be inserted on every page of your website to allow your website visitors easy access to your feedback forms.</p>
<p>The widget is written in Javascript, but works without Javascript too. The feedback forms are written in PHP and send you an email upon form completion.</p>
<p><a href="http://codecanyon.net/item/feedback/89091?ref=1stwebdesigner"><img src="http://www.1stwebdesigner.com/wp-content/uploads/2010/04/codecanyon-php-forms/feedback-ajax-php-jquery-premium-contact-form.jpg" alt="Feedback-ajax-php-jquery-premium-contact-form" border="0" /></a></p>
<p><a href="http://codecanyon.net/item/feedback/full_screen_preview/89091?ref=1stwebdesigner" target="_blank">View Live Demo</a></p>
<h2>15. <a href="http://codecanyon.net/item/beta-invitation-helper/52620?ref=1stwebdesigner" target="_blank">Beta Invitation Helper</a> ($7)</h2>
<p>A simple app that will store and output email address for your site. It can be used for beta invitations or notifying users when your site is ready. A mysql database is required to store emails addresses.</p>
<p>Features:</p>
<ul>
<li>You can customize the success message.</li>
<li>Email validation is included.</li>
<li>Duplicate emails won’t be recorded.</li>
<li>A custom page is used to view all emails, separated by commas or semi-colon.</li>
</ul>
<p><a href="http://codecanyon.net/item/beta-invitation-helper/52620?ref=1stwebdesigner"><img src="http://www.1stwebdesigner.com/wp-content/uploads/2010/04/codecanyon-php-forms/beta-invitation-ajax-php-jquery-premium-contact-form.jpg" alt="Beta-invitation-ajax-php-jquery-premium-contact-form" border="0" /></a></p>
<p><a href="http://codecanyon.net/item/beta-invitation-helper/full_screen_preview/52620?ref=1stwebdesigner" target="_blank">View Live Demo </a></p>
<h2>16. <a href="http://codecanyon.net/item/simple-php-rsvp-v15/84077?ref=1stwebdesigner" target="_blank">Simple PHP RSVP</a> ($12)</h2>
<p>Simple RSVP is a simple, robust and powerful guest invitation and event management platform. Powered by PHP and backed by mySQL, this all-in-one package allows you complete control and expandability of your events and guests. The reserve form contains a web 2.0, user-friendly interface for your guests to sign up and reserve their place at your event.</p>
<p>The admin panel provides a back end to control and monitor all the activity taking place. Also, various forms of validation have been included. The interface is packed with features that make it easy for anyone to run. Whether you have one event or 2,000, Easy RSVP script is the only script you will ever need.</p>
<p><a href="http://codecanyon.net/item/simple-php-rsvp-v15/84077?ref=1stwebdesigner"><img src="http://www.1stwebdesigner.com/wp-content/uploads/2010/04/codecanyon-php-forms/simpl-rsvp-php-jquery-premium-contact-form.jpg" alt="Simpl-rsvp-php-jquery-premium-contact-form" border="0" /></a></p>
<p><a href="http://codecanyon.net/item/simple-php-rsvp-v15/full_screen_preview/84077?ref=1stwebdesigner" target="_blank">View Live Demo</a></p>
<h2>17. <a href="http://codecanyon.net/item/twitter-contact-page/51348?ref=1stwebdesigner" target="_blank">Twitter Contact Page</a> ($7)</h2>
<p>Do you have a Contact Us page? Would you like to turn that snail mail into a Twitter messaging app? Well then this is the app you are looking for!</p>
<p>Your end users won’t need a twitter account. This app will send you a @mention tweet through your account or send a self-DM.</p>
<p>Features:</p>
<ul>
<li>Configurable to send DMs or public tweets.</li>
<li>Form validation.</li>
<li>Spam bot counter with “Math” feature.</li>
<li>140 character countdown using jquery.</li>
</ul>
<p><a href="http://codecanyon.net/item/twitter-contact-page/51348?ref=1stwebdesigner"><img src="http://www.1stwebdesigner.com/wp-content/uploads/2010/04/codecanyon-php-forms/twitter-php-jquery-premium-contact-form.jpg" alt="Twitter-php-jquery-premium-contact-form" border="0" /></a></p>
<p><a href="http://codecanyon.net/item/twitter-contact-page/full_screen_preview/51348?ref=1stwebdesigner" target="_blank">View Live Demo</a></p>
<h2>18. <a href="http://codecanyon.net/item/ajax-contact-form-3-in-1-autoresponder-recaptcha/91362?ref=1stwebdesigner" target="_blank">Ajax Contact form – 3 in 1 Autoresponder reCaptcha</a> ($7)</h2>
<p>The jQuery powered ajax contact form is the Cadillac of contact forms. It has tons of useful features and is very easy customizable via a single configuration file.</p>
<ul>
<li>3 Stylish Themes</li>
<li>It gracefully degrades. Try it, turn off your JavaScript.</li>
<li>Customizable Auto Responder</li>
<li>reCaptcha Support. It’s super easy to turn it on.</li>
<li>SMTP support</li>
<li>jQuery Powered AJAX + Animations</li>
</ul>
<p>&nbsp;</p>
<p><a href="http://codecanyon.net/item/ajax-contact-form-3-in-1-autoresponder-recaptcha/91362?ref=1stwebdesigner"><img src="http://www.1stwebdesigner.com/wp-content/uploads/2010/04/codecanyon-php-forms/autoresponder-php-jquery-premium-contact-form.jpg" alt="Autoresponder-php-jquery-premium-contact-form" border="0" /></a></p>
<p><a href="http://codecanyon.net/item/ajax-contact-form-3-in-1-autoresponder-recaptcha/full_screen_preview/91362?ref=1stwebdesigner" target="_blank">View Live Demo</a></p>
<h2>19. <a href="http://codecanyon.net/item/contact-me-contact-form-admin-panel/79305?ref=1stwebdesigner" target="_blank">Contact Me – Contact Form + Admin Panel</a> ($9)</h2>
<p>A contact form for your website which links in with a simple but powerful admin panel.</p>
<p>Features:</p>
<ul>
<li>An easy automated setup of databases</li>
<li>Simple and friendly user interface</li>
<li>Secure admin panel for viewing messages</li>
<li>Reply to message from the admin panel without opening up a separate email client</li>
</ul>
<p><a href="http://codecanyon.net/item/contact-me-contact-form-admin-panel/79305?ref=1stwebdesigner"><img src="http://www.1stwebdesigner.com/wp-content/uploads/2010/04/codecanyon-php-forms/admin-php-scrip-auto-responder-premium-contact-form.jpg" alt="Admin-php-scrip-auto-responder-premium-contact-form" border="0" /></a></p>
<p><a href="http://codecanyon.net/item/contact-me-contact-form-admin-panel/full_screen_preview/79305?ref=1stwebdesigner" target="_blank">View Live Demo</a></p>
<h2>20. <a href="http://codecanyon.net/item/palmsform-form-api-for-php/89313?ref=1stwebdesigner" target="_blank">PalmsForm – Form API for PHP</a> ($7)</h2>
<p>PalmsForm takes all the hard work out of form building. You can get a form up and running within minutes. Form configuration and validation was never so easy. The best part about this library is that it is so flexible and convenient for you to customize your form, add / remove form fields, modify error messages, and extend core functionality of the library with minimal effort. As a result, you can use PalmsForm for all kinds of form, in all kinds of web sites and applications. It just works.</p>
<p><a href="http://codecanyon.net/item/palmsform-form-api-for-php/89313?ref=1stwebdesigner"><img src="http://www.1stwebdesigner.com/wp-content/uploads/2010/04/codecanyon-php-forms/palms-ajax-php-jquery-premium-contact-form.jpg" alt="Palms-ajax-php-jquery-premium-contact-form" border="0" /></a></p>
<p><a href="http://codecanyon.net/item/palmsform-form-api-for-php/full_screen_preview/89313?ref=1stwebdesigner" target="_blank">View Live Demo</a></p>
<h2>21. <a href="http://codecanyon.net/item/flux-contact-form-updated-15/86638?ref=1stwebdesigner" target="_blank">Flux Contact Form</a> ($8)</h2>
<p>So what is flux? Flux is a Remarkably simple PHP contact form with admin panel. Dynamically select fields or remove fields on the fly. Would you like a add-on? Flux comes equip with google maps. Other add-ons may be implemented too!</p>
<p>Backed by PHP , this contact form script is in a league of it’s own. Fully extend able, and completely brand able. With just a few files uploaded to your server and few snippets of code, you will have a fully running contact form with customized auto responder. No need for PHP script knowledge or a database, Flux’s simple GUI has you covered.</p>
<p><a href="http://codecanyon.net/item/flux-contact-form-updated-15/86638?ref=1stwebdesigner"><img src="http://www.1stwebdesigner.com/wp-content/uploads/2010/04/codecanyon-php-forms/flux-ajax-php-jquery-premium-contact-form.jpg" alt="Flux-ajax-php-jquery-premium-contact-form" border="0" /></a></p>
<p><a href="http://codecanyon.net/item/flux-contact-form-updated-15/full_screen_preview/86638?ref=1stwebdesigner" target="_blank">View Live Demo</a></p>
<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fericrichers.com%2Fblog%2F2011%2F10%2F21-easy-to-customize-premium-php-contact-forms%2F&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div class="rw-left"><div class="rw-ui-container rw-class-blog-post rw-urid-11210"></div></div>]]></content:encoded>
			<wfw:commentRss>http://ericrichers.com/blog/2011/10/21-easy-to-customize-premium-php-contact-forms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Actionscript 3.0 Sound Programming Video Textbook</title>
		<link>http://ericrichers.com/blog/2011/10/flash-actionscript-3-0-sound-programming-video-textbook/</link>
		<comments>http://ericrichers.com/blog/2011/10/flash-actionscript-3-0-sound-programming-video-textbook/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 17:28:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[tuts]]></category>
		<category><![CDATA[videos]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://ericrichers.com/blog/?p=1108</guid>
		<description><![CDATA[httpvp://www.youtube.com/user/flashbuilding#grid/user/8936DC18DF85FB3E]]></description>
			<content:encoded><![CDATA[<p>httpvp://www.youtube.com/user/flashbuilding#grid/user/8936DC18DF85FB3E</p>
<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fericrichers.com%2Fblog%2F2011%2F10%2Fflash-actionscript-3-0-sound-programming-video-textbook%2F&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div class="rw-left"><div class="rw-ui-container rw-class-blog-post rw-urid-11090"></div></div>]]></content:encoded>
			<wfw:commentRss>http://ericrichers.com/blog/2011/10/flash-actionscript-3-0-sound-programming-video-textbook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drupal features</title>
		<link>http://ericrichers.com/blog/2011/10/drupal-features/</link>
		<comments>http://ericrichers.com/blog/2011/10/drupal-features/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 21:35:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[Drupal 6]]></category>
		<category><![CDATA[Kitchen Sink]]></category>
		<category><![CDATA[drupal features]]></category>

		<guid isPermaLink="false">http://ericrichers.com/blog/?p=1104</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://blip.tv/play/AYHhqnAC.html" width="480" height="300" frameborder="0" allowfullscreen></iframe><embed type="application/x-shockwave-flash" src="http://a.blip.tv/api.swf#AYHhqnAC" style="display:none"></embed></p>
<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fericrichers.com%2Fblog%2F2011%2F10%2Fdrupal-features%2F&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div class="rw-left"><div class="rw-ui-container rw-class-blog-post rw-urid-11050"></div></div>]]></content:encoded>
			<wfw:commentRss>http://ericrichers.com/blog/2011/10/drupal-features/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drupal 7 Install Profiles</title>
		<link>http://ericrichers.com/blog/2011/09/d7-install-profiles/</link>
		<comments>http://ericrichers.com/blog/2011/09/d7-install-profiles/#comments</comments>
		<pubDate>Tue, 27 Sep 2011 07:29:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[install profiles]]></category>

		<guid isPermaLink="false">http://ericrichers.com/blog/2011/09/d7-install-profiles/</guid>
		<description><![CDATA[Download &#38; Extend Download &#38; Extend Home Drupal Core Modules Themes Translations Installation Profiles Installation profiles 22 Installation profiles match your search Filter by compatibility: Status: Search Installation profiles: Sort by: Installation profiles provide site features and functions for a &#8230; <a href="http://ericrichers.com/blog/2011/09/d7-install-profiles/">Read More.. <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div id="page" class="container-12 clear-block">
<div id="page-inner">
<div id="page-heading" class="grid-12">
<div id="page-title-tools" class="clear-block">
<div class="grid-8 alpha">
<div id="page-title" class="h2">Download &amp; Extend</div>
</p></div>
<div id="page-tools" class="grid-4 omega">                              </div>
</p></div>
<div id="nav-content" class="clear-block nav-content-downloads">
<ul class="links">
<li class="home first"><a href="http://drupal.org/download">Download &amp; Extend Home</a></li>
<li class="core"><a href="http://drupal.org/project/drupal">Drupal Core</a></li>
<li class="modules"><a href="http://drupal.org/project/modules">Modules</a></li>
<li class="themes"><a href="http://drupal.org/project/themes">Themes</a></li>
<li class="translations"><a href="http://localize.drupal.org/">Translations</a></li>
<li class="install-profiles active last"><a href="http://drupal.org/project/installation%2Bprofiles" class="active">Installation Profiles</a></li>
</ul></div>
<h1 id="page-subtitle">Installation profiles</h1>
</p></div>
<div id="column-left" class="grid-12">
<div id="content" class="clear-block">
<div id="content-inner" class="clear-block">
<form accept-charset="UTF-8" method="post" id="project-solr-browse-projects-form">
<div>
<h3 class="results-count">22 Installation profiles match your search</h3>
<div class="form-item" id="edit-api-version-wrapper"> <label for="edit-api-version">Filter by compatibility: </label>  </div>
<div class="form-item" id="edit-bs-project-sandbox-wrapper"> <label for="edit-bs-project-sandbox">Status: </label>  </div>
<div class="form-item" id="edit-text-wrapper"> <label for="edit-text">Search Installation profiles: </label><br />
<input maxlength="128" name="text" id="edit-text" size="20" value="" class="form-text" type="text"/> </div>
<div class="form-item" id="edit-solrsort-wrapper"> <label for="edit-solrsort">Sort by: </label>  </div>
</p></div>
</form>
<div class="project-type-description">
<p>Installation profiles provide  site features and functions for a specific type of site as a single  download containing Drupal core, contributed modules, themes, and  pre-defined configuration. They make it possible to quickly set up a  complex, use-specific site in fewer steps than if installing and  configuring elements individually.  For example, an <a href="http://drupal.org/project/cod">installation profile for conferences</a> might include modules for advanced user registration, attendee  profiles, ticketing, and a list of speakers and sessions. Once  installed, installation profiles can be configured and customized the  same as traditionally-built Drupal sites. Refer to the <a href="http://drupal.org/node/306267">installation profile documentation</a> for more information.  </p>
</div>
<div id="project-overview">
<div class="project clear-block">
<h2 class="title"><a href="http://drupal.org/project/openoutreach">Open Outreach</a></h2>
<div class="item-list">
<ul class="project-meta flat">
<li class="submitted-by first">Posted by <a href="http://drupal.org/user/4481" title="View user profile.">nedjo</a> on <em>June 18, 2010 at 8:28pm</em></li>
<li class="last-changed first">Last changed: 2 weeks 12 hours ago</li>
</ul>
</div>
<p>Open Outreach is a  Drupal distribution aimed at the nonprofit sector.</p>
<p>The Drupal 7 beta release of Open Outreach is now available for <a href="https://github.com/nedjo/openoutreach" rel="nofollow">download</a>. It has rough edges, partly because many of the modules used in Open  Outreach don&#8217;t yet have full Drupal 7 releases, but is mostly working.  For the next beta release, we plan to remove calendar functionality  temporarily until Date and Calendar stabilize for D7.</p>
<p><strong>New</strong>: User documentation for Open Outreach 7 is now available for <a href="http://chocolatelilyweb.ca/sites/default/files/User%20documentation%20for%20Open%20Outreach%20for%20Drupal%207.pdf" rel="nofollow">download</a>.</p>
<p>Open Outreach contains features frequently used by organizations such as events calendars, image and video handling, and ways to engage with  members, enabling small groups with limited budgets to become more  independent in setting up and maintaining their own website. By making  Drupal easy to use for small groups lacking technical staff or  resources, Open Outreach will help groups to make the move to open  source.</p>
<p>Open Outreach features are being developed as part of the <a href="http://drupal.org/project/debut" rel="nofollow">Debut</a> feature set. See the <a href="http://drupal.org/project/debut" rel="nofollow">Debut</a> page for a list of the currently available features. Please file issues related to Open Outreach functionality on the individual features.</p>
<p>Development of Open Outreach sponsored by <a href="http://chocolatelilyweb.ca/" rel="nofollow">Chocolate Lily</a>.</p>
<div class="node-footer"><span class="links"><a href="http://drupal.org/project/openoutreach" class="read_more">Find out more</a> ⋅ <a href="http://drupal.org/project/issues/openoutreach" class="issues">Bugs and feature requests</a></span> <span class="separator">⋅</span> <span class="terms">Categories: <a href="http://drupal.org/taxonomy/term/13028" rel="tag" title="Bug reports are looked at; requested features may be implemented." class="taxonomy_term_13028">Actively maintained</a>, <a href="http://drupal.org/taxonomy/term/9988" rel="tag" title="" class="taxonomy_term_9988">Under active development</a>, <a href="http://drupal.org/project/installation%20profiles" rel="tag" title="Installation profiles provide site features and functions for a specific type of site as a single download containing Drupal core, contributed modules, themes, and pre-defined configuration. They make it possible to quickly set up a complex, use-specific site in fewer steps than if installing and configuring elements individually.  For example, an installation profile for conferences might include modules for advanced user registration, attendee profiles, ticketing, and a list of speakers and sessions. Once installed, installation profiles can be configured and customized the same as traditionally-built Drupal sites. Refer to the installation profile documentation for more information." class="taxonomy_term_96 active">Installation profiles</a></span></div>
</div>
<div class="project clear-block">
<div class="image-attach-teaser image-attach-node-1081238" style="width: 218px;"><a href="http://drupal.org/project/recruiter"><img src="http://drupal.org/files/images/eRecruiter.thumbnail.jpg" alt="eRecruiter.jpg" title="eRecruiter.jpg" class="image image-thumbnail " height="53" width="218" /></a></div>
<h2 class="title"><a href="http://drupal.org/project/recruiter">eRecruiter</a></h2>
<div class="item-list">
<ul class="project-meta flat">
<li class="submitted-by first">Posted by <a href="http://drupal.org/user/16747" title="View user profile.">fago</a> on <em>September 15, 2010 at 9:37am</em></li>
<li class="last-changed first">Last changed: 5 weeks 4 days ago</li>
</ul>
</div>
<p>eRecruiter is a Drupal distribution for building Drupal  based e-recruitment platforms. Users can register either as recruiter  and post job classifieds or they can register as applicants and fill out their resume. A faceted search helps users to find jobs and possible  job candidates.</p>
<p>Read more at <a href="http://epiqo.com/recruiter" rel="nofollow">http://epiqo.com/recruiter</a>.</p>
<h3>Requirements</h3>
<ul>
<li>Apache Solr</li>
</ul>
<h3>Full download</h3>
<p><a name="full" rel="nofollow"></a></p>
<p>Unfortunately the drupal.org packaging system does not support all  features necessary to build the eRecruiter distribution automatically  yet. So for now you can just checkout the code and build the  distribution yourself (see <a href="http://drupalcode.org/project/recruiter.git/blob_plain/refs/heads/7.x-1.x:/README.txt" rel="nofollow">README.txt</a>), or just use one of our fully built and packaged releases hosted off-drupal.org. </p>
<p><strong>eRecruiter downloads:</strong></p>
<ul>
<li> eRecruiter <a href="http://epiqo.com/download/recruiter-7.x-1.0-beta4.tar.gz" rel="nofollow">7.x-1.0-beta4.tar.gz</a> (Aug 18th, 2011)</li>
<li> eRecruiter <a href="http://epiqo.com/download/recruiter-7.x-1.0-beta3.tar.gz" rel="nofollow">7.x-1.0-beta3.tar.gz</a> (Jun 15th, 2011)</li>
<li> eRecruiter <a href="http://epiqo.com/download/recruiter-7.x-1.0-BETA1.tar.gz" rel="nofollow">7.x-1.0-beta1.tar.gz</a> (Mar 4th, 2011)</li>
</ul>
<div class="node-footer"><span class="links"><a href="http://drupal.org/project/recruiter" class="read_more">Find out more</a> ⋅ <a href="http://drupal.org/project/issues/recruiter" class="issues">Bugs and feature requests</a></span> <span class="separator">⋅</span> <span class="terms">Categories: <a href="http://drupal.org/taxonomy/term/13028" rel="tag" title="Bug reports are looked at; requested features may be implemented." class="taxonomy_term_13028">Actively maintained</a>, <a href="http://drupal.org/taxonomy/term/9988" rel="tag" title="" class="taxonomy_term_9988">Under active development</a>, <a href="http://drupal.org/project/installation%20profiles" rel="tag" title="Installation profiles provide site features and functions for a specific type of site as a single download containing Drupal core, contributed modules, themes, and pre-defined configuration. They make it possible to quickly set up a complex, use-specific site in fewer steps than if installing and configuring elements individually.  For example, an installation profile for conferences might include modules for advanced user registration, attendee profiles, ticketing, and a list of speakers and sessions. Once installed, installation profiles can be configured and customized the same as traditionally-built Drupal sites. Refer to the installation profile documentation for more information." class="taxonomy_term_96 active">Installation profiles</a></span></div>
</div>
<div class="project clear-block">
<h2 class="title"><a href="http://drupal.org/project/media_dev">Media Development Profile</a></h2>
<div class="item-list">
<ul class="project-meta flat">
<li class="submitted-by first">Posted by <a href="http://drupal.org/user/68912" title="View user profile.">JacobSingh</a> on <em>January 15, 2010 at 5:11pm</em></li>
<li class="last-changed first">Last changed: 1 week 3 days ago</li>
</ul>
</div>
<p>This profile is intended for developers who want to work on <a href="http://drupal.org/project/media" title="http://drupal.org/project/media" rel="nofollow">http://drupal.org/project/media</a>. It gets your D7 installation configured to insert images into a text area via CKEditor.</p>
<p>Apart from that, the profile&#8217;s make file downloads a number of media provider (see <a href="http://groups.drupal.org/node/168009" title="http://groups.drupal.org/node/168009" rel="nofollow">http://groups.drupal.org/node/168009</a>) and development modules, to get you going with media testing/development.</p>
<h2>Ongoing</h2>
<ul>
<li>Update versions of required/optional modules</li>
<li>Update/extend functionality of the profile (= what it does upon installation)</li>
</ul>
<p>Want to help keeping the profile up to date? Head over to <a href="http://drupal.org/project/issues/media_dev" rel="nofollow">the issue queue</a>.</p>
<h2>How to install</h2>
<ol>
<li>Download &amp; install the following projects:
<ul>
<li>Drush: <a href="http://drupal.org/project/drush" title="http://drupal.org/project/drush" rel="nofollow">http://drupal.org/project/drush</a></li>
<li>Drush make: <a href="http://drupal.org/project/drush_make" title="http://drupal.org/project/drush_make" rel="nofollow">http://drupal.org/project/drush_make</a></li>
</ul>
</li>
<li>Run the following command:<br />1.x branch: <code>drush make <a href="http://is.gd/8EKNFT" title="http://is.gd/8EKNFT" rel="nofollow">http://is.gd/8EKNFT</a> --prepare-install media_dev</code>
<p>2.x branch: <code>drush make <a href="http://is.gd/KoSSpW" title="http://is.gd/KoSSpW" rel="nofollow">http://is.gd/KoSSpW</a> --prepare-install media_dev</code></p>
<p>to download everything (core, the media profile, contrib modules &amp; libraries)<br />into a folder called &#8216;media_dev&#8217;. </p>
</li>
<li>Install the site as usual, using the &#8216;Media development profile&#8217; as the<br />site&#8217;s profile.</li>
</ol>
<div class="node-footer"><span class="links"><a href="http://drupal.org/project/media_dev" class="read_more">Find out more</a> ⋅ <a href="http://drupal.org/project/issues/media_dev" class="issues">Bugs and feature requests</a></span> <span class="separator">⋅</span> <span class="terms">Categories: <a href="http://drupal.org/taxonomy/term/13028" rel="tag" title="Bug reports are looked at; requested features may be implemented." class="taxonomy_term_13028">Actively maintained</a>, <a href="http://drupal.org/taxonomy/term/9988" rel="tag" title="" class="taxonomy_term_9988">Under active development</a>, <a href="http://drupal.org/project/installation%20profiles" rel="tag" title="Installation profiles provide site features and functions for a specific type of site as a single download containing Drupal core, contributed modules, themes, and pre-defined configuration. They make it possible to quickly set up a complex, use-specific site in fewer steps than if installing and configuring elements individually.  For example, an installation profile for conferences might include modules for advanced user registration, attendee profiles, ticketing, and a list of speakers and sessions. Once installed, installation profiles can be configured and customized the same as traditionally-built Drupal sites. Refer to the installation profile documentation for more information." class="taxonomy_term_96 active">Installation profiles</a></span></div>
</div>
<div class="project clear-block">
<div class="image-attach-teaser image-attach-node-686036" style="width: 218px;"><a href="http://drupal.org/project/openpublish"><img src="http://drupal.org/files/images/Screen%20shot%202010-01-15%20at%202.40.44%20PM.thumbnail.png" alt="OpenPublish Logo" title="OpenPublish Logo" class="image image-thumbnail " height="99" width="218" /></a></div>
<h2 class="title"><a href="http://drupal.org/project/openpublish">OpenPublish</a></h2>
<div class="item-list">
<ul class="project-meta flat">
<li class="submitted-by first">Posted by <a href="http://drupal.org/user/43670" title="View user profile.">febbraro</a> on <em>October 20, 2008 at 10:00pm</em></li>
<li class="last-changed first">Last changed: 4 days 17 hours ago</li>
</ul>
</div>
<h2>About</h2>
<p><a href="http://openpublishapp.com/" rel="nofollow">OpenPublish</a> is a packaged distribution of the popular open source social publishing  platform, Drupal, that has been tailored to the needs of today&#8217;s online  publishers.</p>
<p>OpenPublish is ideal for the implementation of a variety of media  outlets sites including magazines, newspapers, journals, trade  publications, broadcast, wire service, multimedia sites and membership  publications.</p>
<h2>Status</h2>
<p>OpenPublish is used in production by several hundred news websites,  including some well-known, high-traffic publications. Current version of OpenPublish is 2.3 for D6, and an alpha release is available for D7.</p>
<h2>Where to Download?</h2>
<p>Because of the inclusion of some 3rd party libraries, we need to host OpenPublish download off of drupal.org, you can <a href="http://openpublishapp.com/download" rel="nofollow">download</a> it from the <a href="http://openpublishapp.com/" rel="nofollow">OpenPublish website</a> .</p>
<h2>OpenPublish Group: The Place to Find Answers</h2>
<p>OpenPublish is a collection of multiple modules. For all-things OpenPublish, we have created a group: <a href="http://groups.drupal.org/openpublish" title="http://groups.drupal.org/openpublish" rel="nofollow">http://groups.drupal.org/openpublish</a> which is probably the best place to ask questions and find answers,  unless you are having a specific technical problem directly related to  the installation profile, in which case &#8211; feel free to open an issue in  the issue queue.</p>
<div class="node-footer"><span class="links"><a href="http://drupal.org/project/openpublish" class="read_more">Find out more</a> ⋅ <a href="http://drupal.org/project/issues/openpublish" class="issues">Bugs and feature requests</a></span> <span class="separator">⋅</span> <span class="terms">Categories: <a href="http://drupal.org/taxonomy/term/13028" rel="tag" title="Bug reports are looked at; requested features may be implemented." class="taxonomy_term_13028">Actively maintained</a>, <a href="http://drupal.org/taxonomy/term/9988" rel="tag" title="" class="taxonomy_term_9988">Under active development</a>, <a href="http://drupal.org/project/installation%20profiles" rel="tag" title="Installation profiles provide site features and functions for a specific type of site as a single download containing Drupal core, contributed modules, themes, and pre-defined configuration. They make it possible to quickly set up a complex, use-specific site in fewer steps than if installing and configuring elements individually.  For example, an installation profile for conferences might include modules for advanced user registration, attendee profiles, ticketing, and a list of speakers and sessions. Once installed, installation profiles can be configured and customized the same as traditionally-built Drupal sites. Refer to the installation profile documentation for more information." class="taxonomy_term_96 active">Installation profiles</a></span></div>
</div>
<div class="project clear-block">
<h2 class="title"><a href="http://drupal.org/project/bahai_incubator">Local Baha&#8217;i Community Website Incubator</a></h2>
<div class="item-list">
<ul class="project-meta flat">
<li class="submitted-by first">Posted by <a href="http://drupal.org/user/138300" title="View user profile.">dnotes</a> on <em>April 12, 2011 at 5:13pm</em></li>
<li class="last-changed first">Last changed: 11 weeks 6 days ago</li>
</ul>
</div>
<p>The Local Baha&#8217;i Community Website Incubator is an  installation profile that incorporates many features that would be  commonly used on a website for a local Baha&#8217;i community or a group of  communities, including news, events, blogs, facilities and localities,  map and social media integration, and user-submitted content.</p>
<p>### Versions</p>
<p>The incubator platform was originally built in Drupal 6 for  conceptual testing; however, the decision has been made to move forward  with the project in Drupal 7.  It is uncertain that there will be an  automatic upgrade path from 6.x to 7.x.</p>
<p>### 6.x branch</p>
<p>The 6.x branch works.  However, support for it is being phased out in favor of the 7.x branch, and it is uncertain that there will be an  upgrade path, so we recommend to wait for a viable 7.x release.</p>
<p>### 7.x branch</p>
<p><i>Development on the 7.x branch began in July 2011.</i></p>
<p>Currently, the 7.x install profile does nothing more than the  standard Drupal profile.  Please wait for a viable release to install  and use this profile.</p>
<div class="node-footer"><span class="links"><a href="http://drupal.org/project/bahai_incubator" class="read_more">Find out more</a> ⋅ <a href="http://drupal.org/project/issues/bahai_incubator" class="issues">Bugs and feature requests</a></span> <span class="separator">⋅</span> <span class="terms">Categories: <a href="http://drupal.org/taxonomy/term/13028" rel="tag" title="Bug reports are looked at; requested features may be implemented." class="taxonomy_term_13028">Actively maintained</a>, <a href="http://drupal.org/taxonomy/term/9988" rel="tag" title="" class="taxonomy_term_9988">Under active development</a>, <a href="http://drupal.org/project/installation%20profiles" rel="tag" title="Installation profiles provide site features and functions for a specific type of site as a single download containing Drupal core, contributed modules, themes, and pre-defined configuration. They make it possible to quickly set up a complex, use-specific site in fewer steps than if installing and configuring elements individually.  For example, an installation profile for conferences might include modules for advanced user registration, attendee profiles, ticketing, and a list of speakers and sessions. Once installed, installation profiles can be configured and customized the same as traditionally-built Drupal sites. Refer to the installation profile documentation for more information." class="taxonomy_term_96 active">Installation profiles</a></span></div>
</div>
<div class="project clear-block">
<h2 class="title"><a href="http://drupal.org/project/commerce_kickstart">Commerce Kickstart</a></h2>
<div class="item-list">
<ul class="project-meta flat">
<li class="submitted-by first">Posted by <a href="http://drupal.org/user/49344" title="View user profile.">rszrama</a> on <em>March 2, 2011 at 7:31pm</em></li>
<li class="last-changed first">Last changed: 16 hours 16 min ago</li>
</ul>
</div>
<p>Commerce Kickstart is an installation profile designed to get you up and running quickly with Drupal Commerce.</p>
<p>It duplicates a standard Drupal installation and provides additional  configuration for the Drupal Commerce modules and components.  During  the installation process, you can optionally create example content to  demonstrate how the various pieces of Drupal Commerce are supposed to  work.</p>
<p>Sponsored by <a href="http://www.commerceguys.com/" rel="nofollow">Commerce Guys</a>.</p>
<div class="node-footer"><span class="links"><a href="http://drupal.org/project/commerce_kickstart" class="read_more">Find out more</a> ⋅ <a href="http://drupal.org/project/issues/commerce_kickstart" class="issues">Bugs and feature requests</a></span> <span class="separator">⋅</span> <span class="terms">Categories: <a href="http://drupal.org/taxonomy/term/13028" rel="tag" title="Bug reports are looked at; requested features may be implemented." class="taxonomy_term_13028">Actively maintained</a>, <a href="http://drupal.org/taxonomy/term/9988" rel="tag" title="" class="taxonomy_term_9988">Under active development</a>, <a href="http://drupal.org/project/installation%20profiles" rel="tag" title="Installation profiles provide site features and functions for a specific type of site as a single download containing Drupal core, contributed modules, themes, and pre-defined configuration. They make it possible to quickly set up a complex, use-specific site in fewer steps than if installing and configuring elements individually.  For example, an installation profile for conferences might include modules for advanced user registration, attendee profiles, ticketing, and a list of speakers and sessions. Once installed, installation profiles can be configured and customized the same as traditionally-built Drupal sites. Refer to the installation profile documentation for more information." class="taxonomy_term_96 active">Installation profiles</a></span></div>
</div>
<div class="project clear-block">
<div class="image-attach-teaser image-attach-node-339688" style="width: 218px;"><a href="http://drupal.org/project/demo_profile"><img src="http://drupal.org/files/images/demo_profile.thumbnail.png" alt="Demonstration Site Install Profile screenshot" title="Demonstration Site Install Profile screenshot" class="image image-thumbnail " height="150" width="218" /></a></div>
<h2 class="title"><a href="http://drupal.org/project/demo_profile">Demonstration Site Install Profile</a></h2>
<div class="item-list">
<ul class="project-meta flat">
<li class="submitted-by first">Posted by <a href="http://drupal.org/user/61114" title="View user profile.">Rob Loach</a> on <em>November 27, 2008 at 5:18am</em></li>
<li class="last-changed first">Last changed: 1 year 45 weeks ago</li>
</ul>
</div>
<p>Allows restoration of the <a href="http://drupal.org/project/demo" rel="nofollow">Demonstration Site</a> module&#8217;s database dumps during site installation.</p>
<div class="node-footer"><span class="links"><a href="http://drupal.org/project/demo_profile" class="read_more">Find out more</a> ⋅ <a href="http://drupal.org/project/issues/demo_profile" class="issues">Bugs and feature requests</a></span> <span class="separator">⋅</span> <span class="terms">Categories: <a href="http://drupal.org/project/installation%20profiles" rel="tag" title="Installation profiles provide site features and functions for a specific type of site as a single download containing Drupal core, contributed modules, themes, and pre-defined configuration. They make it possible to quickly set up a complex, use-specific site in fewer steps than if installing and configuring elements individually.  For example, an installation profile for conferences might include modules for advanced user registration, attendee profiles, ticketing, and a list of speakers and sessions. Once installed, installation profiles can be configured and customized the same as traditionally-built Drupal sites. Refer to the installation profile documentation for more information." class="taxonomy_term_96 active">Installation profiles</a></span></div>
</div>
<div class="project clear-block">
<div class="image-attach-teaser image-attach-node-775570" style="width: 218px;"><a href="http://drupal.org/project/displaysuite"><img src="http://drupal.org/files/images/DS_logo_groot.thumbnail.png" alt="DS_logo_groot.png" title="DS_logo_groot.png" class="image image-thumbnail " height="66" width="218" /></a></div>
<h2 class="title"><a href="http://drupal.org/project/displaysuite">Display Suite profile</a></h2>
<div class="item-list">
<ul class="project-meta flat">
<li class="submitted-by first">Posted by <a href="http://drupal.org/user/107403" title="View user profile.">swentel</a> on <em>April 19, 2010 at 2:43pm</em></li>
<li class="last-changed first">Last changed: 33 weeks 3 days ago</li>
</ul>
</div>
<p>The Display Suite profile contains all modules which are  supported by Display Suite. We don&#8217;t enable all modules by default in  the installation profile, we just wanted to package them all, so you  know what&#8217;s possible. </p>
<p>We also packaged the Nodeform Columns module for the D6 version which enables you to organise your node forms in an easy way. If you don&#8217;t  really care about fieldgroups on the node form page, but need them on  the frontend, you don&#8217;t need to enable fieldgroups from CCK. The same  applies to the tabs and cck fieldgroup tabs module, which are also  included in the profile. Display Suite has this functionality by  default.</p>
<p><strong>Important</strong>: some modules (like gmap and location)  require the dev version to work properly, but for obvious reasons, the  packed profile only contains official releases.</p>
<p>Read <a href="http://drupal.org/project/ds" title="http://drupal.org/project/ds" rel="nofollow">http://drupal.org/project/ds</a> for more info and documentation about the Display Suite module.</p>
<div class="node-footer"><span class="links"><a href="http://drupal.org/project/displaysuite" class="read_more">Find out more</a> ⋅ <a href="http://drupal.org/project/issues/displaysuite" class="issues">Bugs and feature requests</a></span> <span class="separator">⋅</span> <span class="terms">Categories: <a href="http://drupal.org/taxonomy/term/13028" rel="tag" title="Bug reports are looked at; requested features may be implemented." class="taxonomy_term_13028">Actively maintained</a>, <a href="http://drupal.org/taxonomy/term/13030" rel="tag" title="Bug reports are looked at; code is changed if a patch is provided to fix the issue." class="taxonomy_term_13030">Maintenance fixes only</a>, <a href="http://drupal.org/project/installation%20profiles" rel="tag" title="Installation profiles provide site features and functions for a specific type of site as a single download containing Drupal core, contributed modules, themes, and pre-defined configuration. They make it possible to quickly set up a complex, use-specific site in fewer steps than if installing and configuring elements individually.  For example, an installation profile for conferences might include modules for advanced user registration, attendee profiles, ticketing, and a list of speakers and sessions. Once installed, installation profiles can be configured and customized the same as traditionally-built Drupal sites. Refer to the installation profile documentation for more information." class="taxonomy_term_96 active">Installation profiles</a></span></div>
</div>
<div class="project clear-block">
<h2 class="title"><a href="http://drupal.org/project/feeds_test">Feeds Test Site</a></h2>
<div class="item-list">
<ul class="project-meta flat">
<li class="submitted-by first">Posted by <a href="http://drupal.org/user/53995" title="View user profile.">alex_b</a> on <em>June 20, 2010 at 2:36am</em></li>
<li class="last-changed first">Last changed: 51 weeks 4 days ago</li>
</ul>
</div>
<p>A Drupal installation profile for testing <a href="http://drupal.org/project/feeds" rel="nofollow">Feeds module</a>.</p>
<h3>Installation</h3>
<p>Download and install following <a href="http://drupal.org/getting-started/install" rel="nofollow">Drupal installation instructions</a>. When prompted for which profile to install, choose &#8220;Feeds Test Site&#8221;.</p>
<p>Once installed, manually install Simpletest following its setup  instructions in INSTALL.txt. Simpletest is available in  profiles/feeds_test/modules/simpletest but it is not automatically  enabled as it will require you to patch Drupal core before installation. Patch simpletest with <a href="http://drupal.org/node/587304#comment-2083362" rel="nofollow">#587304-3</a>.</p>
<p>Then, download <a>SimplePie</a> and place simplepie.inc in feeds/libraries. </p>
<p>Go to admin/build/testing, select &#8220;Feeds&#8221; and run tests.</p>
<h3>Developers</h3>
<p>If you develop for Feeds, run rebuild-dev.sh in profiles/feeds_test  which will rebuild the modules directory, check out the latest Feeds  version from CVS and patch Simpletest module (rebuild-dev.sh won&#8217;t patch Drupal core though, so you still have to take care of that yourself).</p>
<p>For running rebuild-dev.sh, you will need <a href="http://drupal.org/project/drush" rel="nofollow">drush &gt;= 3.1</a> and <a href="http://drupal.org/project/drush_make" rel="nofollow">drush_make &gt;= 2.0-beta7</a>.</p>
<h3>Drupal 7</h3>
<div class="node-footer"><span class="links"><a href="http://drupal.org/project/feeds_test" class="read_more">Find out more</a> ⋅ <a href="http://drupal.org/project/issues/feeds_test" class="issues">Bugs and feature requests</a></span> <span class="separator">⋅</span> <span class="terms">Categories: <a href="http://drupal.org/taxonomy/term/9988" rel="tag" title="" class="taxonomy_term_9988">Under active development</a>, <a href="http://drupal.org/project/installation%20profiles" rel="tag" title="Installation profiles provide site features and functions for a specific type of site as a single download containing Drupal core, contributed modules, themes, and pre-defined configuration. They make it possible to quickly set up a complex, use-specific site in fewer steps than if installing and configuring elements individually.  For example, an installation profile for conferences might include modules for advanced user registration, attendee profiles, ticketing, and a list of speakers and sessions. Once installed, installation profiles can be configured and customized the same as traditionally-built Drupal sites. Refer to the installation profile documentation for more information." class="taxonomy_term_96 active">Installation profiles</a></span></div>
</div>
<div class="project clear-block">
<div class="image-attach-teaser image-attach-node-966414" style="width: 218px;"><a href="http://drupal.org/project/dsk"><img src="http://drupal.org/files/images/Farbfaecher-3.thumbnail.jpg" alt="Farbfaecher-3.jpg" title="Farbfaecher-3.jpg" class="image image-thumbnail " height="195" width="218" /></a></div>
<h2 class="title"><a href="http://drupal.org/project/dsk">Designer Starter Kit</a></h2>
<div class="item-list">
<ul class="project-meta flat">
<li class="submitted-by first">Posted by <a href="http://drupal.org/user/96718" title="View user profile.">eigentor</a> on <em>November 9, 2010 at 7:05am</em></li>
<li class="last-changed first">Last changed: 27 weeks 3 days ago</li>
</ul>
</div>
<p>The Designer Starter Kit is ultimately to become one or  more installation profiles, which a Designer that is new to Drupal can  download and install, and right away start to do a design for this  installation. The thing that is lacking from the profiles is styling.  There is an empty theme inside, but the styling looks, say, like Stark. </p>
<p>The idea for this project originated at the Design Camp Prague 2010.  We want to make it easy for a designer to get a kickstart. The  installation profile (s) will be built for special use cases:  Brochureware, Portfolio, Blogging, you name it. There is also some  sample content, so the profile (s) really look and (basically) work like an installation profile for the respective use case.</p>
<p>We see there is quite some overlap with initiatives to create  kick-ass install profiles that let Drupal shine out of the box. But we  have to start somewhere. These profiles are not aimed at creating a  usable profile, but to present some sample content and the real look, so a designer has something do design for.</p>
<p>We also plan on including a PSD file that mirrors the profile and has all the important elements in it (Comments, User image, Submitted  information, read more link)</p>
<h2>Call to action</h2>
<div class="node-footer"><span class="links"><a href="http://drupal.org/project/dsk" class="read_more">Find out more</a> ⋅ <a href="http://drupal.org/project/issues/dsk" class="issues">Bugs and feature requests</a></span> <span class="separator">⋅</span> <span class="terms">Categories: <a href="http://drupal.org/taxonomy/term/13028" rel="tag" title="Bug reports are looked at; requested features may be implemented." class="taxonomy_term_13028">Actively maintained</a>, <a href="http://drupal.org/taxonomy/term/9988" rel="tag" title="" class="taxonomy_term_9988">Under active development</a>, <a href="http://drupal.org/project/installation%20profiles" rel="tag" title="Installation profiles provide site features and functions for a specific type of site as a single download containing Drupal core, contributed modules, themes, and pre-defined configuration. They make it possible to quickly set up a complex, use-specific site in fewer steps than if installing and configuring elements individually.  For example, an installation profile for conferences might include modules for advanced user registration, attendee profiles, ticketing, and a list of speakers and sessions. Once installed, installation profiles can be configured and customized the same as traditionally-built Drupal sites. Refer to the installation profile documentation for more information." class="taxonomy_term_96 active">Installation profiles</a></span></div>
</div>
<div class="project clear-block">
<h2 class="title"><a href="http://drupal.org/project/omega_profile">Omega Install Profile</a></h2>
<div class="item-list">
<ul class="project-meta flat">
<li class="submitted-by first">Posted by <a href="http://drupal.org/user/159141" title="View user profile.">himerus</a> on <em>January 31, 2011 at 4:43pm</em></li>
<li class="last-changed first">Last changed: 27 weeks 5 days ago</li>
</ul>
</div>
<p>This project is the &#8220;starterkit&#8221; for all <a href="http://drupal.org/project/omega" rel="nofollow">Omega</a> projects.</p>
<p>This includes many popular modules, and the Omega base theme and tools. Primarily developed at <a href="https://github.com/himerus/omega_profile" rel="nofollow">GitHub</a>.</p>
<div class="node-footer"><span class="links"><a href="http://drupal.org/project/omega_profile" class="read_more">Find out more</a> ⋅ <a href="http://drupal.org/project/issues/omega_profile" class="issues">Bugs and feature requests</a></span> <span class="separator">⋅</span> <span class="terms">Categories: <a href="http://drupal.org/taxonomy/term/13028" rel="tag" title="Bug reports are looked at; requested features may be implemented." class="taxonomy_term_13028">Actively maintained</a>, <a href="http://drupal.org/taxonomy/term/9988" rel="tag" title="" class="taxonomy_term_9988">Under active development</a>, <a href="http://drupal.org/project/installation%20profiles" rel="tag" title="Installation profiles provide site features and functions for a specific type of site as a single download containing Drupal core, contributed modules, themes, and pre-defined configuration. They make it possible to quickly set up a complex, use-specific site in fewer steps than if installing and configuring elements individually.  For example, an installation profile for conferences might include modules for advanced user registration, attendee profiles, ticketing, and a list of speakers and sessions. Once installed, installation profiles can be configured and customized the same as traditionally-built Drupal sites. Refer to the installation profile documentation for more information." class="taxonomy_term_96 active">Installation profiles</a></span></div>
</div>
<div class="project clear-block">
<h2 class="title"><a href="http://drupal.org/project/grandfoo_profile">GrandFoo Install Profile</a></h2>
<div class="item-list">
<ul class="project-meta flat">
<li class="submitted-by first">Posted by <a href="http://drupal.org/user/797068" title="View user profile.">bumpaw</a> on <em>April 23, 2011 at 8:53pm</em></li>
<li class="last-changed first">Last changed: 4 weeks 4 days ago</li>
</ul>
</div>
<p>This profile should grow over time to include some extra  themes, modules, and configurations that a small site would need on  start-up. As with all Installation Profiles the idea is to get off the  ground quickly without having to ponder a lot of small configuration  items that are commonly used.</p>
<p><del>As a second phase we hope to develop</del> We now have a module  for affiliates with the AvantLink network and this package would make it easy for affiliates new to Drupal 7 to give it all a try. The module  called <a href="http://drupal.org/project/avantlinker" rel="nofollow">AvantLinker </a> is now included in this package.</p>
<p><strong>Note:</strong>If you click on the &#8220;view all releases&#8221; link  below you will see that drupal.org is not reflecting the current status  of the modules or core versions in this Profile. Look in the Repository  viewer for the true status of the modules packaged with this Profile.</p>
<div class="node-footer"><span class="links"><a href="http://drupal.org/project/grandfoo_profile" class="read_more">Find out more</a> ⋅ <a href="http://drupal.org/project/issues/grandfoo_profile" class="issues">Bugs and feature requests</a></span> <span class="separator">⋅</span> <span class="terms">Categories: <a href="http://drupal.org/taxonomy/term/13028" rel="tag" title="Bug reports are looked at; requested features may be implemented." class="taxonomy_term_13028">Actively maintained</a>, <a href="http://drupal.org/taxonomy/term/9988" rel="tag" title="" class="taxonomy_term_9988">Under active development</a>, <a href="http://drupal.org/project/installation%20profiles" rel="tag" title="Installation profiles provide site features and functions for a specific type of site as a single download containing Drupal core, contributed modules, themes, and pre-defined configuration. They make it possible to quickly set up a complex, use-specific site in fewer steps than if installing and configuring elements individually.  For example, an installation profile for conferences might include modules for advanced user registration, attendee profiles, ticketing, and a list of speakers and sessions. Once installed, installation profiles can be configured and customized the same as traditionally-built Drupal sites. Refer to the installation profile documentation for more information." class="taxonomy_term_96 active">Installation profiles</a></span></div>
</div>
<div class="project clear-block">
<div class="image-attach-teaser image-attach-node-969446" style="width: 218px;"><a href="http://drupal.org/project/admin_menu_profile"><img src="http://drupal.org/files/images/Administration-menu.preview_0.thumbnail.png" alt="Drupal with Admin Menu" title="Drupal with Admin Menu" class="image image-thumbnail " height="90" width="218" /></a></div>
<h2 class="title"><a href="http://drupal.org/project/admin_menu_profile">Drupal with Admin Menu</a></h2>
<div class="item-list">
<ul class="project-meta flat">
<li class="submitted-by first">Posted by <a href="http://drupal.org/user/926382" title="View user profile.">Josh The Geek</a> on <em>November 12, 2010 at 12:34am</em></li>
<li class="last-changed first">Last changed: 36 weeks 6 days ago</li>
</ul>
</div>
<h2>Overview</h2>
<p>This is an install profile that does everything that the &#8216;Default&#8217;  Drupal 6 profile does, but it also installs Admin Menu. (For Drupal 7,  it uses a modified version of the &#8216;Standard&#8217; profile.) I use this for  every test site that I create, and find it very useful. I hope that I am not the only one!</p>
<h2>Features</h2>
<p>This profile installs the Admin Menu, but is otherwise identical to the core default profile.</p>
<h2>Requirements</h2>
<p><a href="http://drupal.org/project/admin_menu" rel="nofollow">Admin Menu</a></p>
<h2>Tutorials</h2>
<p><a href="http://drupal.org/node/306267" rel="nofollow">Installing an install profile</a></p>
<h2>Credits</h2>
<p>This profile is a modified version of the core standard profile.<br />This profile was modified by <a href="http://drupal.org/user/926382" rel="nofollow">Josh The Geek</a>.</p>
<h3>Note:</h3>
<p> I don&#8217;t show dev releases because they are always the same as the latest official release.</p>
<div class="node-footer"><span class="links"><a href="http://drupal.org/project/admin_menu_profile" class="read_more">Find out more</a> ⋅ <a href="http://drupal.org/project/issues/admin_menu_profile" class="issues">Bugs and feature requests</a></span> <span class="separator">⋅</span> <span class="terms">Categories: <a href="http://drupal.org/taxonomy/term/13028" rel="tag" title="Bug reports are looked at; requested features may be implemented." class="taxonomy_term_13028">Actively maintained</a>, <a href="http://drupal.org/taxonomy/term/9988" rel="tag" title="" class="taxonomy_term_9988">Under active development</a>, <a href="http://drupal.org/project/installation%20profiles" rel="tag" title="Installation profiles provide site features and functions for a specific type of site as a single download containing Drupal core, contributed modules, themes, and pre-defined configuration. They make it possible to quickly set up a complex, use-specific site in fewer steps than if installing and configuring elements individually.  For example, an installation profile for conferences might include modules for advanced user registration, attendee profiles, ticketing, and a list of speakers and sessions. Once installed, installation profiles can be configured and customized the same as traditionally-built Drupal sites. Refer to the installation profile documentation for more information." class="taxonomy_term_96 active">Installation profiles</a></span></div>
</div>
<div class="project clear-block">
<div class="image-attach-teaser image-attach-node-935424" style="width: 218px;"><a href="http://drupal.org/project/donor_rally"><img src="http://drupal.org/files/images/donorrally-id.thumbnail.png" alt="Donor Rally" title="Donor Rally" class="image image-thumbnail " height="160" width="218" /></a></div>
<h2 class="title"><a href="http://drupal.org/project/donor_rally">Donor Rally</a></h2>
<div class="item-list">
<ul class="project-meta flat">
<li class="submitted-by first">Posted by <a href="http://drupal.org/user/208732" title="View user profile.">jhedstrom</a> on <em>October 8, 2010 at 12:46am</em></li>
<li class="last-changed first">Last changed: 25 weeks 3 days ago</li>
</ul>
</div>
<p>Here&#8217;s how Donor Rally works:</p>
<ul>
<li>Fans of your organization create their own personal (or team)  fundraising pages. Campaign goals are visualized by the Donor Rally  Thermometer.</li>
<li>Each team promotes your cause using their social networks, including Facebook, Twitter, and personal email lists.</li>
<li>Donors then click to donate money.</li>
</ul>
<p>Donor Rally creates a healthy spirit of competition to see who can  raise the most money before the campaign ends. A leaderboard allows  everyone to keep tabs on the top performers. After you&#8217;ve hit your  campaign target, the money is transferred from Paypal into your bank  account. The only thing left is to thank everyone for the time, love,  and money they donated to your cause.</p>
<h4>Download</h4>
<p>You can download Donor Rally <a href="http://code.opensourcery.com/donor-rally" rel="nofollow">here</a>.</p>
<p>Donor Rally will eventually be hosted here, on Drupal.org. Some  components are still missing from Drupal.org&#8217;s package manager to  properly build Donor Rally here. For further details: <a href="http://drupal.org/node/779440" rel="nofollow">Install Profile Packaging</a>.</p>
<p>Built by <a href="http://www.opensourcery.com/" rel="nofollow">OpenSourcery</a>.</p>
<p>To received notice about future updates, <a href="http://www.opensourcery.com/donor-rally" rel="nofollow">join our email list</a>.</p>
<div class="node-footer"><span class="links"><a href="http://drupal.org/project/donor_rally" class="read_more">Find out more</a> ⋅ <a href="http://drupal.org/project/issues/donor_rally" class="issues">Bugs and feature requests</a></span> <span class="separator">⋅</span> <span class="terms">Categories: <a href="http://drupal.org/taxonomy/term/13028" rel="tag" title="Bug reports are looked at; requested features may be implemented." class="taxonomy_term_13028">Actively maintained</a>, <a href="http://drupal.org/taxonomy/term/9988" rel="tag" title="" class="taxonomy_term_9988">Under active development</a>, <a href="http://drupal.org/project/installation%20profiles" rel="tag" title="Installation profiles provide site features and functions for a specific type of site as a single download containing Drupal core, contributed modules, themes, and pre-defined configuration. They make it possible to quickly set up a complex, use-specific site in fewer steps than if installing and configuring elements individually.  For example, an installation profile for conferences might include modules for advanced user registration, attendee profiles, ticketing, and a list of speakers and sessions. Once installed, installation profiles can be configured and customized the same as traditionally-built Drupal sites. Refer to the installation profile documentation for more information." class="taxonomy_term_96 active">Installation profiles</a></span></div>
</div>
<div class="project clear-block">
<h2 class="title"><a href="http://drupal.org/project/commerce_downloads">Commerce Downloads</a></h2>
<div class="item-list">
<ul class="project-meta flat">
<li class="submitted-by first">Posted by <a href="http://drupal.org/user/452914" title="View user profile.">recrit</a> on <em>June 17, 2011 at 3:05pm</em></li>
<li class="last-changed first">Last changed: 8 weeks 5 days ago</li>
</ul>
</div>
<p>A development install with Drupal Commerce and Commerce File pre-configured.  <strong>This is for development purposes only at the moment.</strong></p>
<p>Sponsored by <a href="http://www.commerceguys.com/" rel="nofollow">Commerce Guys</a></p>
<div class="node-footer"><span class="links"><a href="http://drupal.org/project/commerce_downloads" class="read_more">Find out more</a> ⋅ <a href="http://drupal.org/project/issues/commerce_downloads" class="issues">Bugs and feature requests</a></span> <span class="separator">⋅</span> <span class="terms">Categories: <a href="http://drupal.org/taxonomy/term/13028" rel="tag" title="Bug reports are looked at; requested features may be implemented." class="taxonomy_term_13028">Actively maintained</a>, <a href="http://drupal.org/taxonomy/term/9988" rel="tag" title="" class="taxonomy_term_9988">Under active development</a>, <a href="http://drupal.org/project/installation%20profiles" rel="tag" title="Installation profiles provide site features and functions for a specific type of site as a single download containing Drupal core, contributed modules, themes, and pre-defined configuration. They make it possible to quickly set up a complex, use-specific site in fewer steps than if installing and configuring elements individually.  For example, an installation profile for conferences might include modules for advanced user registration, attendee profiles, ticketing, and a list of speakers and sessions. Once installed, installation profiles can be configured and customized the same as traditionally-built Drupal sites. Refer to the installation profile documentation for more information." class="taxonomy_term_96 active">Installation profiles</a></span></div>
</div>
<div class="project clear-block">
<div class="image-attach-teaser image-attach-node-620018" style="width: 218px;"><a href="http://drupal.org/project/churches"><img src="http://drupal.org/files/images/800px-Pisgah.thumbnail.jpg" alt="Pisgah Baptist Church, a typical Protestant church in rural America" title="Pisgah Baptist Church, a typical Protestant church in rural America" class="image image-thumbnail " height="163" width="218" /></a></div>
<h2 class="title"><a href="http://drupal.org/project/churches">Drupal for Churches</a></h2>
<div class="item-list">
<ul class="project-meta flat">
<li class="submitted-by first">Posted by <a href="http://drupal.org/user/99951" title="View user profile.">philbar</a> on <em>October 23, 2009 at 11:20pm</em></li>
<li class="last-changed first">Last changed: 6 weeks 3 days ago</li>
</ul>
</div>
<p>This project is in early planning stages. Any help with planning would be greatly appreciated. I&#8217;m also open to co-maintainers.</p>
<p>The goal of this project is to create an &#8220;Out-of-the-Box&#8221; Drupal  distro designed for church websites. In completing this goal, we will  also create a number of <a href="http://drupal.org/project/features" rel="nofollow">Feature bundles</a> which you can use to add features to pre-existing church websites.</p>
<div class="node-footer"><span class="links"><a href="http://drupal.org/project/churches" class="read_more">Find out more</a> ⋅ <a href="http://drupal.org/project/issues/churches" class="issues">Bugs and feature requests</a></span> <span class="separator">⋅</span> <span class="terms">Categories: <a href="http://drupal.org/taxonomy/term/9992" rel="tag" title="" class="taxonomy_term_9992">Seeking new maintainer</a>, <a href="http://drupal.org/taxonomy/term/16538" rel="tag" title="" class="taxonomy_term_16538">No further development</a>, <a href="http://drupal.org/project/installation%20profiles" rel="tag" title="Installation profiles provide site features and functions for a specific type of site as a single download containing Drupal core, contributed modules, themes, and pre-defined configuration. They make it possible to quickly set up a complex, use-specific site in fewer steps than if installing and configuring elements individually.  For example, an installation profile for conferences might include modules for advanced user registration, attendee profiles, ticketing, and a list of speakers and sessions. Once installed, installation profiles can be configured and customized the same as traditionally-built Drupal sites. Refer to the installation profile documentation for more information." class="taxonomy_term_96 active">Installation profiles</a></span></div>
</div>
<div class="project clear-block">
<h2 class="title"><a href="http://drupal.org/project/media_derivatives_profile">Media derivatives development profile</a></h2>
<div class="item-list">
<ul class="project-meta flat">
<li class="submitted-by first">Posted by <a href="http://drupal.org/user/744628" title="View user profile.">slashrsm</a> on <em>August 15, 2011 at 2:28pm</em></li>
<li class="last-changed first">Last changed: 6 weeks 1 hour ago</li>
</ul>
</div>
<p>This is a profile for developers, that want to develop for <a href="http://drupal.org/project/media_derivatives" rel="nofollow">Media derivatives API</a>.</p>
<p>There is also a <a href="http://drupalcode.org/project/media_derivatives_profile.git/blob_plain/refs/heads/7.x-1.x:/Makefile/media_derivatives_profile.make" rel="nofollow">drush make file</a> available, that will download all needed code-base for you.</p>
<p>You can also use <a href="http://drupal.org/sandbox/slashrsm/1221262" rel="nofollow">sandbox</a> environment, if you prefer git. This profile and all needed modules are included into it as git submodules.</p>
<div class="node-footer"><span class="links"><a href="http://drupal.org/project/media_derivatives_profile" class="read_more">Find out more</a> ⋅ <a href="http://drupal.org/project/issues/media_derivatives_profile" class="issues">Bugs and feature requests</a></span> <span class="separator">⋅</span> <span class="terms">Categories: <a href="http://drupal.org/taxonomy/term/13028" rel="tag" title="Bug reports are looked at; requested features may be implemented." class="taxonomy_term_13028">Actively maintained</a>, <a href="http://drupal.org/taxonomy/term/9988" rel="tag" title="" class="taxonomy_term_9988">Under active development</a>, <a href="http://drupal.org/project/installation%20profiles" rel="tag" title="Installation profiles provide site features and functions for a specific type of site as a single download containing Drupal core, contributed modules, themes, and pre-defined configuration. They make it possible to quickly set up a complex, use-specific site in fewer steps than if installing and configuring elements individually.  For example, an installation profile for conferences might include modules for advanced user registration, attendee profiles, ticketing, and a list of speakers and sessions. Once installed, installation profiles can be configured and customized the same as traditionally-built Drupal sites. Refer to the installation profile documentation for more information." class="taxonomy_term_96 active">Installation profiles</a></span></div>
</div>
<div class="project clear-block">
<h2 class="title"><a href="http://drupal.org/project/openpublic">OpenPublic</a></h2>
<div class="item-list">
<ul class="project-meta flat">
<li class="submitted-by first">Posted by <a href="http://drupal.org/user/43670" title="View user profile.">febbraro</a> on <em>September 7, 2010 at 5:44pm</em></li>
<li class="last-changed first">Last changed: 5 weeks 3 days ago</li>
</ul>
</div>
<p>OpenPublic is a Drupal distribution for government.</p>
<p>Presently, Federal agencies are embarking on creating new websites  and web-based applications at an unprecedented pace. This new breed of  sites are being designed to improve citizen services, provide public  access to data and provide a public forum for two way communication with agencies. Yet, government web sites have unique needs, and until now,  many content management systems (CMS) and procurement processes have  poorly served this market with proprietary solutions that limit  innovation and foster unnecessary replication of closed-source software  code.</p>
<p>Open source software makes sense for government web sites &#8211; perhaps  more so than for any other sector &#8211; because of its emphasis on community innovation, flexibility, and non-proprietary nature. Now, more than  ever, budget pressures for the coming fiscal year demand low cost  solutions that can be delivered through open source software and quick  delivery schedules that limit wasted resources</p>
<p>More at: <a href="http://openpublicapp.com/" title="http://openpublicapp.com" rel="nofollow">http://openpublicapp.com</a></p>
<p>A full drupal install is avaiable at <a href="http://openpublicapp.com/" title="http://openpublicapp.com" rel="nofollow">http://openpublicapp.com</a></p>
<p>If you are conformable with drush make the make file <a href="http://drupalcode.org/project/openpublic.git/blob_plain/refs/heads/7.x-1.x:/build-openpublic.make" rel="nofollow">build-openpublic.make</a> can be used to build openpublic with the recommend command<br /><code></code></p>
<div class="node-footer"><span class="links"><a href="http://drupal.org/project/openpublic" class="read_more">Find out more</a> ⋅ <a href="http://drupal.org/project/issues/openpublic" class="issues">Bugs and feature requests</a></span> <span class="separator">⋅</span> <span class="terms">Categories: <a href="http://drupal.org/taxonomy/term/13028" rel="tag" title="Bug reports are looked at; requested features may be implemented." class="taxonomy_term_13028">Actively maintained</a>, <a href="http://drupal.org/taxonomy/term/9988" rel="tag" title="" class="taxonomy_term_9988">Under active development</a>, <a href="http://drupal.org/project/installation%20profiles" rel="tag" title="Installation profiles provide site features and functions for a specific type of site as a single download containing Drupal core, contributed modules, themes, and pre-defined configuration. They make it possible to quickly set up a complex, use-specific site in fewer steps than if installing and configuring elements individually.  For example, an installation profile for conferences might include modules for advanced user registration, attendee profiles, ticketing, and a list of speakers and sessions. Once installed, installation profiles can be configured and customized the same as traditionally-built Drupal sites. Refer to the installation profile documentation for more information." class="taxonomy_term_96 active">Installation profiles</a></span></div>
</div>
<div class="project clear-block">
<div class="image-attach-teaser image-attach-node-912498" style="width: 218px;"><a href="http://drupal.org/project/l10n_install"><img src="http://drupal.org/files/images/LocalizedDrupal.thumbnail.jpg" alt="Localized Drupal 7 installation finish screen" title="Localized Drupal 7 installation finish screen" class="image image-thumbnail " height="128" width="218" /></a></div>
<h2 class="title"><a href="http://drupal.org/project/l10n_install">Localized Drupal Distribution</a></h2>
<div class="item-list">
<ul class="project-meta flat">
<li class="submitted-by first">Posted by <a href="http://drupal.org/user/4166" title="View user profile.">Gábor Hojtsy</a> on <em>November 27, 2009 at 9:41am</em></li>
<li class="last-changed first">Last changed: 16 weeks 1 day ago</li>
</ul>
</div>
<p>A small distribution to install Drupal with user interface translations pulled automatically from <a href="http://localize.drupal.org/">localize.drupal.org</a>. It is suggested you use this distribution to start off with Drupal if  you&#8217;d like to set up a localized site. You can find setup instructions  for the Drupal 7 version (which applies to Drupal 6 as well) at <a href="http://localize.drupal.org/node/2024" title="http://localize.drupal.org/node/2024">http://localize.drupal.org/node/2024</a></p>
<p>Localized Drupal ships with <a href="http://drupal.org/project/l10n_update">Localization update</a> for sustainable translation management and <a href="http://drupal.org/project/l10n_client">Localization client</a> for fixing translations and contributing back to the community (both on Drupal 6 and Drupal 7).</p>
<h3>Get involved!</h3>
<p>Look at <a href="http://drupal.org/project/issues/search?issue_tags=localized+install" title="http://drupal.org/project/issues/search?issue_tags=localized+install">http://drupal.org/project/issues/search?issue_tags=localized+install</a> for the outstanding issues around this workflow, completing which should lead us to an ideal world. There is work to do.</p>
<h3>Sponsors</h3>
<p>Sponsored in part by <a href="http://acquia.com/">Acquia</a>.</p>
<div class="node-footer"><span class="links"><a href="http://drupal.org/project/l10n_install" class="read_more">Find out more</a> ⋅ <a href="http://drupal.org/project/issues/l10n_install" class="issues">Bugs and feature requests</a></span> <span class="separator">⋅</span> <span class="terms">Categories: <a href="http://drupal.org/taxonomy/term/13028" rel="tag" title="Bug reports are looked at; requested features may be implemented." class="taxonomy_term_13028">Actively maintained</a>, <a href="http://drupal.org/taxonomy/term/9988" rel="tag" title="" class="taxonomy_term_9988">Under active development</a>, <a href="http://drupal.org/project/installation%20profiles" rel="tag" title="Installation profiles provide site features and functions for a specific type of site as a single download containing Drupal core, contributed modules, themes, and pre-defined configuration. They make it possible to quickly set up a complex, use-specific site in fewer steps than if installing and configuring elements individually.  For example, an installation profile for conferences might include modules for advanced user registration, attendee profiles, ticketing, and a list of speakers and sessions. Once installed, installation profiles can be configured and customized the same as traditionally-built Drupal sites. Refer to the installation profile documentation for more information." class="taxonomy_term_96 active">Installation profiles</a></span></div>
</div>
<div class="project clear-block">
<h2 class="title"><a href="http://drupal.org/project/drupal_wiki">Wiki installation profile</a></h2>
<div class="item-list">
<ul class="project-meta flat">
<li class="submitted-by first">Posted by <a href="http://drupal.org/user/73064" title="View user profile.">rötzi</a> on <em>March 17, 2007 at 6:48am</em></li>
<li class="last-changed first">Last changed: 1 week 14 hours ago</li>
</ul>
</div>
<p>The wiki installation profile will set up Drupal with the following settings:</p>
<ul>
<li>Editing for anonymous users</li>
<li>Moderator role which can revert / delete pages</li>
<li>Revisions for pages</li>
<li>Mediawiki input format + Image assist</li>
<li>Categorization via free tagging vocabulary</li>
<li>Views: All pages / All categories / All Images</li>
<li>Recent changes</li>
</ul>
<p>See the readme.txt for the requirements of additional modules prior to installation.</p>
<p> <b>I am taking suggestions on a default &#8220;Wiki like&#8221; theme.</b> </p>
<div class="node-footer"><span class="links"><a href="http://drupal.org/project/drupal_wiki" class="read_more">Find out more</a> ⋅ <a href="http://drupal.org/project/issues/drupal_wiki" class="issues">Bugs and feature requests</a></span> <span class="separator">⋅</span> <span class="terms">Categories: <a href="http://drupal.org/taxonomy/term/13028" rel="tag" title="Bug reports are looked at; requested features may be implemented." class="taxonomy_term_13028">Actively maintained</a>, <a href="http://drupal.org/taxonomy/term/9988" rel="tag" title="" class="taxonomy_term_9988">Under active development</a>, <a href="http://drupal.org/project/installation%20profiles" rel="tag" title="Installation profiles provide site features and functions for a specific type of site as a single download containing Drupal core, contributed modules, themes, and pre-defined configuration. They make it possible to quickly set up a complex, use-specific site in fewer steps than if installing and configuring elements individually.  For example, an installation profile for conferences might include modules for advanced user registration, attendee profiles, ticketing, and a list of speakers and sessions. Once installed, installation profiles can be configured and customized the same as traditionally-built Drupal sites. Refer to the installation profile documentation for more information." class="taxonomy_term_96 active">Installation profiles</a></span></div>
</div>
<div class="project clear-block">
<h2 class="title"><a href="http://drupal.org/project/hostmaster">Hostmaster (Aegir)</a></h2>
<div class="item-list">
<ul class="project-meta flat">
<li class="submitted-by first">Posted by <a href="http://drupal.org/user/1337" title="View user profile.">adrian</a> on <em>November 28, 2007 at 12:37pm</em></li>
<li class="last-changed first">Last changed: 4 weeks 3 days ago</li>
</ul>
</div>
<p>There is no &#8220;Aegir&#8221; project on drupal.org, but the Hostmaster profile is a component of the <a href="http://aegirproject.org/" rel="nofollow">Aegir</a> hosting system.</p>
<p><strong>Hint:</strong> to install aegir for the first time, you should be using the <a href="http://drupal.org/project/provision" rel="nofollow">provision drush command</a> which has a neat script that will do everything for you.</p>
<blockquote><p>Ægir is a new set of contributed modules for Drupal that  aims to solve the problem of managing a large number of Drupal sites. It does this by providing you with a simple Drupal based hosting front end for your entire network of sites. To deploy a new site you simply have  to create a new Site node. To backup or upgrade sites, you simply manage your site nodes as you would any other node.</p>
</blockquote>
<p>The hostmaster profile ties together the functionality of the hosting front end and provisioning back end into a complete package. It handles initialization and auto-detection of your initial configuration  settings, and directs you to the friendly installation wizard. To start  using the Aegir system, you will install a new site using the hostmaster profile, which you will then use to manage all of the sites you host.</p>
<p>For more information on the system, and the other components, please take a look at the <a href="http://community.aegirproject.org/handbook" rel="nofollow">Aegir overview wiki page</a></p>
<div class="node-footer"><span class="links"><a href="http://drupal.org/project/hostmaster" class="read_more">Find out more</a> ⋅ <a href="http://drupal.org/project/issues/hostmaster" class="issues">Bugs and feature requests</a></span> <span class="separator">⋅</span> <span class="terms">Categories: <a href="http://drupal.org/taxonomy/term/13028" rel="tag" title="Bug reports are looked at; requested features may be implemented." class="taxonomy_term_13028">Actively maintained</a>, <a href="http://drupal.org/taxonomy/term/9988" rel="tag" title="" class="taxonomy_term_9988">Under active development</a>, <a href="http://drupal.org/project/installation%20profiles" rel="tag" title="Installation profiles provide site features and functions for a specific type of site as a single download containing Drupal core, contributed modules, themes, and pre-defined configuration. They make it possible to quickly set up a complex, use-specific site in fewer steps than if installing and configuring elements individually.  For example, an installation profile for conferences might include modules for advanced user registration, attendee profiles, ticketing, and a list of speakers and sessions. Once installed, installation profiles can be configured and customized the same as traditionally-built Drupal sites. Refer to the installation profile documentation for more information." class="taxonomy_term_96 active">Installation profiles</a></span></div>
</div>
<div class="project clear-block">
<h2 class="title"><a href="http://drupal.org/project/nodestream">NodeStream</a></h2>
<div class="item-list">
<ul class="project-meta flat">
<li class="submitted-by first">Posted by <a href="http://drupal.org/user/16678" title="View user profile.">TBarregren</a> on <em>August 23, 2010 at 10:51pm</em></li>
<li class="last-changed first">Last changed: 10 hours 43 min ago</li>
</ul>
</div>
<p>NodeStream is a platform for building Drupal  Distributions. It comes bundled with a big set of features, such as  articles, pages and blogs, and is built with extendability and  reusability in mind.</p>
<h3>Important</h3>
<p><strong>NodeStream  for Drupal 6 is currently incompatible with PHP 5.3!</strong></p>
<p>An upgrade path will be provided from all beta releases and later. Please consult the <code>UPGRADE.txt</code> file for more info.</p>
<h3>Download</h3>
<p>Some functionality is missing in the packaging system on drupal.org  to be fully compatible with how NodeStream (and most other  distributions) are built. Work is being done to fix this, read more  here: <a href="http://drupal.org/node/779440" rel="nofollow">Install Profile Packaging</a>.</p>
<p>Meanwhile, you need to <a href="http://drupal.org/node/891490/git-instructions" rel="nofollow">clone NodeStream from the Git repository</a> or download a pre-built package from <a href="http://nodestream.org/" rel="nofollow">nodestream.org</a>.</p>
<h3>Installation</h3>
<p>Consult the <a href="http://drupalcode.org/project/nodestream.git/blob_plain/refs/heads/6.x-1.x:/INSTALL.txt" rel="nofollow">INSTALL.txt</a> file. It provides a step by step guide for fetching and installing NodeStream.</p>
<h3>Extend</h3>
<p>If you are a developer and want to extend NodeStream, have a look at <a href="http://drupalcode.org/project/nodestream.git/blob_plain/refs/heads/6.x-1.x:/EXTEND.txt" rel="nofollow">EXTEND.txt</a></p>
<div class="node-footer"><span class="links"><a href="http://drupal.org/project/nodestream" class="read_more">Find out more</a> ⋅ <a href="http://drupal.org/project/issues/nodestream" class="issues">Bugs and feature requests</a></span> <span class="separator">⋅</span> <span class="terms">Categories: <a href="http://drupal.org/taxonomy/term/13028" rel="tag" title="Bug reports are looked at; requested features may be implemented." class="taxonomy_term_13028">Actively maintained</a>, <a href="http://drupal.org/taxonomy/term/9988" rel="tag" title="" class="taxonomy_term_9988">Under active development</a>, <a href="http://drupal.org/project/installation%20profiles" rel="tag" title="Installation profiles provide site features and functions for a specific type of site as a single download containing Drupal core, contributed modules, themes, and pre-defined configuration. They make it possible to quickly set up a complex, use-specific site in fewer steps than if installing and configuring elements individually.  For example, an installation profile for conferences might include modules for advanced user registration, attendee profiles, ticketing, and a list of speakers and sessions. Once installed, installation profiles can be configured and customized the same as traditionally-built Drupal sites. Refer to the installation profile documentation for more information." class="taxonomy_term_96 active">Installation profiles</a></span></div>
</div>
</div>
</div></div>
</p></div>
</p></div>
</p></div>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=07c80273-3ae5-8056-9c2f-954ae2e06a57" /></div>
<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fericrichers.com%2Fblog%2F2011%2F09%2Fd7-install-profiles%2F&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div class="rw-left"><div class="rw-ui-container rw-class-blog-post rw-urid-11040"></div></div>]]></content:encoded>
			<wfw:commentRss>http://ericrichers.com/blog/2011/09/d7-install-profiles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why you should be using ColorBox</title>
		<link>http://ericrichers.com/blog/2011/09/why-you-should-be-using-colorbox/</link>
		<comments>http://ericrichers.com/blog/2011/09/why-you-should-be-using-colorbox/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 16:05:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[colorbox]]></category>
		<category><![CDATA[lightbox]]></category>

		<guid isPermaLink="false">http://ericrichers.com/blog/2011/09/why-you-should-be-using-colorbox/</guid>
		<description><![CDATA[Supports photos, grouping, slideshow, ajax, inline, and iframed content. Lightweight: 10KB of JavaScript. Appearance is controlled through CSS so users can restyle the box. Behavior settings can be over-written without altering the ColorBox javascript file. Can be extended with callbacks &#38; &#8230; <a href="http://ericrichers.com/blog/2011/09/why-you-should-be-using-colorbox/">Read More.. <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><span style="color: #565656; font-family: verdana, arial, helvetica, sans-serif; font-size: 12px; line-height: 18px; background-color: #ffffff;"> </span></p>
<ul style="padding-top: 0px; padding-right: 0px; padding-bottom: 5px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: url('http://colorpowered.com/images/li_normal.png'); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; border: 0px initial initial;">Supports photos, grouping, slideshow, ajax, inline, and iframed content.</li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: url('http://colorpowered.com/images/li_normal.png'); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; border: 0px initial initial;">Lightweight: 10KB of JavaScript.</li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: url('http://colorpowered.com/images/li_normal.png'); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; border: 0px initial initial;">Appearance is controlled through CSS so users can restyle the box.</li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: url('http://colorpowered.com/images/li_normal.png'); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; border: 0px initial initial;">Behavior settings can be over-written without altering the ColorBox javascript file.</li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: url('http://colorpowered.com/images/li_normal.png'); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; border: 0px initial initial;">Can be extended with callbacks &amp;<br />
		event-hooks without altering the source files.</li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: url('http://colorpowered.com/images/li_normal.png'); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; border: 0px initial initial;">Completely unobtrusive, options are set in the JS and require no changes to existing HTML.</li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: url('http://colorpowered.com/images/li_normal.png'); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; border: 0px initial initial;">Preloads background images and can preload upcoming images in a photo group.</li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: url('http://colorpowered.com/images/li_normal.png'); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; border: 0px initial initial;">Written in jQuery plugin format and can be chained with other jQuery commands.</li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: url('http://colorpowered.com/images/li_normal.png'); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; border: 0px initial initial;">Generates W3C valid XHTML and adds no JS global variables<br />
		&amp; passes JSLint.</li>
</ul>
<p><span style="font-size: 12px;"> </span><span style="font-size: 12px;"> <em><strong><a style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; text-decoration: none; color: #21a4f4; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" href="http://www.opensource.org/licenses/mit-license.php">Released under the MIT License</a>.</strong></em></span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;"><em><strong>Tested In: Firefox 3+, Safari 4+, Chrome, Internet Explorer 6, 7, 8, 9, Opera 11.</strong></em></p>
<h2>Instructions</h2>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">The colorbox method takes a key/value object and an optional callback.</p>
<p>	Format: <span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">$(&#8216;selector&#8217;).colorbox({key:value, key:value, key:value}, callback);</span> Example: <span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">$(&#8216;a#login&#8217;).colorbox({transition:&#8217;fade&#8217;, speed:500});</span> Example: <span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">$(&#8216;a.gallery&#8217;).colorbox();</span> Example: <span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">$(&#8216;button&#8217;).colorbox({href:<br />
	&#8221;<br />
	thankyou.html<br />
	&#8221;<br />
	});</span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">And it can be called directly, without assignment to an element<br />
	Example: <span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">$.colorbox({href:<br />
	&#8221;<br />
	thankyou.html<br />
	&#8221;<br />
	});</span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">ColorBox can accept a function in place of a static value: <span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">$(<br />
	&#8221;<br />
	a[rel='example']<br />
	&#8221;<br />
	).colorbox({title: function(){</p>
<p>	var url = $(this).attr(&#8216;href&#8217;);</p>
<p>	return &#8216;<br />
	&lt;<br />
	a href=<br />
	&#8221;<br />
	&#8216;+url+&#8217;<br />
	&#8221;<br />
	target=<br />
	&#8221;<br />
	_blank<br />
	&#8221;<br />
	&gt;<br />
	Open In New Window<br />
	&lt;<br />
	/a<br />
	&gt;<br />
	&#8216;;<br />
	}});</span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">Follow the source code on the demonstration pages for plenty of examples.</p>
<table style="margin-top: 15px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #ffffff; width: 588px; padding: 0px; border: 0px initial initial;">
<tbody style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<th id="key" style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: initial; border-left-width: 1px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #404046; text-align: left; color: #ffffff; border-top-style: solid; border-right-style: solid; border-left-style: solid; border-top-color: #404046; border-right-color: #404046; border-left-color: #404046; border-bottom-style: none; border-bottom-color: initial; width: 95px; margin: 0px;">Key</th>
<th id="default" style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: initial; border-left-width: 1px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #404046; text-align: left; color: #ffffff; border-top-style: solid; border-right-style: solid; border-left-style: solid; border-top-color: #404046; border-right-color: #404046; border-left-color: #404046; border-bottom-style: none; border-bottom-color: initial; width: 65px; margin: 0px;">Default</th>
<th id="description" style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: initial; border-left-width: 1px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #404046; text-align: left; color: #ffffff; border-top-style: solid; border-right-style: solid; border-left-style: solid; border-top-color: #404046; border-right-color: #404046; border-left-color: #404046; border-bottom-style: none; border-bottom-color: initial; margin: 0px;">Description</th>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f9f9f9; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">transition</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">&#8221;<br />
				elastic<br />
				&#8220;</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">The transition type. Can be set to<br />
				&#8221;<br />
				elastic<br />
				&#8221;<br />
				,<br />
				&#8221;<br />
				fade<br />
				&#8221;<br />
				, or<br />
				&#8221;<br />
				none<br />
				&#8221;<br />
				.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">speed</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">350</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">Sets the speed of the fade and elastic transitions, in milliseconds.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f9f9f9; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">href</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">false</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">This can be used as an alternative anchor URL or to associate a URL for non-anchor elements such as images or form buttons. Example: <span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">$(&#8216;h1&#8242;).colorbox({href:<br />
				&#8221;<br />
				welcome.html<br />
				&#8221;<br />
				})</span></td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">title</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">false</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">This can be used as an anchor title alternative for ColorBox.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f9f9f9; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">rel</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">false</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">This can be used as an anchor rel alternative for ColorBox. This allows the user to group any combination of elements together for a gallery, or to override an existing rel so elements are not grouped together. Example: <span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">$(&#8216;#example a&#8217;).colorbox({rel:&#8217;group1&#8242;})</span> Note: The value can also be set to &#8216;nofollow&#8217; to disable grouping.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">width</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">false</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">Set a fixed total width. This includes borders and buttons. Example:<br />
				&#8221;<br />
				100%<br />
				&#8221;<br />
				,<br />
				&#8221;<br />
				500px<br />
				&#8221;<br />
				, or 500</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f9f9f9; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">height</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">false</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">Set a fixed total height. This includes borders and buttons. Example:<br />
				&#8221;<br />
				100%<br />
				&#8221;<br />
				,<br />
				&#8221;<br />
				500px<br />
				&#8221;<br />
				, or 500</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">innerWidth</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">false</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">This is an alternative to &#8216;width&#8217; used to set a fixed inner width. This excludes borders and buttons. Example:<br />
				&#8221;<br />
				50%<br />
				&#8221;<br />
				,<br />
				&#8221;<br />
				500px<br />
				&#8221;<br />
				, or 500</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f9f9f9; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">innerHeight</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">false</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">This is an alternative to &#8216;height&#8217; used to set a fixed inner height. This excludes borders and buttons. Example:<br />
				&#8221;<br />
				50%<br />
				&#8221;<br />
				,<br />
				&#8221;<br />
				500px<br />
				&#8221;<br />
				, or 500</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">initialWidth</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">300</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">Set the initial width, prior to any content being loaded.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f9f9f9; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">initialHeight</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">100</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">Set the initial height, prior to any content being loaded.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">maxWidth</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">false</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">Set a maximum width for loaded content. Example:<br />
				&#8221;<br />
				100%<br />
				&#8221;<br />
				, 500,<br />
				&#8221;<br />
				500px<br />
				&#8220;</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f9f9f9; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">maxHeight</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">false</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">Set a maximum height for loaded content. Example:<br />
				&#8221;<br />
				100%<br />
				&#8221;<br />
				, 500,<br />
				&#8221;<br />
				500px<br />
				&#8220;</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">scalePhotos</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">true</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">If &#8216;true&#8217; and if maxWidth, maxHeight, innerWidth, innerHeight, width, or height have been defined, ColorBox will scale photos to fit within the those values.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f9f9f9; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">scrolling</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">true</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">If &#8216;false&#8217; ColorBox will hide scrollbars for overflowing content. This could be used on conjunction with the resize method (see below) for a smoother transition if you are appending content to an already open instance of ColorBox.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">iframe</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">false</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">If &#8216;true&#8217; specifies that content should be displayed in an iFrame.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f9f9f9; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">inline</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">false</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">If &#8216;true&#8217; a jQuery selector can be used to display content from the current page. Example: <span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">$(<br />
				&#8221;<br />
				#inline<br />
				&#8221;<br />
				).colorbox({inline:true, href:<br />
				&#8221;<br />
				#myForm<br />
				&#8221;<br />
				});</span></td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">html</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">false</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">This allows an HTML string to be used directly instead of pulling content from another source (ajax, inline, or iframe). Example: <span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">$.colorbox({html:&#8217;<br />
				&lt;<br />
				p<br />
				&gt;<br />
				Hello<br />
				&lt;<br />
				/p<br />
				&gt;<br />
				&#8216;});</span></td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f9f9f9; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">photo</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">false</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">If true, this setting forces ColorBox to display a link as a photo. Use this when automatic photo detection fails (such as using a url like &#8216;photo.php&#8217; instead of &#8216;photo.jpg&#8217;, &#8216;photo.jpg#1&#8242;, or &#8216;photo.jpg?pic=1&#8242;)</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">opacity</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">0.85</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">The overlay opacity level. Range: 0 to 1.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f9f9f9; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">open</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">false</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">If true, the lightbox will automatically open with no input from the visitor.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">returnFocus</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">true</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">If true, focus will be returned when ColorBox exits to the element it was launched from.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f9f9f9; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">fastIframe</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">true</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">If false the loading graphic removal and onComplete event will be delayed until iframe contents have completely loaded.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">preloading</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">true</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">Allows for preloading of &#8216;Next&#8217; and &#8216;Previous&#8217; content in a shared relation group (same values for the &#8216;rel&#8217; attribute), after the current content has finished loading. Set to &#8216;false&#8217; to disable.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f9f9f9; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">overlayClose</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">true</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">If false, disables closing ColorBox by clicking on the background overlay.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">escKey</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">true</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">If false, will disable closing colorbox on esc key press.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f9f9f9; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">arrowKey</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">true</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">If false, will disable the left and right arrow keys from navigating between the items in a group.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">loop</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">true</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">If false, will disable the ability to loop back to the beginning of the group when on the last element.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f9f9f9; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">slideshow</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">false</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">If true, adds an automatic slideshow to a content group / gallery.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">slideshowSpeed</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">2500</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">Sets the speed of the slideshow, in milliseconds.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f9f9f9; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">slideshowAuto</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">true</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">If true, the slideshow will automatically start to play.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">slideshowStart</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">&#8221;<br />
				start slideshow<br />
				&#8220;</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">Text for the slideshow start button.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f9f9f9; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">slideshowStop</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">&#8221;<br />
				stop slideshow<br />
				&#8220;</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">Text for the slideshow stop button</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">current</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">&#8221;<br />
				image {current} of {total}<br />
				&#8220;</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">Text format for the content group / gallery count. {current} and {total} are detected and replaced with actual numbers while ColorBox runs.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f9f9f9; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">previous</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">&#8221;<br />
				previous<br />
				&#8220;</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">Text for the previous button in a shared relation group (same values for &#8216;rel&#8217; attribute).</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">next</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">&#8221;<br />
				next<br />
				&#8220;</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">Text for the next button in a shared relation group (same values for &#8216;rel&#8217; attribute).</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f9f9f9; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">close</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">&#8221;<br />
				close<br />
				&#8220;</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">Text for the close button. The &#8216;Esc&#8217; key will also close ColorBox.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">onOpen</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">false</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">Callback that fires right before ColorBox begins to open.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f9f9f9; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">onLoad</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">false</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">Callback that fires right before attempting to load the target content.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">onComplete</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">false</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">Callback that fires right after loaded content is displayed.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f9f9f9; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">onCleanup</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">false</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">Callback that fires at the start of the close process.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">onClosed</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">false</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">Callback that fires once ColorBox is closed.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f9f9f9; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">top</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">false</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">Accepts a pixel or percent value (50,<br />
				&#8221;<br />
				50px<br />
				&#8221;<br />
				,<br />
				&#8221;<br />
				10%<br />
				&#8221;<br />
				). Controls ColorBox&#8217;s vertical positioning instead of using the default position of being centered in the viewport.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">bottom</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">false</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">Accepts a pixel or percent value (50,<br />
				&#8221;<br />
				50px<br />
				&#8221;<br />
				,<br />
				&#8221;<br />
				10%<br />
				&#8221;<br />
				). Controls ColorBox&#8217;s vertical positioning instead of using the default position of being centered in the viewport.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f9f9f9; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">left</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">false</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">Accepts a pixel or percent value (50,<br />
				&#8221;<br />
				50px<br />
				&#8221;<br />
				,<br />
				&#8221;<br />
				10%<br />
				&#8221;<br />
				). Controls ColorBox&#8217;s horizontal positioning instead of using the default position of being centered in the viewport.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">right</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">false</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">Accepts a pixel or percent value (50,<br />
				&#8221;<br />
				50px<br />
				&#8221;<br />
				,<br />
				&#8221;<br />
				10%<br />
				&#8221;<br />
				). Controls ColorBox&#8217;s horizontal positioning instead of using the default position of being centered in the viewport.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f9f9f9; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">fixed</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">false</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">If true, ColorBox will be displayed in a fixed position within the visitor&#8217;s viewport. This is unlike the default absolute positioning relative to the document.</td>
</tr>
<tr style="padding-top: 0px; padding-right: 15px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">data</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">false</td>
<td style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 8px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: top; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 1px solid #e3e3e3;">For submitting GET or POST values through an ajax request. The data property will act exactly like jQuery&#8217;s <a style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; text-decoration: none; color: #21a4f4; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" href="http://api.jquery.com/load/">.load()</a> data argument, as ColorBox uses .load() for ajax handling.</td>
</tr>
</tbody>
</table>
<p><span style="color: #565656; font-family: verdana, arial, helvetica, sans-serif; font-size: 12px; line-height: 18px; background-color: #ffffff;"> </span><br />
<h2 id="h_extending" style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: url('http://colorpowered.com/images/h.section.png'); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; text-indent: -9999px; height: 35px; background-position: 0px -525px; background-repeat: no-repeat no-repeat; padding: 0px; border: 0px initial initial;">Extending</h2>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">Public methods and event hooks are provided for developers who want to extend or modify the plugin&#8217;s functionality without having to rewrite the source files.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">Example of using an event listener and public method to build a primitive slideshow: <span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">$(document).bind(&#8216;cbox_complete&#8217;, function(){</p>
<p>	setTimeout($.colorbox.next, 1500);<br />
	});</span></p>
<h4 style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 15px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #af3100; padding: 0px; border: 0px initial initial;">Public Methods</h4>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;"><span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">$.colorbox()</span> This method allows you to call ColorBox without having to assign it to an element.</p>
<p>	Example: $.colorbox({href:&#8217;login.php&#8217;});</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;"><span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">$.colorbox.next()</span> and <span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">$.colorbox.prev()</span> These methods moves to the next and previous items in a group and are the same as pressing the &#8216;next&#8217; or &#8216;previous&#8217; buttons.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;"><span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">$.colorbox.close()</span> This method initiates the close sequence, which does not immediately complete. The lightbox will be completely closed only when the &#8216; <span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">cbox_closed</span> &#8216; event is fired.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;"><span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">$.colorbox.element()</span> This method is used to fetch the current HTML element that ColorBox is associated with. Returns a jQuery object containing the element.</p>
<p>	Example: var $element = $.colorbox.element();</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;"><span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">$.colorbox.resize({settings_object})</span> This allows ColorBox to be resized based on it&#8217;s own auto-calculations, or to a specific size. This must be called manually after ColorBox&#8217;s content has loaded. The optional parameters object can accept &#8216;width&#8217; or &#8216;innerWidth&#8217; and &#8216;height&#8217; or &#8216;innerHeight&#8217;. Without specifying a width or height, ColorBox will attempt to recalculate the height of it&#8217;s current content.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;"><span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">$.colorbox.init()</span> This runs silently when the DOM is first loaded and is used to initialize the lightbox (adds necessary HTML to the DOM, preloads the interface graphics, initializes variables, etc). If ColorBox were completely removed from the DOM, to load in a new stylesheet for example, this would be needed to re-initialize it.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;"><span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">$.colorbox.remove()</span> Removes all traces of ColorBox from the document. Not the same as $.colorbox.close(), which tucks colorbox away for future use.</p>
<h4 style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 15px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #af3100; padding: 0px; border: 0px initial initial;">Event Hooks</h4>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">ColorBox triggers four different events during it&#8217;s use. The event hooks fire at the same time as their corresponding callbacks (ie. cbox_complete<br />
	&amp;<br />
	onComplete), but can be used to make a universal change to ColorBox, while callbacks are more for targeting changes on a specific instance of the modal.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">&#8216; <span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">cbox_open</span> &#8216; triggers when ColorBox is first opened, but after a few key variable assignments take place.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">&#8216; <span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">cbox_load</span> &#8216; triggers at the start of the phase where content type is determined and loaded.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">&#8216; <span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">cbox_complete</span> &#8216; triggers when the transition has completed and the newly loaded content has been revealed.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">&#8216; <span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">cbox_cleanup</span> &#8216; triggers as the close method begins.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">&#8216; <span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">cbox_closed</span> &#8216; triggers as the close method ends.</p>
<h2 style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 20px; vertical-align: baseline; background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; text-indent: 0px; height: 35px; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">Asking for help</h2>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">If you have a question not addressed in this document, visit the <a style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; text-decoration: none; color: #21a4f4; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" href="http://groups.google.com/group/colorbox/topics">ColorBox Google Group</a> and ask your question there. <strong style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #ce5700; padding: 0px; margin: 0px; border: 0px initial initial;"> <em style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;"> Be sure to post a link that demonstrates your problem! </em> </strong></p>
<h2 style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 20px; vertical-align: baseline; background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; text-indent: 0px; height: 35px; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">Common Problems</h2>
<ul style="padding-top: 0px; padding-right: 0px; padding-bottom: 5px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: url('http://colorpowered.com/images/li_normal.png'); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; border: 0px initial initial;"><a style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; text-decoration: none; color: #21a4f4; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" href="http://colorpowered.com/colorbox/#flash">Flash appears over ColorBox:</a></li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: url('http://colorpowered.com/images/li_normal.png'); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; border: 0px initial initial;"><a style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; text-decoration: none; color: #21a4f4; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" href="http://colorpowered.com/colorbox/#doctype">ColorBox is positioned incorrectly or behaving strangely</a></li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: url('http://colorpowered.com/images/li_normal.png'); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; border: 0px initial initial;"><a style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; text-decoration: none; color: #21a4f4; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" href="http://colorpowered.com/colorbox/#iframe">ColorBox is broken or looks incomplete while displaying documents.</a></li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: url('http://colorpowered.com/images/li_normal.png'); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; border: 0px initial initial;"><a style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; text-decoration: none; color: #21a4f4; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" href="http://colorpowered.com/colorbox/#conflict">ColorBox only works the first time it is opened.</a></li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: url('http://colorpowered.com/images/li_normal.png'); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; border: 0px initial initial;"><a style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; text-decoration: none; color: #21a4f4; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" href="http://colorpowered.com/colorbox/#paths">ColorBox&#8217;s borders do not display in Internet Explorer:</a></li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: url('http://colorpowered.com/images/li_normal.png'); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; border: 0px initial initial;"><a style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; text-decoration: none; color: #21a4f4; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" href="http://colorpowered.com/colorbox/#jquery">JS Error:<br />
			&#8221;<br />
			$(selector).colorbox is not a function<br />
			&#8221;<br />
			or<br />
			&#8221;<br />
			$.colorbox is not a function<br />
			&#8221; </a></li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: url('http://colorpowered.com/images/li_normal.png'); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; border: 0px initial initial;"><a style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; text-decoration: none; color: #21a4f4; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" href="http://colorpowered.com/colorbox/#ajax">Trying to load an external page results in<br />
			&#8221;<br />
			Request unsuccessful</a></li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: url('http://colorpowered.com/images/li_normal.png'); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; border: 0px initial initial;"><a style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; text-decoration: none; color: #21a4f4; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" href="http://colorpowered.com/colorbox/#focus">Closing ColorBox breaks accordians/tabs/animations</a></li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: url('http://colorpowered.com/images/li_normal.png'); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; border: 0px initial initial;"><a style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; text-decoration: none; color: #21a4f4; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" href="http://colorpowered.com/colorbox/#timing">JavaScript/jQuery is not working inside of ColorBox</a></li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: url('http://colorpowered.com/images/li_normal.png'); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; border: 0px initial initial;"><a style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; text-decoration: none; color: #21a4f4; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" href="http://colorpowered.com/colorbox/#img">ColorBox is sized too small the first time ajax/inline content is opened</a></li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: url('http://colorpowered.com/images/li_normal.png'); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; border: 0px initial initial;"><a style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; text-decoration: none; color: #21a4f4; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" href="http://colorpowered.com/colorbox/#jquerybug">IE6/IE7 freezes with jQuery 1.6.0</a></li>
</ul>
<h2 style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 20px; vertical-align: baseline; background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; text-indent: 0px; height: 35px; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">How To</h2>
<ul style="padding-top: 0px; padding-right: 0px; padding-bottom: 5px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: initial initial; background-repeat: initial initial; margin: 0px; border: 0px initial initial;">
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: url('http://colorpowered.com/images/li_normal.png'); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; border: 0px initial initial;"><a style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; text-decoration: none; color: #21a4f4; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" href="http://colorpowered.com/colorbox/#cookie">Open ColorBox on first visit (How to set a cookie)</a></li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: url('http://colorpowered.com/images/li_normal.png'); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; border: 0px initial initial;"><a style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; text-decoration: none; color: #21a4f4; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" href="http://colorpowered.com/colorbox/#querystring">Pass ColorBox parameters based on a URL</a></li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: url('http://colorpowered.com/images/li_normal.png'); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; border: 0px initial initial;"><a style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; text-decoration: none; color: #21a4f4; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" href="http://colorpowered.com/colorbox/#close">Prevent ColorBox from closing / Change the behavior of $.colorbox.close()</a></li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: url('http://colorpowered.com/images/li_normal.png'); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; border: 0px initial initial;"><a style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; text-decoration: none; color: #21a4f4; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" href="http://colorpowered.com/colorbox/#nofollow">Disable grouping by rel attribute</a></li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: url('http://colorpowered.com/images/li_normal.png'); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; border: 0px initial initial;"><a style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; text-decoration: none; color: #21a4f4; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" href="http://colorpowered.com/colorbox/#parent">Open ColorBox in the parent of an iframed document</a></li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: url('http://colorpowered.com/images/li_normal.png'); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; background-position: 0% 50%; background-repeat: no-repeat no-repeat; border: 0px initial initial;"><a style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; text-decoration: none; color: #21a4f4; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" href="http://colorpowered.com/colorbox/#click">Create a separate link for opening a gallery</a></li>
</ul>
<h4 id="flash" style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 15px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #af3100; padding: 0px; border: 0px initial initial;">Flash appears over ColorBox:</h4>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">This is not a ColorBox specific problem. Flash will overlay any HTML content by default, but this can be prevented by setting the &#8216;wmode&#8217; param and embed attributes to &#8216;transparent&#8217;.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">For more information from <a style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; text-decoration: none; color: #21a4f4; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" href="http://kb2.adobe.com/cps/155/tn_15523.html">Adobe Support</a></p>
<h4 id="doctype" style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 15px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #af3100; padding: 0px; border: 0px initial initial;">ColorBox is positioned incorrectly or behaving strangely:</h4>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">This is often due to loading colorbox.css after jquery.colorbox.js or stems from a bad doctype. Both jQuery and colorbox.css need to be loaded prior to jquery.colorbox.js. ColorBox should be called or assigned to elements inside of jQuery&#8217;s ready method, which should be declared after jquery.colorbox.js.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">ColorBox requires a valid doctype and rendering in quirks mode is not supported. If you aren&#8217;t using the HTML5 doctype, make sure you are using the full doctype declaration (with URI) to insure rendering in standards mode.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">Unfortunately, this abbreviated doctype renders the document in quirks mode for Internet Explorer: <span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;"> &lt;<br />
	!DOCTYPE HTML PUBLIC<br />
	&#8221;<br />
	-//W3C//DTD HTML 4.01 Transitional//EN<br />
	&#8221;<br />
	&gt; </span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">The doctype with URI renders in standards mode for all browsers: <span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;"> &lt;<br />
	!DOCTYPE HTML PUBLIC<br />
	&#8221;<br />
	-//W3C//DTD HTML 4.01 Transitional//EN<br />
	&#8221;<br />
	&#8221;</p>
<p>http://www.w3.org/TR/html4/loose.dtd</p>
<p>	&#8221;<br />
	&gt; </span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">For more information, see A List Apart&#8217;s <a style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; text-decoration: none; color: #21a4f4; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" href="http://www.alistapart.com/articles/doctype/">primer on doctypes</a>.</p>
<h4 id="iframe" style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 15px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #af3100; padding: 0px; border: 0px initial initial;">ColorBox is broken or looks incomplete while displaying documents:</h4>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">Often this is due to not using an iframe when an iframe would be required. The default method, ajax, is only for elements that can exist within a<br />
	&lt;<br />
	body<br />
	&gt;<br />
	element.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">If you are loading a complete HTML document with<br />
	&lt;<br />
	html<br />
	&gt;<br />
	,<br />
	&lt;<br />
	head<br />
	&gt;<br />
	, and<br />
	&lt;<br />
	body<br />
	&gt;<br />
	elements, then using an iframe is required. While nesting these elements may appear to display correctly in some browsers, it is still invalid HTML and should not be depended on. Remember to set the width and height values for ColorBox when using an iframe, it has no way of knowing the dimensions of elements that exist within the iframe.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">ColorBox leverages jQuery&#8217;s <a style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; text-decoration: none; color: #21a4f4; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" href="http://docs.jquery.com/Ajax/load">.load()</a> method for handling ajax. If you are loading a document from the same domain as your current document, you can use a selector pull out just the portion of the document that is needed. Example: <span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">$(&#8216;#example&#8217;).colorbox({href:<br />
	&#8221;<br />
	document.html div#content<br />
	&#8221;<br />
	});</span></p>
<h4 id="conflict" style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 15px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #af3100; padding: 0px; border: 0px initial initial;">ColorBox only works the first time it is opened:</h4>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">This is often due to loading a document with script elements with ColorBox&#8217;s ajax mode instead of using an iframe. And iframe would prevent those scripts from interfering with the scripts in the host document. Often it&#8217;s due to the parent document&#8217;s version of jQuery being overwriten by the loaded in document&#8217;s version of jQuery.</p>
<h4 id="paths" style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 15px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #af3100; padding: 0px; border: 0px initial initial;">ColorBox&#8217;s borders do not display in Internet Explorer:</h4>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;"><em style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;"> This information only applies to versions of ColorBox prior to 1.3.16 </em></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">Some of the example styles provided make use of transparent .PNG files. Alpha transparencies aren&#8217;t supported by default in IE6, and can cause an undesirable &#8216;black halo&#8217; effect in IE7 and IE8 when changing their opacity. ColorBox resolves this by using one of IE&#8217;s CSS filters. You can see these at the bottom of colorbox.css. The filter src paths are relative to the HTML document (just like an IMG element), while CSS background image paths are relative to the CSS document. In the examples I provide the relative path is the same, but users often change the directory structure once they move the files over to their own host. The filter src path needs to reflect this change with the appropriate relative path or an absolute path. Here is an example that assumes the &#8216;images&#8217; folder is in the root directory:</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">Original CSS with incorrect relative path: <span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">.AlphaImageLoader(src=images/internet_explorer/borderTopLeft.png</span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">Corrected relative path: <span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">.AlphaImageLoader(src=/images/internet_explorer/borderTopLeft.png</span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">Corrected absolute path: <span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">.AlphaImageLoader(src=http://your_domain.com/images/internet_explorer/borderTopLeft.png</span></p>
<h4 id="ajax" style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 15px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #af3100; padding: 0px; border: 0px initial initial;">Trying to load an external page results in<br />
	&#8221;<br />
	Request unsuccessful<br />
	&#8220;</h4>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">This could be due to an invalid URL or trying to load ajax content from a different domain. Ajax will only work with documents that are on the same domain as your current document due to browser restrictions. Ajax has to be run from a server to function (e.g., ajax content is not going to work from your desktop unless you are running a web server such as Apache for local development).</p>
<h4 id="jquery" style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 15px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #af3100; padding: 0px; border: 0px initial initial;">JS Error:<br />
	&#8221;<br />
	$(selector).colorbox is not a function<br />
	&#8221;<br />
	or<br />
	&#8221;<br />
	$.colorbox is not a function<br />
	&#8220;</h4>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">Double check your script paths and look for accidentally including multiple versions of jQuery.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">This most often happens when users load multiple versions of jQuery which overwrites the version that was extended with the ColorBox plugin. Check out source to see if a version of jQuery is being loaded after ColorBox has been loaded.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">If your HTML document only contains one link to the jQuery library, the same error could also be caused by loading HTML snippets (through ajax) or HTML documents that load the jQuery library. If you are loading HTML snippets with ajax or through ColorBox, be sure that they do not contain a link to the jQuery library. HTML documents should be contained within iframes or opened with ColorBox&#8217;s iframe property.</p>
<h4 id="focus" style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 15px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #af3100; padding: 0px; border: 0px initial initial;">Closing ColorBox breaks accordians/tabs/animations</h4>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">Try setting &#8216;returnFocus&#8217; to false. ColorBox returns focus to the element it was launched from upon closing. This is intended to provide better accessibility to users who use their keyboard to navigate through the document&#8217;s links, but it can cause problems with some JS effects. The problem isn&#8217;t ColorBox specific and can be reproduced without ColorBox by pressing the TAB key to cycle through the available links.</p>
<h4 id="timing" style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 15px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #af3100; padding: 0px; border: 0px initial initial;">JavaScript/jQuery is not working inside of ColorBox.</h4>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">This is often due to trying to access an element before it has been loaded into the document and can be resolved by moving the JavaScript into ColorBox&#8217;s onComplete callback.</p>
<h4 id="img" style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 15px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #af3100; padding: 0px; border: 0px initial initial;">ColorBox is sized too small the first time ajax/inline content is opened</h4>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">This is likely due to IMG elements in the loaded markup having not fully finished downloading before ColorBox takes measurements for auto-sizing the content. The second time ColorBox is opened, the images have been cached and will take up the correct width and height within your document. This can easily be fixed by adding the width and height dimensions to the IMG element, or by setting a style that specifies the width and height of the image in your CSS.</p>
<h4 id="jquerybug" style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 15px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #af3100; padding: 0px; border: 0px initial initial;">IE6/IE7 freezes with jQuery 1.6.0</h4>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">jQuery 1.6.0 had a <a style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; text-decoration: none; color: #21a4f4; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" href="http://bugs.jquery.com/ticket/9072">regressive bug</a> that affected ColorBox. Either use jQuery 1.5.x or jQuery 1.6.1 or higher.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">Example (using <a style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; text-decoration: none; color: #21a4f4; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" href="http://jquery.malsup.com/form/">jQuery Forms</a> plugin): <span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">$(&#8216;#login_window&#8217;).colorbox({onComplete:function(){</p>
<p>	$(&#8216;form#login&#8217;).ajaxForm();<br />
	}}); </span></p>
<h4 id="cookie" style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 15px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #af3100; padding: 0px; border: 0px initial initial;">Open ColorBox on first visit</h4>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">You&#8217;ll need to define a cookie that indicates that the user has already visited to site, then use that to determine whether or not to display ColorBox</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">Example &#8211; display a welcome message on first visit, and set a cookie that expires in 30 days from current time:</p>
<p class="code" style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">if (document.cookie.indexOf(&#8216;visited=true&#8217;) === -1) {</p>
<p>	var expires = new Date();</p>
<p>	expires.setDate(expires.getDate()+30);</p>
<p>	document.cookie =<br />
	&#8221;<br />
	visited=true; expires=<br />
	&#8221;<br />
	+expires.toUTCString();</p>
<p>$.colorbox({html:<br />
&#8221;<br />
Welcome!<br />
&#8221;<br />
});<br />
}<br />
<h4 id="querystring" style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 15px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #af3100; padding: 0px; border: 0px initial initial;">Pass ColorBox parameters based on a URL</h4>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">With a little JavaScript, you can parse the parameters from your URL&#8217;s querystring and pass them to ColorBox.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">Example URL: <span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">http://example.com/gallery.html?open=true<br />
	&amp;<br />
	height=500</span></p>
<p class="code" style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">function getParameters(){</p>
<p>	var</p>
<p>	settingsObject = {},</p>
<p>	hash,</p>
<p>	hashes = location.search.substring(1).split(/<br />
	&amp;<br />
	/);</p>
<p>	for(var i = 0; i<br />
	&lt;<br />
	hashes.length; i++)</p>
<p>	{</p>
<p>	hash = hashes[i].split(&#8216;=&#8217;);</p>
<p>	settingsObject[hash[0]] = hash[1];</p>
<p>	}</p>
<p>	return settingsObject;<br />
	}</p>
<p>$(&#8216;a[rel=example1]&#8216;).colorbox($.extend({width:&#8217;100%&#8217;, height:&#8217;100%&#8217;, speed:0}, getParameters()));</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">Here we selected some elements in our document, assigned colorbox to them, then used jQuery&#8217;s<a style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; text-decoration: none; color: #21a4f4; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" href="http://api.jquery.com/jQuery.extend/">$.extend()</a> method to combine our querystring parameters with the initial settings we set for our elements. This is just an example however, and you probably should not let visitors control all of ColorBox&#8217;s parameters (through modifying the querystring).</p>
<h4 id="close" style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 15px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #af3100; padding: 0px; border: 0px initial initial;">Prevent ColorBox from closing / Change the behavior of $.colorbox.close()</h4>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">The close method ($.colorbox.close()) can be cached and redefined as to offer some control over what happens when ColorBox is closed. This affects controls that are bind to it (such as the escKey, overlayClose, and the close button) and calling the close method directly.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">For example, lets say we open ColorBox to display an html snippet containing a form, and we want to warn the visitor that they are discarding their form if they try to close ColorBox before they submit their data.</p>
<p class="code" style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">var originalClose = $.colorbox.close;</p>
<p>	$.colorbox.close = function(){</p>
<p>	var response;</p>
<p>	if($(&#8216;#cboxLoadedContent&#8217;).find(&#8216;form&#8217;).length<br />
	&gt;<br />
	0){</p>
<p>	response = confirm(&#8216;Do you want to close this window?&#8217;);</p>
<p>	if(!response){</p>
<p>	return; // Do nothing.</p>
<p>	}</p>
<p>	}</p>
<p>	originalClose();</p>
<p>	};</p>
<p>	$(&#8216;a#example&#8217;).colorbox();</p>
<h4 id="nofollow" style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 15px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #af3100; padding: 0px; border: 0px initial initial;">Disable grouping by rel attribute</h4>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">Set ColorBox&#8217;s value for rel to &#8216;nofollow&#8217;. Example: <span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">$(&#8216;a[rel=<br />
	"<br />
	examples<br />
	"<br />
	]&#8216;).colorbox({rel:&#8217;nofollow&#8217;});</span></p>
<h4 id="parent" style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 15px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #af3100; padding: 0px; border: 0px initial initial;">Open ColorBox in the parent of an iframed document</h4>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">Anything loaded within an iframe is going to be confined to that iframe. The only way not to be confined by the iframe is to move ColorBox to the parent document. From the iframe you can reach back to the parent document to call ColorBox.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">Example: <span class="code" style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;"> &lt;<br />
	a href=&#8217;login.php&#8217; onclick=&#8217;parent.$.colorbox({href:<br />
	&#8221;<br />
	login.php<br />
	&#8221;<br />
	}); return false;&#8217;<br />
	&gt;<br />
	Open from parent<br />
	&lt;<br />
	/a<br />
	&gt; </span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">Note that grouping will not work with this format since the parent document can not access the content of the iframe to see if any of those elements share a rel attribute value.</p>
<h4 id="click" style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 15px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #af3100; padding: 0px; border: 0px initial initial;">Create a separate link for opening a gallery</h4>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">Lets say you&#8217;ve assigned ColorBox to a set of links in your document, but you also want to have an<br />
	&#8221;<br />
	Open Gallery<br />
	&#8221;<br />
	link that opens the first item in your set. When<br />
	&#8221;<br />
	Open Gallery<br />
	&#8221;<br />
	is clicked, you want to prevent the default action, then trigger a click event on that first set item. Example:</p>
<p class="code" style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: monospace; color: #53289a; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">var $gallery = $(&#8216;a[rel=gallery]&#8216;).colorbox();</p>
<p>	$(&#8216;a#openGallery&#8217;).click(function(e){</p>
<p>	e.preventDefault();</p>
<p>	$gallery.eq(0).click();</p>
<p>	});</p>
<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fericrichers.com%2Fblog%2F2011%2F09%2Fwhy-you-should-be-using-colorbox%2F&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div class="rw-left"><div class="rw-ui-container rw-class-blog-post rw-urid-10990"></div></div>]]></content:encoded>
			<wfw:commentRss>http://ericrichers.com/blog/2011/09/why-you-should-be-using-colorbox/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Converting 6.x themes to 7.x</title>
		<link>http://ericrichers.com/blog/2011/09/converting-6-x-themes-to-7-x/</link>
		<comments>http://ericrichers.com/blog/2011/09/converting-6-x-themes-to-7-x/#comments</comments>
		<pubDate>Wed, 07 Sep 2011 06:38:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[Drupal 6]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[drupal 7]]></category>
		<category><![CDATA[drupal theming]]></category>
		<category><![CDATA[update 6]]></category>

		<guid isPermaLink="false">http://ericrichers.com/blog/?p=1094</guid>
		<description><![CDATA[Converting 6.x themes to 7.x [U] Blocks have new, more meaningful CSS IDs [U] Primary and secondary links are now Main and Secondary menu [U] Unrendered taxonomy links are no longer available as a separate variable in node.tpl.php files [U] &#8230; <a href="http://ericrichers.com/blog/2011/09/converting-6-x-themes-to-7-x/">Read More.. <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a target="_blank"  href="/update/themes/6/7" title="Converting 6.x themes to 7.x">Converting 6.x themes to 7.x</a></p>
<ol>
<li>[<a href="http://drupal.org/node/778884" title="Docs Updated" rel="nofollow">U</a>] <a href="#blocks" rel="nofollow">Blocks have new, more meaningful CSS IDs</a></li>
<li>[<a href="http://drupal.org/node/778906" title="Docs Updated" rel="nofollow">U</a>] <a href="#menus" rel="nofollow">Primary and secondary links are now Main and Secondary menu</a></li>
<li>[<a href="http://drupal.org/node/778926" title="Docs Updated" rel="nofollow">U</a>] <a href="#taxonomy" rel="nofollow">Unrendered taxonomy links are no longer available as a separate variable in node.tpl.php files</a></li>
<li>[<a href="http://drupal.org/node/778988" title="Docs Updated" rel="nofollow">U</a>] <a href="#rdfa_header" rel="nofollow">RDFa requires some changes at the beginning of html.tpl.php</a></li>
<li>[<a href="http://drupal.org/node/778998" title="Docs Updated" rel="nofollow">U</a>] <a href="#clearfix" rel="nofollow">The clear-block class has been renamed to clearfix</a></li>
<li>[<a href="http://drupal.org/node/779002" title="Docs Updated" rel="nofollow">U</a>] <a href="#box" rel="nofollow">The box.tpl.php template has been removed</a></li>
<li><a href="#help-region" rel="nofollow">$help became a region</a></li>
<li>[<a href="http://drupal.org/node/779016" title="Docs Updated" rel="nofollow">U</a>] <a href="#highlighted-region" rel="nofollow">Mission statement removed, &#8216;highlighted&#8217; region suggested</a></li>
<li>[<a href="http://drupal.org/node/171224" title="Docs Updated" rel="nofollow">U</a>] <a href="#footer-message" rel="nofollow">Footer message removed</a></li>
<li>[<a href="http://drupal.org/node/171224" title="Docs Updated" rel="nofollow">U</a>] <a href="#content-region" rel="nofollow">Content region is now mandatory, main page content became a block</a></li>
<li>[<a href="http://drupal.org/node/223430" title="Docs Updated" rel="nofollow">U</a>] <a href="#variables-processor" rel="nofollow">Second phase variable process functions</a></li>
<li><a href="#html-class-variable" rel="nofollow">HTML classes generated through a variable</a></li>
<li><a href="#html-attributes-variable" rel="nofollow">HTML attributes generated through a variable</a></li>
<li><a href="#variables-processors-for-all-theme-hooks" rel="nofollow">Variable process functions can now be used for all theming hooks</a></li>
<li><a href="#function-argument-variables" rel="nofollow">All theme functions now take a single argument, $variables</a></li>
<li>[<a href="http://drupal.org/node/173880" title="Docs Updated" rel="nofollow">U</a>] <a href="#function-names-phptemplate" rel="nofollow">Function names must match theme name</a></li>
<li>[<a href="http://drupal.org/node/171205" title="Docs Updated" rel="nofollow">U</a>] <a href="#specify-all-css-js" rel="nofollow">All CSS and JavaScript files must be specified in the theme&#8217;s .info file</a></li>
<li><a href="#block-content" rel="nofollow">Renamed $block-&gt;content in block.tpl.php</a></li>
<li><a href="#granular" rel="nofollow">Granular rendering in node and user templates</a></li>
<li>[<a href="http://drupal.org/node/171213" title="Docs Updated" rel="nofollow">U</a>] <a href="#jquery_ui" rel="nofollow">Added jQuery UI (1.8) to core</a></li>
<li><a href="#attached_js" rel="nofollow">Attached JS/CSS for elements</a></li>
<li><a href="#closure" rel="nofollow">$closure becomes $page_bottom, new $page_top and hidden regions</a></li>
<li><a href="#sidebars-renamed" rel="nofollow">$left and $right variables are now $sidebar_first and $sidebar_second; CSS IDs also changed</a></li>
<li><a href="#user-picture" rel="nofollow">$picture changes to $user_picture, and the CSS class &#8216;picture&#8217; to &#8216;user-picture&#8217; </a></li>
<li><a href="#element-hidden" rel="nofollow">New classes available to hide content in an accessible manner</a></li>
<li><a href="#no-jsenabled" rel="nofollow">JavaScript variable Drupal.jsEnabled has been removed</a></li>
<li><a href="#phptemplate-suggestion-wildcard" rel="nofollow">PHPTemplate suggestion wildcard</a></li>
<li><a href="#system_elements-theme-definition" rel="nofollow">Include theme definition explicitly on element when using system_elements()</a></li>
<li><a href="#theme_task_list-accessibility" rel="nofollow">Added markup to make installation task progress perceivable with screen-reader and CSS disabled.</a></li>
<li><a href="#theme_breadcrumb-heading" rel="nofollow">Added an invisible heading to theme_breadcrumb().</a></li>
<li><a href="#theme_feed_icon-improved-alt-text" rel="nofollow">Changes to alt and title attribute for the RSS feed icon</a></li>
<li><a href="#search_box" rel="nofollow">Search box moved from theme layer to blocks</a></li>
<li><a href="#menu_tree" rel="nofollow">Changes to menu tree, link and tab rendering functions</a></li>
<li><a href="#theme-links-param" rel="nofollow">theme_links() has a new parameter &#8216;heading&#8217; for accessibility</a></li>
<li><a href="#theme-links-specifics" rel="nofollow">theme_links() now has some specific versions for more targeted overrides</a></li>
<li><a href="#theme-settings" rel="nofollow">theme_get_setting() and THEME_settings() have been improved</a></li>
<li><a href="#theme-form-required-marker" rel="nofollow">Added a theme_form_required_marker() function</a></li>
<li><a href="#theme-link" rel="nofollow">Added a theme_link() function</a></li>
<li><a href="#skip-link" rel="nofollow">Skip to main content links in core themes</a></li>
<li><a href="#theme_alter" rel="nofollow">Alter hooks available to themes</a></li>
<li><a href="#system-stylesheets" rel="nofollow">System module stylesheets have been reorganized to separate behavior-supporting styles from presentational styles</a></li>
<li><a href="#shortcuts" rel="nofollow">New theme setting for displaying the Shortcut module &#8220;add to shortcuts&#8221; link</a></li>
<li><a href="#template_files_double_hyphen" rel="nofollow">Specific template overrides of generic templates use a &#8216;&#8211;&#8217; delimiter instead of &#8216;-&#8217;</a></li>
<li><a href="#css-ie-31-tag-limit-workaround" rel="nofollow">CSS files are sometimes loaded with @import, sometimes with LINK tags</a></li>
<li>[<a href="http://drupal.org/node/1030462" rel="nofollow">U</a>] <a href="#browser-targeted-css" rel="nofollow">Browser-targeted CSS files can and should be added using drupal_add_css()</a></li>
<li><a href="#theme-suggestions-for-menus" rel="nofollow">Targeted overrides (suggestions) available for theme_menu_link() and theme_menu_tree()</a></li>
<li><a href="#theme-submenu" rel="nofollow">theme_submenu() was removed</a></li>
<li><a href="#title-prefix-suffix" rel="nofollow">New $title_prefix and $title_suffix template variables</a></li>
<li><a href="#theme-node-form" rel="nofollow">theme_node_form() was removed</a></li>
<li><a href="#node-get-types" rel="nofollow">node_get_types() renamed to node_type_get_types()</a></li>
<li><a href="#package-core" rel="nofollow">Core themes now contain &#8220;package = Core&#8221; in their .info files</a></li>
<li><a href="#search-result-headings" rel="nofollow"> Heading elements added to search-result.tpl.php</a></li>
<li><a href="#xhtml11-compatibility" rel="nofollow">The name attribute in a and map elements is invalid</a></li>
<li><a href="#engine" rel="nofollow">PHPTemplate is now the default theme engine</a></li>
<li><a href="#print-regions" rel="nofollow">Custom regions must be printed differently in page.tpl.php</a></li>
<li>[U] <a href="#thumbnail" rel="nofollow">Thumbnail size has changed</a></li>
<li><a href="#show-blocks" rel="nofollow">$show_blocks theme variable has been removed</a></li>
<li><a href="#region-tpl" rel="nofollow">Regions are now rendered with their own TPL file: region.tpl.php</a></li>
<li><a href="#html-tpl" rel="nofollow">New html.tpl.php file</a></li>
<li><a href="#css-no-wrappers" rel="nofollow">HTML rendering of form elements has different CSS classes</a></li>
<li><a href="#local_tasks" rel="nofollow">Local tasks and actions can now be altered</a></li>
<li><a href="#submitted_by" rel="nofollow">theme(&#8216;node_submitted&#8217;) and theme(&#8216;comment_submitted&#8217;) no longer exist</a></li>
</ol>
<div class="node-content">
<p>Help with upgrading the handbook to incorporate these changes. <span class="project-issue-status-1 project-issue-status-info"><a target="_blank"  href="/node/740194" title="Status: active">#740194: Update theming guide for Drupal 7</a></span></p>
<p>Once an update in this list is updated in the handbook, add [U], as a link to the handbook page, so others know the update is complete.</p>
<h2>Overview of Drupal Theme changes in 7.x</h2>
<h3 id="blocks">Blocks have new, more meaningful CSS IDs</h3>
<p>Many of the CSS IDs for blocks defined by Drupal core have changed so that they more clearly indicate the purpose of the block:</p>
<p><strong>Recent blog posts</strong></p>
<p>Old CSS ID (Drupal 6): <em>block-blog-0</em><br />
New CSS ID (Drupal 7): <em>block-blog-recent</em></p>
<p><strong>Book navigation</strong><br />
Old CSS ID (Drupal 6): <em>block-book-0</em><br />
New CSS ID (Drupal 7): <em>block-book-navigation</em></p>
<p><strong>Recent comments</strong><br />
Old CSS ID (Drupal 6): <em>block-comment-0</em></p>
<p>New CSS ID (Drupal 7): <em>block-comment-recent</em></p>
<p><strong>Active forum topics</strong><br />
Old CSS ID (Drupal 6): <em>block-forum-0</em><br />
New CSS ID (Drupal 7): <em>block-forum-active</em></p>
<p><strong>New forum topics</strong><br />
Old CSS ID (Drupal 6): <em>block-forum-1</em><br />
New CSS ID (Drupal 7): <em>block-forum-new</em></p>
<p><strong>Language switcher</strong><br />
Old CSS ID (Drupal 6): <em>block-locale-0</em><br />
New CSS ID (Drupal 7): <em>block-locale-language-switcher</em></p>
<p><strong>Syndicate</strong><br />
Old CSS ID (Drupal 6): <em>block-node-0</em><br />
New CSS ID (Drupal 7): <em>block-node-syndicate</em></p>
<p><strong>Most recent poll</strong></p>
<p>Old CSS ID (Drupal 6): <em>block-poll-0</em><br />
New CSS ID (Drupal 7): <em>block-poll-recent</em></p>
<p><strong>Author information</strong><br />
Old CSS ID (Drupal 6): <em>block-profile-0</em><br />
New CSS ID (Drupal 7): <em>block-profile-author-information</em></p>
<p><strong>Search form</strong><br />
Old CSS ID (Drupal 6): <em>block-search-0</em></p>
<p>New CSS ID (Drupal 7): <em>block-search-form</em></p>
<p><strong>Popular content</strong><br />
Old CSS ID (Drupal 6): <em>block-statistics-0</em><br />
New CSS ID (Drupal 7): <em>block-statistics-popular</em></p>
<p><strong>Powered by Drupal</strong><br />
Old CSS ID (Drupal 6): <em>block-system-0</em><br />
New CSS ID (Drupal 7): <em>block-system-powered-by</em></p>
<p><strong>User login</strong><br />
Old CSS ID (Drupal 6): <em>block-user-0</em><br />
New CSS ID (Drupal 7): <em>block-user-login</em></p>
<p><strong>Navigation</strong><br />
Old CSS ID (Drupal 6): <em>block-user-1</em><br />
New CSS ID (Drupal 7): <em>block-system-navigation</em></p>
<p><strong>Who&#8217;s new</strong></p>
<p>Old CSS ID (Drupal 6): <em>block-user-2</em><br />
New CSS ID (Drupal 7): <em>block-user-new</em></p>
<p><strong>Who&#8217;s online</strong><br />
Old CSS ID (Drupal 6): <em>block-user-3</em><br />
New CSS ID (Drupal 7): <em>block-user-online</em></p>
<p>For example, a Drupal 6 CSS style declaration such as:</p>
<div class="codeblock"><code>/* Make the text in the user login block bigger. */<br />#block-user-0 {<br />&nbsp; font-size: 1.5em;<br />}</code></div>
<p></p>
<p>should become (in Drupal 7):</p>
<div class="codeblock"><code>/* Make the text in the user login block bigger. */<br />#block-user-login {<br />&nbsp; font-size: 1.5em;<br />}</code></div>
<p>
<em>[<a target="_blank"  href="http://drupal.org/node/778884" rel="nofollow">Docs Updated</a>]</em>
</p>
<h3 id="menus">Primary and secondary links are now Main and Secondary menu</h3>
<p>Primary and Secondary links have been renamed to Main and Secondary menu. Themes which support these options will need to be updated to use the new variable names:</p>
<p><strong>6.x: page.tpl.php</strong></p>
<div class="codeblock"><code>&nbsp; &lt;div id="menu"&gt;<br />&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">if (isset(</span><span style="color: rgb(0, 0, 187);">$secondary_links</span><span style="color: rgb(0, 119, 0);">)) { </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">theme</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">'links'</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(0, 0, 187);">$secondary_links</span><span style="color: rgb(0, 119, 0);">, array(</span><span style="color: rgb(221, 0, 0);">'class' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(221, 0, 0);">'links'</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(221, 0, 0);">'id' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(221, 0, 0);">'subnavlist'</span><span style="color: rgb(0, 119, 0);">)); </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">} </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">if (isset(</span><span style="color: rgb(0, 0, 187);">$primary_links</span><span style="color: rgb(0, 119, 0);">)) { </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">theme</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">'links'</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(0, 0, 187);">$primary_links</span><span style="color: rgb(0, 119, 0);">, array(</span><span style="color: rgb(221, 0, 0);">'class' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(221, 0, 0);">'links'</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(221, 0, 0);">'id' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(221, 0, 0);">'navlist'</span><span style="color: rgb(0, 119, 0);">)) </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">} </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp; &lt;/div&gt;</code></div>
</p>
<p><strong>7.x: page.tpl.php</strong>
</p>
<div class="codeblock"><code>&nbsp; &lt;div id="menu"&gt;<br />&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">if (isset(</span><span style="color: rgb(0, 0, 187);">$secondary_menu</span><span style="color: rgb(0, 119, 0);">)) { </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">theme</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">'links'</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(0, 0, 187);">$secondary_menu</span><span style="color: rgb(0, 119, 0);">, array(</span><span style="color: rgb(221, 0, 0);">'class' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(221, 0, 0);">'links'</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(221, 0, 0);">'id' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(221, 0, 0);">'subnavlist'</span><span style="color: rgb(0, 119, 0);">)); </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">} </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">if (isset(</span><span style="color: rgb(0, 0, 187);">$main_menu</span><span style="color: rgb(0, 119, 0);">)) { </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">theme</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">'links'</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(0, 0, 187);">$main_menu</span><span style="color: rgb(0, 119, 0);">, array(</span><span style="color: rgb(221, 0, 0);">'class' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(221, 0, 0);">'links'</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(221, 0, 0);">'id' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(221, 0, 0);">'navlist'</span><span style="color: rgb(0, 119, 0);">)) </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">} </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp; &lt;/div&gt;</code></div>
</p>
<p>You will also need to make the appropriate variable name changes if your theme&#8217;s theme.info is defining features[]. Defining renamed or replaced features may cause all features to render as blank or empty arrays.</p>
<p><strong>6.x: theme.info &#8211; features[]</strong>
</p>
<div class="codeblock"><code>&nbsp; features[] = primary_links<br />&nbsp; features[] = secondary_links</code></div>
</p>
<p><strong>7.x: theme.info &#8211; features[]</strong>
</p>
<div class="codeblock"><code>&nbsp; features[] = main_menu<br />&nbsp; features[] = secondary_menu</code></div>
</p>
<p>Also, if your theme.info is defining <b>features[] = mission</b> please note that this feature has been removed and replaced with a variable named $mission which can be output in your page template.</p>
<p><em>[<a target="_blank"  href="http://drupal.org/node/778906" rel="nofollow">Docs Updated</a>]</em></p>
<h3 id="taxonomy">Unrendered taxonomy links are no longer available as a separate variable in node.tpl.php files</h3>
<p>Previously, node.tpl.php files could use the <code>$taxonomy</code> variable if they needed access to an array of unrendered taxonomy links associated with the current node.</p>
<p>In Drupal 7, this is no longer the case. Instead, all links have been moved into the <code>$node</code> object. The array of unrendered taxonomy links can now be found in <code>$node-&gt;content['links']['terms']['#value']</code> instead. (Note that this array should be used with caution, since the text contained within it has not been escaped to prevent <a target="_blank"  href="/node/28984" rel="nofollow">XSS attacks</a>.)</p>
<p><em>Rendered</em> taxonomy links are not affected; node.tpl.php files can continue to access these via the <code>$terms</code> variable, as before. In many cases, the <code>$terms</code> variable is what you want to use in your theme anyway, and you might be able to replace references to <code>$taxonomy</code> with it, as in the following example:</p>
<p><strong>6.x</strong>
</p>
<div class="codeblock"><code>&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">if (</span><span style="color: rgb(0, 0, 187);">$taxonomy</span><span style="color: rgb(0, 119, 0);">): </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div class="terms"&gt;<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$terms ?&gt;</span></span>&lt;/div&gt;<br />&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">endif;</span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<p><strong>7.x</strong>
</p>
<div class="codeblock"><code>&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">if (</span><span style="color: rgb(0, 0, 187);">$terms</span><span style="color: rgb(0, 119, 0);">): </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div class="terms"&gt;<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$terms ?&gt;</span></span>&lt;/div&gt;<br />&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">endif;</span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
<p></p>
<p><em>[<a target="_blank"  href="http://drupal.org/node/778926" rel="nofollow">Docs Updated</a>]</em>
</p>
<h3 id="rdfa_header">RDFa requires some changes at the beginning of html.tpl.php</h3>
<p>Drupal 7 is able to output RDFa which requires the following changes in html.tpl.php.</p>
<ul>
<li>The DOCTYPE must be changed to XHTML+RDFa 1.0.</li>
<li>The old <code>lang</code> attribute should be removed for <a target="_blank"  href="http://www.w3.org/TR/xhtml11/changes.html" rel="nofollow">compatibility with XHTML 1.1</a>, only <code>xml:lang</code> should remain.</li>
<li>The RDF namespace prefixes used throughout the HTML document need to be serialized in the <code>html</code> tag and are contained in the <code>$rdf_namespaces</code> variable.</li>
<li>The GRDDL profile should be specified in the <code>&lt;head&gt;</code> tag.</li>
</ul>
<p><strong>6.x</strong></p>
<div class="codeblock"><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"<br />&nbsp; "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;<br />&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$language</span><span style="color: rgb(0, 119, 0);">-&gt;</span><span style="color: rgb(0, 0, 187);">language ?&gt;</span></span>" lang="<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$language</span><span style="color: rgb(0, 119, 0);">-&gt;</span><span style="color: rgb(0, 0, 187);">language ?&gt;</span></span>" dir="<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$language</span><span style="color: rgb(0, 119, 0);">-&gt;</span><span style="color: rgb(0, 0, 187);">dir ?&gt;</span></span>"&gt;<br />&nbsp; &lt;head&gt;</code></div>
</p>
<p><strong>7.x</strong>
</p>
<div class="codeblock"><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"<br />&nbsp; "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"&gt;<br />&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$language</span><span style="color: rgb(0, 119, 0);">-&gt;</span><span style="color: rgb(0, 0, 187);">language ?&gt;</span></span>" dir="<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$language</span><span style="color: rgb(0, 119, 0);">-&gt;</span><span style="color: rgb(0, 0, 187);">dir ?&gt;</span></span>"<br />&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$rdf_namespaces ?&gt;</span></span>&gt;<br />&nbsp; &lt;head profile="<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$grddl_profile ?&gt;</span></span>"&gt;</code></div>
</p>
<p><em>[<a target="_blank"  href="http://drupal.org/node/778988" rel="nofollow">Docs Updated</a>]</em></p>
<h3 id="clearfix">The clear-block class has been renamed to clearfix</h3>
<p>The &#8220;clear-block&#8221; class was a Drupalism for functionality that was better known by the CSS Community as the &#8220;clearfix&#8221; class. Also, using &#8220;block&#8221; in the old name was confusing to Drupal users more familiar with Drupal&#8217;s <em>block system</em> than with the properties inside that CSS ruleset. New themers and designers to the Drupal community will no longer be confused by the old class name.</p>
<p>If you had a <code>&lt;div class="clear-block"&gt;</code> in your D6 theme, simply change it to <code>&lt;div class="clearfix"&gt;</code>.</p>
<p><em>[<a target="_blank"  href="http://drupal.org/node/778998" rel="nofollow">Docs Updated</a>]</em></p>
<h3 id="box">The box.tpl.php template has been removed</h3>
<p>The amorphous box.tpl.php template has been removed. Those pieces of content that were using the box.tpl.php now have their own theme functions.</p>
<p>The search results listings are just themed with theme(&#8216;search_results&#8217;) instead of being wrapped in an additional box. The comment form box is themed with a theme_comment_form_box() theme function.</p>
<p><em>[<a target="_blank"  href="http://drupal.org/node/779002" rel="nofollow">Docs Updated</a>]</em></p>
<h3 id="help-region">$help became a region</h3>
<p><a target="_blank"  href="http://drupal.org/node/448784" rel="nofollow">(issue)</a> In Drupal 7, a new region was added to the defaults (<code>left</code>, <code>right</code>, <code>content</code>, <code>header</code>, <code>footer</code>) called <code>help</code>. By default, the textual content of this region is the same as the <code>$help</code> variable was in page.tpl.php for Drupal 6. </p>
<p>Themes in Drupal 7 need to ensure that the <code>$help</code> variable is printed in page.tpl.php and, if the theme overrode the default regions, that the following line is added to its .info file:</p>
</p>
<div class="codeblock"><code>regions[help] = Help</code></div>
</p>
<p>The help text is now surrounded by the block.tpl.php template&#8217;s <code>&lt;div&gt;</code> tags and classes, so the CSS used to style the help likely needs changing.</p>
<p><em>[docs updated]</em></p>
<h3 id="highlighted-region">Mission statement removed, &#8216;highlighted&#8217; region suggested</h3>
<p><a target="_blank"  href="http://drupal.org/node/428800" rel="nofollow">(issue)</a> In Drupal 6, the page template received a special variable called $mission, which contained the mission statement setting of the website when on the front page. Drupal 6 themes also had an option on the theme settings page to toggle this functionality. Drupal 7 removes the mission setting and the option toggle in favor of the more general custom block placement in regions.</p>
<p>Drupal 7 core themes now include a region named &#8216;highlighted&#8217; which uses the same display as the mission statement area in Drupal 6. Whether this region has content now depends on administrators setting block placement, and is not limited to the front page only. Content in the highlighted region will be surrounded by the block.tpl.php template&#8217;s <code>&lt;div&gt;</code> tags and classes, so the CSS used to style this area might need changing.</p>
<p><strong>6.x</strong></p>
<p><em>In .info:</em>
</p>
<div class="codeblock"><code>features[] = mission</code></div>
</p>
<p><em>In page.tpl.php:</em></p>
<div class="codeblock"><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$mission</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<p><strong>7.x</strong></p>
<p>If you have defined custom regions in your .info file, you may add the highlighted region to the existing list of regions as shown below. If your theme does not define any regions, the highlighted region will be provided by core automatically, and you&#8217;ll only need to ensure that you print it in page.tpl.php.</p>
<p><em>in .info:</em>
</p>
<div class="codeblock"><code>regions[highlighted] = Highlighted</code></div>
</p>
<p><em>in page.tpl.php:</em></p>
<div class="codeblock"><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">render</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$page</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'highlighted'</span><span style="color: rgb(0, 119, 0);">]); </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<p><a target="_blank"  href="http://drupal.org/node/779016" rel="nofollow">[Docs Updated]</a>.</p>
<h3 id="footer-message">Footer message removed</h3>
<p><a target="_blank"  href="http://drupal.org/node/453080" rel="nofollow">(issue)</a> In Drupal 6, the page template received a special variable called $footer_message, which contained the footer message setting of the website. This was usually output before the footer region ($footer) by the template. Drupal 7 recognizes that the footer message was just a special type of user defined block. Those who had this setting in Drupal 6 will get a user defined block in the update, positioned in the $footer region.</p>
<p>To update your themes, just remove the $footer_message variable from them.</p>
<p>If you happened to output the $footer_message in your page template, but did not yet support the $footer region, now might be the time to start supporting this region. If you don&#8217;t override any regions, the footer region will be predefined for you. If you do override regions, please output the $footer content in your page template and include the footer region in your .info file: </p>
</p>
<div class="codeblock"><code>regions[footer] = Footer</code></div>
</p>
<p>Support for the footer region is just suggested but not required by Drupal. Those upgrading from Drupal 6 with a theme lacking support for the footer region will be able to reposition their block to another region.</p>
<h3 id="content-region">Content region is now mandatory, main page content became a block</h3>
<p>In Drupal up to version 6, the $content variable in page.tpl.php contained the main page content appended with the blocks positioned into the content region (if you had that region defined).</p>
<p>In Drupal 7, $content became a full region and is now mandatory in all themes. This new requirement was set up so that when enabling new themes, Drupal knows where to put the main page content by default.</p>
<p>In Drupal 6, it was only possible to put blocks after the main page content in this region. The only way to put blocks before the main page content was to define a specific region for that purpose. Drupal 7 now makes the main page content its own block. This makes it possible to put blocks before or after the main page content in the region without hacking in a new region.</p>
<p>If you relied on the fact that blocks were only put in the sidebars and therefore got their styling via just a <code>.block</code> class selector or something similar, now you might need to revisit your CSS files. Because the main page content is wrapped by markup from block.tpl.php, the <code>.block</code> selector will match that too, so you need to limit your blocks styling to certain regions by making the selectors more specific, such as <code>#left-sidebar .block</code>.</p>
<h3 id="variables-processor">Second phase variable process functions</h3>
<p>There are now two sets of variables process functions. The first are the existing &#8220;<a target="_blank"  href="/node/223430" rel="nofollow"><em>pre</em>process</a>&#8221; functions. The second are &#8220;process&#8221; functions which are run after preprocessors. All the various prefixes and suffixes apply to this second phase in the exact same way. This is useful when certain variables need to be worked on in two phases.</p>
<p>For example, adding classes into an array for the &#8220;preprocess&#8221; phase then flattening them into a string in the &#8220;process&#8221; phase so it&#8217;s ready to print within a template. See next section.</p>
<p><a target="_blank"  href="http://drupal.org/node/223430" rel="nofollow">[Docs Updated]</a>.</p>
<h3 id="html-class-variable">HTML classes generated through a variable</h3>
<p>All templates can now print out <code>$classes</code> from a template to render dynamic classes built from variable process functions. The way to add these dynamic classes is by feeding the variable key labeled &#8220;classes_array&#8221; like so:</p>
</p>
<div class="codeblock"><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php<br /></span><span style="color: rgb(0, 119, 0);">function </span><span style="color: rgb(0, 0, 187);">mytheme_preprocess_node</span><span style="color: rgb(0, 119, 0);">(&amp;</span><span style="color: rgb(0, 0, 187);">$vars</span><span style="color: rgb(0, 119, 0);">) {<br />&nbsp; </span><span style="color: rgb(255, 128, 0);">// Add a striping class.<br />&nbsp; </span><span style="color: rgb(0, 0, 187);">$vars</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'classes_array'</span><span style="color: rgb(0, 119, 0);">][] = </span><span style="color: rgb(221, 0, 0);">'node-' </span><span style="color: rgb(0, 119, 0);">. </span><span style="color: rgb(0, 0, 187);">$vars</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'zebra'</span><span style="color: rgb(0, 119, 0);">];<br />}<br /></span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<p>The default &#8220;template_process&#8221; (second phase processor) will take care of flattening the array into a flat string making it ready to print from your template. Dynamic classes are generated for common templates by default but due to the way it&#8217;s set-up, any template can have a $classes variable.</p>
<p>Example:</p>
</p>
<div class="codeblock"><code>&lt;div class="<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$classes ?&gt;</span></span>"&gt;<br />&nbsp; ...<br />&lt;/div&gt;</code></div>
</p>
<h3 id="html-attributes-variable">HTML attributes generated through a variable</h3>
<p>All templates can now print out <code>$attributes</code>, <code>$title_attributes</code>, and <code>$content_attributes</code> from a template to render dynamic attributes built from variable process functions. The RDF module and other modules add important information to these variables, so it is important for themes to ensure that these variables are printed correctly within all overridden template files. These three variables contain attributes for the overall element being rendered by the template, and its primary title and content elements, respectively. The way to add attributes to these variables is by feeding the variable keys labeled &#8220;attributes_array&#8221;, &#8220;title_attributes_array&#8221;, and &#8220;content_attributes_array&#8221; like so:</p>
</p>
<div class="codeblock"><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php<br /></span><span style="color: rgb(0, 119, 0);">function </span><span style="color: rgb(0, 0, 187);">mytheme_preprocess_node</span><span style="color: rgb(0, 119, 0);">(&amp;</span><span style="color: rgb(0, 0, 187);">$vars</span><span style="color: rgb(0, 119, 0);">) {<br />&nbsp; </span><span style="color: rgb(255, 128, 0);">// If the node was saved with a log message and the currently logged in user<br />&nbsp; // has permission to view that message, add it as a title attribute (tooltip)<br />&nbsp; // when displaying the node.<br />&nbsp; </span><span style="color: rgb(0, 119, 0);">if (!empty(</span><span style="color: rgb(0, 0, 187);">$vars</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'node'</span><span style="color: rgb(0, 119, 0);">]-&gt;</span><span style="color: rgb(0, 0, 187);">log</span><span style="color: rgb(0, 119, 0);">) &amp;&amp; </span><span style="color: rgb(0, 0, 187);">user_access</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">'view revisions'</span><span style="color: rgb(0, 119, 0);">)) {<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(0, 0, 187);">$vars</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'attributes_array'</span><span style="color: rgb(0, 119, 0);">][</span><span style="color: rgb(221, 0, 0);">'title'</span><span style="color: rgb(0, 119, 0);">] = </span><span style="color: rgb(0, 0, 187);">$vars</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'node'</span><span style="color: rgb(0, 119, 0);">]-&gt;</span><span style="color: rgb(0, 0, 187);">log</span><span style="color: rgb(0, 119, 0);">;<br />&nbsp; }</p>
<p>&nbsp; </span><span style="color: rgb(255, 128, 0);">// Force the direction of node titles to be left to right, regardless of<br />&nbsp; // language or any other settings.<br />&nbsp; </span><span style="color: rgb(0, 0, 187);">$vars</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'title_attributes_array'</span><span style="color: rgb(0, 119, 0);">][</span><span style="color: rgb(221, 0, 0);">'dir'</span><span style="color: rgb(0, 119, 0);">] = </span><span style="color: rgb(221, 0, 0);">'ltr'</span><span style="color: rgb(0, 119, 0);">;<br />}<br /></span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<p>The default &#8220;template_process&#8221; (second phase processor) takes care of flattening the arrays into strings ready to print within the template file. The flattening process results in either empty strings (if no dynamic attributes were set) or strings that have a leading space followed by attribute names and values. Because of this, the attributes variables should be printed directly next to what precedes it in the template, with no leading space.</p>
<p>Example:
</p>
<div class="codeblock"><code>&lt;div id="..." class="..."<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$attributes</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span>&gt;<br />&nbsp; &lt;h2<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$title_attributes</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span>&gt;...&lt;/h2&gt;<br />&nbsp; &lt;div class="content"<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$content_attributes</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span>&gt;...&lt;/div&gt;<br />&lt;/div&gt;</code></div>
</p>
<p>As is shown in the example, the convention is for the &#8220;id&#8221; and &#8220;class&#8221; attributes to be printed explicitly within the template, and for the attributes variables to be used for all other attributes. Therefore, to ensure that no attribute gets printed twice within the same element, the following rules should be followed:</p>
<ul>
<li>Preprocess functions within modules must not add &#8220;id&#8221; or &#8220;class&#8221; to the attributes arrays.</li>
<li>Preprocess functions within themes may add &#8220;id&#8221; and/or &#8220;class&#8221; to the attributes arrays, but if they do so, the theme must also override the corresponding template file and ensure that the same attribute isn&#8217;t being printed explicitly.</li>
<li>Templates must not print any attribute other than &#8220;id&#8221; or &#8220;class&#8221; explicitly on any element for which an attributes variable is also being printed. Instead, the theme must use a preprocess function, as shown above.</li>
</ul>
<h3 id="variables-processors-for-all-theme-hooks">Variable process functions can now be used for all theming hooks</h3>
<p><a target="_blank"  href="http://drupal.org/node/400292" rel="nofollow">(issue)</a> In Drupal 6, <a target="_blank"  href="http://drupal.org/node/223430" rel="nofollow">preprocess functions</a> could only be used for theming hooks rendered by templates. In Drupal 7, hook-specific preprocess and process functions can be used for all theming hooks, whether rendered by templates or functions. For example, a theme can make all menu links that start with &#8220;http:&#8221; or &#8220;https:&#8221; (as opposed to ones that refer to an internal Drupal path) to open in a new browser tab:</p>
</p>
<div class="codeblock"><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php<br /></span><span style="color: rgb(0, 119, 0);">function </span><span style="color: rgb(0, 0, 187);">mytheme_preprocess_menu_link</span><span style="color: rgb(0, 119, 0);">(&amp;</span><span style="color: rgb(0, 0, 187);">$variables</span><span style="color: rgb(0, 119, 0);">) {<br />&nbsp; if (<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(0, 0, 187);">substr</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$variables</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'element'</span><span style="color: rgb(0, 119, 0);">][</span><span style="color: rgb(221, 0, 0);">'#href'</span><span style="color: rgb(0, 119, 0);">], </span><span style="color: rgb(0, 0, 187);">0</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(0, 0, 187);">5</span><span style="color: rgb(0, 119, 0);">) == </span><span style="color: rgb(221, 0, 0);">'http:' </span><span style="color: rgb(0, 119, 0);">|| <br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(0, 0, 187);">substr</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$variables</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'element'</span><span style="color: rgb(0, 119, 0);">][</span><span style="color: rgb(221, 0, 0);">'#href'</span><span style="color: rgb(0, 119, 0);">], </span><span style="color: rgb(0, 0, 187);">0</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(0, 0, 187);">6</span><span style="color: rgb(0, 119, 0);">) == </span><span style="color: rgb(221, 0, 0);">'https:'<br />&nbsp; </span><span style="color: rgb(0, 119, 0);">) {<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(0, 0, 187);">$variables</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'element'</span><span style="color: rgb(0, 119, 0);">][</span><span style="color: rgb(221, 0, 0);">'#localized_options'</span><span style="color: rgb(0, 119, 0);">][</span><span style="color: rgb(221, 0, 0);">'attributes'</span><span style="color: rgb(0, 119, 0);">][</span><span style="color: rgb(221, 0, 0);">'target'</span><span style="color: rgb(0, 119, 0);">] = </span><span style="color: rgb(221, 0, 0);">'_blank'</span><span style="color: rgb(0, 119, 0);">;<br />&nbsp; }<br />} <br /></span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<p>Every preprocess function adds to the time it takes to theme the item, so especially for theme functions that get called a lot, keep an eye on performance when adding preprocess functions.</p>
<p>To minimize performance overhead, the non-hook-specific preprocess and process functions are called for templates only. See the <a target="_blank"  href="http://api.drupal.org/api/function/theme/7" rel="nofollow">API documentation for theme()</a> for the full list of hook-specific and non-hook-specific preprocess and process functions.</p>
<h3 id="function-argument-variables">All theme functions now take a single argument, $variables</h3>
<p><a target="_blank"  href="http://drupal.org/node/572618" rel="nofollow">(issue)</a> In Drupal 6, theme functions registered their function arguments in hook_theme(). In Drupal 7, all theme functions take a single argument, $variables, an array of keyed variables, and register the expected keys within this array in hook_theme().</p>
<p><strong>6.x</strong>
</p>
<div class="codeblock"><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php<br /></span><span style="color: rgb(0, 119, 0);">function </span><span style="color: rgb(0, 0, 187);">drupal_common_theme</span><span style="color: rgb(0, 119, 0);">() {<br />&nbsp; return array(<br />&nbsp;&nbsp;&nbsp; ...<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(221, 0, 0);">'table' </span><span style="color: rgb(0, 119, 0);">=&gt; array(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(221, 0, 0);">'arguments' </span><span style="color: rgb(0, 119, 0);">=&gt; array(</span><span style="color: rgb(221, 0, 0);">'header' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(0, 0, 187);">NULL</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(221, 0, 0);">'rows' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(0, 0, 187);">NULL</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(221, 0, 0);">'attributes' </span><span style="color: rgb(0, 119, 0);">=&gt; array(), </span><span style="color: rgb(221, 0, 0);">'caption' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(0, 0, 187);">NULL</span><span style="color: rgb(0, 119, 0);">),<br />&nbsp;&nbsp;&nbsp; ),<br />&nbsp;&nbsp;&nbsp; ...<br />&nbsp; );<br />}</p>
<p>function </span><span style="color: rgb(0, 0, 187);">theme_table</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$header</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(0, 0, 187);">$rows</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(0, 0, 187);">$attributes </span><span style="color: rgb(0, 119, 0);">= array(), </span><span style="color: rgb(0, 0, 187);">$caption </span><span style="color: rgb(0, 119, 0);">= </span><span style="color: rgb(0, 0, 187);">NULL</span><span style="color: rgb(0, 119, 0);">) {<br />&nbsp; ...<br />}<br /></span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<p><strong>7.x</strong>
</p>
<div class="codeblock"><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php<br /></span><span style="color: rgb(0, 119, 0);">function </span><span style="color: rgb(0, 0, 187);">drupal_common_theme</span><span style="color: rgb(0, 119, 0);">() {<br />&nbsp; return array(<br />&nbsp;&nbsp;&nbsp; ...<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(221, 0, 0);">'table' </span><span style="color: rgb(0, 119, 0);">=&gt; array(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(221, 0, 0);">'variables' </span><span style="color: rgb(0, 119, 0);">=&gt; array(</span><span style="color: rgb(221, 0, 0);">'header' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(0, 0, 187);">NULL</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(221, 0, 0);">'rows' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(0, 0, 187);">NULL</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(221, 0, 0);">'attributes' </span><span style="color: rgb(0, 119, 0);">=&gt; array(), </span><span style="color: rgb(221, 0, 0);">'caption' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(0, 0, 187);">NULL</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(221, 0, 0);">'colgroups' </span><span style="color: rgb(0, 119, 0);">=&gt; array(), </span><span style="color: rgb(221, 0, 0);">'sticky' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(0, 0, 187);">TRUE</span><span style="color: rgb(0, 119, 0);">),<br />&nbsp;&nbsp;&nbsp; ),<br />&nbsp;&nbsp;&nbsp; ...<br />&nbsp; );<br />}</p>
<p>function </span><span style="color: rgb(0, 0, 187);">theme_table</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$variables</span><span style="color: rgb(0, 119, 0);">) {<br />&nbsp; </span><span style="color: rgb(0, 0, 187);">$header </span><span style="color: rgb(0, 119, 0);">= </span><span style="color: rgb(0, 0, 187);">$variables</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'header'</span><span style="color: rgb(0, 119, 0);">];<br />&nbsp; </span><span style="color: rgb(0, 0, 187);">$rows </span><span style="color: rgb(0, 119, 0);">= </span><span style="color: rgb(0, 0, 187);">$variables</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'rows'</span><span style="color: rgb(0, 119, 0);">];<br />&nbsp; </span><span style="color: rgb(0, 0, 187);">$attributes </span><span style="color: rgb(0, 119, 0);">= </span><span style="color: rgb(0, 0, 187);">$variables</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'attributes'</span><span style="color: rgb(0, 119, 0);">];<br />&nbsp; </span><span style="color: rgb(0, 0, 187);">$caption </span><span style="color: rgb(0, 119, 0);">= </span><span style="color: rgb(0, 0, 187);">$variables</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'caption'</span><span style="color: rgb(0, 119, 0);">];<br />&nbsp; </span><span style="color: rgb(0, 0, 187);">$colgroups </span><span style="color: rgb(0, 119, 0);">= </span><span style="color: rgb(0, 0, 187);">$variables</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'colgroups'</span><span style="color: rgb(0, 119, 0);">];<br />&nbsp; </span><span style="color: rgb(0, 0, 187);">$sticky </span><span style="color: rgb(0, 119, 0);">= </span><span style="color: rgb(0, 0, 187);">$variables</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'sticky'</span><span style="color: rgb(0, 119, 0);">];<br />&nbsp; ...<br />}<br /></span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<h3 id="function-names-phptemplate">Function names must match theme name</h3>
<p>Function names in the file <code>template.php</code> must now use the relevant theme&#8217;s name. You may no longer use phptemplate_function. This change was made in the following patch: <a target="_blank"  href="http://drupal.org/node/422116" rel="nofollow">Die, themeEngineName_ prefix, die!</a>. To update your theme ensure there are no functions that begin with the template engine name (phptemplate) in the file <code>template.php</code> or any related template files.</p>
<h3 id="specify-all-css-js">All CSS and JavaScript files must be specified in the theme&#8217;s .info file</h3>
<p>In Drupal 6 <code>style.css</code> and <code>script.js</code> would be included in your theme automatically, even if they weren&#8217;t present in the theme&#8217;s .info file. In Drupal 7, themes must specify these files in the .info file to include them. More information about this change can be seen at <a target="_blank"  href="/node/351487" rel="nofollow">#351487: Remove default values for stylesheet and scripts includes from system module</a>. If your theme doesn&#8217;t use these files, or if they are already specified in your theme&#8217;s info file, no changes are required. <em>[docs updated]</em></p>
<h3 id="block-content">Renamed $block-&gt;content to $content in block.tpl.php</h3>
<p>See <a target="_blank"  href="/node/478744" rel="nofollow">this issue</a> for the whole story.</p>
<h3 id="granular">Granular rendering in node and user templates.</h3>
<p><a target="_blank"  href="/node/455844" rel="nofollow">Issue</a>. Template authors may now finally print out bits of node and profile content as they see fit and still maintain forward compatibility with new modules that might add new content. To do so, template authors should use 2 new functions &#8211; render() and hide(). Example taken from node.tpl.php:
</p>
<div class="codeblock"><code>&lt;div class="content"&gt;<br />&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(255, 128, 0);">// We hide the comments and links now so that we can render them later.<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(0, 0, 187);">hide</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$content</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'comments'</span><span style="color: rgb(0, 119, 0);">]);<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(0, 0, 187);">hide</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$content</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'links'</span><span style="color: rgb(0, 119, 0);">]);<br />&nbsp;&nbsp;&nbsp; print </span><span style="color: rgb(0, 0, 187);">render</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$content</span><span style="color: rgb(0, 119, 0);">);<br />&nbsp; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&lt;/div&gt;</p>
<p><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">render</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$content</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'links'</span><span style="color: rgb(0, 119, 0);">]); </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></p>
<p><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">render</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$content</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'comments'</span><span style="color: rgb(0, 119, 0);">]); </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
<p></p>
<p>render() returns all the items that are in $content. So, <code>print render($content)</code> is equivalent to the D6 <code>print $content</code>. When a templater wants to print out part of the <code>$content</code> array, she may do so with something like <code>print render($content['links'])</code>. If the printing of links comes after the printing of all the rest of <code>$content</code>, then templater should call <code>hide($content['links'])</code> before calling <code>print render($content)</code>. Then, the links can be printed further down in the template with <code>print render($content['links'])</code>.
</p>
<h3 id="jquery_ui">Added jQuery UI (1.8) to core</h3>
<p><a target="_blank"  href="http://drupal.org/node/315035" rel="nofollow">(issue)</a> jQuery UI 1.8 was added to core. You can find the jQuery UI files in misc/ui and can add Javascript and CSS files from there to your pages with the regular drupal_add_js() and drupal_add_css() calls, no special function calls required. If you are migrating a theme which was previously dependent on the jquery_ui contributed module, see <a target="_blank"  href="http://drupal.org/update/modules/6/7#jquery_ui" rel="nofollow">the module update guide on the topic</a>, which provides examples. <em>[docs updated]</em></p>
<h3 id="attached_js">Attached JavaScript and CSS for drupal_render</h3>
<p><a target="_blank"  href="http://drupal.org/node/323112" rel="nofollow">(issue)</a> Individual elements now have the ability to define what JavaScript and cascading stylesheets are associated with them. This is stated in the <a target="_blank"  href="http://api.drupal.org/api/file/developer/topics/forms_api_reference.html/7#attached_js" rel="nofollow">#attached_js</a> and <a target="_blank"  href="http://api.drupal.org/api/file/developer/topics/forms_api_reference.html/7#attached_css" rel="nofollow">#attached_css</a> property.</p>
<p>Drupal 6.x:
</p>
<div class="codeblock"><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php<br /></span><span style="color: rgb(0, 119, 0);">function </span><span style="color: rgb(0, 0, 187);">example_admin_settings</span><span style="color: rgb(0, 119, 0);">() {<br />&nbsp; </span><span style="color: rgb(255, 128, 0);">// Add example.admin.css<br />&nbsp; </span><span style="color: rgb(0, 0, 187);">drupal_add_css</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">drupal_get_path</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">'module'</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(221, 0, 0);">'example'</span><span style="color: rgb(0, 119, 0);">) .</span><span style="color: rgb(221, 0, 0);">'/example.admin.css'</span><span style="color: rgb(0, 119, 0);">);<br />&nbsp; </span><span style="color: rgb(255, 128, 0);">// Add some inline JavaScript<br />&nbsp; </span><span style="color: rgb(0, 0, 187);">drupal_add_js</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">'alert("You are visiting the example form.");'</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(221, 0, 0);">'inline'</span><span style="color: rgb(0, 119, 0);">);<br />&nbsp; </span><span style="color: rgb(255, 128, 0);">// Add a JavaScript setting.<br />&nbsp; </span><span style="color: rgb(0, 0, 187);">drupal_add_js</span><span style="color: rgb(0, 119, 0);">(array(</span><span style="color: rgb(221, 0, 0);">'mymodule' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(221, 0, 0);">'example'</span><span style="color: rgb(0, 119, 0);">), </span><span style="color: rgb(221, 0, 0);">'setting'</span><span style="color: rgb(0, 119, 0);">);<br />&nbsp; </span><span style="color: rgb(0, 0, 187);">$form</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'example'</span><span style="color: rgb(0, 119, 0);">] = array(<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(221, 0, 0);">'#type' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(221, 0, 0);">'fieldset'</span><span style="color: rgb(0, 119, 0);">,<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(221, 0, 0);">'#title' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(0, 0, 187);">t</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">'Example'</span><span style="color: rgb(0, 119, 0);">);<br />&nbsp; );<br />&nbsp; return </span><span style="color: rgb(0, 0, 187);">$form</span><span style="color: rgb(0, 119, 0);">;<br />}<br /></span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<p>Drupal 7.x:
</p>
<div class="codeblock"><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php<br /></span><span style="color: rgb(0, 119, 0);">function </span><span style="color: rgb(0, 0, 187);">example_admin_settings</span><span style="color: rgb(0, 119, 0);">() {<br />&nbsp; </span><span style="color: rgb(0, 0, 187);">$form</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'#attached_css'</span><span style="color: rgb(0, 119, 0);">] = array(<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(255, 128, 0);">// Add example.admin/css.<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(0, 0, 187);">drupal_get_path</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">'module'</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(221, 0, 0);">'example'</span><span style="color: rgb(0, 119, 0);">) . </span><span style="color: rgb(221, 0, 0);">'/example.admin.css'<br />&nbsp; </span><span style="color: rgb(0, 119, 0);">),<br />&nbsp; </span><span style="color: rgb(0, 0, 187);">$form</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'#attached_js'</span><span style="color: rgb(0, 119, 0);">] = array(<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(255, 128, 0);">// Add some inline JavaScript.<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(221, 0, 0);">'alert("You are visiting the example form.");' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(221, 0, 0);">'inline'</span><span style="color: rgb(0, 119, 0);">,<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(255, 128, 0);">// Add a JavaScript setting. Note that when the key is a number, the 'data' property will be used.<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(0, 119, 0);">array(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(221, 0, 0);">'data' </span><span style="color: rgb(0, 119, 0);">=&gt; array(</span><span style="color: rgb(221, 0, 0);">'mymodule' </span><span style="color: rgb(0, 119, 0);">=&gt; array(...)),<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(221, 0, 0);">'type' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(221, 0, 0);">'setting'<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(0, 119, 0);">),<br />&nbsp; );<br />&nbsp; </span><span style="color: rgb(0, 0, 187);">$form</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'example'</span><span style="color: rgb(0, 119, 0);">] = array(<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(221, 0, 0);">'#type' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(221, 0, 0);">'fieldset'</span><span style="color: rgb(0, 119, 0);">,<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(221, 0, 0);">'#title' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(0, 0, 187);">t</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">'Example'</span><span style="color: rgb(0, 119, 0);">);<br />&nbsp; );<br />&nbsp; return </span><span style="color: rgb(0, 0, 187);">$form</span><span style="color: rgb(0, 119, 0);">;<br />}<br /></span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<h3 id="closure">$closure becomes $page_bottom, new $page_top and hidden regions</h3>
<p><a target="_blank"  href="http://drupal.org/node/519782" rel="nofollow">(issue 1)</a>, <a target="_blank"  href="http://drupal.org/node/511284" rel="nofollow">(issue 2)</a> Drupal 6 provides a special variable called $closure which should be put at the bottom of the HTML body output and can be themed via theme_footer() (which calls out to implementations of hook_footer() in modules). To generalize on one way to put output to the different page areas, Drupal 7 standardizes on regions and introduced the page_bottom region in place of the $closure special variable. Also, page_top is added as a pair of page_bottom. In Drupal 7 you need to output $page_top at the top of the HTML body output and $page_bottom at the bottom.</p>
<p>Drupal 6 (page.tpl.php):
</p>
<div class="codeblock"><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"<br />&nbsp; "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;<br />...<br />&lt;body class="<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$body_classes</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span>"&gt;<br />...<br />&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$closure</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&lt;/body&gt;<br />&lt;/html&gt;</code></div>
</p>
<p>Drupal 7 (html.tpl.php):
</p>
<div class="codeblock"><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"<br />&nbsp; "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"&gt;<br />...<br />&lt;body class="<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$classes</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span>"&gt;<br />...<br />&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$page_top</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$page</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$page_bottom</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&lt;/body&gt;<br />&lt;/html&gt;</code></div>
</p>
<p>If you define custom regions, it is important to remember that you need to include the page_top and page_bottom regions in your set of regions.</p>
<p>theme .info file extract:
</p>
<div class="codeblock"><code>regions[content] = Content<br />regions[help] = Help<br />regions[page_top] = Page top<br />regions[page_bottom] = Page bottom</code></div>
</p>
<p>The page_top and page_bottom regions are hidden, which means they will not show up on the blocks administration interface. When doing site-specific themes, it might also be useful to add more hidden regions (to provide ways for modules to add output to more places in the theme without defining blocks showing up on the blocks interface), you can do that via the regions_hidden[] .info file array which is new to Drupal 7:</p>
<p>theme .info file extract:
</p>
<div class="codeblock"><code>regions[content] = Content<br />regions[help] = Help<br />regions[page_top] = Page top<br />regions[page_bottom] = Page bottom<br />regions[indicators] = Indicators<br />regions_hidden[] = indicators</code></div>
</p>
<h3 id="sidebars-renamed">$left and $right variables are now $sidebar_first and $sidebar_second; CSS IDs also changed</h3>
<p><a target="_blank"  href="http://drupal.org/node/226587" rel="nofollow">(issue)</a> In Drupal 6, the sidebar variable names were <code>$left</code> and <code>$right</code>. In Drupal 7 they are <code>$sidebar_first</code> and <code>$sidebar_second</code>.</p>
<p><strong>6.x</strong></p>
</p>
<div class="codeblock"><code>&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">if (!empty(</span><span style="color: rgb(0, 0, 187);">$left</span><span style="color: rgb(0, 119, 0);">)): </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div id="sidebar-left" class="column sidebar"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$left</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/div&gt; &lt;!-- /sidebar-left --&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">endif; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br /> ...<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">if (!empty(</span><span style="color: rgb(0, 0, 187);">$right</span><span style="color: rgb(0, 119, 0);">)): </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div id="sidebar-right" class="column sidebar"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$right</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/div&gt; &lt;!-- /sidebar-right --&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">endif; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<p><strong>7.x</strong></p>
</p>
<div class="codeblock"><code>&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">if (</span><span style="color: rgb(0, 0, 187);">$sidebar_first</span><span style="color: rgb(0, 119, 0);">): </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div id="sidebar-first" class="column sidebar"&gt;&lt;div class="section region"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$sidebar_first</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/div&gt;&lt;/div&gt; &lt;!-- /.section, /#sidebar-first --&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">endif; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">if (</span><span style="color: rgb(0, 0, 187);">$sidebar_second</span><span style="color: rgb(0, 119, 0);">): </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div id="sidebar-second" class="column sidebar"&gt;&lt;div class="section region"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$sidebar_second</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/div&gt;&lt;/div&gt; &lt;!-- /.section, /#sidebar-second --&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">endif; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<p> This means that associated CSS IDs have changed as well:</p>
<table>
<tbody>
<tr>
<th>Old CSS ID (Drupal 6)</th>
<th>New CSS ID (Drupal 7)</th>
</tr>
<tr>
<td><em>#sidebar-left</em></td>
<td><em> #sidebar-first</em></td>
</tr>
<tr>
<td><em>#sidebar-right</em></td>
<td><em> #sidebar-second</em></td>
</tr>
</tbody>
</table>
<p><em>[docs updated]</em></p>
<h3 id="user-picture">$picture changes to $user_picture, and the CSS class &#8216;picture&#8217; to &#8216;user-picture&#8217; </h3>
<p>The variable and the CSS class have been renamed to be more descriptive.</p>
<p>Drupal 6 (user-picture.tpl.php):</p>
<div class="codeblock"><code>&lt;div class="picture"&gt;<br />&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$picture</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&lt;/div&gt;</code></div>
</p>
<p>Drupal 7:
</p>
<div class="codeblock"><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">if (</span><span style="color: rgb(0, 0, 187);">$user_picture</span><span style="color: rgb(0, 119, 0);">): </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp; &lt;div class="user-picture"&gt;<br />&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$user_picture</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp; &lt;/div&gt;<br /><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">endif; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<h3 id="element-hidden">New classes available to hide content in an accessible manner</h3>
<p>Three new system classes have been added to be used for the purpose of hiding elements, <code>.element-hidden</code>, <code>.element-invisible</code>, and <code>.element-invisible.element-focusable</code>. Each class serves its own unique purpose:</p>
<dl>
<dt><code>.element-hidden</code></dt>
<dd>The role of this class is to hide elements from all users. This class should be used for elements which should not be immediately displayed to any user. An example would be a collapsible fieldset that will be expanded with a click from a user. The effect of this class can be toggled with the jQuery <code>show()</code> and <code>hide()</code> functions.</p>
</dd>
<dt><code>.element-invisible</code></dt>
<dd>The role of this class is to hide elements visually, but keep them available for screen-readers. This class should be used for information required for screen-reader users to understand and use the site where visual display is undesirable. Information provided in this manner should be kept concise, to avoid unnecessary burden on the user. This class must not be used for focusable elements (such as links and form elements) as this causes issues for keyboard only or voice recognition users.</dd>
<dt><code>.element-invisible.element-focusable</code></dt>
<dd>The .element-focusable class extends the .element-invisible class to allow the element to be focusable when navigated to via the keyboard.</dd>
</dl>
<h3 id="no-jsenabled">JavaScript variable Drupal.jsEnabled has been removed</h3>
<p>In previous versions of Drupal, you could do the following in JavaScript code, to verify that JavaScript was enabled and sufficient for Drupal to do its &#8220;behaviors&#8221;:
</p>
<div class="codeblock"><code>if( Drupal.jsEnabled ) {<br />&nbsp;&nbsp; // something<br />}</code></div>
</p>
<p>In Drupal 7, the <code>Drupal.jsEnabled</code> variable is no longer defined, and there is no work-around &#8212; the assumption is that JQuery things will simply not work if they don&#8217;t work, so there&#8217;s no reason to check ahead of time. See issue <span class="project-issue-status-7 project-issue-status-info"><a target="_blank"  href="/node/444352" title="Status: closed (fixed)">#444352: Kill the killswitch</a></span> for discussion.</p>
<h3 id="phptemplate-suggestion-wildcard">PHPTemplate suggestion wildcard</h3>
<p><a target="_blank"  href="http://drupal.org/node/167112" rel="nofollow">(issue)</a> PHPTemplate offers suggestions based on the URI integers. In Drupal 6, you have to theme the previous suggestion or the specific one eg.</p>
<p>page-user.tpl.php or page-user-1.tpl.php</p>
<p>This was cumbersome because to theme all the user pages, it meant overriding page-user.tpl.php, which in turn themed the user login page.</p>
<p>The new suggestion wildcard for integer arguments accepts % suggestions page&#8211;user&#8211;%.tpl.php. Suggestions which have additional arguments like page&#8211;user&#8211;edit.tpl.php remain the same; this simply differentiates the suggestions with and without integer args.</p>
<h3 id="system_elements-theme-definition">Include theme definition explicitly on element when using system_elements()</h3>
<p>In system_elements(), it is now necessary to include the theme definition explicitly on the element, rather than allowing the system to &#8220;fallback&#8221; and assign it automatically. Refer to <a target="_blank"  href="http://drupal.org/node/127731?mode=2&amp;sort=2" rel="nofollow">issue 127731</a>.</p>
<h3 id="theme_task_list-accessibility">Added markup to make installation task progress perceivable with screen-reader and CSS disabled</h3>
<p>(Issue)</p>
<p>In D6 there is no markup to indicate which of the installation tasks were complete, or which task is active, these differences are only shown with CSS styling.</p>
<p>In Drupal 7 markup has been added to theme_task_list() to:</p>
<dl>
<dt>Add a heading that is only visible to screen-reader users and when CSS is disabled.</dt>
<dd><code>&lt;h2 class="element-invisible"&gt;Installation tasks&lt;/h2&gt;</code></dd>
<dt>Append text &#8220;(done)&#8221; and &#8220;(active)&#8221; to relevant tasks in the task list, visible only to screen-reader users and when CSS is disabled.</dt>
<dd><code>&lt;span class="element-invisible"&gt;(done)&lt;/span&gt;</code></dd>
</dl>
<h3 id="theme_breadcrumb-heading">Add an invisible heading to theme_breadcrumb()</h3>
<p>(Issue)</p>
<p>In D6 there is no markup to indicate the role or purpose of the breadcrumb links to users of screen-readers.</p>
<p>Drupal 7 provides a heading before the list of breadcrumb links, which is visible to screen-reader users and when CSS is disabled. This heading has been added to theme_breadcrumb() and to garland_breadcrumb().</p>
<p><code>&lt;h2 class="element-invisible"&gt;You are here&lt;/h2&gt;</code></p>
<h3 id="theme_feed_icon-improved-alt-text">Changes to alt and title attribute for the RSS feed icon</h3>
<p>In D6 the alt attribute of the RSS feed icon themed by theme_feed_icon() was statically set to &#8220;Syndicate content&#8221; and the title attribute of the icon was set to the string passed to the function in the $title parameter.</p>
<p>Drupal 7 sets the alt attribute of the image and the title attribute of the anchor for the RSS feed to the same text. The text is comprised of &#8220;Subscribe to &#8221; + the $title string passed to theme_feed_icon().</p>
<h3 id="search_box">Search box moved from theme layer to blocks</h3>
<p>In previous versions, the search_box was displayed by the theme using $search_box.</p>
<p>Drupal 7 removes this. The search form is simply part of the block system. Theme developers will want to remove all references to $search_box in the theme, and may need to change CSS to handle the search box in the block.</p>
<p>Site maintainers upgrading sites from Drupal 6 to Drupal 7 will want to add the search form block to their site.</p>
<h3 id="menu_tree">Changes to menu tree, link and tab rendering functions</h3>
<p><a target="_blank"  href="http://drupal.org/node/283723" rel="nofollow">(Issue)</a></p>
<p>function <a target="_blank"  href="http://api.drupal.org/api/function/menu_tree_output/7" rel="nofollow">menu_tree_output()</a> now returns a structured array of data that can be rendered to html using drupal_render().</p>
<p>Function theme_menu_item_link() and theme_menu_item() have been removed and are effectively replaced by in terms of rendering a menu tree by <a target="_blank"  href="http://api.drupal.org/api/function/theme_menu_link/7" rel="nofollow">theme_menu_link()</a>. This is the default function used to render each link in the tree returned by menu_tree_output(). </p>
<p>Function <a target="_blank"  href="http://api.drupal.org/api/function/theme_menu_local_task/7" rel="nofollow">theme_menu_local_task()</a> takes different parameters and has a companion <a target="_blank"  href="http://api.drupal.org/api/function/theme_menu_local_action/7" rel="nofollow">theme_menu_local_action()</a> that did not exist in Drupal 6. Both of these function take as the first parameter a menu link array with &#8216;title&#8217;, &#8216;href&#8217;, and &#8216;localized_options&#8217; keys. In Drupal 6, the first parameter was a string. The change to array was made in order to allow removal of theme_menu_item_link(). The second parameter theme_menu_local_task() of is still a boolean, $active.</p>
<h3 id="theme-links-param">theme_links() has a new parameter &#8216;heading&#8217; for accessibility</h3>
<p>Issue: <span class="project-issue-status-7 project-issue-status-info"><a target="_blank"  href="/node/364219" title="Status: closed (fixed), Assigned to: jhodgdon">#364219: Navigation menus should be preceded by headings of the appropriate level (usually &lt;h2&gt;).</a></span></p>
<p>To meet <a target="_blank"  href="http://www.w3.org/WAI/intro/wcag.php" rel="nofollow">Web Content Accessibility Guidelines (WCAG)</a> requirements, <a target="_blank"  href="http://www.w3.org/TR/2008/NOTE-WCAG20-TECHS-20081211/H69.html" rel="nofollow">HTML headings should be used before all content sections</a>, which includes lists of links such as menus. The headers ensure that there is a quick way for assistive technology users to browse through the content; however, most visual users do not need headers on navigation lists, because they can get a sense of the structure by how they are arranged visually on the page. So, the recommendation is to add a header with the &#8220;element-invisible&#8221; CSS class on it, so that only assistive technology users will notice the header.</p>
<p>It is also important that the header level used (H2, H3, etc.) be appropriately nested in the heading hierarchy. So, it is not recommended to just blindly add an H2 header before each list.</p>
<p>For that reason, the <a target="_blank"  href="http://api.drupal.org/api/function/theme_links/7" rel="nofollow">theme_links()</a> function, which is normally called via theme(&#8216;links&#8217;, $variables), has a new third variable &#8216;heading&#8217; to add the required heading to a list of links.</p>
<p>For example &#8211; Drupal 6 in a typical page.tpl.php file:</p>
<div class="codeblock"><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">theme</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">'links'</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(0, 0, 187);">$secondary_menu</span><span style="color: rgb(0, 119, 0);">, array(</span><span style="color: rgb(221, 0, 0);">'id' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(221, 0, 0);">'secondary-menu'</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(221, 0, 0);">'class' </span><span style="color: rgb(0, 119, 0);">=&gt; array(</span><span style="color: rgb(221, 0, 0);">'links'</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(221, 0, 0);">'clearfix'</span><span style="color: rgb(0, 119, 0);">))); </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<p>Drupal 7:
</p>
<div class="codeblock"><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">theme</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">'links'</span><span style="color: rgb(0, 119, 0);">, array(</span><span style="color: rgb(221, 0, 0);">'links' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(0, 0, 187);">$main_menu</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(221, 0, 0);">'attributes' </span><span style="color: rgb(0, 119, 0);">=&gt; array(</span><span style="color: rgb(221, 0, 0);">'id' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(221, 0, 0);">'main-menu'</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(221, 0, 0);">'class' </span><span style="color: rgb(0, 119, 0);">=&gt; array(</span><span style="color: rgb(221, 0, 0);">'links'</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(221, 0, 0);">'clearfix'</span><span style="color: rgb(0, 119, 0);">)), </span><span style="color: rgb(221, 0, 0);">'header' </span><span style="color: rgb(0, 119, 0);">=&gt; array(</span><span style="color: rgb(221, 0, 0);">'text' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(0, 0, 187);">t</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">'Main menu'</span><span style="color: rgb(0, 119, 0);">), </span><span style="color: rgb(221, 0, 0);">'level' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(221, 0, 0);">'h2'</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(221, 0, 0);">'class' </span><span style="color: rgb(0, 119, 0);">=&gt; array(</span><span style="color: rgb(221, 0, 0);">'element-invisible'</span><span style="color: rgb(0, 119, 0);">))));&nbsp; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
<p></p>
<p>This will result in a semantically correct and accessible secondary menu in Drupal 7, because an invisible heading has been added:</p>
<div class="codeblock"><code>&lt;h2 class="element-invisible"&gt;Secondary menu&lt;/h2&gt;</code></div>
</p>
<p>For more information: </p>
<ul>
<li><a target="_blank"  href="http://drupal.org/node/394094" rel="nofollow">Accessibility in Drupal</a></li>
<li><a target="_blank"  href="http://drupal.org/node/464472" rel="nofollow">Theming accessibility guide</a></li>
<li><a target="_blank"  href="http://drupal.org/node/561750" rel="nofollow">Headings section of theme accessibility guide</a></li>
</ul>
<h3 id="theme-links-specifics">theme_links() now allows more targeted overrides</h3>
<p><a target="_blank"  href="http://drupal.org/node/588148" rel="nofollow">(issue)</a> Modules can now specify a more specific theme callback for links, so that theming of links can be overridden for specific purposes.</p>
<p>For instance, the Node module uses &#8216;links__node&#8217; rather than just &#8216;links&#8217; as its theme callback when adding links to nodes, so if you want to override just the theming of these links, you can do it in a mytheme_links__node() function, rather than adding some complicated logic to the the generic mytheme_links() function.</p>
<p>Other examples in Drupal core are links__contextual, links__system_main_menu, links__system_secondary_menu, etc.</p>
<h3 id="theme-settings">theme_get_setting() and THEME_settings() have been improved</h3>
<p>In Drupal 6, themes could add custom form elements to their &#8220;configure theme settings&#8221; page at admin/build/themes/settings/THEMENAME. Themes would need to create a theme-settings.php page in their theme directory and use a function with the following syntax:</p>
</p>
<div class="codeblock"><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php<br /></span><span style="color: rgb(255, 128, 0);">/**<br /> * Implementation of THEMEHOOK_settings() function.<br /> *<br /> * @param $saved_settings<br /> *&nbsp;&nbsp; array An array of saved settings for this theme.<br /> * @return<br /> *&nbsp;&nbsp; array A form array.<br /> */<br /></span><span style="color: rgb(0, 119, 0);">function </span><span style="color: rgb(0, 0, 187);">phptemplate_settings</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$saved_settings</span><span style="color: rgb(0, 119, 0);">) { }<br /></span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<p>In Drupal 7, much more flexibility is given to themes to modify the entire theme settings form. In a theme&#8217;s theme-settings.php, themes should now use a <a target="_blank"  href="http://api.drupal.org/api/function/hook_form_system_theme_settings_alter/7" rel="nofollow">THEMENAME_form_system_theme_settings_alter(&amp;$form, $form_state)</a> function. This gives the same power to themes that modules have if they use hook_form_system_theme_settings_alter(). See the &#8220;Forms API Quickstart Guide&#8221; and &#8220;Forms API Reference&#8221; on <a target="_blank"  href="http://api.drupal.org/api/7" title="http://api.drupal.org/api/7" rel="nofollow">http://api.drupal.org/api/7</a>, as well as the <a target="_blank"  href="http://api.drupal.org/api/function/hook_form_FORM_ID_alter/7" rel="nofollow">hook_form_FORM_ID_alter() docs</a> to learn the full flexibility of Forms API. Note that themes can no longer use the phptemplate_ prefix to the function; you&#8217;ll need to use the actual name of your theme as the prefix.</p>
<p>Here&#8217;s an example if you had a &#8220;foo&#8221; theme and wanted to add a textfield whose default value was &#8220;blue bikeshed&#8221;:</p>
</p>
<div class="codeblock"><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php<br /></span><span style="color: rgb(0, 119, 0);">function </span><span style="color: rgb(0, 0, 187);">foo_form_system_theme_settings_alter</span><span style="color: rgb(0, 119, 0);">(&amp;</span><span style="color: rgb(0, 0, 187);">$form</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(0, 0, 187);">$form_state</span><span style="color: rgb(0, 119, 0);">) {<br />&nbsp; </span><span style="color: rgb(0, 0, 187);">$form</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'foo_example'</span><span style="color: rgb(0, 119, 0);">] = array(<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(221, 0, 0);">'#type'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(221, 0, 0);">'textfield'</span><span style="color: rgb(0, 119, 0);">,<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(221, 0, 0);">'#title'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(0, 0, 187);">t</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">'Widget'</span><span style="color: rgb(0, 119, 0);">),<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(221, 0, 0);">'#default_value' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(0, 0, 187);">theme_get_setting</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">'foo_example'</span><span style="color: rgb(0, 119, 0);">),<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(221, 0, 0);">'#description'&nbsp;&nbsp; </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(0, 0, 187);">t</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">"Place this text in the widget spot on your site."</span><span style="color: rgb(0, 119, 0);">),<br />&nbsp; );<br />}<br /></span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<p>In order to set the default value for any form element you add, you&#8217;ll need to add a simple line to your .info file: <code>settings[SETTING_NAME] = DEFAULT_VALUE</code>. For our foo theme, you&#8217;d need to edit the foo.info file and this line:</p>
</p>
<div class="codeblock"><code>settings[foo_example] = blue bikeshed</code></div>
</p>
<p>In any of your theme&#8217;s php files, you can retrieve the value the user set by calling:
</p>
<div class="codeblock"><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php<br />$foo_example </span><span style="color: rgb(0, 119, 0);">= </span><span style="color: rgb(0, 0, 187);">theme_get_setting</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">'foo_example'</span><span style="color: rgb(0, 119, 0);">);<br /></span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<h3 id="theme-form-required-marker">theme_form_required_marker()</h3>
<p><a target="_blank"  href="/node/582584" rel="nofollow">(issue)</a> The markup for generating the marker on required form elements is now handled by a separate function, <code>theme_form_required_marker()</code> instead of just being included as part of the work performed by <code>theme_form_element()</code>. This allows you to reuse this markup in other places or to modify the markup without changing all of <code>theme_form_element()</code></p>
<h3 id="theme-link">theme_link()</h3>
<p>(<a target="_blank"  href="http://drupal.org/node/318636" rel="nofollow">issue</a>) The markup for generating a link is now handled by a theme function, <a target="_blank"  href="http://api.drupal.org/api/function/theme_link/7" rel="nofollow">theme_link()</a>, instead of being hard-coded into the <code>l()</code> function. This allows you to implement a preprocess function or an override function in order to customize the markup of any link. Doing so may slow down Drupal pages that have many links, so it is recommended to evaluate the benefit vs. the performance trade-off, but the capability exists for sites and themes that need it. This theme function is for customizing the markup of links, generically. Other theme functions exist for customizing links based on context. For example, to customize menu links, override <code>theme_menu_link()</code> instead. </p>
<p>Example of hook_preprocess_link():
</p>
<div class="codeblock"><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php<br /></span><span style="color: rgb(0, 119, 0);">function </span><span style="color: rgb(0, 0, 187);">mytheme_preprocess_link</span><span style="color: rgb(0, 119, 0);">(&amp;</span><span style="color: rgb(0, 0, 187);">$variables</span><span style="color: rgb(0, 119, 0);">) {<br />&nbsp; </span><span style="color: rgb(255, 128, 0);">// In order to style links differently depending on what they are linking to,<br />&nbsp; // add classes that contain information about the link path.<br />&nbsp; </span><span style="color: rgb(0, 119, 0);">if (</span><span style="color: rgb(0, 0, 187);">strpos</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$variables</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'path'</span><span style="color: rgb(0, 119, 0);">], </span><span style="color: rgb(221, 0, 0);">':'</span><span style="color: rgb(0, 119, 0);">) !== </span><span style="color: rgb(0, 0, 187);">FALSE</span><span style="color: rgb(0, 119, 0);">) {<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(255, 128, 0);">// For external links, add a class indicating an external link and a class<br />&nbsp;&nbsp;&nbsp; // indicating the scheme (e.g., for 'mailto:...' links, add a 'link-mailto'<br />&nbsp;&nbsp;&nbsp; // class).<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(0, 0, 187);">$variables</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'options'</span><span style="color: rgb(0, 119, 0);">][</span><span style="color: rgb(221, 0, 0);">'attributes'</span><span style="color: rgb(0, 119, 0);">][</span><span style="color: rgb(221, 0, 0);">'class'</span><span style="color: rgb(0, 119, 0);">][] = </span><span style="color: rgb(221, 0, 0);">'link-external'</span><span style="color: rgb(0, 119, 0);">;<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(0, 0, 187);">$variables</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'options'</span><span style="color: rgb(0, 119, 0);">][</span><span style="color: rgb(221, 0, 0);">'attributes'</span><span style="color: rgb(0, 119, 0);">][</span><span style="color: rgb(221, 0, 0);">'class'</span><span style="color: rgb(0, 119, 0);">][] = </span><span style="color: rgb(221, 0, 0);">'link-' </span><span style="color: rgb(0, 119, 0);">. </span><span style="color: rgb(0, 0, 187);">parse_url</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$variables</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'path'</span><span style="color: rgb(0, 119, 0);">], </span><span style="color: rgb(0, 0, 187);">PHP_URL_SCHEME</span><span style="color: rgb(0, 119, 0);">);<br />&nbsp; }<br />&nbsp; else {<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(255, 128, 0);">// For internal paths, add a class indicating an internal link.<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(0, 0, 187);">$variables</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'options'</span><span style="color: rgb(0, 119, 0);">][</span><span style="color: rgb(221, 0, 0);">'attributes'</span><span style="color: rgb(0, 119, 0);">][</span><span style="color: rgb(221, 0, 0);">'class'</span><span style="color: rgb(0, 119, 0);">][] = </span><span style="color: rgb(221, 0, 0);">'link-internal'</span><span style="color: rgb(0, 119, 0);">;<br />&nbsp;&nbsp;&nbsp; if (empty(</span><span style="color: rgb(0, 0, 187);">$variables</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'path'</span><span style="color: rgb(0, 119, 0);">]) || </span><span style="color: rgb(0, 0, 187);">$variables</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'path'</span><span style="color: rgb(0, 119, 0);">] == </span><span style="color: rgb(221, 0, 0);">'&lt;front&gt;'</span><span style="color: rgb(0, 119, 0);">) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(255, 128, 0);">// Add a class indicating a link to the front page.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(0, 0, 187);">$variables</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'options'</span><span style="color: rgb(0, 119, 0);">][</span><span style="color: rgb(221, 0, 0);">'attributes'</span><span style="color: rgb(0, 119, 0);">][</span><span style="color: rgb(221, 0, 0);">'class'</span><span style="color: rgb(0, 119, 0);">][] = </span><span style="color: rgb(221, 0, 0);">'link-front'</span><span style="color: rgb(0, 119, 0);">;<br />&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; else {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(255, 128, 0);">// For internal links not to the front page, add a class for each part<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // of the path. For example, for a link to 'admin/structure/block', add<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // the classes 'link-path-admin', 'link-path-admin-structure', and<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // 'link-path-admin-structure-block'.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(0, 0, 187);">$class </span><span style="color: rgb(0, 119, 0);">= </span><span style="color: rgb(221, 0, 0);">'link-path'</span><span style="color: rgb(0, 119, 0);">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach (</span><span style="color: rgb(0, 0, 187);">explode</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">'/'</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(0, 0, 187);">$variables</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'path'</span><span style="color: rgb(0, 119, 0);">]) as </span><span style="color: rgb(0, 0, 187);">$path_part</span><span style="color: rgb(0, 119, 0);">) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(0, 0, 187);">$class </span><span style="color: rgb(0, 119, 0);">.= </span><span style="color: rgb(221, 0, 0);">'-' </span><span style="color: rgb(0, 119, 0);">. </span><span style="color: rgb(0, 0, 187);">$path_part</span><span style="color: rgb(0, 119, 0);">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(0, 0, 187);">$variables</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'options'</span><span style="color: rgb(0, 119, 0);">][</span><span style="color: rgb(221, 0, 0);">'attributes'</span><span style="color: rgb(0, 119, 0);">][</span><span style="color: rgb(221, 0, 0);">'class'</span><span style="color: rgb(0, 119, 0);">][] = </span><span style="color: rgb(0, 0, 187);">$class</span><span style="color: rgb(0, 119, 0);">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; }<br />&nbsp; }<br />}<br /></span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<p>Example of overriding theme_link():
</p>
<div class="codeblock"><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php<br /></span><span style="color: rgb(0, 119, 0);">function </span><span style="color: rgb(0, 0, 187);">mytheme_link</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$variables</span><span style="color: rgb(0, 119, 0);">) {<br />&nbsp; </span><span style="color: rgb(255, 128, 0);">// Place a span within and outside the anchor tag in order to implement some<br />&nbsp; // special styling.<br />&nbsp; </span><span style="color: rgb(0, 119, 0);">return </span><span style="color: rgb(221, 0, 0);">'&lt;span class="link-wrapper"&gt;&lt;a href="' </span><span style="color: rgb(0, 119, 0);">. </span><span style="color: rgb(0, 0, 187);">check_plain</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">url</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$path</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(0, 0, 187);">$options</span><span style="color: rgb(0, 119, 0);">)) . </span><span style="color: rgb(221, 0, 0);">'"' </span><span style="color: rgb(0, 119, 0);">. </span><span style="color: rgb(0, 0, 187);">drupal_attributes</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$options</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'attributes'</span><span style="color: rgb(0, 119, 0);">]) . </span><span style="color: rgb(221, 0, 0);">'&gt;&lt;span class="link-content-wrapper"&gt;' </span><span style="color: rgb(0, 119, 0);">. (</span><span style="color: rgb(0, 0, 187);">$options</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'html'</span><span style="color: rgb(0, 119, 0);">] ? </span><span style="color: rgb(0, 0, 187);">$text </span><span style="color: rgb(0, 119, 0);">: </span><span style="color: rgb(0, 0, 187);">check_plain</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$text</span><span style="color: rgb(0, 119, 0);">)) . </span><span style="color: rgb(221, 0, 0);">'&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;'</span><span style="color: rgb(0, 119, 0);">;<br />}<br /></span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<h3 id="skip-link">Skip to main content links in core themes</h3>
<p><a target="_blank"  href="http://drupal.org/node/386462" rel="nofollow">(Issue)</a><br />
To meet Web Content Accessibility Guidelines (WCAG) 2.0 guideline <a target="_blank"  href="http://www.w3.org/TR/UNDERSTANDING-WCAG20/navigation-mechanisms-skip.html" rel="nofollow">2.4.1 Bypass Blocks</a>, web pages need to have a link to help keyboard only users and screen readers more easily access the main content of a website.</p>
<p>Garland&#8217;s implementation is hidden visually, but keep them available for screen-readers. Furthermore, if a keyboard only user tabs through a site the link will become visible as it gains focus.</p>
<p>To hide the skip navigation you can use one the <a target="_blank"  href="http://drupal.org/update/theme/6/7#element-hidden" rel="nofollow">new classes available to hide content in an accessible manner</a>.</p>
<h3 id="theme_alter">Alter hooks available to themes</h3>
<p>(<a target="_blank"  href="http://drupal.org/node/591794" rel="nofollow">Issue</a>) Hooks that are used to alter content before being displayed on the page are now available to themes. Some important ones to note are:</p>
<ul>
<li><a target="_blank"  href="http://api.drupal.org/api/function/hook_page_alter/7" rel="nofollow">hook_page_alter</a></li>
<li><a target="_blank"  href="http://api.drupal.org/api/function/hook_form_alter/7" rel="nofollow">hook_form_alter</a></li>
<li><a target="_blank"  href="http://api.drupal.org/api/function/hook_js_alter/7" rel="nofollow">hook_js_alter</a></li>
<li><a target="_blank"  href="http://api.drupal.org/api/function/hook_css_alter/7" rel="nofollow">hook_css_alter</a></li>
</ul>
<p>Note that although technically all of the alter hooks are exposed to the theme, only a given number of them will actually work due to the way the Drupal bootstrap works. If you need to use <a target="_blank"  href="http://api.drupal.org/api/function/hook_menu_alter/7" rel="nofollow">hook_menu_alter</a>, for example, you&#8217;ll have to use a module. These hooks can be exposed in template.php.</p>
<p>Drupal 7.x:
</p>
<div class="codeblock"><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php<br /></span><span style="color: rgb(255, 128, 0);">/**<br /> * Implement hook_page_alter().<br /> */<br /></span><span style="color: rgb(0, 119, 0);">function </span><span style="color: rgb(0, 0, 187);">mytheme_page_alter</span><span style="color: rgb(0, 119, 0);">(&amp;</span><span style="color: rgb(0, 0, 187);">$page</span><span style="color: rgb(0, 119, 0);">) {<br />&nbsp; </span><span style="color: rgb(255, 128, 0);">// Remove elements from the page.<br /></span><span style="color: rgb(0, 119, 0);">}</p>
<p></span><span style="color: rgb(255, 128, 0);">/**<br /> * Implement hook_css_alter().<br /> */<br /></span><span style="color: rgb(0, 119, 0);">function </span><span style="color: rgb(0, 0, 187);">mytheme_css_alter</span><span style="color: rgb(0, 119, 0);">(&amp;</span><span style="color: rgb(0, 0, 187);">$css</span><span style="color: rgb(0, 119, 0);">) {<br />&nbsp; </span><span style="color: rgb(255, 128, 0);">// Replace some CSS files with this theme's special CSS.<br /></span><span style="color: rgb(0, 119, 0);">}<br /></span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<h3 id="system-stylesheets">System module stylesheets have been reorganized to separate behavior-supporting styles from presentational styles.</h3>
<p>(<a target="_blank"  href="http://drupal.org/node/592018" rel="nofollow">Issue</a>) Summary of changes:</p>
<ul>
<li>Styles from <strong>default.css</strong> were merged into <strong>system.css</strong> and <strong>default.css</strong> was removed.</li>
<li><strong>system-behavior.css</strong> was added to house behavior-supporting styles, ie. styles for autocomplete, drag and drop, collapsible fieldsets, progress bars, etc.</li>
</ul>
<h3 id="shortcuts">New theme setting for displaying the Shortcut module &#8220;add to shortcuts&#8221; link</h3>
<p>Issue: <span class="project-issue-status-5 project-issue-status-info"><a target="_blank"  href="/node/674394" title="Status: closed (won't fix)">#674394: The add/remove shortcut buttons look bad and don&#8217;t appear in most themes besides Seven</a></span></p>
<p>In Drupal 7, you will notice that when the Shortcut module is enabled, the core Seven administration theme displays a &#8220;plus&#8221; or &#8220;minus&#8221; sign next to the title of each page (for sufficiently privileged users), which allows that page to be added or removed from the user&#8217;s set of shortcuts via a one-click link.</p>
<p>The appearance of this link is controlled by a theme setting. If you want it to display in your theme when the Shortcut module is enabled, add the following line of code to your theme&#8217;s .info file:</p>
</p>
<div class="codeblock"><code>settings[shortcut_module_link] = 1</code></div>
</p>
<h3 id="template_files_double_hyphen">Specific template overrides of generic templates use a &#8216;&#8211;&#8217; delimiter instead of &#8216;-&#8217;</h3>
<p>Issue <span class="project-issue-status-7 project-issue-status-info"><a target="_blank"  href="/node/678714" title="Status: closed (fixed)">#678714: Unify use of theme hook / template suggestions, fix clobbering problems, and improve suggestion discovery performance</a></span></p>
<p>In Drupal 6, some template files could be overridden in a targeted way. For example, the theme could contain a &#8220;node-article.tpl.php&#8221; file which would be used for nodes of the article type only. In Drupal 7, these need to be renamed to use a double-hyphen. For example, &#8220;node&#8211;article.tpl.php&#8221;. A single hyphen is still used to separate words: for example, &#8220;user-picture.tpl.php&#8221; or &#8220;node&#8211;long-content-type-name.tpl.php&#8221;, so the double hyphen always indicates a more targeted override of what comes before the &#8220;&#8211;&#8221;. As another example, in Drupal 7 the override of a page.tpl.php for node/17 is page&#8211;node&#8211;17.tpl.php (in Drupal 6 it would have been page-node-17.tpl.php).</p>
<p>Please also see <a target="_blank"  href="http://drupal.org/update/modules/6/7#theme_hook_suggestions_2" title="http://drupal.org/update/modules/6/7#theme_hook_suggestions_2" rel="nofollow">http://drupal.org/update/modules/6/7#theme_hook_suggestions_2</a> for how this affects preprocess functions if your theme implements those.</p>
<h3 id="css-ie-31-tag-limit-workaround">CSS files are sometimes loaded with @import, sometimes with LINK tags</h3>
<p>(<a target="_blank"  href="http://drupal.org/node/228818" rel="nofollow">Issue</a>) Prior to Drupal 6, CSS files were added to the page using @import statements inside of STYLE tags. Drupal 6 <a target="_blank"  href="http://drupal.org/node/145218" rel="nofollow">switched to using LINK tags</a>. With Drupal 7, LINK tags are used when the performance setting to &#8220;Aggregate and compress CSS files into one file&#8221; is enabled, but @import statements are sometimes used when that setting is disabled. This was needed to work around an Internet Explorer limitation of only being able to load the first 31 tags that add CSS files. See the API documentation for <a target="_blank"  href="http://api.drupal.org/api/function/drupal_pre_render_styles/7" rel="nofollow">drupal_pre_render_styles()</a> for more details explaining when LINK tags are used and when @import statements are used.</p>
<h3 id="browser-targeted-css">Browser-targeted CSS files can and should be added using drupal_add_css()</h3>
<p>(<a target="_blank"  href="http://drupal.org/node/228818" rel="nofollow">Issue</a>) Drupal 7 adds the ability to specify a &#8216;browsers&#8217; key when calling drupal_add_css().</p>
<p>Drupal 6:<br />
Garland&#8217;s page.tpl.php:
</p>
<div class="codeblock"><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php<br /></span><span style="color: rgb(0, 119, 0);">...<br />&lt;?</span><span style="color: rgb(0, 0, 187);">php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$styles </span><span style="color: rgb(0, 119, 0);">? &gt;<br />&lt;!--[if </span><span style="color: rgb(0, 0, 187);">lt IE 7</span><span style="color: rgb(0, 119, 0);">]&gt;<br />&nbsp; &lt;?</span><span style="color: rgb(0, 0, 187);">php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">phptemplate_get_ie_styles</span><span style="color: rgb(0, 119, 0);">(); ? &gt;<br />&lt;![endif]--&gt;<br />...<br /></span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<p>Garland&#8217;s template.php:
</p>
<div class="codeblock"><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php<br /></span><span style="color: rgb(0, 119, 0);">...<br />function </span><span style="color: rgb(0, 0, 187);">phptemplate_get_ie_styles</span><span style="color: rgb(0, 119, 0);">() {<br />&nbsp; global </span><span style="color: rgb(0, 0, 187);">$language</span><span style="color: rgb(0, 119, 0);">;</p>
<p>&nbsp; </span><span style="color: rgb(0, 0, 187);">$iecss </span><span style="color: rgb(0, 119, 0);">= </span><span style="color: rgb(221, 0, 0);">'&lt;link type="text/css" rel="stylesheet" media="all" href="'</span><span style="color: rgb(0, 119, 0);">. </span><span style="color: rgb(0, 0, 187);">base_path</span><span style="color: rgb(0, 119, 0);">() . </span><span style="color: rgb(0, 0, 187);">path_to_theme</span><span style="color: rgb(0, 119, 0);">() .</span><span style="color: rgb(221, 0, 0);">'/fix-ie.css" /&gt;'</span><span style="color: rgb(0, 119, 0);">;<br />&nbsp; if (</span><span style="color: rgb(0, 0, 187);">$language</span><span style="color: rgb(0, 119, 0);">-&gt;</span><span style="color: rgb(0, 0, 187);">direction </span><span style="color: rgb(0, 119, 0);">== </span><span style="color: rgb(0, 0, 187);">LANGUAGE_RTL</span><span style="color: rgb(0, 119, 0);">) {<br />&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(0, 0, 187);">$iecss </span><span style="color: rgb(0, 119, 0);">.= </span><span style="color: rgb(221, 0, 0);">'&lt;style type="text/css" media="all"&gt;@import "'</span><span style="color: rgb(0, 119, 0);">. </span><span style="color: rgb(0, 0, 187);">base_path</span><span style="color: rgb(0, 119, 0);">() . </span><span style="color: rgb(0, 0, 187);">path_to_theme</span><span style="color: rgb(0, 119, 0);">() .</span><span style="color: rgb(221, 0, 0);">'/fix-ie-rtl.css";&lt;/style&gt;'</span><span style="color: rgb(0, 119, 0);">;<br />&nbsp; }</p>
<p>&nbsp; return </span><span style="color: rgb(0, 0, 187);">$iecss</span><span style="color: rgb(0, 119, 0);">;<br />}<br />...<br /></span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<p>Drupal 7:<br />
Garland&#8217;s template.php:
</p>
<div class="codeblock"><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php<br /></span><span style="color: rgb(0, 119, 0);">...<br />function </span><span style="color: rgb(0, 0, 187);">garland_preprocess_html</span><span style="color: rgb(0, 119, 0);">(&amp;</span><span style="color: rgb(0, 0, 187);">$vars</span><span style="color: rgb(0, 119, 0);">) {<br />&nbsp; ...<br />&nbsp; </span><span style="color: rgb(0, 0, 187);">drupal_add_css</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">path_to_theme</span><span style="color: rgb(0, 119, 0);">() . </span><span style="color: rgb(221, 0, 0);">'/fix-ie.css'</span><span style="color: rgb(0, 119, 0);">, array(</span><span style="color: rgb(221, 0, 0);">'group' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(0, 0, 187);">CSS_THEME</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(221, 0, 0);">'browsers' </span><span style="color: rgb(0, 119, 0);">=&gt; array(</span><span style="color: rgb(221, 0, 0);">'IE' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(221, 0, 0);">'lt IE 7'</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(221, 0, 0);">'!IE' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(0, 0, 187);">FALSE</span><span style="color: rgb(0, 119, 0);">), </span><span style="color: rgb(221, 0, 0);">'preprocess' </span><span style="color: rgb(0, 119, 0);">=&gt; </span><span style="color: rgb(0, 0, 187);">FALSE</span><span style="color: rgb(0, 119, 0);">));<br />}<br />...<br /></span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<p>See the API documentation for <a target="_blank"  href="http://api.drupal.org/api/function/drupal_pre_render_conditional_comments/7" rel="nofollow">drupal_pre_render_conditional_comments()</a> for details on the &#8216;IE&#8217; and &#8216;!IE&#8217; keys.</p>
<p>It is recommended for themes to always use drupal_add_css() for adding a CSS file, so that Drupal code knows the exact total number of CSS files being added, information that might be needed for working around Internet Explorer&#8217;s limitation of only being able to load the first 31 LINK/STYLE tags. <em>[docs updated]</em></p>
<h3 id="theme-suggestions-for-menus">Targeted overrides (suggestions) available for theme_menu_link() and theme_menu_tree()</h3>
<p><a target="_blank"  href="http://drupal.org/node/634472" rel="nofollow">(issue)</a> In addition to <a target="_blank"  href="#menu_tree" rel="nofollow">other changes to menu rendering</a>, a Drupal 7 theme can implement a <code>THEMENAME_menu_tree__MENU_NAME()</code> and/or <code>THEMENAME_menu_link__MENU_NAME()</code> function to override <a target="_blank"  href="http://api.drupal.org/api/function/theme_menu_tree/7" rel="nofollow">theme_menu_tree()</a>/<a target="_blank"  href="http://api.drupal.org/api/function/theme_menu_link/7" rel="nofollow">theme_menu_link()</a> for a specific menu. For example, <code>THEMENAME_menu_link__management()</code> would override theme_menu_link() for links within the &#8220;Management&#8221; menu. This is similar to <a target="_blank"  href="http://drupal.org/update/theme/6/7#template_files_double_hyphen" rel="nofollow">how &#8220;node&#8211;article.tpl.php&#8221; overrides &#8220;node.tpl.php&#8221;</a>.</p>
<h3 id="theme-submenu">theme_submenu() was removed</h3>
<p><a target="_blank"  href="http://drupal.org/node/721556" rel="nofollow">(issue)</a> Drupal core does not provide theme_submenu() anymore.</p>
<h3 id="title-prefix-suffix">New $title_prefix and $title_suffix template variables</h3>
<p><a target="_blank"  href="http://drupal.org/node/646874" rel="nofollow">(issue)</a> Templates in Drupal 7 have two new standard variables, $title_prefix and $title_suffix, which are renderable arrays that contain output intended to be displayed before or after (respectively) the main title tag that appears in the template.</p>
<p>All standard templates that potentially have a title (e.g., nodes, blocks, comments, the main page.tpl.php file, etc.) should render these variables.  It is important that the variables be rendered even if the title itself is not being displayed, since the variables might contain important data added by modules (for example, contextual links) associated with the template as a whole.</p>
<p>Example (from page.tpl.php):</p>
</p>
<div class="codeblock"><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">render</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$title_prefix</span><span style="color: rgb(0, 119, 0);">); </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br /><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">if (</span><span style="color: rgb(0, 0, 187);">$title</span><span style="color: rgb(0, 119, 0);">): </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span>&lt;h1 class="title" id="page-title"&gt;<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$title</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span>&lt;/h1&gt;<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">endif; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br /><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">render</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$title_suffix</span><span style="color: rgb(0, 119, 0);">); </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<h3 id="theme-node-form">theme_node_form() was removed</h3>
<p><a target="_blank"  href="http://drupal.org/node/596582" rel="nofollow">(issue)</a> Drupal core does not provide theme_node_form() anymore.  Node forms now have a CSS classes of .node-form and .node-TYPE-form for facilicate simple node type specific styling of the node form.</p>
<h3 id="node-get-types">node_get_types() renamed to node_type_get_types()</h3>
<p>In template.php, replace:
</p>
<div class="codeblock"><code>foreach (node_get_types() as $type =&gt; $name) {<br />unset($settings['toggle_node_info_' . $type]);<br />}</code></div>
<p></p>
<p>with:</p>
<div class="codeblock"><code>foreach(node_type_get_types() as $type =&gt; $name) {<br />unset($settings['toggle_node_info_'. $type]);<br />}</code></div>
</p>
<h3 id="package-core">Core themes now contain &#8220;package = Core&#8221; in their .info files</h3>
<p><a target="_blank"  href="http://drupal.org/node/334238" rel="nofollow">(issue)</a> Each core theme now contains the line: <code>package = Core</code> in their</p>
<p>.info files. This is a <strong>core only</strong> property that was added to</p>
<p>to help the Update Manager module identify core modules and themes. It should<br />
not be used in custom or contributed themes.</p>
<h3 id="search-result-headings">search-result.tpl.php now uses proper H3 headings for search result titles</h3>
<p><a target="_blank"  href="http://drupal.org/node/810176" rel="nofollow">(issue)</a> H3 heading elements are now used to wrap each search result title to allow for heading based navigation for keyboard only users (accessibility improvement). This required a change from a DL list to an OL list with changes in two templates &#8211; search-results.tpl.php and seach-result.tpl.php.</p>
<p><a target="_blank"  href="http://drupal.org/node/839524" rel="nofollow">(second issue)</a> Rendering was pushed to the last possible moment in search results theming, resulting in more changes to these templates and the pre-processing functions. One note: the $type variable is now $module (this variable is not used in the default search result markup).</p>
<p><strong>Drupal 6 markup for search-results.tpl.php:</strong>
</p>
<div class="codeblock"><code>&lt;dl class="search-results <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$type</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span>-results"&gt;<br />&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$search_results</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&lt;/dl&gt;<br /><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$pager</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<p><strong>Drupal 7 markup for search-results.tpl.php:</strong>
</p>
<div class="codeblock"><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">if (</span><span style="color: rgb(0, 0, 187);">$search_results</span><span style="color: rgb(0, 119, 0);">) : </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp; &lt;h2&gt;<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">t</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">'Search results'</span><span style="color: rgb(0, 119, 0);">);</span><span style="color: rgb(0, 0, 187);">?&gt;</span></span>&lt;/h2&gt;<br />&nbsp; &lt;ol class="search-results <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$module</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span>-results"&gt;<br />&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$search_results</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp; &lt;/ol&gt;<br />&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$pager</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br /><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">else : </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp; &lt;h2&gt;<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">t</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">'Your search yielded no results'</span><span style="color: rgb(0, 119, 0);">);</span><span style="color: rgb(0, 0, 187);">?&gt;</span></span>&lt;/h2&gt;<br />&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">search_help</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">'search#noresults'</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(0, 0, 187);">drupal_help_arg</span><span style="color: rgb(0, 119, 0);">()); </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br /><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">endif; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<p><strong>Drupal 6 markup for search-result.tpl.php:</strong>
</p>
<div class="codeblock"><code>&lt;dt class="title"&gt;<br />&nbsp; &lt;a href="<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$url</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span>"&gt;<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$title</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span>&lt;/a&gt;<br />&lt;/dt&gt;<br />&lt;dd&gt;<br />&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">if (</span><span style="color: rgb(0, 0, 187);">$snippet</span><span style="color: rgb(0, 119, 0);">) : </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp;&nbsp;&nbsp; &lt;p class="search-snippet"&gt;<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$snippet</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span>&lt;/p&gt;<br />&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">endif; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">if (</span><span style="color: rgb(0, 0, 187);">$info</span><span style="color: rgb(0, 119, 0);">) : </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp; &lt;p class="search-info"&gt;<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$info</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span>&lt;/p&gt;<br />&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">endif; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&lt;/dd&gt;</code></div>
</p>
<p><strong>Drupal 7 markup for search-result.tpl.php:</strong>
</p>
<div class="codeblock"><code>&lt;li class="<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$classes</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span>"<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$attributes</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span>&gt;<br />&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">render</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$title_prefix</span><span style="color: rgb(0, 119, 0);">); </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp; &lt;h3 class="title"<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$title_attributes</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span>&gt;<br />&nbsp;&nbsp;&nbsp; &lt;a href="<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$url</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span>"&gt;<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$title</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span>&lt;/a&gt;<br />&nbsp; &lt;/h3&gt;<br />&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">render</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$title_suffix</span><span style="color: rgb(0, 119, 0);">); </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp; &lt;div class="search-snippet-info"&gt;<br />&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">if (</span><span style="color: rgb(0, 0, 187);">$snippet</span><span style="color: rgb(0, 119, 0);">) : </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;p class="search-snippet"<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$content_attributes</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span>&gt;<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$snippet</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span>&lt;/p&gt;<br />&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">endif; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">if (</span><span style="color: rgb(0, 0, 187);">$info</span><span style="color: rgb(0, 119, 0);">) : </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;p class="search-info"&gt;<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$info</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span>&lt;/p&gt;<br />&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">endif; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp; &lt;/div&gt;<br />&lt;/li&gt;</code></div>
</p>
<p>The corresponding pre-processing functions for search results have also changed.</p>
<h3 id="xhtml11-compatibility">The name attribute in a and map elements is invalid</h3>
<p>(<a target="_blank"  href="http://drupal.org/node/338429" rel="nofollow">issue</a>) Due to Drupal 7&#8242;s XHTML+RDFa 1.0 doctype (which inherits the HTML 1.1 doctype), the HTML output should be <a target="_blank"  href="http://www.w3.org/TR/xhtml11/changes.html" rel="nofollow">compatible with XHTML 1.1</a>, in particular there should be no <code>name</code> attribute in the <code>a</code> and <code>map</code> HTML elements.</p>
<p><strong>6.x</strong>
</p>
<div class="codeblock"><code>&lt;a id="new" name="new"&gt;</code></div>
</p>
<p><strong>7.x</strong>
</p>
<div class="codeblock"><code>&lt;a id="new"&gt;</code></div>
</p>
<h3 id="engine">PHPTemplate is now the default theme engine</h3>
<p>In Drupal 6, specifying the theme engine in .info files was required:<br />
<code>engine = phptemplate</code></p>
<p>In Drupal 7, this line is no longer necessary because it is assumed by default. You may safely remove it from your .info file.</p>
<p>Themes using the Smarty engine are not affected, and PHP only themes may still be used by specifying &#8220;theme&#8221; as the engine:</p>
<p><code>engine = theme</code></p>
<h3 id="print-regions">Custom regions must be printed differently in page.tpl.php</h3>
<p>In Drupal 6, when you wanted to print a region you had just made, you just put this into your page.tpl.php:
</p>
<div class="codeblock"><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php<br /> </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$foo_sidebar</span><span style="color: rgb(0, 119, 0);">; <br /></span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<p>In Drupal 7, all of the regions you wish to add must be printed using render and the page variable:</p>
<div class="codeblock"><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php<br /> </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">render</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$page</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'foo_sidebar'</span><span style="color: rgb(0, 119, 0);">]); <br /></span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<h3 id="thumbnail">Thumbnail size has changed</h3>
<p>(<a target="_blank"  href="http://drupal.org/node/491214" rel="nofollow">issue</a>) The Appearance page in Drupal 7 (Themes in Drupal 6) was substantially reorganized. Accordingly, the size of the thumbnail to include with a theme in Drupal 7 changed. In Drupal 7, the thumbnail file should be 294px wide by 219px tall. See <a target="_blank"  href="http://drupal.org/node/647754" title="http://drupal.org/node/647754" rel="nofollow">http://drupal.org/node/647754</a> for instructions on how to make your thumbnail file.</p>
<h3 id="show-blocks">$show_blocks theme variable has been removed</h3>
<p>(<a target="_blank"  href="http://drupal.org/node/423992" rel="nofollow">issue</a>) The $show_blocks theme variable for pages, which used to be FALSE on pages such as 404 errors to indicate that the sidebars should not be shown, has been removed in Drupal 7. The reasoning was that it wasn&#8217;t really possible for the theme system to know, for a given theme, which regions were &#8220;non-essential sidebars&#8221; and shouldn&#8217;t be shown, and which were essential regions (navigation etc.).</p>
<p>In addition, theme(&#8216;maintenance_page&#8217;) no longer has a $show_blocks argument.</p>
<h3 id="region-tpl">Regions are now rendered with their own TPL file: region.tpl.php</h3>
<p>(<a target="_blank"  href="http://drupal.org/node/60552" rel="nofollow">issue</a>) All theme regions, when rendered in the page, are rendered using a new <a target="_blank"  href="http://api.drupal.org/api/drupal/modules--system--region.tpl.php/7" rel="nofollow">region.tpl.php</a> file. This ensures that regions are rendered consistently, and the <a target="_blank"  href="http://api.drupal.org/api/drupal/includes--theme.inc/function/template_preprocess_region/7" rel="nofollow">template_preprocess_region()</a> function ensures that each region has a consistent class attribute applied to it (classes: region, region-REGIONNAME).</p>
<p>Example &#8211; Drupal 6 &#8211; page.tpl.php
</p>
<div class="codeblock"><code> &lt;div id="header-region" class="clear-block"&gt;<span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$header</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span>&lt;/div&gt;</code></div>
</p>
<p>Drupal 7:
</p>
<div class="codeblock"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">render</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$page</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'header'</span><span style="color: rgb(0, 119, 0);">]); </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</p>
<h3 id="html-tpl">New html.tpl.php file</h3>
<p>html.tpl.php takes over part of the Drupal 6 page.tpl.php, by providing the structure for the HTML header (the <code>&lt;!DOCTYPE&gt;</code> and the <code>&lt;html&gt;</code>, <code>&lt;head&gt;</code>, and <code>&lt;body&gt;</code> elements. See <a target="_blank"  href="http://api.drupal.org/api/drupal/modules--system--html.tpl.php/7" rel="nofollow">the documentation for html.tpl.php at api.drupal.org</a> and <a target="_blank"  href="http://api.drupal.org/api/drupal/modules--system--html.tpl.php/7/source" rel="nofollow">the source code for html.tpl.php</a> for the default html.tpl.php file, which of course can be overridden in a theme, just like any other tpl.php file.</p>
<h3 id="css-no-wrappers">HTML rendering of form elements has different CSS classes</h3>
<p><a target="_blank"  href="http://drupal.org/node/550572" rel="nofollow">Issue</a>: The HTML rendering of form elements has changed, in that they have different CSS classes applied to the surrounding DIV: .form-type-TYPE and .form-item-NAME. Previously, the assigned classes were .form-item-TYPE and .NAME-wrapper. In both cases, TYPE is the #type component of the form element, and NAME is the array key. For example, in:
</p>
<div class="codeblock"><code>$form['body'] = array(<br />&nbsp; '#type' =&gt; 'textarea',<br />&nbsp; ...<br />);</code></div>
<p>
TYPE would be textarea, and NAME would be body. (For multi-word types and names, underscores are converted to hyphens.)
</p>
<h3 id="local_tasks">Local tasks and actions can now be altered</h3>
<p> <a target="_blank"  href="/node/599706" rel="nofollow">(issue)</a>.<br />
Previously, theme_menu_local_tasks() took no $variables, so preprocess functions on it were impossible. Modules can now alter the primary and secondary tabs using preprocess or process functions.</p>
<p>Themes that overrode the old definition of theme_menu_local_tasks() will need to update their theme declaration to mirror the changes to the default implementation in includes/menu.inc.</p>
<h3 id="submitted_by">theme(&#8216;node_submitted&#8217;) and theme(&#8216;comment_submitted&#8217;) no longer exist</h3>
<p><a target="_blank"  href="/node/364470" rel="nofollow">(issue)</a>. In Drupal 6, the template_preprocess_node() and template_preprocess_comment() functions called theme(&#8216;node_submitted&#8217;) and theme(&#8216;comment_submitted&#8217;) respectively, in order to create the &#8220;Submitted by&#8221; lines, which come into the node.tpl.php and comment.tpl.php files as variable $submitted. In Drupal 7, these two theme calls have been eliminated, and now the submitted information is generated directly in template_preprocess_node() and template_preprocess_comment().</p>
<p>So, if you want to override how the submitted by information is presented in a theme, you have two choices:</p>
<ol>
<li>In your theme&#8217;s mytheme_preprocess_node()/comment() function, do something different in place of:
<div class="codeblock"><code>&nbsp;&nbsp; $variables['submitted'] = t('Submitted by !username on !datetime', array('!username' =&gt; $variables['name'], '!datetime' =&gt; $variables['date']));</code></div>
</li>
<li>Override node.tpl.php/comment.tpl.php and use the $name and $date variables to do something different in the section:
<div class="codeblock"><code> <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">if (</span><span style="color: rgb(0, 0, 187);">$display_submitted</span><span style="color: rgb(0, 119, 0);">): </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp;&nbsp;&nbsp; &lt;div class="submitted"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$submitted</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span><br />&nbsp;&nbsp;&nbsp; &lt;/div&gt;<br />&nbsp; <span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);">&lt;?php </span><span style="color: rgb(0, 119, 0);">endif; </span><span style="color: rgb(0, 0, 187);">?&gt;</span></span></code></div>
</li>
</ol>
</div>
<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fericrichers.com%2Fblog%2F2011%2F09%2Fconverting-6-x-themes-to-7-x%2F&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div class="rw-left"><div class="rw-ui-container rw-class-blog-post rw-urid-10950"></div></div>]]></content:encoded>
			<wfw:commentRss>http://ericrichers.com/blog/2011/09/converting-6-x-themes-to-7-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP TUT Feed from: tutorialzine.com</title>
		<link>http://ericrichers.com/blog/2011/08/php-tut-feed-from-tutorialzine-com/</link>
		<comments>http://ericrichers.com/blog/2011/08/php-tut-feed-from-tutorialzine-com/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 04:56:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[PHP & MySQL]]></category>
		<category><![CDATA[php functions]]></category>
		<category><![CDATA[tuts]]></category>

		<guid isPermaLink="false">http://ericrichers.com/blog/?p=1091</guid>
		<description><![CDATA[Current Feed Content Building a Website with PHP, MySQL and jQuery Mobile, Part 2 Posted: Tue, 23 Aug 2011 12:34:01 +0000 This is the second part of a two-part tutorial, in which we use PHP, MySQL and jQuery mobile to &#8230; <a href="http://ericrichers.com/blog/2011/08/php-tut-feed-from-tutorialzine-com/">Read More.. <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h3 id="currentFeedContent">Current Feed Content</h3>
<ul>
<li>
<h4><a href="http://feedproxy.google.com/%7Er/Tutorialzine/%7E3/VKUd67RygVw/">Building a Website with PHP, MySQL and jQuery Mobile, Part 2</a></h4>
<h5>Posted: Tue, 23 Aug 2011 12:34:01 +0000</h5>
<div>
<div><a href="http://tutorialzine.com/2011/08/jquery-mobile-mvc-website-part-2/"><img src="http://cdn.tutorialzine.com/img/featured/1585.jpg" alt="" /></a></div>
<p>This is the second part of a two-part tutorial, in which we use PHP, MySQL and jQuery mobile to build a simple computer web store. <a title="Go to Part 1" href="http://tutorialzine.com/2011/08/jquery-mobile-product-website/">In the previous part</a> we created the models and the controllers, and this time we will be writing our views.</p>
<h3>jQuery mobile</h3>
<p>First, lets say a few words about the library we will be using. <a href="http://jquerymobile.com/" target="_blank">jQuery mobile</a> is a user interface library that sits on top of jQuery and provides support for a wide array of devices in the form of ready to use widgets and a touch-friendly development environment. It is still in beta, but upgrading to the official 1.0 release will be as simple as swapping a CDN URL.</p>
<p>The library is built around progressive enhancement. You, as the developer, only need to concern yourself with outputting the correct HTML, and the library will take care of the rest. jQuery mobile makes use of the HTML5 <strong>data-</strong> attributes and by adding them, you instruct the library how it should render your markup.</p>
<p>In this tutorial we will be using some of the interface components that this library gives us – <a href="http://jquerymobile.com/demos/1.0b2/#/demos/1.0b2/docs/lists/docs-lists.html" target="_blank">lists</a>, <a href="http://jquerymobile.com/demos/1.0b2/#/demos/1.0b2/docs/toolbars/docs-headers.html" target="_blank">header</a> and <a href="http://jquerymobile.com/demos/1.0b2/#/demos/1.0b2/docs/toolbars/docs-footers.html" target="_blank">footer</a> bars and <a href="http://jquerymobile.com/demos/1.0b2/#/demos/1.0b2/docs/buttons/buttons-types.html" target="_blank">buttons</a>, all of which are defined using the <strong>data-role</strong> attributes, which you will see in use in the next section.</p>
<h3>Rendering Views</h3>
<p>The views are PHP files, or templates, that generate HTML code. They are printed by the controllers using the <strong>render()</strong> helper function. We have 7 views in use for this website – <em>_category.php</em>, <em>_product.php</em>, <em>_header.php</em>, <em>_footer.php</em>, <em>category.php</em>, <em>home.php</em> and <em>error.php</em>, which are discussed later on. First, here is <strong>render() </strong>function:</p>
<h4>includes/helpers.php</h4>
<pre>/* These are helper functions */

function render($template,$vars = array()){

	// This function takes the name of a template and
	// a list of variables, and renders it.

	// This will create variables from the array:
	extract($vars);

	// It can also take an array of objects
	// instead of a template name.
	if(is_array($template)){

		// If an array was passed, it will loop
		// through it, and include a partial view
		foreach($template as $k){

			// This will create a local variable
			// with the name of the object's class

			$cl = strtolower(get_class($k));
			$$cl = $k;

			include "views/_$cl.php";
		}

	}
	else {
		include "views/$template.php";
	}
}</pre>
<p>The first argument of this function is the name of the template file in the <strong>views/</strong> folder (without the <em>.php</em> extension). The next is an array with arguments. These are extracted and form real variables which you can use in your template.</p>
<p>There is one more way this function can be called – instead of a template name, you can pass an array with objects. If you recall from last time, this is what is returned by using the <strong>find()</strong> method. So basically if you pass the result of <code>Category::find()</code> to <strong>render</strong>, the function will loop through the array, get the class names of the objects inside it, and automatically include the <strong>_category.php</strong> template for each one. Some frameworks (Rails for example) call these partials.</p>
<div id="attachment_1579"><a href="http://demo.tutorialzine.com/2011/08/jquery-mobile-product-website/"><img title="Computer Store with PHP, MySQL and jQuery Mobile" src="http://cdn.tutorialzine.com/wp-content/uploads/2011/08/mobile-computer-store.jpg" alt="Computer Store with PHP, MySQL and jQuery Mobile" width="620" height="460" /></a>Computer Store with PHP, MySQL and jQuery Mobile</p>
</div>
<h3>The Views</h3>
<p>Lets start off with the first view – the header. You can see that this template is simply the top part of a regular HTML5 page with interleaved PHP code. This view is used in <strong>home.php</strong> and <strong>category.php</strong> to promote code reuse.</p>
<h4>includes/views/_header.php</h4>
<pre>&lt;!DOCTYPE html&gt;
&lt;html&gt;
	&lt;head&gt;
	&lt;title&gt;&lt;?php echo formatTitle($title)?&gt;&lt;/title&gt; 

	&lt;meta name="viewport" content="width=device-width, initial-scale=1" /&gt; 

	&lt;link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.css" /&gt;
    &lt;link rel="stylesheet" href="assets/css/styles.css" /&gt;
	&lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"&gt;&lt;/script&gt;
	&lt;script type="text/javascript" src="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.js"&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt; 

&lt;div data-role="page"&gt;

	&lt;div data-role="header" data-theme="b"&gt;
	    &lt;a href="./" data-icon="home" data-iconpos="notext" data-transition="fade"&gt;Home&lt;/a&gt;
		&lt;h1&gt;&lt;?php echo $title?&gt;&lt;/h1&gt;
	&lt;/div&gt;

	&lt;div data-role="content"&gt;</pre>
<p>In the head section we include jQuery and jQuery mobile from jQuery’s CDN, and two stylesheets. The body section is where it gets interesting. We define a div with the <strong>data-role=”page”</strong> attribute. This, along with the <strong>data-role=”content”</strong> div, are the two elements <a href="http://jquerymobile.com/demos/1.0b2/#/demos/1.0b2/docs/pages/page-anatomy.html" target="_blank">required by the library to be present on every page</a>.</p>
<p>The <strong>data-role=”header”</strong> div is transformed into a header bar. The <strong>data-theme</strong> attribute chooses one of the <a href="http://jquerymobile.com/demos/1.0b2/#/demos/1.0b2/docs/api/themes.html" target="_blank">5 standard themes</a>. Inside it, we have a link that is assigned a home icon, and has its text hidden. jQuery Mobile comes with a <a href="http://jquerymobile.com/demos/1.0b2/#/demos/1.0b2/docs/buttons/buttons-icons.html" target="_blank">set of icons</a> you can choose from.</p>
<p>The closing tags (and the footer bar) reside in the <em>_footer.php</em> view:</p>
<h4>includes/views/_footer.php</h4>
<pre>	&lt;/div&gt;

	&lt;div data-role="footer" id="pageFooter"&gt;
		&lt;h4&gt;&lt;?php echo $GLOBALS['defaultFooter']?&gt;&lt;/h4&gt;
	&lt;/div&gt;
&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;</pre>
<p>Nothing too fancy here. We only have a div with the <strong>data-role=”footer”</strong> attribute, and inside it we print the globally accessible <strong>$defaultFooter</strong> variable, defined in <strong>includes/config.php</strong>.</p>
<p>Neither of the above views are printed directly by our controllers. They are instead used by <strong>category.php</strong> and <strong>home.php</strong>:</p>
<h4>includes/views/home.php</h4>
<pre>&lt;?php render('_header',array('title'=&gt;$title))?&gt;

&lt;p&gt;Welcome! This is a demo for a ...&lt;/p&gt;
&lt;p&gt;Remember to try browsing this ...&lt;/p&gt;

&lt;ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="b"&gt;
    &lt;li data-role="list-divider"&gt;Choose a product category&lt;/li&gt;
    &lt;?php render($content) ?&gt;
&lt;/ul&gt;

&lt;?php render('_footer')?&gt;</pre>
<p>If you may recall, the home view was rendered in the home controller. There we passed an array with all the categories, which is available here as <code>$content</code>. So what this view does, is to print the header, and footer, define a jQuery mobile listview (using the data-role attribute), and generate the markup of the categories passed by the controller, using this template (used implicitly by <strong>render()</strong>):</p>
<h4>index.php/views/_category.php</h4>
<pre>&lt;li &lt;?php echo ($active == $category-&gt;id ? 'data-theme="a"' : '') ?&gt;&gt;
&lt;a href="?category=&lt;?php echo $category-&gt;id?&gt;" data-transition="fade"&gt;
	&lt;?php echo $category-&gt;name ?&gt;
    &lt;span&gt;&lt;?php echo $category-&gt;contains?&gt;&lt;/span&gt;&lt;/a&gt;
&lt;/li&gt;</pre>
<p>Notice that we have a <code>$category</code> PHP variable that points to the actual object this view is being generated for. This is done in lines 24/25 of the render function. When the user clicks one of the links generated by the above fragment, he will be taken to the <strong>/?category=someid</strong> url, which will show the <strong>category.php</strong> view, given below.</p>
<pre>&lt;?php render('_header',array('title'=&gt;$title))?&gt;

&lt;div&gt;
	&lt;ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="c"&gt;
        &lt;?php render($products) ?&gt;
    &lt;/ul&gt;
&lt;/div&gt;

&lt;div&gt;
    &lt;ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="b"&gt;
        &lt;li data-role="list-divider"&gt;Categories&lt;/li&gt;
        &lt;?php render($categories,array('active'=&gt;$_GET['category'])) ?&gt;
    &lt;/ul&gt;
&lt;/div&gt;

&lt;?php render('_footer')?&gt;</pre>
<p>This file also uses the header, footer and _category views, but it also presents a column with products (passed by the category controller). The products are rendered using the <em>_product.php</em> partial:</p>
<pre>&lt;li&gt;
	&lt;img src="assets/img/&lt;?php echo $product-&gt;id ?&gt;.jpg" alt="&lt;?php echo $product-&gt;name ?&gt;" /&gt;
	&lt;?php echo $product-&gt;name ?&gt; &lt;i&gt;&lt;?php echo $product-&gt;manufacturer?&gt;&lt;/i&gt;
	&lt;b&gt;$&lt;?php echo $product-&gt;price?&gt;&lt;/b&gt;
&lt;/li&gt;</pre>
<p>As we have an image as the first child of the li elements, it is automatically displayed as an 80px thumbnail by jQuery mobile.</p>
<p>One of the advantages to using the interface components defined in the library is that they are automatically scaled to the width of the device. But what about the columns we defined above? We will need to style them ourselves with some CSS3 magic:</p>
<h4>assets/css/styles.css</h4>
<pre>media all and (min-width: 650px){

	.rightColumn{
		width:56%;
		float:right;
		margin-left:4%;
	}

	.leftColumn{
		width:40%;
		float:left;
	}

}

.product i{
	display:block;
	font-size:0.8em;
	font-weight:normal;
	font-style:normal;
}

.product img{
	margin:10px;
}

.product b{
	position: absolute;
	right: 15px;
	top: 15px;
	font-size: 0.9em;
}

.product{
	height: 80px;
}</pre>
<p>Using a media query, we tell the browser that if the view area is wider than 650px, it should display the columns side by side. If it is not (or if the browser does not support media queries) they will be displayed one on top of the other, the regular “block” behavior.</p>
<h3>We’re done!</h3>
<p>In the second and last part of this tutorial, we wrote our views to leverage the wonderful features of jQuery mobile. With minimal effort on our part, we were able to describe the roles of our markup and easily create a fully fledged mobile website.</p>
<div><a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=VKUd67RygVw:gZWC_-dqSAw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?d=yIl2AUoC8zA" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=VKUd67RygVw:gZWC_-dqSAw:D7DqB2pKExk"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=VKUd67RygVw:gZWC_-dqSAw:D7DqB2pKExk" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=VKUd67RygVw:gZWC_-dqSAw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=VKUd67RygVw:gZWC_-dqSAw:F7zBnMyn0Lo" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=VKUd67RygVw:gZWC_-dqSAw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=VKUd67RygVw:gZWC_-dqSAw:V_sGLiPBpWU" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=VKUd67RygVw:gZWC_-dqSAw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=VKUd67RygVw:gZWC_-dqSAw:gIN9vFwOqvQ" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=VKUd67RygVw:gZWC_-dqSAw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?d=qj6IDK7rITs" alt="" border="0" /></a></div>
<p><img src="http://feeds.feedburner.com/%7Er/Tutorialzine/%7E4/VKUd67RygVw" alt="" width="1" height="1" /></div>
</li>
<li>
<h4><a href="http://feedproxy.google.com/%7Er/Tutorialzine/%7E3/bKLRMLHA3RM/">Building a Website with PHP, MySQL and jQuery Mobile, Part 1</a></h4>
<h5>Posted: Fri, 19 Aug 2011 18:58:17 +0000</h5>
<div>
<div><a href="http://tutorialzine.com/2011/08/jquery-mobile-product-website/"><img src="http://cdn.tutorialzine.com/img/featured/1569.jpg" alt="" /></a></div>
<p>In this two-part tutorial, we will be building a simple website with PHP and MySQL, using the Model-View-Controller (MVC) pattern. Finally, with the help of the <a href="http://jquerymobile.com/" target="_blank">jQuery Mobile framework</a>, we will turn it into a touch-friendly mobile website, that works on any device and screen size.</p>
<p>In this first part, we concentrate on the backend, discussing the database and MVC organization. <a title="Go to Part 2" href="http://tutorialzine.com/2011/08/jquery-mobile-mvc-website-part-2/">In part two</a>, we are writing the views and integrating jQuery Mobile.</p>
<h3>The File Structure</h3>
<p>As we will be implementing the MVC pattern (in effect writing a simple micro-framework), it is natural to split our site structure into different folders for the models, views and controllers. Don’t let the number of files scare you – although we are using a lot of files, the code is concise and easy to follow.</p>
<div id="attachment_1575"><a href="http://demo.tutorialzine.com/2011/08/jquery-mobile-product-website/"><img title="The Directory Structure" src="http://cdn.tutorialzine.com/wp-content/uploads/2011/08/jquery-mobile-php-mysql-file-structure.jpg" alt="The Directory Structure" width="620" height="260" /></a>The Directory Structure</p>
</div>
<h3>The Database Schema</h3>
<p>Our simple application operates with two types of resources – categories and products. These are given their own tables – <strong>jqm_categories</strong>, and <strong>jqm_products</strong>. Each product has a category field, which assigns it to a category.</p>
<div id="attachment_1576"><a href="http://demo.tutorialzine.com/2011/08/jquery-mobile-product-website/"><img title="jqm_categories Table Structure" src="http://cdn.tutorialzine.com/wp-content/uploads/2011/08/categories-table-structure.jpg" alt="jqm_categories Table Structure" width="620" height="260" /></a>jqm_categories Table Structure</p>
</div>
<p>The categories table has an <strong>ID</strong> field, a <strong>name</strong> and a <strong>contains</strong> column, which shows how many products there are in each category.</p>
<div id="attachment_1577"><a href="http://demo.tutorialzine.com/2011/08/jquery-mobile-product-website/"><img title="jqm_products Table Structure" src="http://cdn.tutorialzine.com/wp-content/uploads/2011/08/products-table-structure.jpg" alt="jqm_products Table Structure" width="620" height="260" /></a>jqm_products Table Structure</p>
</div>
<p>The product table has a <strong>name</strong>, <strong>manufacturer</strong>, <strong>price</strong> and a <strong>category</strong> field. The latter holds the ID of the category the product is added to.</p>
<blockquote><p>You can find the SQL code to create these tables in tables.sql in the download archive. Execute it in the SQL tab of phpMyAdmin to have a working copy of this database. Remember to also fill in your MySQL login details in config.php.</p></blockquote>
<h3>The Models</h3>
<p>The models in our application will handle the communication with the database. We have two types of resources in our application – <strong>products</strong> and <strong>categories</strong>. The models will expose an easy to use method – <code>find()</code> which will query the database behind the scenes and return an array with objects.</p>
<p>Before starting work on the models, we will need to establish a database connection. I am using the <a href="http://www.php.net/manual/en/intro.pdo.php" target="_blank">PHP PDO class</a>, which means that it would be easy to use a different database than MySQL, if you need to.</p>
<h4>includes/connect.php</h4>
<pre>/*
	This file creates a new MySQL connection using the PDO class.
	The login details are taken from includes/config.php.
*/

try {
	$db = new PDO(
		"mysql:host=$db_host;dbname=$db_name;charset=UTF-8",
		$db_user,
		$db_pass
	);

    $db-&gt;query("SET NAMES 'utf8'");
	$db-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
catch(PDOException $e) {
	error_log($e-&gt;getMessage());
	die("A database error was encountered");
}</pre>
<p>This will put the <strong>$db</strong> connection object in the global scope, which we will use in our models. You can see them below.</p>
<h4>includes/models/category.model.php</h4>
<pre>class Category{

	/*
		The find static method selects categories
		from the database and returns them as
		an array of Category objects.
	*/

	public static function find($arr = array()){
		global $db;

		if(empty($arr)){
			$st = $db-&gt;prepare("SELECT * FROM jqm_categories");
		}
		else if($arr['id']){
			$st = $db-&gt;prepare("SELECT * FROM jqm_categories WHERE id=:id");
		}
		else{
			throw new Exception("Unsupported property!");
		}

                // This will execute the query, binding the $arr values as query parameters
		$st-&gt;execute($arr);

		// Returns an array of Category objects:
		return $st-&gt;fetchAll(PDO::FETCH_CLASS, "Category");
	}
}</pre>
<p>Both models are simple class definitions with a single static method – <strong>find()</strong>. In the fragment above, this method takes an optional array as a parameter and executes different queries as prepared statements.</p>
<p>In the return declaration, we are using the <a href="http://www.php.net/manual/en/pdostatement.fetchall.php" target="_blank">fetchAll</a> method passing it the <strong>PDO::FETCH_CLASS</strong> constant. What this does, is to loop though all the result rows, and create a new object of the Category class. The columns of each row will be added as public properties to the object.</p>
<p>This is also the case with the <em>Product model</em>:</p>
<h4>includes/models/product.model.php</h4>
<pre>class Product{

	// The find static method returns an array
	// with Product objects from the database.

	public static function find($arr){
		global $db;

		if($arr['id']){
			$st = $db-&gt;prepare("SELECT * FROM jqm_products WHERE id=:id");
		}
		else if($arr['category']){
			$st = $db-&gt;prepare("SELECT * FROM jqm_products WHERE category = :category");
		}
		else{
			throw new Exception("Unsupported property!");
		}

		$st-&gt;execute($arr);

		return $st-&gt;fetchAll(PDO::FETCH_CLASS, "Product");
	}
}</pre>
<p>The return values of both find methods are arrays with instances of the class. We could possibly return an array of generic objects (or an array of arrays) in the find method, but creating specific instances will allow us to automatically style each object using the appropriate template in the views folder (the ones that start with an underscore). We will talk again about this in the next part of the tutorial.</p>
<p>There, now that we have our two models, lets move on with the controllers.</p>
<div id="attachment_1579"><a href="http://demo.tutorialzine.com/2011/08/jquery-mobile-product-website/"><img title="Computer Store with PHP, MySQL and jQuery Mobile" src="http://cdn.tutorialzine.com/wp-content/uploads/2011/08/mobile-computer-store.jpg" alt="Computer Store with PHP, MySQL and jQuery Mobile" width="620" height="460" /></a>Computer Store with PHP, MySQL and jQuery Mobile</p>
</div>
<h3>The controllers</h3>
<p>The controllers use the <strong>find()</strong> methods of the models to fetch data, and render the appropriate views. We have two controllers in our application – one for the <em>home page</em>, and another one for the <em>category pages</em>.</p>
<h4>includes/controllers/home.controller.php</h4>
<pre>/* This controller renders the home page */

class HomeController{
	public function handleRequest(){

		// Select all the categories:
		$content = Category::find();

		render('home',array(
			'title'		=&gt; 'Welcome to our computer store',
			'content'	=&gt; $content
		));
	}
}</pre>
<p>Each controller defines a <strong>handleRequest()</strong> method. This method is called when a specific URL is visited. We will return to this in a second, when we discuss <em>index.php</em>.</p>
<p>In the case with the <strong>HomeController</strong>, <strong>handleRequest()</strong> just selects all the categories using the model’s find() method, and renders the home view (<em>includes/views/home.php</em>) using our <em>render</em> helper function (<em>includes/helpers.php</em>), passing a title and the selected categories. Things are a bit more complex in <strong>CategoryController</strong>:</p>
<h4>includes/controllers/category.controller.php</h4>
<pre>/* This controller renders the category pages */

class CategoryController{
	public function handleRequest(){
		$cat = Category::find(array('id'=&gt;$_GET['category']));

		if(empty($cat)){
			throw new Exception("There is no such category!");
		}

		// Fetch all the categories:
		$categories = Category::find();

		// Fetch all the products in this category:
		$products = Product::find(array('category'=&gt;$_GET['category']));

		// $categories and $products are both arrays with objects

		render('category',array(
			'title'			=&gt; 'Browsing '.$cat[0]-&gt;name,
			'categories'	=&gt; $categories,
			'products'		=&gt; $products
		));
	}
}</pre>
<p>The first thing this controller does, is to select the category by id (it is passed as part of the URL). If everything goes to plan, it fetches a list of categories, and a list of products associated with the current one. Finally, the category view is rendered.</p>
<p>Now lets see how all of these work together, by inspecting <em>index.php</em>:</p>
<h4>index.php</h4>
<pre>/*
	This is the index file of our simple website.
	It routes requests to the appropriate controllers
*/

require_once "includes/main.php";

try {

	if($_GET['category']){
		$c = new CategoryController();
	}
	else if(empty($_GET)){
		$c = new HomeController();
	}
	else throw new Exception('Wrong page!');

	$c-&gt;handleRequest();
}
catch(Exception $e) {
	// Display the error page using the "render()" helper function:
	render('error',array('message'=&gt;$e-&gt;getMessage()));
}</pre>
<p>This is the first file that is called on a new request. Depending on the <strong>$_GET</strong> parameters, it creates a new controller object and executes its <strong>handleRequest()</strong> method. If something goes wrong anywhere in the application, an exception will be generated which will find its way to the catch clause, and then in the error template.</p>
<p>One more thing that is worth noting, is the very first line of this file, where we require <em>main.php</em>. You can see it below:</p>
<h4>main.php</h4>
<pre>/*
	This is the main include file.
	It is only used in index.php and keeps it much cleaner.
*/

require_once "includes/config.php";
require_once "includes/connect.php";
require_once "includes/helpers.php";
require_once "includes/models/product.model.php";
require_once "includes/models/category.model.php";
require_once "includes/controllers/home.controller.php";
require_once "includes/controllers/category.controller.php";

// This will allow the browser to cache the pages of the store.

header('Cache-Control: max-age=3600, public');
header('Pragma: cache');
header("Last-Modified: ".gmdate("D, d M Y H:i:s",time())." GMT");
header("Expires: ".gmdate("D, d M Y H:i:s",time()+3600)." GMT");</pre>
<p>This file holds the <strong>require_once</strong> declarations for all the models, controllers and helper files. It also defines a few headers to enable caching in the browser (PHP disables caching by default), which speeds up the performance of the jQuery mobile framework.</p>
<h3>Continue to Part 2</h3>
<p>With this the first part of the tutorial is complete! <a title="Continue to Part 2" href="http://tutorialzine.com/2011/08/jquery-mobile-mvc-website-part-2/">Continue to part 2</a>, where we will be writing the views and incorporate jQuery Mobile. Feel free to share your thoughts and suggestions in the comment section below.</p>
<div><a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=bKLRMLHA3RM:SMCU_jJFoS4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?d=yIl2AUoC8zA" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=bKLRMLHA3RM:SMCU_jJFoS4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=bKLRMLHA3RM:SMCU_jJFoS4:D7DqB2pKExk" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=bKLRMLHA3RM:SMCU_jJFoS4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=bKLRMLHA3RM:SMCU_jJFoS4:F7zBnMyn0Lo" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=bKLRMLHA3RM:SMCU_jJFoS4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=bKLRMLHA3RM:SMCU_jJFoS4:V_sGLiPBpWU" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=bKLRMLHA3RM:SMCU_jJFoS4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=bKLRMLHA3RM:SMCU_jJFoS4:gIN9vFwOqvQ" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=bKLRMLHA3RM:SMCU_jJFoS4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?d=qj6IDK7rITs" alt="" border="0" /></a></div>
<p><img src="http://feeds.feedburner.com/%7Er/Tutorialzine/%7E4/bKLRMLHA3RM" alt="" width="1" height="1" /></div>
</li>
<li>
<h4><a href="http://feedproxy.google.com/%7Er/Tutorialzine/%7E3/goCyzHmtUGw/">Display your Favorite Tweets using PHP and jQuery</a></h4>
<h5>Posted: Fri, 05 Aug 2011 14:22:01 +0000</h5>
<div>
<div><a href="http://tutorialzine.com/2011/08/display-favorite-tweets-php-css/"><img src="http://cdn.tutorialzine.com/img/featured/1559.jpg" alt="" /></a></div>
<p>If you have a twitter account, you oftentimes find yourself looking for a way to display your latest tweets on your website or blog. This is pretty much a solved problem. There are jQuery plugins, PHP classes and <a href="http://tutorialzine.com/2009/10/jquery-twitter-ticker/" target="_blank">tutorials</a> that show you how to do this.</p>
<p>However, what happens if you only want to display certain tweets, that you have explicitly marked to show? As minimalistic twitter’s feature set is, it does provide a solution to this problem – favorites.</p>
<p>In this tutorial, we will be writing a PHP class that will fetch, cache, and display your favorite tweets in a beautiful CSS3 interface.</p>
<h3>HTML</h3>
<p>You can see the markup of the page that we will be using as a foundation below. The <strong>#container</strong> div will hold the tweets (which we will be generating in the PHP section of the tutorial).</p>
<h4>index.php</h4>
<pre>&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;meta charset="utf-8" /&gt;
        &lt;title&gt;Display your Favorite Tweets using PHP and jQuery | Tutorialzine Demo&lt;/title&gt;

        &lt;!-- Our CSS stylesheet file --&gt;
        &lt;link rel="stylesheet" href="assets/css/styles.css" /&gt;

        &lt;!--[if lt IE 9]&gt;
          &lt;script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt;
        &lt;![endif]--&gt;
    &lt;/head&gt;

    &lt;body&gt;

		&lt;div id="container"&gt;
	        &lt;!-- The tweets will go here --&gt;
        &lt;/div&gt;

        &lt;!-- JavaScript includes --&gt;
		&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"&gt;&lt;/script&gt;
        &lt;script src="assets/js/jquery.splitlines.js"&gt;&lt;/script&gt;
        &lt;script src="assets/js/script.js"&gt;&lt;/script&gt;

    &lt;/body&gt;
&lt;/html&gt;</pre>
<p>We will be using the <a href="http://42pixels.com/demos/splitlines/demos.html" target="_blank">splitLines plugin</a>, which as its name suggest, will split the tweets into separate divs, one for each line of text. This is necessary as it is the only we can apply padding to the lines individually (as an illustration, view the demo with JS disabled). However, the demo will still keep most of its design without it.</p>
<p>As for the generation of the tweets, we will be creating a PHP class that will handle it for us. We will only need to call its generate method inside the <strong>#container</strong> div like this: <code>$tweets-&gt;generate(5)</code>, which will show the 5 most recent liked tweets. This method will output an unordered list with tweets:</p>
<h4>Tweet markup</h4>
<pre>&lt;ul&gt;
&lt;li&gt;
	&lt;p&gt;The text of the tweet goes here&lt;/p&gt;
	&lt;div&gt;
		&lt;a title="Go to Tutorialzine's twitter page"
			href="http://twitter.com/Tutorialzine"&gt;Tutorialzine&lt;/a&gt;

		&lt;span title="Retweet Count"&gt;19&lt;/span&gt;

		&lt;a title="Shared 3 days ago" target="_blank"
			href="http://twitter.com/Tutorialzine/status/98439169621241856"&gt;3 days ago&lt;/a&gt;
	&lt;/div&gt;

	&lt;div&gt;&lt;/div&gt;

&lt;/li&gt;

&lt;!-- More tweets here .. --&gt;

&lt;/ul&gt;</pre>
<p>The text of the tweet will be held in a paragraph, with additional information available in the <strong>.info</strong> div. Now lets write the PHP class.</p>
<div id="attachment_1564"><a href="http://demo.tutorialzine.com/2011/08/display-favorite-tweets-php-css/"><img title="Display Your Favorite Tweets with jQuery and PHP" src="http://cdn.tutorialzine.com/wp-content/uploads/2011/08/display-favorite-tweets-php-jquery-css.jpg" alt="Display Your Favorite Tweets with jQuery and PHP" width="620" height="460" /></a>Display Your Favorite Tweets with jQuery and PHP</p>
</div>
<h3>PHP</h3>
<p>We will name our class <strong><em>FavoriteTweetsList</em></strong>. It will take a twitter username as a parameter, and expose a number of useful methods for fetching tweets and generating HTML markup.</p>
<p>The class will fetch the favorite tweets json feed, located at <em>http://api.twitter.com/1/favorites/<strong>USERNAME</strong>.json</em> (see <a href="http://api.twitter.com/1/favorites/Tutorialzine.json">Tutorialzine’s feed</a> as an example). Additionally, it will include caching, so that a request is made only once every three hours, which will speed things up.</p>
<h4>FavoriteTweetsList.class.php</h4>
<pre>class FavoriteTweetsList{
	private $username;
	const cache = "cache_tweets.ser";

	public function __construct($username){
		$this-&gt;username = $username;
	}

	/* The get method returns an array of tweet objects */

	public function get(){

		$cache = self::cache;
		$tweets = array();

		if(file_exists($cache) &amp;&amp; time() - filemtime($cache) &lt; 3*60*60){

			// Use the cache if it exists and is less than three hours old
			$tweets = unserialize(file_get_contents($cache));
		}
		else{

			// Otherwise rebuild it
			$tweets = json_decode($this-&gt;fetch_feed());
			file_put_contents($cache,serialize($tweets));
		}

		if(!$tweets){
			$tweets = array();
		}

		return $tweets;
	}

	/* The generate method takes an array of tweets and build the markup */

	public function generate($limit=10, $className = 'tweetFavList'){

		echo "&lt;ul class='$className'&gt;";

		// Limiting the number of shown tweets
		$tweets = array_slice($this-&gt;get(),0,$limit);

		foreach($tweets as $t){

			$id			= $t-&gt;id_str;
			$text		= self::formatTweet($t-&gt;text);
			$time		= self::relativeTime($t-&gt;created_at);
			$username	= $t-&gt;user-&gt;screen_name;
			$retweets	= $t-&gt;retweet_count;

			?&gt;

			&lt;li&gt;
				&lt;p&gt;&lt;?php echo $text ?&gt;&lt;/p&gt;
				&lt;div&gt;
					&lt;a href="http://twitter.com/&lt;?php echo $username ?&gt;"
						title="Go to &lt;?php echo $username?&gt;'s twitter page"&gt;
                    	                    	&lt;?php echo $username ?&gt;&lt;/a&gt;

					&lt;?php if($retweets &gt; 0):?&gt;
						&lt;span title="Retweet Count"&gt;
                    	                    	&lt;?php echo $retweets ?&gt;&lt;/span&gt;
					&lt;?php endif;?&gt;

					&lt;a href="http://twitter.com/&lt;?php echo $username,'/status/',$id?&gt;"
                    	class="date" target="_blank" title="Shared &lt;?php echo $time?&gt;"&gt;
                    	&lt;?php echo $time?&gt;&lt;/a&gt;
				&lt;/div&gt;

                &lt;div&gt;&lt;/div&gt;

            &lt;/li&gt;

            &lt;?php
		}

		echo "&lt;/ul&gt;";
	}

	/* Helper methods and static functions */

	private function fetch_feed(){
		return file_get_contents("http://api.twitter.com/1/favorites/{$this-&gt;username}.json");
	}

	private static function relativeTime($time){

		$divisions	= array(1,60,60,24,7,4.34,12);
		$names		= array('second','minute','hour','day','week','month','year');
		$time		= time() - strtotime($time);

		$name = "";

		if($time &lt; 10){
			return "just now";
		}

		for($i=0; $i&lt;count($divisions); $i++){
			if($time &lt; $divisions[$i]) break;

			$time = $time/$divisions[$i];
			$name = $names[$i];
		}

		$time = round($time);

		if($time != 1){
			$name.= 's';
		}

		return "$time $name ago";
	}

	private static function formatTweet($str){

		// Linkifying URLs, mentionds and topics. Notice that
		// each resultant anchor type has a unique class name.

		$str = preg_replace(
			'/((ftp|https?):\/\/([-\w\.]+)+(:\d+)?(\/([\w\/_\.]*(\?\S+)?)?)?)/i',
			'&lt;a href="$1" target="_blank"&gt;$1&lt;/a&gt;',
			$str
		);

		$str = preg_replace(
			'/(\s|^)@([\w\-]+)/',
			'$1&lt;a href="http://twitter.com/#!/$2" target="_blank"&gt;@$2&lt;/a&gt;',
			$str
		);

		$str = preg_replace(
			'/(\s|^)#([\w\-]+)/',
			'$1&lt;a href="http://twitter.com/search?q=%23$2"&gt;#$2&lt;/a&gt;',
			$str
		);

		return $str;
	}
}</pre>
<p>Of the methods above, <code>generate()</code> is the one that you will most likely be working with directly. It takes the number of tweets to be displayed, and an optional <strong>class</strong> parameter, that overrides the default class attribute of the unordered list.</p>
<p>Now that we have the <strong>FavoriteTweetsList</strong> class in place, we simply need to instantiate an object, passing it a twitter username, like this:</p>
<h4>index.php</h4>
<pre>require "includes/FavoriteTweetsList.class.php";

$tweets = new FavoriteTweetsList('Tutorialzine');</pre>
<p>Calling the <code>$tweets-&gt;generate()</code> will show that user’s latest faved tweets.</p>
<h3>jQuery</h3>
<p>As we are using the <em>splitLines</em> jQuery plugin, we already have most of the work done for us. We simply have to loop through the paragraph elements holding the text of the tweets, and call the plugin.</p>
<h4>script.js</h4>
<pre>$(function(){
	var width = $('ul.tweetFavList p').outerWidth();

	// Looping through the p elements
	// and calling the splitLines plugin

	$('ul.tweetFavList p').each(function(){
		$(this).addClass('sliced').splitLines({width:width});
	});
});</pre>
<p>This will split the contents of the paragraph into lines, each held in an individual div, which we can style.</p>
<h3>CSS</h3>
<p>First lets style the unordered list and the paragraph elements.</p>
<h4>styles.css – 1</h4>
<pre>ul.tweetFavList{
	margin:0 auto;
	width:600px;
	list-style:none;
}

ul.tweetFavList p{
	background-color: #363636;
	color: #FFFFFF;
	display: inline;
	font-size: 28px;
	line-height: 2.25;
	padding: 10px;
}

/* Coloring the links differently */

ul.tweetFavList a.link		{ color:#aed080;}
ul.tweetFavList a.mention	{ color:#6fc6d9;}
ul.tweetFavList a.hash		{ color:#dd90e9;}</pre>
<p>If you take a closer look at the <strong>formatTweet()</strong> static method in the PHP class, you will see that we are adding a class name for each type of hyperlink – a regular link, a mention or a hash, so we can style them differently.</p>
<p>When the page loads, jQuery adds <strong><em>sliced</em></strong> as a class to each paragraph. This class undoes some of the styling applied to the paragraphs by default as a fallback, so we can display the individual lines properly.</p>
<h4>styles.css – 2</h4>
<pre>/* The sliced class is assigned by jQuery */

ul.tweetFavList p.sliced{
	background:none;
	display:block;
	padding:0;
	line-height:2;
}

/* Each div is a line generated by the splitLines plugin */

ul.tweetFavList li p div{
	background-color: #363636;
	box-shadow: 2px 2px 2px rgba(33, 33, 33, 0.5);
	display: inline-block;
	margin-bottom: 6px;
	padding: 0 10px;
	white-space: nowrap;
}</pre>
<p>Next we will style the colorful information boxes that hold the <em>author username</em>, <em>publish date</em> and <em>retweet count</em>.</p>
<h4>styles.css – 3</h4>
<pre>ul.tweetFavList .info{
	overflow: hidden;
	padding: 15px 0 5px;
}

/* The colorful info boxes */

ul.tweetFavList .user,
ul.tweetFavList .retweet,
ul.tweetFavList .date{
	float:left;
	padding:4px 8px;
	color:#fff !important;
	text-decoration:none;
	font-size:11px;
	box-shadow: 1px 1px 1px rgba(33, 33, 33, 0.3);
}

ul.tweetFavList .user{
	background-color:#6fc6d9;
}

ul.tweetFavList .retweet{
	background-color:#dd90e9;
	cursor:default;
}

ul.tweetFavList .date{
	background-color:#aed080;
}</pre>
<p>And finally we will style the divider. This is a single div, but thanks to <code>:before</code>/<code>:after</code> pseudo elements, we add two more circles to the left and to the right of it.</p>
<h4>styles.css – 4</h4>
<pre>/* Styling the dotted divider */

ul.tweetFavList .divider,
ul.tweetFavList .divider:before,
ul.tweetFavList .divider:after{
	background-color: #777777;
	border-radius: 50% 50% 50% 50%;
	height: 12px;
	margin: 60px auto 80px;
	width: 12px;
	position:relative;
	box-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
}

ul.tweetFavList .divider:before,
ul.tweetFavList .divider:after{
	margin:0;
	position:absolute;
	content:'';
	top:0;
	left:-40px;
}

ul.tweetFavList .divider:after{
	left:auto;
	right:-40px;
}

ul.tweetFavList li:last-child .divider{
	display:none;
}</pre>
<p>With this our favorited tweet list is complete!</p>
<h3>Done</h3>
<p>This example can be used to build a simple testimonials section, or to highlight tweets that you think your readers would find worthy. You can even see it implemented on the sidebar of this very site.</p>
<div><a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=goCyzHmtUGw:7-vw4sQ7aH0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?d=yIl2AUoC8zA" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=goCyzHmtUGw:7-vw4sQ7aH0:D7DqB2pKExk"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=goCyzHmtUGw:7-vw4sQ7aH0:D7DqB2pKExk" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=goCyzHmtUGw:7-vw4sQ7aH0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=goCyzHmtUGw:7-vw4sQ7aH0:F7zBnMyn0Lo" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=goCyzHmtUGw:7-vw4sQ7aH0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=goCyzHmtUGw:7-vw4sQ7aH0:V_sGLiPBpWU" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=goCyzHmtUGw:7-vw4sQ7aH0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=goCyzHmtUGw:7-vw4sQ7aH0:gIN9vFwOqvQ" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=goCyzHmtUGw:7-vw4sQ7aH0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?d=qj6IDK7rITs" alt="" border="0" /></a></div>
<p><img src="http://feeds.feedburner.com/%7Er/Tutorialzine/%7E4/goCyzHmtUGw" alt="" width="1" height="1" /></div>
</li>
<li>
<h4><a href="http://feedproxy.google.com/%7Er/Tutorialzine/%7E3/q1wI213lUJI/">Bubble Slideshow Effect with jQuery</a></h4>
<h5>Posted: Thu, 28 Jul 2011 19:41:06 +0000</h5>
<div>
<div><a href="http://tutorialzine.com/2011/07/bubble-slideshow-jquery-css/"><img src="http://cdn.tutorialzine.com/img/featured/1551.jpg" alt="" /></a></div>
<p>Today we will be building a jQuery-powered bubble animation effect. It will be a great way to present a set of images on your website as a interesting slideshow. And as the code will be completely modular, you will be able to easily use it and modify it.</p>
<h3>The HTML</h3>
<p>The slideshow effect we will be creating today, will take the form of an easy to use jQuery plugin. As most of the work is done by the plugin, there isn’t much to do in this section. However, to use the plugin you need to add an unordered list on your page. The individual slides of the slideshow will be added as LI elements.</p>
<h4>index.html</h4>
<pre>&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;meta charset="utf-8" /&gt;
        &lt;title&gt;Bubble Slideshow Effect with jQuery | Tutorialzine Demo&lt;/title&gt;

        &lt;!-- Our CSS stylesheet file --&gt;
        &lt;link rel="stylesheet" href="assets/css/styles.css" /&gt;

        &lt;!-- The plugin stylehseet --&gt;
        &lt;link rel="stylesheet" href="assets/jquery.bubbleSlideshow/jquery.bubbleSlideshow.css" /&gt;

        &lt;!--[if lt IE 9]&gt;
          &lt;script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt;
        &lt;![endif]--&gt;
    &lt;/head&gt;

    &lt;body&gt;

        &lt;!-- The bubble slideshow holder --&gt;
		&lt;ul id="slideShow"&gt;&lt;/ul&gt;

		&lt;!-- JavaScript includes --&gt;
		&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"&gt;&lt;/script&gt;
        &lt;script src="assets/jquery.bubbleSlideshow/bgpos.js"&gt;&lt;/script&gt;
        &lt;script src="assets/jquery.bubbleSlideshow/jquery.bubbleSlideshow.js"&gt;&lt;/script&gt;
        &lt;script src="assets/js/script.js"&gt;&lt;/script&gt;

    &lt;/body&gt;
&lt;/html&gt;</pre>
<p>To be able to use the plugin, you will need to include <em>jquery.bubbleSlideshow.css</em> in the head of the page, <em>bgpos.js</em> and <em>jquery.bubbleSlideshow.js</em> before the closing body tag. <a href="https://github.com/brandonaaron/jquery-cssHooks" target="_blank">bgpos.js</a> is a jQuery CSS hooks plugin that will allow us to animate the <em>background-position</em> property (needed in the bubble animation), and <em>jquery.bubbleSlideshow.js</em> holds the code we will be writing today.  Also remember to include the jQuery library as well.</p>
<p>You can see a simple explanation of the bubble effect below.</p>
<div id="attachment_1555"><a href="http://demo.tutorialzine.com/2011/07/bubble-slideshow-jquery-css/"><img title="The Bubble Effect Explained" src="http://cdn.tutorialzine.com/wp-content/uploads/2011/07/the-bubble-effect-explained.jpg" alt="The Bubble Effect Explained" width="620" height="460" /></a>The Bubble Effect Explained</p>
</div>
<h3>JavaScript and jQuery</h3>
<p>First we will write a JavaScript class named <em>Bubble</em>. Every bubble in the slideshow is going to be an object of this class. It will have properties such as <strong>top</strong> and <strong>left</strong> (position offsets), <strong>size</strong> (diameter of the circle) and an <strong>elem</strong> property, which is a jQuery object containing the actual div. We will use this property later when we animate the bubble in the <code>flyFrom()</code> method.</p>
<h4>jquery.bubbleSlideshow.js</h4>
<pre>	// This is the Bubble class. It takes left and top
	// coordinates, size (diameter) and a image URL

	function Bubble( left, top, size, imgURL ){

		this.top	= top;
		this.left	= left;
		this.size	= size;

		// This places the center of the
		// circles on the specified position:

		top -= size/2;
		left-= size/2;

		this.elem = $('&lt;div&gt;',{
			'class':'bubble',
			'css'	: {
				'width'		: size,
				'height'	: size,
				'top'		: top,
				'left'		: left,
				'background-position': (-left)+'px '+(-top)+'px',
				'background-image': 'url('+imgURL+')'
			}
		});

	}

	// The fly from method takes a starting position, time,
	// and a callback function, executed when the animation finishes.

	Bubble.prototype.flyFrom = function( startX, startY, time, callBack ){

		time = time || 250;
		callBack = callBack || function(){};

		startX -= this.size/2;
		startY -= this.size/2;

		// Offsetting the element

		this.elem.css({
			'display'				: 'block',
			'backgroundPositionX'	: -startX,
			'backgroundPositionY'	: -startY,
			'left'					: startX,
			'top'					: startY
		});

		// Animating it to where it should be

		this.elem.animate({
			'backgroundPositionX'	: -this.left,
			'backgroundPositionY'	: -this.top,
			'left'					: this.left,
			'top'					: this.top
		}, time, 'easeOutCirc', callBack );

	};

	// Helper function for generating random
	// values in the [min,max] range

	function rand( min, max ){
		return Math.floor( Math.random()*((max+1)-min) + min);
	}</pre>
<p>The <code>flyFrom()</code> method takes a set of coordinates, that determine the position the bubble <strong>flies in from</strong>. It still ends up in the position that you specify when creating it. This method is defined on the Bubble function’s prototype, which automatically makes it available to all its instances. This is a more effective approach, as only one copy of this method exists at a time, instead of a copy of this method for each object. Also, notice the <code>rand()</code> function defined at the bottom of the fragment. It mimics the PHP function of the same name and is used throughout the plugin code.</p>
<p>Now that we have the class in place, lets write a function that creates an array with bubble objects, appends them to a new LI element, and animates them. The function takes three parameters:</p>
<ul>
<li><strong>stage</strong>, which is a jQuery object that holds a UL element. This will hold the slideshow, with each slide being an individual LI;</li>
<li><strong>imgURL</strong> is the URL of the image that will be shown in the bubbles;</li>
<li><strong>func</strong> is a callback function that will be called once all bubble animations are complete. This is used to switch the slides and destroy the bubbles, as they will not be needed after the transition to the new slide is complete;</li>
</ul>
<p>As you guessed, for every slide transition, a new random set of bubbles is created, and destroyed after the next slide is made visible.</p>
<div id="attachment_1556"><a href="http://demo.tutorialzine.com/2011/07/bubble-slideshow-jquery-css/"><img title="Bubble Slideshow Effect" src="http://cdn.tutorialzine.com/wp-content/uploads/2011/07/bubble-effect-jquery-css.jpg" alt="Bubble Slideshow Effect" width="620" height="460" /></a>Bubble Slideshow Effect</p>
</div>
<h4>jquery.bubbleSlideshow.js</h4>
<pre>	function showBubbles( stage, imgURL, func ){

		// This function appends a new LI element to the UL
		// and uses it to hold and animate the bubbles.

		var i = 0,
			bubbles = [],
			totalBubbles = 75,
			stageWidth = stage.outerWidth(),
			stageHeight = stage.outerHeight(),
			emptyFunc = function(){};

		// This li holds the bubbles
		var li = $('&lt;li&gt;').appendTo(stage);

		// This function is passed to the flyFrom method call:

		var callBack = function(){

			// Waiting for the func function to
			// finish and removing the li.

			$.when(func()).then(function(){
				li.remove();
			});
		};

		for( i=0; i&lt;totalBubbles; i++ ){

			var x	 = rand(0, stageWidth),
				y	 = rand(0,stageHeight),
				size = rand(30,150);

			var bubble = new Bubble( x, y, size, imgURL );
			li.append(bubble.elem);

			bubbles.push(bubble);
		}

		// Sorting the bubbles so that the
		// bubbles closest to the top border of
		// the image come first:

		bubbles = bubbles.sort(function( b1, b2 ){
			return b1.top+b1.size/2 &gt; b2.top+b2.size/2;
		});

		// Looping through all the bubbles,
		// and triggering their flyFrom methods

		for( i=0; i&lt;bubbles.length; i++){

			(function( bubble, i ){
				setTimeout(function(){

					bubble.flyFrom(
						stageWidth/2,
						stageHeight+200,
						250,
						(i == bubbles.length-1) ? callBack : emptyFunc
					);

				// This Math.floor schedules five bubbles
				// to be animated simultaneously

				}, Math.floor(i/5)*100); 

			})( bubbles[i], i );
		}
	}</pre>
<p>Great! So now we have a function that creates a set of bubbles in a new LI element and animates them. But these are only functions, they are not a plugin yet, so we will have to work on that. Also we are still missing the slides themselves. Lets write the missing pieces:</p>
<h4>jquery.bubbleSlideshow.js</h4>
<pre>$.fn.bubbleSlideshow = function(photos){

		if(!$.isArray(photos)){
			throw new Error("You need to pass an array of photo URLs as a parameter!");
		}

		photos = photos.reverse();

		var ul = this.addClass('bubbleSlideshow');

		$.each(photos,function(){
			ul.append('&lt;li&gt;&lt;img src="'+this+'" /&gt;&lt;/li&gt;');
		});

		// These methods are available externally and
		// can be used to control the bubble slideshow

		ul.showNext = function(){
			showNext(ul);
		};

		ul.showPrev = function(){
			showPrev(ul);
		};

		ul.autoAdvance = function(timeout){
			timeout = timeout || 6000;
			autoAdvance(ul,timeout);
		};

		ul.stopAutoAdvance = function(){
			stopAutoAdvance(ul);
		};

		return ul;
	};</pre>
<p>The code above defines a new plugin called <code>bubbleSlideshow()</code>. It should be called on a UL element and takes an array of photo URLs as its parameter. These are added to the UL.</p>
<p>Inside its body, the plugin creates a new LI element for each of the photos in the array, and adds <strong>showNext</strong>, <strong>showPrev</strong>, <strong>autoAdvance</strong> and <strong>stopAutoAdvance</strong> methods to the UL. These wrap around local functions with the same names, which you can see below:</p>
<h4>jquery.bubbleSlideshow.js</h4>
<pre>	function autoAdvance(stage,timeout){
		stage.data('timeout',setTimeout(function(){
			showNext(stage);
			autoAdvance(stage,timeout);
		},timeout));
	}

	function stopAutoAdvance(stage){
		clearTimeout(stage.data('timeout'));
	}

	function showNext(stage){
		showFrame(stage, stage.find('li.bubbleImageFrame').first());
	}

	function showPrev(stage){
		showFrame(stage, stage.find('li.bubbleImageFrame').last().prev());
	}

	function showFrame(stage, frame ){

		// This function shows a frame,
		// passed as a jQuery object

		if(stage.data('working')){
			// Prevents starting more than
			// one animation at a time:
			return false;
		}
		stage.data('working',true);

		var frame = frame.hide().detach();

		// Using the showBubbles function, defined below.
		// The frame is showed after the bubble animation is over.

		showBubbles( stage, frame.find('img').attr('src'), function(){
			stage.append(frame);
			stage.data('working',false);

			// This returns a jQuery Promise object.
			return frame.fadeIn('slow');
		});		

	}</pre>
<p>I used <em>“local”</em> to describe these functions, because they are not available from outside the plugin. The <strong>showNext</strong> and <strong>showPrev </strong>functions above both call <strong>showFrame</strong>, passing it the UL and the LI slide that is to be shown. <strong>showFrame </strong>makes sure that there is only one animation running at a time, and calls the <strong>showBubbles </strong>function we already wrote.</p>
<p>The callback function that is passed along with the method call, displays the slide you want to show above all the others by appending it last in the UL (the slides are absolutely positioned, which means that the last element in the UL is shown on top). This function is called once the bubble animation completes.</p>
<p>Here is how you initialize the bubble slideshow:</p>
<h4>script.js</h4>
<pre>$(function(){
	var photos = [
		'http://farm6.static.flickr.com/5230/5822520546_dd2b6d7e24_z.jpg',
		'http://farm5.static.flickr.com/4014/4341260799_b466a1dfe4_z.jpg',
		'http://farm6.static.flickr.com/5138/5542165153_86e782382e_z.jpg',
		'http://farm5.static.flickr.com/4040/4305139726_829be74e29_z.jpg',
		'http://farm4.static.flickr.com/3071/5713923079_60f53b383f_z.jpg',
		'http://farm5.static.flickr.com/4108/5047301420_621d8a7912_z.jpg'
	];

	var slideshow = $('#slideShow').bubbleSlideshow(photos);

	$(window).load(function(){
		slideshow.autoAdvance(5000);
	});

	// Other valid method calls:

	// slideshow.showNext();
	// slideshow.showPrev();
	// slideshow.stopAutoAdvance();
});</pre>
<p>All that is left is to define a few CSS rules that add properties such positioning, overflows and background-positions:</p>
<h4>jquery.bubbleSlideshow.css</h4>
<pre>ul.bubbleSlideshow{
	position:relative;
	list-style:none;
	overflow:hidden;
}

.bubbleSlideshow li{
	position:absolute;
	top:0;
	left:0;
}

.bubbleSlideshow li img{
	display:block;
}

.bubbleSlideshow li div.bubble{
	-moz-border-radius:50%;
	-webkit-border-raidus:50%;
	border-radius:50%;

	background-repeat:no-repeat;
	display:none;
	position:absolute;
}</pre>
<p><strong>With this the bubble effect slideshow is complete!</strong></p>
<h3>Final words</h3>
<p>The effect we made today may not be limited only to slideshows. It can be used to build unique website backgrounds, headers and presentations. The plugin is built to automatically resize to fit the UL, so you can easily change its size by tweaking a few CSS properties.</p>
<div><a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=q1wI213lUJI:Dkixhz1NW3M:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?d=yIl2AUoC8zA" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=q1wI213lUJI:Dkixhz1NW3M:D7DqB2pKExk"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=q1wI213lUJI:Dkixhz1NW3M:D7DqB2pKExk" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=q1wI213lUJI:Dkixhz1NW3M:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=q1wI213lUJI:Dkixhz1NW3M:F7zBnMyn0Lo" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=q1wI213lUJI:Dkixhz1NW3M:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=q1wI213lUJI:Dkixhz1NW3M:V_sGLiPBpWU" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=q1wI213lUJI:Dkixhz1NW3M:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=q1wI213lUJI:Dkixhz1NW3M:gIN9vFwOqvQ" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=q1wI213lUJI:Dkixhz1NW3M:qj6IDK7rITs"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?d=qj6IDK7rITs" alt="" border="0" /></a></div>
<p><img src="http://feeds.feedburner.com/%7Er/Tutorialzine/%7E4/q1wI213lUJI" alt="" width="1" height="1" /></div>
</li>
<li>
<h4><a href="http://feedproxy.google.com/%7Er/Tutorialzine/%7E3/0ZEZZLnidhk/">Having Fun With CSS3: Spinning Newspapers</a></h4>
<h5>Posted: Thu, 21 Jul 2011 18:11:40 +0000</h5>
<div>
<div><a href="http://tutorialzine.com/2011/07/spinning-newspaper-effect-css3/"><img src="http://cdn.tutorialzine.com/img/featured/1543.jpg" alt="" /></a></div>
<p>Imagine a cop drama taking place in the 1930s. After a streak of bank heists, a young detective is given the case of his life. He accepts the challenge, and after grueling months of hard work and life-threatening situations, he manages to bring the bad guys to justice.</p>
<p>What follows is a classical device used by film makers of the period – newspapers flashing and spinning towards the camera, praising the heroic feats of our protagonist.</p>
<p>So lets have some fun and build this classical scene using the CSS3 animations capabilities of the new versions of Firefox, Chrome and Safari, picking useful techniques along the way.</p>
<h3>The Idea</h3>
<p>Using JavaScript, we will load a sliced up version of the newspaper (slices are independently encoded as PNG or JPG for smaller filesize), and combine them in a single canvas element. We will also load a custom font from <a href="https://developer.mozilla.org/en/CSS/CSS_animations" target="_blank">Google WebFonts</a>, which we use to write the article title to the canvas.</p>
<p>We also define a simple CSS3 keyframe animation, which uses transformations such as <code>scale()</code> and <code>rotate()</code> to animate the canvas elements. Appending the canvas to the page triggers the animation, which means we don’t need to write a single line of JavaScript for the effect itself.</p>
<p>Currently, CSS3 keyframe animations are supported by Firefox, Safari and Chrome, so if you are using a recent version of one of these browsers, you will be able to enjoy the demo.</p>
<p>Here are some minor considerations that drove the decisions above:</p>
<ul>
<li>The image of the newspaper, encoded as PNG, weighs at over 250kb. Slicing it into independently encoded slices saves 200kb, as the center part does need transparency and is encoded as JPEG;</li>
<li>Rotating a bunch of DOM elements is slower than a single canvas element. Also, rotated text in the browser generally does not look very good, as letters may lose their anti-aliasing (see a <a href="http://jsfiddle.net/martinaglv/mXr3B/" target="_blank">simple experiment here</a>; it is most pronounced in Firefox). Painting the text and the newspaper background to a <code>canvas</code> element solves both of these problems;</li>
</ul>
<div id="attachment_1547"><a href="http://demo.tutorialzine.com/2011/07/spinning-newspaper-effect-css3/"><img title="The Sliced Newspaper Background" src="http://cdn.tutorialzine.com/wp-content/uploads/2011/07/the-slices-spinning-newspaper-effect.jpg" alt="The Sliced Newspaper Background" width="620" height="320" /></a>The Sliced Newspaper Background</p>
</div>
<h3>The HTML</h3>
<p>The markup of the page is minimal – everything is done using jQuery, so we only need to include our JS source files and stylesheets.</p>
<h4>index.html</h4>
<pre>&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;meta charset="utf-8" /&gt;
        &lt;title&gt;Spinning Newspaper Effect | Tutorialzine Demo&lt;/title&gt;

        &lt;!-- Our CSS stylesheet file --&gt;
        &lt;link rel="stylesheet" href="assets/css/styles.css" /&gt;

		&lt;!-- Embedding the Anton font from Google Webfonts --&gt;
        &lt;link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Anton&amp;v2" /&gt;

        &lt;!--[if lt IE 9]&gt;
          &lt;script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt;
        &lt;![endif]--&gt;
    &lt;/head&gt;

    &lt;body&gt;

		&lt;h3 id="fin"&gt;That is all&lt;/h3&gt;

		&lt;!--
			This div uses the "Anton" font,
			preloading it for the canvas element
        --&gt;
		&lt;div id="fontPreload"&gt;.&lt;/div&gt;

        &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"&gt;&lt;/script&gt;
        &lt;script src="assets/js/script.js"&gt;&lt;/script&gt;

    &lt;/body&gt;
&lt;/html&gt;</pre>
<p>In the head section, we include our <strong>styles.css</strong> file (discussed below) and a stylsheet, which embeds the <a href="http://www.google.com/webfonts/specimen/Anton" target="_blank">Anton font</a> from Google WebFonts. Near the end of the file, we include version 1.6.2 of the <strong>jQuery library</strong> and our <strong>script.js</strong> (discussed in detail later on).</p>
<p>The most important piece of markup in the code is also the most unassuming. The <code>#fontPreload</code> div is crucial for this example. What it does is use the embedded <em>Anton</em> web font. This is required so that browsers properly initializes the font before it is used in the canvas. Without it we would be staring at a blank newspaper cover.</p>
<div id="attachment_1548"><a href="http://demo.tutorialzine.com/2011/07/spinning-newspaper-effect-css3/"><img title="Spinning Newspaper Effect with CSS3 Animations" src="http://cdn.tutorialzine.com/wp-content/uploads/2011/07/spinning-newspaper-effect-css3-animations.jpg" alt="Spinning Newspaper Effect with CSS3 Animations" width="620" height="460" /></a>Spinning Newspaper Effect with CSS3 Animations</p>
</div>
<h3>The jQuery</h3>
<p>As we are using a custom web font, we need to be sure that the font is loaded before we use it to generate the newspaper titles. This is why we are binding a callback to the <code>$(window).load()</code> event, which is called once everything is loaded:</p>
<h4>assets/js/script.js</h4>
<pre>$(window).load(function(){

	var imgPath = "assets/img/";

	// Define 6 paper covers:

	var papers = [
		{
			line1:"The financial",
			line2:"chrisis is a hoax!",
			subtitle:"Economist admits practical joke"
		}, {
			line1:"Deeply fried now",
			line2:"considered healthy",
			subtitle:"Scientists change the definition of \"Healthy\""
		}, {
			line1:"Apple announces",
			line2:"the new iphone 9",
			subtitle:"5, 6, 7 and 8 deemed \"not hip enough\""
		}, {
			line1:"The world did end",
			line2:"on may 21st!",
			subtitle:"Priest argues we are actually dead"
		}, {
			line1:"France imposes an",
			line2:"internet kitten tax",
			subtitle:"Every cat picture on the internet will cost 3 €"
		}, {
			line1:"Thank you &amp;",
			line2:"goodbye",
			subtitle:"The Zine Weekly takes its farewell"
		}
	];

	// Check whether canvas and CSS3 animations are supported:

	if(!$.support.canvas){
		$('#fin').html('Sorry, your browser does not&lt;br /&gt;support &amp;lt;canvas&amp;gt;').show();
		return;
	}

	if(!$.support.css3Animation){
		$('#fin').html('Sorry, your browser does not&lt;br /&gt;support CSS3 Animations').show();
		return;
	}

	// Use jQuery.Deferred to bind a callback when all
	// the images that comprise the paper are loaded:

	$.when(

		loadImage(imgPath+"paper_top.png"),
		loadImage(imgPath+"paper_left.png"),
		loadImage(imgPath+"paper_center.jpg"),
		loadImage(imgPath+"paper_right.png"),
		loadImage(imgPath+"paper_bottom.png")

	).then(function( imgTop, imgLeft, imgCenter, imgRight, imgBottom ){

		// Loop through the paper covers and
		// create a new canvas for each one:

		$.each(papers,function(i){

			var canvas	= document.createElement("canvas"),
				c		= canvas.getContext("2d");

			canvas.width = 717;
			canvas.height = 526;

			// Drawing the paper background slices:

			c.drawImage( imgTop, 0, 0 );
			c.drawImage( imgLeft, 0, 12 );
			c.drawImage( imgCenter, 14, 12 );
			c.drawImage( imgRight, 711, 12 );
			c.drawImage( imgBottom, 0, 516 );

			// Drawing the text using our helper
			// function (see at the bottom):

			drawText( this.line1, this.line2, this.subtitle, c, 358, 250 );

			// Appending the element to the page.
			// This triggers the CSS3 animation.

			setTimeout(function(){
				$("body").append(canvas);
			},i*5800);

		});

		// "This is all"
		$('#fin').delay(papers.length*5800).fadeIn();
	});

	/*------------------------
		Helper functions
	------------------------*/

	// Load an image by URL and resolve a jQuery.Deferred:

	function loadImage(src){

		var def = new $.Deferred(),
			img = new Image();

		img.onload = function(){

			//	Resolve the deferred. The img parameter
			//	will be available in the then function:

			def.resolve(img);
		}

		// Always set the src attribute
		// after the onload callback:

		img.src = src;

		return def.promise();
	}

	// Draw two lines of text and a subtitle
	// on the canvas (passed as the c param):

	function drawText( line1, line2, subtitle, c, x, y ){

		c.font = "65px Anton,Calibri";
		c.textAlign = "center";
		c.fillStyle = "#3e3e3e";

		c.fillText(line1.toUpperCase(),x,y);
		c.fillText(line2.toUpperCase(),x,y+80);

		c.font = "italic 20px Georgia,serif";
		c.fillStyle = "#737373";

		c.fillText(subtitle,x,y+120);
	}
});

(function(){

	// Adding custom checks for canvas and css3
	// animations support, to the jQuery.support object:

	$.support.canvas = 'getContext' in document.createElement('canvas');

	$.support.css3Animation = (function(){
		var sp = $('&lt;span&gt;');

		return (
			sp.css("-webkit-animation") !== undefined	||
			sp.css("-moz-animation") !== undefined		||
			sp.css("animation") !== undefined
		);

	})();
})();</pre>
<p>To generate the newspapers, we need to first load the five slices that comprise the image. This sounds like the perfect place to use jQuery’s <strong>Deferred object</strong>, introduced in version 1.5. What it does is to notify us when a number of asynchronous events are completed. As you can see in the code above, we are using it in the <code>loadImage()</code> function. The <code>then()</code> method on line 58 is called only when all five images are loaded.</p>
<blockquote><p>Using jQuery.Deferred is a convenient way to organize our code better. It is also used by jQuery’s internal AJAX and animation methods. To get a better idea of what you can do with it, read through the <a href="http://api.jquery.com/category/deferred-object/" target="_blank">deferred object documentation</a>.</p></blockquote>
<p>Inside the <code>$.each</code> loop, we create a canvas element for each of the paper covers, and add them to the page after a delay introduced by the <code>setTimeout()</code> call.</p>
<p>Once we have the canvas on the page, we can continue with animating it.</p>
<h3>The CSS</h3>
<p>Canvas elements are treated as any other element. This means that you can safely style and transform them the same way as you would a regular image.</p>
<p>Once the canvas is added to the page, it will assume the styling you see below:</p>
<pre>canvas{
	position:fixed;
	width:717px;
	height:526px;

	top:50%;
	left:50%;

	margin:-263px 0 0 -358px;
	opacity:0;

	/* Configure the animation for Firefox */
	-moz-animation-duration:6s;
	-moz-animation-name:spin;
	-moz-animation-timing-function:linear;

	/* Configure it for Chrome and Safari */
	-webkit-animation-duration:6s;
	-webkit-animation-name:spin;
	-webkit-animation-timing-function:linear;
}</pre>
<p>Nothing out of the ordinary here. We are <a title="MicroTut: Centering a Div Both Horizontally And Vertically" href="http://tutorialzine.com/2010/03/centering-div-vertically-and-horizontally/" target="_blank">centering the canvas in the page</a>, and defining the different aspects of the animation like <strong><em>duration</em></strong>, <strong><em>name</em></strong>, and a <strong><em>timing function</em></strong>. “Linear” would make our animation run at a constant speed, instead of getting accelerated as is the case with “ease”, which is used by default.</p>
<p>After this, we have to use the <a href="https://developer.mozilla.org/en/CSS/CSS_animations" target="_blank">@keyframes declaration</a> to specify how our element would look at different key points during the animation:</p>
<pre>@-moz-keyframes spin{
	0%{
		opacity:0.2;
		-moz-transform:scale(0.2) rotate(0deg);
	}

	15%{
		opacity:1;
		margin:-263px 0 0 -358px;
		-moz-transform:scale(1) rotate(1090deg);
	}

	90%{
		opacity:1;
		top:50%;
		-moz-transform:scale(1) rotate(1090deg);
	}

	100%{
		top:500%;
		opacity:1;
		-moz-transform:scale(1) rotate(1090deg);
	}
}</pre>
<p>When the canvas element is added to the page, we start off from the <strong>0%</strong> position above. The element’s <em>opacity </em> is set to 0.2, and it is made 5 times smaller using a <code>scale()</code> transformation. It is quickly animated to its full size ( <code>scale(1)</code> ) in and from <strong>15%</strong> to <strong>90%</strong> of the animation (or about four and a half seconds) it stays fixed on the screen, after which it quickly falls outside the bottom border of the window (top is increased to 500%).</p>
<p>It is important to specify the properties that you want to persist in every percentage point of the animation. One example is the <code>-moz-transform:scale(1) rotate(1090deg)</code> declaration, which is duplicated three times. Without it, Chrome and Safari (but not Firefox) will revert to the default rotation of 0 degrees mid animation.</p>
<p>And, as this is still considered an experimental feature by browser vendors, we need to write the same code for webkit:</p>
<pre>@-webkit-keyframes spin{
	0%{
		opacity:0.2;
		-webkit-transform:scale(0.2) rotate(0deg);
	}
	15%{
		opacity:1;
		margin:-263px 0 0 -358px;
		-webkit-transform:scale(1) rotate(1090deg);
	}
	90%{
		opacity:1;
		top:50%;
		-webkit-transform:scale(1) rotate(1090deg);
	}

	100%{
		top:500%;
		opacity:1;
		-webkit-transform:scale(1) rotate(1090deg);
	}
}</pre>
<p><strong>With this our spinning newspaper effect is complete!</strong></p>
<h3>Conclusion</h3>
<p>As with any cop drama from the 1930s, and the 1930s themselves for that matter, this tutorial has to come to an end. Hope you folks had as much fun following the tutorial as I had writing it. If you have any thoughts or suggestion be sure to share in the comment section. You can also download a PSD with the newspaper template, so you can make your own, below.</p>
<div><a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=0ZEZZLnidhk:R8lrjL7v0l4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?d=yIl2AUoC8zA" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=0ZEZZLnidhk:R8lrjL7v0l4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=0ZEZZLnidhk:R8lrjL7v0l4:D7DqB2pKExk" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=0ZEZZLnidhk:R8lrjL7v0l4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=0ZEZZLnidhk:R8lrjL7v0l4:F7zBnMyn0Lo" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=0ZEZZLnidhk:R8lrjL7v0l4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=0ZEZZLnidhk:R8lrjL7v0l4:V_sGLiPBpWU" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=0ZEZZLnidhk:R8lrjL7v0l4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=0ZEZZLnidhk:R8lrjL7v0l4:gIN9vFwOqvQ" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=0ZEZZLnidhk:R8lrjL7v0l4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?d=qj6IDK7rITs" alt="" border="0" /></a></div>
<p><img src="http://feeds.feedburner.com/%7Er/Tutorialzine/%7E4/0ZEZZLnidhk" alt="" width="1" height="1" /></div>
</li>
<li>
<h4><a href="http://feedproxy.google.com/%7Er/Tutorialzine/%7E3/dR7s-oE9al4/">Creating a PHP and CSS3 Powered About Page</a></h4>
<h5>Posted: Tue, 12 Jul 2011 19:46:46 +0000</h5>
<div>
<div><a href="http://tutorialzine.com/2011/07/about-page-vcard-php-css/"><img src="http://cdn.tutorialzine.com/img/featured/1530.jpg" alt="" /></a></div>
<p>In this tutorial, we will be creating a simple about page that is powered by PHP, HTML5 and CSS3. It will present your contact information to your visitors, with an option for downloading it as a vCard (useful for importing it in third party applications).</p>
<p>You can use today’s example as a placeholder for your upcoming personal website, or as an actual about page.</p>
<h3>HTML</h3>
<p>As always, the first step is to write the HTML markup that will be powering our example. This is a simple page the main purpose of which is to present our contact details semantically. This will require adding appropriate meta tags and using the <a href="http://en.wikipedia.org/wiki/HCard" target="_blank">hCard microformat</a> to embed data in the page.</p>
<h4>index.php</h4>
<pre>&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;meta charset="utf-8" /&gt;
        &lt;meta name="description" content="Online info page of &lt;?php echo $profile-&gt;fullName()?&gt;. Learn more about me and download a vCard." /&gt;

        &lt;title&gt;Creating a PHP and CSS Powered About Page  | Tutorialzine Demo&lt;/title&gt;

        &lt;!-- Our CSS stylesheet file --&gt;
        &lt;link rel="stylesheet" href="assets/css/styles.css" /&gt;

        &lt;!--[if lt IE 9]&gt;
          &lt;script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt;
        &lt;![endif]--&gt;
    &lt;/head&gt;

    &lt;body&gt;

		&lt;section id="infoPage"&gt;

    		&lt;img src="&lt;?php echo $profile-&gt;photoURL()?&gt;" alt="&lt;?php echo $profile-&gt;fullName()?&gt;" width="164" height="164" /&gt;

            &lt;header&gt;
                &lt;h1&gt;&lt;?php echo $profile-&gt;fullName()?&gt;&lt;/h1&gt;
                &lt;h2&gt;&lt;?php echo $profile-&gt;tags()?&gt;&lt;/h2&gt;
            &lt;/header&gt;

            &lt;p&gt;&lt;?php echo nl2br($profile-&gt;description())?&gt;&lt;/p&gt;

            &lt;a href="&lt;?php echo $profile-&gt;facebook()?&gt;"&gt;Find me on Facebook&lt;/a&gt;
            &lt;a href="&lt;?php echo $profile-&gt;twitter()?&gt;"&gt;Follow me on Twitter&lt;/a&gt;

            &lt;ul&gt;
                &lt;li&gt;&lt;?php echo $profile-&gt;fullName()?&gt;&lt;/li&gt;
                &lt;li&gt;&lt;?php echo $profile-&gt;company()?&gt;&lt;/li&gt;
                &lt;li&gt;&lt;?php echo $profile-&gt;cellphone()?&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href="&lt;?php echo $profile-&gt;website()?&gt;"&gt;&lt;?php echo $profile-&gt;website()?&gt;&lt;/a&gt;&lt;/li&gt;
            &lt;/ul&gt;

		&lt;/section&gt;

        &lt;section id="links"&gt;
        	&lt;a href="?vcard"&gt;Download as V-Card&lt;/a&gt;
            &lt;a href="?json"&gt;Get as a JSON feed&lt;/a&gt;
            &lt;p&gt;In this tutorial: &lt;a href="http://www.flickr.com/photos/levycarneiro/4144428707/"&gt;Self Portrait&lt;/a&gt; by &lt;a href="http://www.flickr.com/photos/levycarneiro/"&gt;Levy Carneiro Jr&lt;/a&gt;&lt;/p&gt;
        &lt;/section&gt;

    &lt;/body&gt;
&lt;/html&gt;</pre>
<p>The <code>$profile</code> variable you see above, holds an object of the AboutPage PHP class that we will be writing in a moment. It holds our contact details and provides a number of useful methods for generating JSON and vCard files.</p>
<p>As mentioned above, we are using the hCard microformat to embed contact details in the page. This is a simple standard with which we use the class names of regular HTML elements to specify data, easily recognizable by search engines. The hCard holds information about our full name, organization, phone and home page:</p>
<pre>&lt;ul&gt;
    &lt;li&gt;&lt;?php echo $profile-&gt;fullName()?&gt;&lt;/li&gt;
    &lt;li&gt;&lt;?php echo $profile-&gt;company()?&gt;&lt;/li&gt;
    &lt;li&gt;&lt;?php echo $profile-&gt;cellphone()?&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="&lt;?php echo $profile-&gt;website()?&gt;"&gt;&lt;?php echo $profile-&gt;website()?&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</pre>
<p>You can also optionally specify a home / work address and other kinds of useful information.</p>
<div id="attachment_1534"><a href="http://demo.tutorialzine.com/2011/07/about-page-vcard-php-css/"><img title="PHP &amp; CSS3 Powered About Page" src="http://cdn.tutorialzine.com/wp-content/uploads/2011/07/php-css3-html5-about-page.jpg" alt="PHP &amp; CSS3 Powered About Page" width="620" height="460" /></a>PHP &amp; CSS3 Powered About Page</p>
</div>
<h3>PHP</h3>
<p>One of the points of using a server side language is that we can leave some aspects of the page to be generated on the fly. This frees us from having to manually keep various parts of the page up to date.</p>
<p>In the case with our about page, we have a simple configuration file, which holds the data, used by the page. This same resource is used for the generation of the vCard file and the JSON feed.</p>
<h4>config.php</h4>
<pre>$info = array(
	'firstName'		=&gt; 'John',
	'middleName'	=&gt; 'S.',
	'lastName'		=&gt; 'Smith',
	'photoURL'		=&gt; 'assets/img/photo.jpg',
	'birthDay'		=&gt; strtotime('22-03-1983'),
	'city'			=&gt; 'MyCity',
	'country'		=&gt; 'United States',
	'street'		=&gt; 'My Street 21',
	'zip'			=&gt; '12345',
	'company'		=&gt; 'Google Inc',
	'website'		=&gt; 'http://tutorialzine.com/',
	'email'			=&gt; 'email@example.com',
	'cellphone'		=&gt; '12345678910',
	'description'	=&gt; "I am a webdeveloper living in ...",
	'tags'			=&gt; 'Developer, Designer, Photographer',
	'facebook'		=&gt; 'http://www.facebook.com/',
	'twitter'		=&gt; 'http://twitter.com/Tutorialzine'
);</pre>
<p>Not all of these properties are presented on the about page. Some of them (like the <em>address fields</em>, <em>company</em>, <em>email</em> and <em>birthday</em>) are only made available when the user downloads the profile as a <em>vCard</em> or as a <em>JSON file</em>. You can also add quite a few more properties to this array (a complete list is given as a comment in the <em>config.php</em> file).</p>
<p>So now that we have provided all the information we wanted, we need to build a class that will handle the task of presenting a complete about page.</p>
<h4>aboutPage.class.php</h4>
<pre>class AboutPage{
	private $info = array();

	// The constructor:

	public function __construct(array $info){
		$this-&gt;info = $info;
	}

	// A helper method that assembles the person's full name:

	public function fullName(){
		return $this-&gt;firstName().' '.$this-&gt;middleName().' '.$this-&gt;lastName();
	}

	// Using PHP's Magick __call method to make the
	// properties of $this-&gt;info available as method calls:

	public function __call($method,$args = array()){

		if(!array_key_exists($method,$this-&gt;info)){
			throw new Exception('Such a method does not exist!');
		}

		if(!empty($args)){
			$this-&gt;info[$method] = $args[0];
		}
		else{
			return $this-&gt;info[$method];
		}
	}

	// This method generates a vcard from the $info
	// array, using the third party vCard class:

	public function downloadVcard(){

		$vcard = new vCard;

		$methodCalls = array();

		// Translating the properties of $info to method calls
		// understandable by the third party vCard class:

		$propertyMap = array(
			'firstName'		=&gt; 'setFirstName',
			'middleName'	=&gt; 'setMiddleName',
			'lastName'		=&gt; 'setLastName',
			'birthDay'		=&gt; 'setBirthday',
			'city'			=&gt; 'setHomeCity',
			'zip'			=&gt; 'setHomeZIP',
			'country'		=&gt; 'setHomeCountry',
			'website'		=&gt; 'setURLWork',
			'email'			=&gt; 'setEMail',
			'description'	=&gt; 'setNote',
			'cellphone'		=&gt; 'setCellphone');

		// Looping though the properties in $info:

		foreach($this-&gt;info as $k=&gt;$v){

			// Mapping a property of the array to a recognized method:

			if($propertyMap[$k]){
				$methodCalls[$propertyMap[$k]] = $v;
			}
			else {

				// If it does not exist, transform it to setPropertyName,
				// which might be recognized by the vCard class:

				$methodCalls['set'.ucfirst($k)] = $v;
			}
		}

		// Attempt to call these methods:

		foreach($methodCalls as $k=&gt;$v){
			if(method_exists($vcard,$k)){
				$vcard-&gt;$k($v);
			}
			else error_log('Invalid property in your $info array: '.$k);
		}

		// Serving the vcard with a x-vcard Mime type:

		header('Content-Type: text/x-vcard; charset=utf-8');
		header('Content-Disposition: attachment; filename="'.$this-&gt;fullName().'.vcf"');
		echo $vcard-&gt;generateCardOutput();
	}

	// This method generates and serves a JSON object from the data:

	public function generateJSON(){
		header('Content-Type: application/json');
		header('Content-Disposition: attachment; filename="'.$this-&gt;fullName().'.json"');

		// If you wish to allow cross-domain AJAX requests, uncomment the following line:
		// header('Access-Control-Allow-Origin: *');

		echo json_encode($this-&gt;info);
	}
}</pre>
<p>As you can see from the code below, we are using a <a href="http://www.phpclasses.org/package/874-PHP-class-for-creating-vCard-files.html" target="_blank">third party open source class</a> for the actual generation of the vCard file (vcf). As this class uses its own set of method calls, we will need to transform our configuration file to something that it will understand. We are doing this with the <code>$propertyMap</code> array which maps properties found in our $info array to the names of method calls that will need to be executed on the vCard object. After we configure the <code>$vcard</code> object, we set the content headers and call the object’s <code>generateCardOutput()</code> method. This causes the browser to display a file download dialog.</p>
<p>We are doing basically the same thing in the generateJSON method, with the worthy exception that we are not using a third party PHP class, but the <code>json_encode()</code> built-in. We are serving the JSON file with an application/json content type. You can also uncomment the access control header if you wish to be able to access your data via AJAX from other domains.</p>
<p>Now lets see how we are using this class in index.php:</p>
<h4>index.php</h4>
<pre>require 'includes/config.php';
require 'includes/aboutPage.class.php';
require 'includes/vcard.class.php';

$profile = new AboutPage($info);

if(array_key_exists('json',$_GET)){
	$profile-&gt;generateJSON();
	exit;
}
else if(array_key_exists('vcard',$_GET)){
	$profile-&gt;downloadVcard();
	exit;
}</pre>
<p>The fragment you see above is found at the top of <em>index.php</em>, before any of the HTML, as we have to be able to set headers. After including the appropriate PHP source files, we create a new <code>AboutPage</code> object with the configuration array as its parameter. After this we check whether the requested URL is <em>?json</em> or <em>?vcard</em>, and serve the appropriate data. Otherwise, the regular about page is displayed.</p>
<h3>CSS</h3>
<p>Most of the design of the about page is pretty straightforward. However, a fair share of CSS3 is used to keep the number of images to a minimum. The two buttons – <em>Find me on facebook</em>, and <em>Follow me on twitter</em>, that are positioned below the text, are ordinary hyperlinks with a <code>.grayButton</code> class name. You can see the definition of this class below:</p>
<h4>assets/css/styles.css</h4>
<pre>a.grayButton{
	padding:6px 12px 6px 30px;
	position:relative;

	background-color:#fcfcfc;
	background:-moz-linear-gradient(left top -90deg, #fff, #ccc);
	background:-webkit-linear-gradient(left top -90deg, #fff, #ccc);
	background:linear-gradient(left top -90deg, #fff, #ccc);

	-moz-box-shadow: 1px 1px 1px #333;
	-webkit-box-shadow: 1px 1px 1px #333;
	box-shadow: 1px 1px 1px #333;

	-moz-border-radius:18px;
	-webkit-border-radius:18px;
	border-radius:18px;

	font-size:11px;
	color:#444;
	text-shadow:1px 1px 0 #fff;
	display:inline-block;
	margin-right:10px;

	-moz-transition:0.25s;
	-webkit-transition:0.25s;
	transition:0.25s;
}

a.grayButton:hover{
	text-decoration:none !important;
	box-shadow:0 0 5px #2b99ff;
}

a.grayButton:before{
	background:url('../img/icons.png') no-repeat;
	height: 18px;
	left: 4px;
	position: absolute;
	top: 6px;
	width: 20px;
	content: '';
}

a.grayButton.twitter:before{
	background-position:0 -20px;
}</pre>
<p>The code above applies a CSS3 linear gradient to the button, text shadows and rounded corners. It also defines a 0.25 sec transition, that animates the glow that is applied on hover. We are also using the <code>:before</code> pseudo element to create the icon that goes with the button. As we are using a sprite, the only thing that differs between the two buttons is the offset of the background image.</p>
<p>After this we have the “<em>Download as vCard</em>” and “<em>Get as a JSON file</em>” links:</p>
<h4>assets/css/styles.css</h4>
<pre>#links{
	text-align:center;
	padding-top: 20px;
	border-top:1px solid #4a4a4a;
	text-shadow: 1px 1px 0 #333333;
	width:655px;
	margin:0 auto;
}

#links a{
	color: #ccc;
	position:relative;
}

#links &gt; a{
	display: inline-block;
	font-size: 11px;
	margin: 0 10px;
	padding-left:15px;
}

#links &gt; a:before{
	background: url("../img/icons.png") no-repeat -10px -60px;
	position:absolute;
	content:'';
	width:16px;
	height:16px;
	top:2px;
	left:-4px;
}

#links &gt; a.vcard:before{
	background-position: -10px -40px;
	top: 0;
	left: -8px;
}

#links p{
	color: #888888;
	font-size: 10px;
	font-style: normal;
	padding: 30px;
}</pre>
<p>As the <code>#links</code> section element contains more than these links (it contains a paragraph with a link to a great <a href="http://www.flickr.com/photos/levycarneiro/" target="_blank">portrait image by Levy Carneiro Jr.</a>) , we have to limit the styling to the anchor elements that are direct children of the section.</p>
<p><strong>With this our PHP &amp; CSS3 powered about page is complete!</strong></p>
<h3>To Wrap it up</h3>
<p>You can use this about page as a simple placeholder for your personal website. You can also use an existing users database and create beautiful profiles for your users. Combined with some of our previous tutorials, you can display your latest posts on facebook, flickr images or tweets as a personalized home page.</p>
<div><a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=dR7s-oE9al4:QTUrG2LIPpE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?d=yIl2AUoC8zA" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=dR7s-oE9al4:QTUrG2LIPpE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=dR7s-oE9al4:QTUrG2LIPpE:D7DqB2pKExk" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=dR7s-oE9al4:QTUrG2LIPpE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=dR7s-oE9al4:QTUrG2LIPpE:F7zBnMyn0Lo" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=dR7s-oE9al4:QTUrG2LIPpE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=dR7s-oE9al4:QTUrG2LIPpE:V_sGLiPBpWU" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=dR7s-oE9al4:QTUrG2LIPpE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=dR7s-oE9al4:QTUrG2LIPpE:gIN9vFwOqvQ" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=dR7s-oE9al4:QTUrG2LIPpE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?d=qj6IDK7rITs" alt="" border="0" /></a></div>
<p><img src="http://feeds.feedburner.com/%7Er/Tutorialzine/%7E4/dR7s-oE9al4" alt="" width="1" height="1" /></div>
</li>
<li>
<h4><a href="http://feedproxy.google.com/%7Er/Tutorialzine/%7E3/f8b2X2YSdhU/">15 Powerful jQuery Tips and Tricks for Developers</a></h4>
<h5>Posted: Wed, 29 Jun 2011 14:14:08 +0000</h5>
<div>
<div><a href="http://tutorialzine.com/2011/06/15-powerful-jquery-tips-and-tricks-for-developers/"><img src="http://cdn.tutorialzine.com/img/featured/1518.jpg" alt="" /></a></div>
<p>In this article we will take a look at 15 jQuery techniques which will be useful for your effective use of the library. We will start with a few tips about performance and continue with short introductions to some of the library’s more obscure features.</p>
<h3>1) Use the Latest Version of jQuery</h3>
<p>With all the innovation taking place in the jQuery project, one of the easiest ways to improve the performance of your web site is to simply use the latest version of jQuery. Every release of the library introduces optimizations and bug fixes, and most of the time upgrading involves only changing a script tag.</p>
<p>You can even include jQuery directly from Google’s servers, which provide <a href="http://code.google.com/apis/libraries/devguide.html" target="_blank">free CDN hosting</a> for a number of JavaScript libraries.</p>
<pre>&lt;!-- Include a specific version of jQuery --&gt;
&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"&gt;&lt;/script&gt;

&lt;!-- Include the latest version in the 1.6 branch --&gt;
&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"&gt;&lt;/script&gt;</pre>
<p>The latter example will include the latest 1.6.x version automatically as it becomes available, but as pointed out on <a href="http://css-tricks.com/7924-google-cdn-naming/" target="_blank">css-tricks</a>, it is cached only for an hour, so you better not use it in production environments.</p>
<h3>2) Keep Selectors Simple</h3>
<p>Up until recently, retrieving DOM elements with jQuery was a finely choreographed combination of parsing selector strings, JavaScript loops and inbuilt APIs like <code>getElementById()</code>, <code>getElementsByTagName()</code> and <code>getElementsByClassName()</code>. But now, all major browsers support <code>querySelectorAll()</code>, which understands CSS query selectors and brings a <a href="http://ejohn.org/blog/queryselectorall-in-firefox-31/" target="_blank">significant performance gain</a>.</p>
<p>However, you should still try to optimize the way you retrieve elements. Not to mention that a lot of users still use older browsers that force jQuery into traversing the DOM tree, which is slow.</p>
<pre>$('li[data-selected="true"] a')	// Fancy, but slow
$('li.selected a')	// Better
$('#elem')	// Best</pre>
<p>Selecting by id is the fastest. If you need to select by class name, prefix it with a tag – <code>$('li.selected')</code>. These optimizations mainly affect older browsers and mobile devices.</p>
<p>Accessing the DOM will always be the slowest part of every JavaScript application, so minimizing it is beneficial. One of the ways to do this, is to cache the results that jQuery gives you. The variable you choose will hold a jQuery object, which you can access later in your script.</p>
<pre>var buttons = $('#navigation a.button');

// Some prefer prefixing their jQuery variables with $:
var $buttons = $('#navigation a.button');</pre>
<p>Another thing worth noting, is that jQuery gives you a large number of <a href="http://api.jquery.com/category/selectors/jquery-selector-extensions/" target="_blank">additional selectors</a> for convenience, such as <code>:visible</code>, <code>:hidden</code>, <code>:animated</code> and more, which are not valid CSS3 selectors. The result is that if you use them the library cannot utilize <code>querySelectorAll()</code>. To remedy the situation, you can first select the elements you want to work with, and later filter them, like this:</p>
<pre>$('a.button:animated');	// Does not use querySelectorAll()
$('a.button').filter(':animated');	// Uses it</pre>
<p>The results of the above are the same, with the exception that the second example is faster.</p>
<h3>3) jQuery Objects as Arrays</h3>
<p>The result of running a selector is a jQuery object. However, the library makes it appear as if you are working with an array by defining index elements and a length.</p>
<pre>// Selecting all the navigation buttons:
var buttons = $('#navigation a.button');

// We can loop though the collection:
for(var i=0;i&lt;buttons.length;i++){
	console.log(buttons[i]);	// A DOM element, not a jQuery object
}

// We can even slice it:
var firstFour = buttons.slice(0,4);</pre>
<p>If performance is what you are after, using a simple <code>for</code> (or a <code>while</code>) loop instead of <code>$.each()</code>, can make your code <a href="http://jsfiddle.net/martinaglv/NcRsV/" target="_blank">several times faster</a>.</p>
<p>Checking the length is also the only way to determine whether your collection contains any elements.</p>
<pre>if(buttons){	// This is always true
	// Do something
}

if(buttons.length){ // True only if buttons contains elements
	// Do something
}</pre>
<h3>4) The Selector Property</h3>
<p>jQuery provides a property which contains the selector that was used to start the chain.</p>
<pre>$('#container li:first-child').selector    // #container li:first-child
$('#container li').filter(':first-child').selector    // #container li.filter(:first-child)</pre>
<p>Although the examples above target the same element, the selectors are quite different. The second one is actually invalid – you can’t use it as the basis of a new jQuery object. It only shows that the filter method was used to narrow down the collection.</p>
<h3>5) Create an Empty jQuery Object</h3>
<p>Creating a new jQuery object can bring significant overhead. Sometimes, you might need to create an empty object, and fill it in with the <a href="http://api.jquery.com/add/" target="_blank">add()</a> method later.</p>
<pre>var container = $([]);
container.add(another_element);</pre>
<p>This is also the basis for the <a href="http://jsperf.com/jquery-each-vs-quickeach" target="_blank">quickEach() method</a> that you can use as a faster alternative to the default <code>each()</code>.</p>
<h3>6) Select a Random Element</h3>
<p>As I mentioned above, jQuery adds its own selection filters. As with everything else in the library, you can also create your own. To do this simply add a new function to the <code>$.expr[':']</code> object. One awesome use case was presented by Waldek Mastykarz on <a href="http://blog.mastykarz.nl/jquery-random-filter/" target="_blank">his blog</a>: creating a selector for retrieving a random element. You can see a slightly modified version of his code below:</p>
<pre>(function($){
    var random = 0;

    $.expr[':'].random = function(a, i, m, r) {
        if (i == 0) {
            random = Math.floor(Math.random() * r.length);
        }
        return i == random;
    };

})(jQuery);

// This is how you use it:
$('li:random').addClass('glow');</pre>
<h3>7) Use CSS Hooks</h3>
<p>The <a href="http://api.jquery.com/jQuery.cssHooks/" target="_blank">CSS hooks API</a> was introduced to give developers the ability to get and set particular CSS values. Using it, you can hide browser specific implementations and expose a unified interface for accessing particular properties.</p>
<pre>$.cssHooks['borderRadius'] = {
        get: function(elem, computed, extra){
            // Depending on the browser, read the value of
            // -moz-border-radius, -webkit-border-radius or border-radius
        },
        set: function(elem, value){
            // Set the appropriate CSS3 property
        }
};

// Use it without worrying which property the browser actually understands:
$('#rect').css('borderRadius',5);</pre>
<p>What is even better, is that people have already built a rich <a href="https://github.com/brandonaaron/jquery-cssHooks" target="_blank">library of supported CSS hooks</a> that you can use for free in your next project.</p>
<h3>8) Use Custom Easing Functions</h3>
<p>You have probably heard of the jQuery <a href="http://gsgd.co.uk/sandbox/jquery/easing/" target="_blank">easing plugin</a> by now – it allows you to add effects to your animations. The only shortcoming is that this is another JavaScript file your visitors have to load. Luckily enough, you can simply copy the effect you need from the <a href="http://gsgd.co.uk/sandbox/jquery/easing/jquery.easing.1.3.js" target="_blank">plugin file</a>, and add it to the <code>jQuery.easing</code> object:</p>
<pre>$.easing.easeInOutQuad = function (x, t, b, c, d) {
	if ((t/=d/2) &lt; 1) return c/2*t*t + b;
	return -c/2 * ((--t)*(t-2) - 1) + b;
};

// To use it:
$('#elem').animate({width:200},'slow','easeInOutQuad');</pre>
<h3>9) The $.proxy()</h3>
<p>One of the drawbacks to using callback functions in jQuery has always been that when they are executed by a method of the library, the context is set to a different element. For example, if you have this markup:</p>
<pre>&lt;div id="panel" style="display:none"&gt;
	&lt;button&gt;Close&lt;/button&gt;
&lt;/div&gt;</pre>
<p>And you try to execute this code:</p>
<pre>$('#panel').fadeIn(function(){
	// this points to #panel
	$('#panel button').click(function(){
		// this points to the button
		$(this).fadeOut();
	});
});</pre>
<p>You will run into a problem – the button will disappear, not the panel. With <code>$.proxy</code>, you can write it like this:</p>
<pre>$('#panel').fadeIn(function(){
	// Using $.proxy to bind this:

	$('#panel button').click($.proxy(function(){
		// this points to #panel
		$(this).fadeOut();
	},this));
});</pre>
<p>Which will do what you expect. The <code>$.proxy</code> function takes two arguments – your original function, and a context. It returns a new function in which the value of this is always fixed to the context. You can read more about <a href="http://api.jquery.com/jQuery.proxy/" target="_blank">$.proxy in the docs</a>.</p>
<h3>10) Determine the Weight of Your Page</h3>
<p>A simple fact: the more content your page has, the more time it takes your browser to render it. You can get a quick count of the number of DOM elements on your page by running this in your console:</p>
<pre>console.log( $('*').length );</pre>
<p>The smaller the number, the faster the website is rendered. You can optimize it by removing redundant markup and unnecessary wrapping elements.</p>
<h3>11) Turn your Code into a jQuery Plugin</h3>
<p>If you invest some time in writing a piece of jQuery code, consider turning it into a plugin. This promotes code reuse, limits dependencies and helps you organize your project’s code base. Most of the <a href="http://tutorialzine.com/category/tutorials/">tutorials on Tutorialzine</a> are organized as plugins, so that it is easy for people to simply drop them in their sites and use them.</p>
<p>Creating a jQuery plugin couldn’t be easier:</p>
<pre>(function($){
	$.fn.yourPluginName = function(){
		// Your code goes here
		return this;
	};
})(jQuery);</pre>
<p>Read a detailed tutorial on <a href="http://tutorialzine.com/2011/02/converting-jquery-code-plugin/">turning jQuery code into a plugin</a>.</p>
<h3>12) Set Global AJAX Defaults</h3>
<p>When triggering AJAX requests in your application, you often need to display some kind of indication that a request is in progress. This can be done by displaying a loading animation, or using a dark overlay. Managing this indicator in every single <code>$.get</code> or <code>$.post</code> call can quickly become tedious.</p>
<p>The best solution is to set global AJAX defaults using one of jQuery’s methods.</p>
<pre>// ajaxSetup is useful for setting general defaults:
$.ajaxSetup({
	url			: '/ajax/',
	dataType	: 'json'
});

$.ajaxStart(function(){
	showIndicator();
	disableButtons();
});

$.ajaxComplete(function(){
	hideIndicator();
	enableButtons();
});

/*
	// Additional methods you can use:
	$.ajaxStop();
	$.ajaxError();
	$.ajaxSuccess();
	$.ajaxSend();
*/</pre>
<p>Read the docs about <a href="http://api.jquery.com/category/ajax/" target="_blank">jQuery’s AJAX functionality</a>.</p>
<h3>13) Use delay() for Animations</h3>
<p>Chaining animation effects is a powerful tool in every jQuery developer’s toolbox. One of the more overlooked features is that you can introduce delays between animations.</p>
<pre>// This is wrong:
$('#elem').animate({width:200},function(){
	setTimeout(function(){
		$('#elem').animate({marginTop:100});
	},2000);
});

// Do it like this:
$('#elem').animate({width:200}).delay(2000).animate({marginTop:100});</pre>
<p>To appreciate how much time jQuery’s <code>animation()</code> save us, just imagine if you had to manage everything yourself: you would need to set timeouts, parse property values, keep track of the animation progress, cancel when appropriate and update numerous variables on every step.</p>
<p>Read the docs about <a href="http://api.jquery.com/category/effects/" target="_blank">jQuery animations</a>.</p>
<h3>14) Make Use of  HTML5 Data Attributes</h3>
<p>HTML5 data attributes are a simple means to embed data in a webpage. It is useful for exchanging data between the server and the front end, something that used to require outputting &lt;script&gt; blocks or hidden markup.</p>
<p>With the recent updates to the jQuery <code>data()</code> method, HTML5 data attributes are pulled automatically and are available as entries, as you can see from the example below:</p>
<pre>&lt;div id="d1" data-role="page" data-last-value="43" data-hidden="true"
	data-options='{"name":"John"}'&gt;
&lt;/div&gt;</pre>
<p>To access the data attributes of this div, you would use code like the one below:</p>
<pre>$("#d1").data("role");			// "page"
$("#d1").data("lastValue");		// 43
$("#d1").data("hidden");		// true;
$("#d1").data("options").name;	// "John";</pre>
<p>Read more about <a href="http://api.jquery.com/data/" target="_blank">data() in the jQuery docs</a>.</p>
<h3>15) Local Storage and jQuery</h3>
<p>Local storage is a dead simple API for storing information on the client side. Simply add your data as a property of the global <code>localStorage</code> object:</p>
<pre>localStorage.someData = "This is going to be saved across page refreshes and browser restarts";</pre>
<p>The bad news is that it is not supported in older browsers. This is where you can use one of the <a href="http://plugins.jquery.com/plugin-tags/localstorage" target="_blank">many jQuery plugins</a> that provide different fallbacks if <code>localStorage</code> is not available, which makes client-side storage work almost everywhere.</p>
<p>Here is an example using the <a href="http://www.jstorage.info/" target="_blank">$.jStorage jQuery plugin</a>:</p>
<pre>// Check if "key" exists in the storage
var value = $.jStorage.get("key");
if(!value){
	// if not - load the data from the server
 	value = load_data_from_server();
 	// and save it
	$.jStorage.set("key",value);
}

// Use value</pre>
<h3>To Wrap it Up</h3>
<p>The techniques presented here will give you a head start in effectively using the jQuery library. If you want something to be added to this list, or if you have any suggestions, use the comment section below.</p>
<div><a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=f8b2X2YSdhU:MfEZjy2OLqc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?d=yIl2AUoC8zA" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=f8b2X2YSdhU:MfEZjy2OLqc:D7DqB2pKExk"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=f8b2X2YSdhU:MfEZjy2OLqc:D7DqB2pKExk" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=f8b2X2YSdhU:MfEZjy2OLqc:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=f8b2X2YSdhU:MfEZjy2OLqc:F7zBnMyn0Lo" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=f8b2X2YSdhU:MfEZjy2OLqc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=f8b2X2YSdhU:MfEZjy2OLqc:V_sGLiPBpWU" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=f8b2X2YSdhU:MfEZjy2OLqc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=f8b2X2YSdhU:MfEZjy2OLqc:gIN9vFwOqvQ" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=f8b2X2YSdhU:MfEZjy2OLqc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?d=qj6IDK7rITs" alt="" border="0" /></a></div>
<p><img src="http://feeds.feedburner.com/%7Er/Tutorialzine/%7E4/f8b2X2YSdhU" alt="" width="1" height="1" /></div>
</li>
<li>
<h4><a href="http://feedproxy.google.com/%7Er/Tutorialzine/%7E3/Cpz_cChUNDw/">Making a Beautiful HTML5 Portfolio</a></h4>
<h5>Posted: Fri, 17 Jun 2011 13:06:43 +0000</h5>
<div>
<div><a href="http://tutorialzine.com/2011/06/beautiful-portfolio-html5-jquery/"><img src="http://cdn.tutorialzine.com/img/featured/1486.jpg" alt="" /></a></div>
<p>In today’s tutorial we will be making a beautiful HTML5 portfolio powered by jQuery and the <a href="http://razorjack.net/quicksand/index.html" target="_blank">Quicksand plugin</a>. You can use it to showcase your latest work and it is fully customizable, so potentially you could expand it to do much more.</p>
<h3>The HTML</h3>
<p>The first step is to write down the markup of a new HTML5 document. In the head section, we will include the stylesheet for the page. The <em> jQuery library</em>, the <em>Quicksand </em>plugin and our <em>script.js</em> will go right before the closing body tag:</p>
<h4>index.html</h4>
<pre>&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;meta charset="utf-8" /&gt;

        &lt;title&gt;Making a Beautiful HTML5 Portfolio | Tutorialzine Demo&lt;/title&gt;

        &lt;!-- Our CSS stylesheet file --&gt;
        &lt;link rel="stylesheet" href="assets/css/styles.css" /&gt;

		&lt;!-- Enabling HTML5 tags for older IE browsers --&gt;
        &lt;!--[if lt IE 9]&gt;
          &lt;script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt;
        &lt;![endif]--&gt;
    &lt;/head&gt;

    &lt;body&gt;

        &lt;header&gt;
            &lt;h1&gt;My Portfolio&lt;/h1&gt;
        &lt;/header&gt;

        &lt;nav id="filter"&gt;
			&lt;!-- The menu items will go here (generated by jQuery) --&gt;
		&lt;/nav&gt;

        &lt;section id="container"&gt;
        	&lt;ul id="stage"&gt;
				&lt;!-- Your portfolio items go here --&gt;
			&lt;/ul&gt;
        &lt;/section&gt;

        &lt;footer&gt;
        &lt;/footer&gt;

		&lt;!-- Including jQuery, the Quicksand plugin, and our own script.js --&gt;

        &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"&gt;&lt;/script&gt;
        &lt;script src="assets/js/jquery.quicksand.js"&gt;&lt;/script&gt;
        &lt;script src="assets/js/script.js"&gt;&lt;/script&gt;

    &lt;/body&gt;
&lt;/html&gt;</pre>
<p>In the body, there are a number of the new HTML5 elements. The <code>header</code> holds our h1 heading (which is styled as the logo), the <code>section</code> element holds the unordered list with the portfolio items (more lists are added by jQuery, as you will see later), and the <code>nav</code> element, styled as a green bar, acts as a content filter.</p>
<p>The <code>#stage</code> unordered list holds our portfolio items. You can see what these items should look like below. Each of them has a HTML5 <code>data</code> attribute, which defines a series of comma-separated tags. Later, when we use jQuery to loop through this list, we will record the tags and create categories that can be selected from the green bar.</p>
<pre>&lt;li data-tags="Print Design"&gt;
	&lt;img src="assets/img/shots/1.jpg" /&gt;
&lt;/li&gt;

&lt;li data-tags="Logo Design,Print Design"&gt;
	&lt;img src="assets/img/shots/2.jpg" /&gt;
&lt;/li&gt;

&lt;li data-tags="Web Design,Logo Design"&gt;
	&lt;img src="assets/img/shots/3.jpg" /&gt;
&lt;/li&gt;</pre>
<p>You can put whatever you want in these li items and customize the portfolio further. The Quicksand plugin will handle the animated transitions of this list, so you are free to experiment.</p>
<div id="attachment_1491"><a href="http://demo.tutorialzine.com/2011/06/beautiful-portfolio-html5-jquery/"><img title="Beautiful HTML5 Portfolio with jQuery" src="http://cdn.tutorialzine.com/wp-content/uploads/2011/06/beautiful-html5-jquery-portfolio.jpg" alt="Beautiful HTML5 Portfolio with jQuery" width="620" height="460" /></a>Beautiful HTML5 Portfolio with jQuery</p>
</div>
<h3>The jQuery</h3>
<p>What the Quicksand plugin does, is compare two unordered lists of items, find the matching LIs inside them, and animate them to their new positions. The jQuery script we will be writing in this section, will loop through the portfolio items in the <code>#stage</code> list, and create a new (hidden) unordered list for each of the tags it finds. It will also create a new menu option, which will trigger the quicksand transition between the two lists.</p>
<p>First we need to listen for the <code>ready</code> event (the earliest point in the loading of the page where we can access the DOM), and loop through all the li items detecting the associated tags.</p>
<h4>script.js – Part 1</h4>
<pre>$(document).ready(function(){

	var items = $('#stage li'),
		itemsByTags = {};

	// Looping though all the li items:

	items.each(function(i){
		var elem = $(this),
			tags = elem.data('tags').split(',');

		// Adding a data-id attribute. Required by the Quicksand plugin:
		elem.attr('data-id',i);

		$.each(tags,function(key,value){

			// Removing extra whitespace:
			value = $.trim(value);

			if(!(value in itemsByTags)){
				// Create an empty array to hold this item:
				itemsByTags[value] = [];
			}

			// Each item is added to one array per tag:
			itemsByTags[value].push(elem);
		});

	});</pre>
<p>Each tag is added to the <code>itemsByTags</code> object as an array. This would mean that <code>itemsByTags['Web Design']</code> would hold an array with all the items that have Web Design as one of their tags. We will use this object to create hidden unordered lists on the page for quicksand.</p>
<p>It would be best to create a helper function that will handle it for us:</p>
<h4>script.js – Part 2</h4>
<pre>function createList(text,items){

	// This is a helper function that takes the
	// text of a menu button and array of li items

	// Creating an empty unordered list:
	var ul = $('&lt;ul&gt;',{'class':'hidden'});

	$.each(items,function(){
		// Creating a copy of each li item
		// and adding it to the list:

		$(this).clone().appendTo(ul);
	});

	ul.appendTo('#container');

	// Creating a menu item. The unordered list is added
	// as a data parameter (available via .data('list')):

	var a = $('&lt;a&gt;',{
		html: text,
		href:'#',
		data: {list:ul}
	}).appendTo('#filter');
}</pre>
<p>This function takes the name of the group and an array with LI items as parameters. It then clones these items into a new UL and adds a link in the green bar.</p>
<p>Now we have to loop through all the groups and call the above function, and also listen for clicks on the menu items.</p>
<h4>script.js – Part 3</h4>
<pre>// Creating the "Everything" option in the menu:
createList('Everything',items);

// Looping though the arrays in itemsByTags:
$.each(itemsByTags,function(k,v){
	createList(k,v);
});

$('#filter a').live('click',function(e){
	var link = $(this);

	link.addClass('active').siblings().removeClass('active');

	// Using the Quicksand plugin to animate the li items.
	// It uses data('list') defined by our createList function:

	$('#stage').quicksand(link.data('list').find('li'));
	e.preventDefault();
});

// Selecting the first menu item by default:
$('#filter a:first').click();</pre>
<p>Great! Now that we have everything in place we can move on to styling the page.</p>
<h3>The CSS</h3>
<p>Styling the page itself is not that interesting (you can see the CSS for this in <em>assets/css/styles.css</em>). However what is more interesting is the green bar (or the #filter bar), which uses the <code>:before / :after</code> pseudo elements to add attractive corners on the sides of the bar. As these are positioned absolutely, they also grow together with the bar.</p>
<h4>styles.css</h4>
<pre>#filter {
	background: url("../img/bar.png") repeat-x 0 -94px;
	display: block;
	height: 39px;
	margin: 55px auto;
	position: relative;
	width: 600px;
	text-align:center;

	-moz-box-shadow:0 4px 4px #000;
	-webkit-box-shadow:0 4px 4px #000;
	box-shadow:0 4px 4px #000;
}

#filter:before, #filter:after {
	background: url("../img/bar.png") no-repeat;
	height: 43px;
	position: absolute;
	top: 0;
	width: 78px;
	content: '';

	-moz-box-shadow:0 2px 0 rgba(0,0,0,0.4);
	-webkit-box-shadow:0 2px 0 rgba(0,0,0,0.4);
	box-shadow:0 2px 0 rgba(0,0,0,0.4);
}

#filter:before {
	background-position: 0 -47px;
	left: -78px;
}

#filter:after {
	background-position: 0 0;
	right: -78px;
}

#filter a{
	color: #FFFFFF;
	display: inline-block;
	height: 39px;
	line-height: 37px;
	padding: 0 15px;
	text-shadow:1px 1px 1px #315218;
}

#filter a:hover{
	text-decoration:none;
}

#filter a.active{
	background: url("../img/bar.png") repeat-x 0 -138px;
	box-shadow:	1px 0 0 rgba(255, 255, 255, 0.2),
				-1px 0 0 rgba(255, 255, 255, 0.2),
				1px 0 1px rgba(0,0,0,0.2) inset,
				-1px 0 1px rgba(0,0,0,0.2) inset;
}</pre>
<div id="attachment_1492"><a href="http://demo.tutorialzine.com/2011/06/beautiful-portfolio-html5-jquery/"><img title="Before / After Elements" src="http://cdn.tutorialzine.com/wp-content/uploads/2011/06/filter-before-after-elements.jpg" alt="Before / After Elements" width="620" height="260" /></a>Before / After Elements</p>
</div>
<p>With this our beautiful HTML5 portfolio is complete!</p>
<h3>Conclusion</h3>
<p>You can use this template to present your work. The best thing about it is that it’s really easy to customize. You only need to change the contents of the initial LI items of the #stage list, and specify some new tags – the script will do the rest. If the visitor doesn’t have JavaScript enabled, they will still see all your portfolio items, which is also good for SEO purposes.</p>
<div><a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=Cpz_cChUNDw:quzkKSC2Z3A:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?d=yIl2AUoC8zA" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=Cpz_cChUNDw:quzkKSC2Z3A:D7DqB2pKExk"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=Cpz_cChUNDw:quzkKSC2Z3A:D7DqB2pKExk" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=Cpz_cChUNDw:quzkKSC2Z3A:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=Cpz_cChUNDw:quzkKSC2Z3A:F7zBnMyn0Lo" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=Cpz_cChUNDw:quzkKSC2Z3A:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=Cpz_cChUNDw:quzkKSC2Z3A:V_sGLiPBpWU" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=Cpz_cChUNDw:quzkKSC2Z3A:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=Cpz_cChUNDw:quzkKSC2Z3A:gIN9vFwOqvQ" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=Cpz_cChUNDw:quzkKSC2Z3A:qj6IDK7rITs"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?d=qj6IDK7rITs" alt="" border="0" /></a></div>
<p><img src="http://feeds.feedburner.com/%7Er/Tutorialzine/%7E4/Cpz_cChUNDw" alt="" width="1" height="1" /></div>
</li>
<li>
<h4><a href="http://feedproxy.google.com/%7Er/Tutorialzine/%7E3/-sSvGTB9448/">Making a Simple Tweet to Download System</a></h4>
<h5>Posted: Wed, 25 May 2011 14:28:05 +0000</h5>
<div>
<div><a href="http://tutorialzine.com/2011/05/tweet-to-download-jquery/"><img src="http://cdn.tutorialzine.com/img/featured/1472.jpg" alt="" /></a></div>
<p>Twitter is undoubtedly a hugely popular social network. One of the keys to its success is its simple and powerful API, which opens the doors to countless novel ways for you to use the service.</p>
<p>One of these uses is allowing your visitors to “pay with a tweet”. Namely you take something that you would otherwise offer for free (like an ebook, mp3 or other kind of digital media), and make it available to users only after they tweet about your website. It is a great way to promote your products and get noticed, and it doesn’t cost anything to your visitors.</p>
<p>Building such functionality is not as hard as you might think. Twitter made it even easier with their <a href="http://dev.twitter.com/pages/intents" target="_blank">Web Intents</a> – a dead simple way to integrate the platform in your website. In this tutorial we will build a jQuery plugin around that API, and activate a download button once the user tweets. So lets get started!</p>
<h3>The HTML</h3>
<p>First we will need a simple web page to hold the example together.</p>
<h4>index.html</h4>
<pre>&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;meta charset="utf-8" /&gt;

        &lt;title&gt;Tweet to Download | Tutorialzine Demo&lt;/title&gt;

        &lt;!-- Our CSS stylesheet file --&gt;
        &lt;link rel="stylesheet" href="assets/css/styles.css" /&gt;

        &lt;!--[if lt IE 9]&gt;
          &lt;script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt;
        &lt;![endif]--&gt;
    &lt;/head&gt;

    &lt;body&gt;

        &lt;header&gt;
            &lt;h1&gt;Tweet to Download&lt;/h1&gt;
            &lt;h2&gt;&lt;a href="http://tutorialzine.com/2011/05/tweet-to-download-jquery/"&gt;&amp;laquo; Back to Tutorialzine&lt;/a&gt;&lt;/h2&gt;
        &lt;/header&gt;

        &lt;section id="container"&gt;
        	&lt;p&gt;The button below is activated&lt;br /&gt;only* after you tweet. &lt;a href="#" id="tweetLink"&gt;Try it.&lt;/a&gt;&lt;/p&gt;
            &lt;a href="#"&gt;Download&lt;/a&gt;
        &lt;/section&gt;

        &lt;footer&gt;*Not exactly. Read more in the tutorial..&lt;/footer&gt;

        &lt;img src="assets/img/twitter_bird.png" alt="Twitter Bird" /&gt;

        &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"&gt;&lt;/script&gt;
        &lt;script src="assets/js/jquery.tweetAction.js"&gt;&lt;/script&gt;
        &lt;script src="assets/js/script.js"&gt;&lt;/script&gt;

    &lt;/body&gt;
&lt;/html&gt;</pre>
<p>We are using some of the HTML5 tags – header, section and footer, to logically separate the page in three parts. Our #container section holds two anchor elements.</p>
<p>The first link – #tweetLink, is going to trigger the plugin and display a popup holding a Twitter submission form. The second – #downloadButton, is styled as a button and its href attribute is set to that of the file we are offering for download, once the user tweets.</p>
<p>At the bottom of the file, before the closing body tag, we have the usual set of JavaScript includes – version 1.6 of the <a href="http://jquery.com/" target="_blank">jQuery library</a>, the <strong><em>tweetAction.js</em></strong> plugin we will be writing in a moment, and <strong><em>script.js</em></strong>, which listens for clicks on the links and triggers the plugin.</p>
<p>Lets move to the jQuery section of this tutorial.</p>
<div id="attachment_1476"><a href="http://demo.tutorialzine.com/2011/05/tweet-to-download-jquery/"><img title="Tweet to Download" src="http://cdn.tutorialzine.com/wp-content/uploads/2011/05/tweet-to-download-jquery-plugin.jpg" alt="Tweet to Download" width="620" height="460" /></a>Tweet to Download</p>
</div>
<h3>The jQuery</h3>
<p>As you can see from the <a href="http://dev.twitter.com/pages/intents#tweet-intent" target="_blank">Web Intents documentation</a>, it can be described as a popup based interface for interacting with Twitter. You just need to load a specific <em>intent URL</em> in a popup window and pass GET parameters with the text of the tweet, Twitter username and more, depending on the intent. This will produce a form which with which the user can publish a new tweet, reply or follow you.</p>
<p>Lets put this together in a jQuery plugin that handles it for us:</p>
<h4>jquery.tweetAction.js</h4>
<pre>(function($){

	var win = null;

	$.fn.tweetAction = function(options,callback){

		// Default parameters of the tweet popup:

		options = $.extend({
			url:window.location.href
		}, options);

		return this.click(function(e){

			if(win){
				// If a popup window is already shown,
				// do nothing;
				e.preventDefault();
				return;
			}

			var width	= 550,
				height	= 350,
				top		= (window.screen.height - height)/2,
				left	= (window.screen.width - width)/2; 

			var config = [
				'scrollbars=yes','resizable=yes','toolbar=no','location=yes',
				'width='+width,'height='+height,'left='+left, 'top='+top
			].join(',');

			// Opening a popup window pointing to the twitter intent API:
			win = window.open('http://twitter.com/intent/tweet?'+$.param(options),
						'TweetWindow',config);

			// Checking whether the window is closed every 100 milliseconds.
			(function checkWindow(){

				try{
					// Opera raises a security exception, so we
					// need to put this code in a try/catch:

					if(!win || win.closed){
						throw "Closed!";
					}
					else {
						setTimeout(checkWindow,100);
					}
				}
				catch(e){
					// Executing the callback, passed
					// as an argument to the plugin.

					win = null;
					callback();
				}

			})();

			e.preventDefault();
		});

	};
})(jQuery);</pre>
<p>To open a popup window with <code>window.open()</code>, we need to pass a list of comma-delimited parameters. These include which address bars are to be shown, and the dimensions and position of the window.</p>
<p>After we open <code>http://twitter.com/intent/tweet</code> we check the <code>closed</code> attribute of the window every 100 ms by running the <code>checkWindow()</code> function with a <code>setTimeout()</code>. This is the only way we can know that the popup has been closed, as browsers prevent any kind of cross-domain interactions. When the popup is closed, a callback function, passsed as the second argument of the function, is executed.</p>
<div id="attachment_1477"><a href="http://demo.tutorialzine.com/2011/05/tweet-to-download-jquery/"><img title="The Tweet Intent Popup" src="http://cdn.tutorialzine.com/wp-content/uploads/2011/05/twitter-intent-share.jpg" alt="The Tweet Intent Popup" width="620" height="300" /></a>The Tweet Intent Popup</p>
</div>
<p>You can see how we use this plugin below:</p>
<h4>script.js</h4>
<pre>$(document).ready(function(){

	// Using our tweetAction plugin. For a complete list with supported
	// parameters, refer to http://dev.twitter.com/pages/intents#tweet-intent

	$('#tweetLink').tweetAction({
		text:		'How to make a simple Tweet to Download system',
		url:		'http://tutorialzine.com/2011/05/tweet-to-download-jquery/',
		via:		'tutorialzine',
		related:	'tutorialzine'
	},function(){

		// Callback function. Triggered when the user closes the pop-up window:

		$('a.downloadButton')
				.addClass('active')
				.attr('href','tweet_to_download.zip');

	});

});</pre>
<p>In the fragment above we trigger the <em>tweetAction</em> plugin on the <em>#tweetLink</em> anchor. When it clicked, we will display a popup window, which, when closed, will trigger the callback. This is where we enable the button and set its <code>href</code> attribute to that of the file.</p>
<h3>The CSS</h3>
<p>The only thing we are left to do, is throw in some fancy CSS styles. I am going to present only some of the more interesting declarations here. You can see the rest in <em>assets/css/styles.css</em>.</p>
<p>We are using multiple backgrounds for the html element. The background images are displayed one beneath the other, starting with the topmost image – <code>bg_gradient.jpg</code>.</p>
<pre>html{
	/* CSS3 Multiple backgrounds with a fallback */

	background-color:#e4e4e4;
	background:url('../img/bg_gradient.jpg') no-repeat center center,url('../img/bg_tile.jpg');
}

body{
	color:#888;
	padding:10px;
	min-height:600px;
	font:14px/1.3 'Segoe UI',Arial, sans-serif;
	text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.7);
}</pre>
<p>Further down we have the styling of the twitter bird icon. I am using the &gt; character to denote that this will affect only images that are direct children of body.</p>
<pre>body &gt; img{
	/* The twitter illustration */

	margin:50px auto 0;
	display:block;
}</pre>
<p>Finally we have the #container section. With the help of the <code>:before</code>/<code>:after</code> pseudo elements, we display subtle shadows above and below the container.</p>
<pre>#container{
	width:450px;
	height:300px;
	padding:10px;
	text-align:center;
	margin:0 auto;
	position:relative;
	background-color:#fff;
	display:block;

	-moz-border-radius:10px;
	-webkit-border-radius:10px;
	border-radius:10px;
}

#container:before,
#container:after{

	/* Adding subtle shadows with before/after elements */

	content:'.';
	text-indent:-99999px;
	overflow:hidden;
	display:block;
	height:12px;
	width:470px;
	background:url('../img/shadows.png') no-repeat center top;
	position:absolute;
	left:0;
	top:-12px;
}

#container:after{
	top:auto;
	bottom:-12px;
	background-position:center bottom;
}</pre>
<p>These two pseudo elements share almost all of their code, so I’ve defined them as a group. The <code>:after</code> element is also styled separately, but only the styles that differ are redefined.</p>
<p><strong>With this our Pay with a Tweet experiment is complete!</strong></p>
<h3>But wait! This doesn’t work!</h3>
<p>And you are entirely correct. As you can see from the code (and confirm from the demo), we assume that closing the popup window equals a published tweet. It does not.</p>
<p>As this is a cross domain interaction, there is no way to subscribe for when a tweet is actually published. The only way to do this would be to use Twitter’s more complex <a href="http://dev.twitter.com/anywhere" target="_blank">@Anywhere API</a>, but even then people could just hotlink to your file.</p>
<p>Does it even matter? The real purpose of this technique is to give people an incentive to tweet about your product/service, something that a lot of folks would love to do just for the feeling of receiving your “members-only” download.</p>
<div><a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=-sSvGTB9448:YeDEW73YcBU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?d=yIl2AUoC8zA" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=-sSvGTB9448:YeDEW73YcBU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=-sSvGTB9448:YeDEW73YcBU:D7DqB2pKExk" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=-sSvGTB9448:YeDEW73YcBU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=-sSvGTB9448:YeDEW73YcBU:F7zBnMyn0Lo" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=-sSvGTB9448:YeDEW73YcBU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=-sSvGTB9448:YeDEW73YcBU:V_sGLiPBpWU" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=-sSvGTB9448:YeDEW73YcBU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?i=-sSvGTB9448:YeDEW73YcBU:gIN9vFwOqvQ" alt="" border="0" /></a> <a href="http://feeds.feedburner.com/%7Eff/Tutorialzine?a=-sSvGTB9448:YeDEW73YcBU:qj6IDK7rITs"><img src="http://feeds.feedburner.com/%7Eff/Tutorialzine?d=qj6IDK7rITs" alt="" border="0" /></a></div>
<p><img src="http://feeds.feedburner.com/%7Er/Tutorialzine/%7E4/-sSvGTB9448" alt="" width="1" height="1" /></div>
</li>
<li>
<h4><a href="http://feedproxy.google.com/%7Er/Tutorialzine/%7E3/_akC4ny3ChE/">Generating Files with JavaScript</a></h4>
<h5>Posted: Tue, 17 May 2011 16:46:55 +0000</h5>
<div>
<div><a href="http://tutorialzine.com/2011/05/generating-files-javascript-php/"><img src="http://cdn.tutorialzine.com/img/featured/1461.jpg" alt="" /></a></div>
<p>When building a web application, you oftentimes need to give users the ability to download a piece of data as a file. It could be a backup of configuration settings, reports, or other piece of information that is generated dynamically.</p>
<p>The usual solution to this problem would be to have a dedicated export script that selects from a database and builds the file you need. However, as we will be proving in this short tutorial, there is another way.</p>
<p>We will make a jQuery plugin which, combined with a simple php script, can generate every kind of textual file, and make it available for download. You will initiate the download from your JavaScript front end by only providing the file contents, and leave the rest to the plugin.</p>
<h3>The HTML</h3>
<p>We shall start by laying down a simple HTML page with a textarea and a download button, so we can demonstrate the plugin at work.</p>
<h4>index.html</h4>
<pre>&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;meta charset="utf-8" /&gt;

        &lt;title&gt;Generating files with JS &amp;amp; PHP | Tutorialzine Demo&lt;/title&gt;

        &lt;!-- Our CSS stylesheet file --&gt;
        &lt;link rel="stylesheet" href="assets/css/styles.css" /&gt;

        &lt;!--[if lt IE 9]&gt;
          &lt;script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt;
        &lt;![endif]--&gt;
    &lt;/head&gt;

    &lt;body&gt;

        &lt;header&gt;
            &lt;h1&gt;Generating Files with JavaScript&lt;/h1&gt;
            &lt;h2&gt;&lt;a href="http://tutorialzine.com/2011/05/generating-files-javascript-php/"&gt;&amp;laquo; Read and download on Tutorialzine&lt;/a&gt;&lt;/h2&gt;
        &lt;/header&gt;

        &lt;form action="./" method="post"&gt;
            &lt;textarea&gt;&lt;/textarea&gt;
            &lt;a href="#" id="download"&gt;Download&lt;/a&gt;
        &lt;/form&gt;

        &lt;footer&gt;Another cool example: &lt;a href="#" id="downloadPage"&gt;download this page.&lt;/a&gt; &lt;b&gt;To download the source code, visit &lt;a href="http://tutorialzine.com/2011/05/generating-files-javascript-php/"&gt;Tutorialzine.com&lt;/a&gt;&lt;/b&gt;&lt;/footer&gt;

        &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"&gt;&lt;/script&gt;
        &lt;script src="assets/js/jquery.generateFile.js"&gt;&lt;/script&gt;
        &lt;script src="assets/js/script.js"&gt;&lt;/script&gt;

    &lt;/body&gt;
&lt;/html&gt;</pre>
<p>The page uses the HTML5 doctype, as we are using some of the tags defined by the standard. For it to work in IE, we also need to include the <a href="http://remysharp.com/2009/01/07/html5-enabling-script/" target="_blank">HTML5 enabling script</a> in the head section.</p>
<p>Before the closing body tag, we are adding the jQuery library, the <em>generateFile plugin</em> we will be writing in a moment, and the <em>script.js</em> file that listens for events and triggers the file downloads.</p>
<div id="attachment_1465"><a href="http://demo.tutorialzine.com/2011/05/generating-files-javascript-php/"><img title="Generating Files with jQuery and PHP" src="http://cdn.tutorialzine.com/wp-content/uploads/2011/05/downloading-files-jquery-php.jpg" alt="Generating Files with jQuery and PHP" width="620" height="460" /></a>Generating Files with jQuery and PHP</p>
</div>
<h3>The PHP</h3>
<p>As you probably know, generating files is not possible with JavaScript alone. Different solutions exist (some of them even relying on Flash), but using a generic PHP script on the backend provides better control and ease of use (not to mention that it works in every major browser out there).</p>
<p>You can see the generic file generation script below:</p>
<h4>download.php</h4>
<pre>if(empty($_POST['filename']) || empty($_POST['content'])){
	exit;
}

// Sanitizing the filename:
$filename = preg_replace('/[^a-z0-9\-\_\.]/i','',$_POST['filename']);

// Outputting headers:
header("Cache-Control: ");
header("Content-type: text/plain");
header('Content-Disposition: attachment; filename="'.$filename.'"');

echo $_POST['content'];</pre>
<p>What this PHP script does is simply add some headers on top of an echo statement. The plugin we are building must pass two parameters along with the POST request: <em>filename</em> and <em>content</em>. The script will print the content of the file, while setting three headers that will force the file download box to appear (instead of your browser simply opening it).</p>
<p>To use the plugin you need to upload this file somewhere on your server and pass its URL to the plugin we will be coding next.</p>
<h3>The jQuery</h3>
<p>As you saw in the previous section, our plugin has to issue a POST request to <em>download.php</em>. The natural choice for making a request would be by using AJAX. However, there is a shortcoming to using this method – it does not trigger the file download dialog to appear.</p>
<p>So what we need is a bit more old school. We will be dynamically creating a hidden iframe and write a form to it, which we will later submit via POST. The action attribute of the form points to <em>download.php</em>, so the file download dialog will pop up, exactly as we need it to.</p>
<p>Now lets lay down the jQuery code that does this:</p>
<h4>assets/jquery.generateFile.js</h4>
<pre>(function($){

	// Creating a jQuery plugin:

	$.generateFile = function(options){

		options = options || {};

		if(!options.script || !options.filename || !options.content){
			throw new Error("Please enter all the required config options!");
		}

		// Creating a 1 by 1 px invisible iframe:

		var iframe = $('&lt;iframe&gt;',{
			width:1,
			height:1,
			frameborder:0,
			css:{
				display:'none'
			}
		}).appendTo('body');

		var formHTML = '&lt;form action="" method="post"&gt;'+
			'&lt;input type="hidden" name="filename" /&gt;'+
			'&lt;input type="hidden" name="content" /&gt;'+
			'&lt;/form&gt;';

		// Giving IE a chance to build the DOM in
		// the iframe with a short timeout:

		setTimeout(function(){

			// The body element of the iframe document:

			var body = (iframe.prop('contentDocument') !== undefined) ?
							iframe.prop('contentDocument').body :
							iframe.prop('document').body;	// IE

			body = $(body);

			// Adding the form to the body:
			body.html(formHTML);

			var form = body.find('form');

			form.attr('action',options.script);
			form.find('input[name=filename]').val(options.filename);
			form.find('input[name=content]').val(options.content);

			// Submitting the form to download.php. This will
			// cause the file download dialog box to appear.

			form.submit();
		},50);
	};

})(jQuery);</pre>
<p>In less than 50 lines (with comments stripped) the above fragment does what we need. It creates a hidden iframe with a form inside it.</p>
<p>Notice the <code>setTimeout()</code> function. Without it we cannot access the document element of the iframe in Internet Explorer. This way, we are giving it time to build the DOM and make it available to us.</p>
<p>And here is how to use this plugin:</p>
<h4>assets/script.js</h4>
<pre>$(document).ready(function(){

	$('#download').click(function(e){

		$.generateFile({
			filename	: 'export.txt',
			content		: $('textarea').val(),
			script		: 'download.php'
		});

		e.preventDefault();
	});

	$('#downloadPage').click(function(e){

		$.generateFile({
			filename	: 'page.html',
			content		: $('html').html(),
			script		: 'download.php'
		});

		e.preventDefault();
	});

});</pre>
<p>When calling <code>$.generateFile</code>, you need to pass the name of the file (should be something descriptive), its text content, and the path to download.php. As you can see in the example above, we can generate any kind of file, as long as it is text.</p>
<p><strong>With this our simple plugin is complete!</strong></p>
<h3>Conclusion</h3>
<p>You can use this code to add export features to your web app or enhance certain areas of your site with download functionality. It is even possible to generate doc files and spreadsheets if you follow <a href="http://en.wikipedia.org/wiki/Microsoft_Office_XML_formats" target="_blank">Microsoft Office’s XML formats</a>. The best part is that everything is done with JavaScript and you can easily combine different sources of data.</p>
</div>
</li>
</ul>
<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fericrichers.com%2Fblog%2F2011%2F08%2Fphp-tut-feed-from-tutorialzine-com%2F&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div class="rw-left"><div class="rw-ui-container rw-class-blog-post rw-urid-10920"></div></div>]]></content:encoded>
			<wfw:commentRss>http://ericrichers.com/blog/2011/08/php-tut-feed-from-tutorialzine-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mobile DevBox</title>
		<link>http://ericrichers.com/blog/2011/08/mobile-devbox/</link>
		<comments>http://ericrichers.com/blog/2011/08/mobile-devbox/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 05:03:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[mobile]]></category>
		<category><![CDATA[capita]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[ios]]></category>

		<guid isPermaLink="false">http://ericrichers.com/blog/?p=1086</guid>
		<description><![CDATA[http://www.pairodime.com/mobile/tmp-sencha/index.html &#60;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&#62; &#60;title&#62;CAPiTA Tabs&#60;/title&#62; &#60;link rel="stylesheet" href="sencha-touch.css" type="text/css"&#62; &#60;script type="text/javascript" src="sencha-touch.js"&#62;&#60;/script&#62; &#60;!-- app, models, stores, views, controllers [in that order!] --&#62; &#60;script type="text/javascript" src="app/app.js"&#62;&#60;/script&#62; &#60;script type="text/javascript" src="app/views/teamcard.js"&#62;&#60;/script&#62; &#60;script type="text/javascript" src="app/views/boardscard.js"&#62;&#60;/script&#62; &#60;script type="text/javascript" src="app/views/newscard.js"&#62;&#60;/script&#62; &#60;script type="text/javascript" src="app/views/Viewport.js"&#62;&#60;/script&#62; &#60;/head&#62; &#8230; <a href="http://ericrichers.com/blog/2011/08/mobile-devbox/">Read More.. <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a title="Mobile Tester" href="http://www.pairodime.com/mobile/tmp-sencha/index.html" target="_blank">http://www.pairodime.com/mobile/tmp-sencha/index.html</a></p>
<pre class="brush: php; highlight: [12]; html-script: true; title: Code example: (this example was added using the title parameter); notranslate" title="Code example: (this example was added using the title parameter)">
    &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
    &lt;title&gt;CAPiTA Tabs&lt;/title&gt;
	&lt;link rel="stylesheet" href="<a href="view-source:http://www.pairodime.com/mobile/tmp-sencha/sencha-touch.css">sencha-touch.css</a>" type="text/css"&gt;

	&lt;script type="text/javascript" src="<a href="view-source:http://www.pairodime.com/mobile/tmp-sencha/sencha-touch.js">sencha-touch.js</a>"&gt;&lt;/script&gt;
    &lt;!-- app, models, stores, views, controllers [in that order!] --&gt;
	&lt;script type="text/javascript" src="<a href="view-source:http://www.pairodime.com/mobile/tmp-sencha/app/app.js">app/app.js</a>"&gt;&lt;/script&gt;</pre>
<pre id="line11">    &lt;script type="text/javascript" src="<a href="view-source:http://www.pairodime.com/mobile/tmp-sencha/app/views/teamcard.js">app/views/teamcard.js</a>"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="<a href="view-source:http://www.pairodime.com/mobile/tmp-sencha/app/views/boardscard.js">app/views/boardscard.js</a>"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="<a href="view-source:http://www.pairodime.com/mobile/tmp-sencha/app/views/newscard.js">app/views/newscard.js</a>"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="<a href="view-source:http://www.pairodime.com/mobile/tmp-sencha/app/views/Viewport.js">app/views/Viewport.js</a>"&gt;&lt;/script&gt;   

&lt;/head&gt;
&lt;body&gt;&lt;/body&gt;
&lt;/html&gt;</pre>
<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fericrichers.com%2Fblog%2F2011%2F08%2Fmobile-devbox%2F&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div class="rw-left"><div class="rw-ui-container rw-class-blog-post rw-urid-10870"></div></div>]]></content:encoded>
			<wfw:commentRss>http://ericrichers.com/blog/2011/08/mobile-devbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sweet Drupal 6.x Developer Modules</title>
		<link>http://ericrichers.com/blog/2011/08/sweet-drupal-6-x-developer-modules/</link>
		<comments>http://ericrichers.com/blog/2011/08/sweet-drupal-6-x-developer-modules/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 11:08:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Drupal 6]]></category>
		<category><![CDATA[External]]></category>
		<category><![CDATA[6.x]]></category>
		<category><![CDATA[Developer Modules]]></category>
		<category><![CDATA[Drupal]]></category>

		<guid isPermaLink="false">http://ericrichers.com/blog/2011/08/sweet-drupal-6-x-developer-modules/</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://ericrichers.com/blog/2011/08/sweet-drupal-6-x-developer-modules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iframe tab application on Facebook</title>
		<link>http://ericrichers.com/blog/2011/08/iframe-tab-application-on-facebook/</link>
		<comments>http://ericrichers.com/blog/2011/08/iframe-tab-application-on-facebook/#comments</comments>
		<pubDate>Mon, 15 Aug 2011 05:22:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[tuts]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[ifram]]></category>

		<guid isPermaLink="false">http://ericrichers.com/blog/2011/08/iframe-tab-application-on-facebook/</guid>
		<description><![CDATA[I won’t cover all of the details here, but you need to set up an iframe tab application on Facebook first. Assuming you have access to put PHP files up on a public server, follow these steps: Go to the &#8230; <a href="http://ericrichers.com/blog/2011/08/iframe-tab-application-on-facebook/">Read More.. <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I won’t cover all of the details here, but you need to set up an iframe tab application on <a href="http://www.facebook.com/" class="ml-smartlink">Facebook</a> first. Assuming you have access to put <span class="caps">PHP</span> files up on a public server, follow these steps:</p>
<ol>
<li>Go to the <a href="http://www.facebook.com/apps/application.php?id=2345053339">Facebook Developer application</a></li>
<li>Create a new application</li>
<li>On the <strong>&#8220;Facebook Integration&#8221;</strong> tab of the application settings:
<ol>
<li>Set the <strong>Canvas Page</strong> <span class="caps">URL</span> slug</li>
<li>Point the <strong>Canvas <span class="caps">URL</span></strong> to your <span class="caps">PHP</span> script’s base <span class="caps">URL</span></li>
<li>Set the <strong>Tab Name</strong> to something (Welcome!)</li>
<li><strong>Make sure the *Page Tab Type</strong> is set to iframe*</li>
<li>Set the <strong>Tab <span class="caps">URL</span></strong> to the specific <span class="caps">PHP</span> file for this tab</li>
</ol>
</li>
<li>On the <strong>&#8220;Advanced&#8221;</strong> tab of the application settings:
<ol>
<li>Make sure the <strong>&#8220;OAuth 2.0 for Canvas&#8221;</strong> option is set</li>
</ol>
</li>
<li>Save the application</li>
<li>Add the application to a Page to test it out</li>
</ol>
<p><strong><span class="caps">NOTE</span>:</strong> There is some confusion about Canvas <span class="caps">URL</span> and the Tab <span class="caps">URL</span>. The Canvas <span class="caps">URL</span> is the <span class="caps">PHP</span> file that get’s hit when the users views the Canvas app. This is different than the <span class="caps">PHP</span> script which generates the Tab, which is defined by the Tab <span class="caps">URL</span>. The Tab <span class="caps">URL</span> has to be relative to the Canvas <span class="caps">URL</span>. What I usually do is have the Canvas <span class="caps">PHP</span> file be &#8220;index.php&#8221; and point the Canvas <span class="caps">URL</span> to the directory it’s in. Then I make a &#8220;tab.php&#8221; file for the Tab <span class="caps">URL</span> in the same directory.</p>
<ul>
<li><strong>Canvas <span class="caps">URL</span></strong>: http://mysite.com/myfbappdirectory/
<ul>
<li>This points to the file http://mysite.com/myfbappdirectory/index.php</li>
</ul>
</li>
<li><strong>Tab <span class="caps">URL</span></strong>: tab.php
<ul>
<li>This points to the file http://mysite.com/myfbappdirectory/tab.php</li>
</ul>
</li>
</ul>
<h3>2. Get the signed_request</h3>
<p>Facebook now passes an encoded <span class="caps">POST</span> variable to tab applications, called the <a href="http://developers.facebook.com/docs/authentication/signed_request">signed_request</a>. The content of a tab’s signed_request is covered <a href="http://developers.facebook.com/docs/guides/canvas#tabs">here in the canvas guide</a>. General details about Facebook’s signed requests can be found <a href="http://developers.facebook.com/docs/authentication/signed_request">here</a>.</p>
<p>To get the signed_request, make sure the &#8220;OAuth 2.0 for Canvas&#8221;  option is set in your application’s settings. Then just grab it out of <span class="caps">PHP</span>’s $_REQUEST array global.</p>
<pre>&lt;code&gt;$signed_request = $_REQUEST['signed_request'];&lt;/code&gt;</pre>
<h3>3. Decode the signed_request</h3>
<p>The signed request is encoded for security. <a href="http://developers.facebook.com/docs/authentication/signed_request">Read more about this here.</a>. We are not really interested in security on this app though. We just  want to tell if a visitor is a fan or not. So we are going to do the  &#8220;cheater&#8221; method of decoding the signed_request, which ignores some of  the security features (like the signature). Here is the cheater code  (you will need the <span class="caps">PHP</span> json_decode() method!):</p>
<pre>&lt;code&gt;function parsePageSignedRequest() {&lt;br /&gt;    if (isset($_REQUEST['signed_request'])) {&lt;br /&gt;      $encoded_sig = null;&lt;br /&gt;      $payload = null;&lt;br /&gt;      list($encoded_sig, $payload) = explode('.', $_REQUEST['signed_request'], 2);&lt;br /&gt;      $sig = base64_decode(strtr($encoded_sig, '-_', '+/'));&lt;br /&gt;      $data = json_decode(base64_decode(strtr($payload, '-_', '+/'), true));&lt;br /&gt;      return $data;&lt;br /&gt;    }&lt;br /&gt;    return false;&lt;br /&gt;  }&lt;br /&gt;  print_r(parsePageSignedRequest());&lt;/code&gt;</pre>
<h3>4. Switch content based on the signed_request</h3>
<p>The signed_request on iframe tabs has a &#8220;pages&#8221; object, which holds a &#8220;liked&#8221; variable. If the user viewing your tab has Liked your page, it  is set to <span class="caps">TRUE</span>. If they have not, it is set to <span class="caps">FALSE</span>. So:</p>
<pre>&lt;code&gt;function parsePageSignedRequest() {&lt;br /&gt;    if (isset($_REQUEST['signed_request'])) {&lt;br /&gt;      $encoded_sig = null;&lt;br /&gt;      $payload = null;&lt;br /&gt;      list($encoded_sig, $payload) = explode('.', $_REQUEST['signed_request'], 2);&lt;br /&gt;      $sig = base64_decode(strtr($encoded_sig, '-_', '+/'));&lt;br /&gt;      $data = json_decode(base64_decode(strtr($payload, '-_', '+/'), true));&lt;br /&gt;      return $data;&lt;br /&gt;    }&lt;br /&gt;    return false;&lt;br /&gt;  }&lt;br /&gt;  if($signed_request = parsePageSignedRequest()) {&lt;br /&gt;    if($signed_request-&gt;page-&gt;liked) {&lt;br /&gt;      echo "This content is for Fans only!";&lt;br /&gt;    } else {&lt;br /&gt;      echo "Please click on the Like button to view this tab!";&lt;br /&gt;    }&lt;br /&gt;  }&lt;/code&gt;</pre>
<h3>You now have a reveal tab with fans-only content!</h3>
<p>This new method is actually better than the old method in a couple of ways:</p>
<ol>
<li>You no longer need to do devious &#8220;position: absolute&#8221; <span class="caps">CSS</span> hacks to get your fan and non-fan content to look nice! With  , the content for <span class="caps">BOTH</span> was printed out, the non-fan content was just &#8220;hidden&#8221;, which was a nightmare to style. </li>
<li>The page doesn’t blow up when viewed as an Admin</li>
<li>Your content for fans-only is <span class="caps">REALLY</span> for <em>fans-only</em> – clever folks can no longer &#8220;View Source&#8221; to see the hidden content.</li>
</ol>
<p>Good luck, and happy Facebook developing!</p>
<div class="entry-meta">
<p></p>
<p></p>
<p>Share: </p>
</p></div>
<h2 id="comment">Comment</h2>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=71e597bf0f448736ef3d875ae104550b&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Feb 16, 07:34 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000538" id="c000538">(Link)</a></div>
<p> vedran said: </p></div>
<p>Hi, Thank you for the great article!<br />btw do you have any live example?</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=732cbb7d682a43ad606d28c324d9b271&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Feb 16, 08:41 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000539" id="c000539">(Link)</a></div>
<p> Kevin Fair said: </p></div>
<p>Outstanding.  Thanks for sharing.</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=d556160cd2d5ef8131227f01281e5291&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Feb 16, 12:52 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000540" id="c000540">(Link)</a></div>
<p> <a href="http://af-design.com/" rel="nofollow">Erik Giberti</a> said: </div>
<p>You can see a live example of a reveal tab here:<br />http://www.facebook.com/application.development.design?sk=app_198954953450233</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=d097775c28f3e82943a10a03b3ed41df&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Feb 16, 01:23 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000541" id="c000541">(Link)</a></div>
<p> <a href="http://www.ideea.net/" rel="nofollow">Stefan Rosca</a> said: </div>
<p>Can’t get it to work.<br />Can you post a full page code. or an example</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=5cd94b65b396883cc985c7e6209fd4e4&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Feb 18, 03:27 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000545" id="c000545">(Link)</a></div>
<p> Julianne said: </p></div>
<p>Hey, I’ve outputted the signed request info, and its not outputting  the page objects &#8216;liked&#8217; variable details. I’ve got it set up with  canvas iframe, and tab iframe, its in tab.php etc…. just wondering if  theres something else I havent set that should output this?</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=86e8fd26ec5ac09531e9578699c4c184&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Feb 18, 02:25 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000546" id="c000546">(Link)</a></div>
<p> <a href="http://sigmagroup.com/" rel="nofollow">Joe Schorn</a> said: </div>
<p>Thanks!!! I’ve book looking for an answer to this for the last hour!</p>
</p></div>
</p></div>
<div>
<div class="comment  mycomment">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=02bee2f91e0a8c3aefbfa6bfb5304c51&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Feb 18, 04:49 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000547" id="c000547">(Link)</a></div>
<p> <a href="http://www.chilipepperdesign.com/" rel="nofollow">Evan Johnson</a> said: </div>
<p>@Stefan – I will try to post a working example soon.</p>
<p>@julianna – I don’t know why it wouldn’t be working – did you  print_r() to see the whole signed_request? And do you have Auth 2.0 for  canvas enabled in the advanced App settings? Perhaps I will post some  screenshots perhaps of the app settings, and full code for a little demo app.</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=fb41e138b31f5b3791f8afaf833bb35c&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Feb 19, 01:51 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000548" id="c000548">(Link)</a></div>
<p> <a href="http://localdominate.com/" rel="nofollow">Phil Benham</a> said: </div>
<p>I’d like to second the request for a small working example.  I’m  having a rough time with this.  Don’t know where to put everything.</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=b5b6c1eaac75b648051c81162d423bac&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Feb 21, 12:20 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000550" id="c000550">(Link)</a></div>
<p> Moxie said: </p></div>
<p>Are steps 3 &amp; 4 done on the tab.php file or the facebook.php file?</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=23b59da120e878ac202870a0195300d4&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Feb 21, 06:07 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000551" id="c000551">(Link)</a></div>
<p> <a href="http://various/" rel="nofollow">peter</a> said: </div>
<p>great stuff.  much clearer than the &#8216;sample&#8217; from the creators.</p>
<p>now , how to deliver something more interesting that the &#8216;like me&#8217;/'you like me&#8217; comment. Im thinking Video, signup forms …</p>
<p>thanks in advance</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=8cc1d1fa6f47c8600ea5d7bb3d783bca&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Feb 21, 01:22 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000552" id="c000552">(Link)</a></div>
<p> James said: </p></div>
<p>Yes a full page example of the code would be great!</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=deed508fd9f95fbe78fcae178372f464&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Feb 26, 03:32 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000554" id="c000554">(Link)</a></div>
<p> <a href="http://vestorlogic.com/" rel="nofollow">jessica</a> said: </div>
<p>works great!! Place this in the index.php:</p>
<pre>&lt;code&gt;&lt;? require 'facebook.php';&lt;br /&gt;$app_id = "YOUR APPID";&lt;br /&gt;$app_secret = "YOUR APP SECRET";&lt;br /&gt;$facebook = new Facebook(array(&lt;br /&gt;'appId' =&gt; $app_id,&lt;br /&gt;'secret' =&gt; $app_secret,&lt;br /&gt;'cookie' =&gt; true&lt;br /&gt;));&lt;br /&gt;$signed_request = $facebook-&gt;getSignedRequest();&lt;br /&gt;function parsePageSignedRequest() {&lt;br /&gt;    if (isset($_REQUEST['signed_request'])) {&lt;br /&gt;      $encoded_sig = null;&lt;br /&gt;      $payload = null;&lt;br /&gt;      list($encoded_sig, $payload) = explode('.', $_REQUEST['signed_request'], 2);&lt;br /&gt;      $sig = base64_decode(strtr($encoded_sig, '-_', '+/'));&lt;br /&gt;      $data = json_decode(base64_decode(strtr($payload, '-_', '+/'), true));&lt;br /&gt;      return $data;&lt;br /&gt;    }&lt;br /&gt;    return false;&lt;br /&gt;  }&lt;br /&gt;  if($signed_request = parsePageSignedRequest()) {&lt;br /&gt;    if($signed_request-&gt;page-&gt;liked) {&lt;br /&gt;      echo "This content is for Fans only!";&lt;br /&gt;    } else {&lt;br /&gt;      echo "Please click on the Like button to view this tab!";&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;?&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;</pre>
<p>———————————<br />the facebook.php file (from the <span class="caps">SDK</span> here:<br />http://hyperarts.com/facebook/downloads/HyperArts_SR_PHP.zip and  elsewhere I’m sure) needs to be uploaded to the same folder as your  index.php file. No edits to that file needed</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=12792aa54208ecfbdeac80603b19138d&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar  1, 01:53 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000558" id="c000558">(Link)</a></div>
<p> Matt said: </p></div>
<p>Still having trouble with this… unclear as to what script goes on tab.php</p>
<p>@Jessica – can you clarify?</p>
</p></div>
</p></div>
<div>
<div class="comment  mycomment">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=02bee2f91e0a8c3aefbfa6bfb5304c51&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar  2, 07:23 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000560" id="c000560">(Link)</a></div>
<p> <a href="http://www.chilipepperdesign.com/" rel="nofollow">Evan Johnson</a> said: </div>
<p>@Matt – @jessica’s script goes in tab.php. You don’t really need  anything in any other files. My code is a little simpler though since  you don’t need to include the <span class="caps">PHP</span> <span class="caps">SDK</span> library. Good luck!</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=67b2d1ffd088150a6fb51c3a37e4046c&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar  2, 03:34 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000562" id="c000562">(Link)</a></div>
<p> <a href="http://ikonwire.com/" rel="nofollow">Alex Walker</a> said: </div>
<p>I’ve gotten it to work on my page when viewed with the new page  layout. However, some users are seeing it with the old page layout and  the fan-gate is not working. Do you know why this could be?</p>
<p>Thanks!</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=a1e62ce729837fa85d16ed0f27ab6c18&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar  2, 08:39 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000563" id="c000563">(Link)</a></div>
<p> zak said: </p></div>
<p>I hate to sound daft, but…</p>
<p>…exactly where does this code go??</p>
<p>Are we talking about adding it to my index.html file?  Other??…</p>
<p>I can read php but am not familiar enough with the &#8220;json_decode() method&#8221; to understand what to do with this.</p>
<p>I appreciate the info but a coding example would really go a long way to making the most of this post.</p>
<p>Thanks….</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=6c1c90b89ffceabdc13acd192ed6aba7&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar  4, 09:44 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000567" id="c000567">(Link)</a></div>
<p> <a href="http://www.aleoflashmedia.com/" rel="nofollow">Elesha Gabriell</a> said: </div>
<p>Thanks so much for the helpful Post. Very through and great layout! Thanks-e</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=bde04b2760331a59f6fbc6d9d44f8170&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar  6, 01:23 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000568" id="c000568">(Link)</a></div>
<p> <a href="http://www.devblog.fr/" rel="nofollow">Benoit</a> said: </div>
<p>Awesome piece of code.<br />Thank you very much :)<br />@zak : just copy and paste in a blank &#8216;index.php&#8217; file and your good to go ! <br />of cours the file should be in your declared &#8216;tab&#8217; directory (in apps configuration. ie : /tab/)</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=a49b763b48853a1edf15fe0066b4f8f7&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar  7, 08:01 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000571" id="c000571">(Link)</a></div>
<p> <a href="http://na/" rel="nofollow">Brent</a> said: </div>
<p>Hey Evan,</p>
<p>Do you know where i can find a more robust guide for newbs? Not necessarily familiar with <span class="caps">PHP</span>, but would love to get this app functioning.</p>
<p>Thanks,<br />B</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=b9bf76381884822ee970b7c282f4c7c7&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar 10, 03:20 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000572" id="c000572">(Link)</a></div>
<p> <a href="http://www.facebook.com/pages/Morita-Design/128970117134498" rel="nofollow">Marcel</a> said: </div>
<p>Very Good Thanks It works fine<br />Thanks</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=deed508fd9f95fbe78fcae178372f464&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar 10, 09:17 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000573" id="c000573">(Link)</a></div>
<p> <a href="http://vestorlogic.com/" rel="nofollow">jessica</a> said: </div>
<p>When I set mine up I used more simple language. In the index page  (where unlikers land first) I used the chunk of code in my other post  above, and replaced the echo text with some  php-friendly image code,  i.e:</p>
<p>echo &#8220;&lt;img src=\&#8221;http://www.mysite.com/myimg.jpg\&#8221; width=\&#8221;512\&#8221; height=\&#8221;557\&#8221;&gt;&#8221;;</p>
<p>Then I have another file called revealed.php that gets displayed when they like the page, the file that gets &#8220;revealed&#8221;.</p>
<p>In the index.php, right above the echo bit,  make sure you refer to the revealed.php file like this(w/o the caps):</p>
<p>   if($signed_request = parsePageSignedRequest()) {    if($signed_request-&gt;page-&gt;liked) { 		include(&#8220;REVEALED.PHP&#8221;);
<p>so the whole index.php file looks like:</p>
<p>&lt;? require &#8216;facebook.php&#8217;;<br />$app_id = &#8220;MYAPPID&#8221;;<br />$app_secret = &#8220;MYSECRET&#8221;;<br />$facebook = new Facebook(array(<br />&#8216;appId&#8217; =&gt; $app_id,<br />&#8216;secret&#8217; =&gt; $app_secret,<br />&#8216;cookie&#8217; =&gt; true<br />));</p>
<p>$signed_request = $facebook-&gt;getSignedRequest();<br />function parsePageSignedRequest() {    if (isset($_REQUEST['signed_request'])) {      $encoded_sig = null;      $payload = null;      list($encoded_sig, $payload) = explode(&#8216;.&#8217;, $_REQUEST['signed_request'], 2);      $sig = base64_decode(strtr($encoded_sig, &#8216;-_&#8217;, &#8216;+/&#8217;));      $data = json_decode(base64_decode(strtr($payload, &#8216;-_&#8217;, &#8216;+/&#8217;), true));      return $data;    }    return false;  }  if($signed_request = parsePageSignedRequest()) {    if($signed_request-&gt;page-&gt;liked) { 		include(&#8220;revealed.php&#8221;);</p>
<p>     } else {      echo &#8220;&lt;img src=\&#8221;http://www.mysite.com/myimg.jpg\&#8221; width=\&#8221;512\&#8221; height=\&#8221;557\&#8221;&gt;&#8221;;    }  }
<p>?&gt;</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=5410147d1644a373c1c9091572e801c5&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar 11, 12:11 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000575" id="c000575">(Link)</a></div>
<p> Teemu Korpi said: </p></div>
<p>Thanks Jessica (and Evan). That’s all I needed :-)</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=d3bab454a0e12d6bf4edd09b880660bf&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar 14, 02:35 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000576" id="c000576">(Link)</a></div>
<p> Gordon  said: </p></div>
<p>Thanks Evan &amp; Jess … nice work</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=acc22738d1e557082d0fda209672f838&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar 14, 09:08 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000577" id="c000577">(Link)</a></div>
<p> <a href="http://rjjacob.com/" rel="nofollow">RJ Jacob</a> said: </div>
<p>Thanks to Evan and Jessica for helping me to understand and apply this!</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=9280238f71de7a6d8e27a89d5fbe62fd&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar 14, 10:32 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000579" id="c000579">(Link)</a></div>
<p> CJ said: </p></div>
<p>Nice job Jessica! If you run into problems with the include you can  echo your &lt;iframe&gt;. Just remember to use escape chars in your  code.</p>
<p>&lt;? require &#8216;facebook.php&#8217;;<br />$app_id = &#8220;Your_APP_ID&#8221;;<br />$app_secret = &#8220;YOUR_APP_SECRET&#8221;;<br />$facebook = new Facebook(array(<br />&#8216;appId&#8217; =&gt; $app_id,<br />&#8216;secret&#8217; =&gt; $app_secret,<br />&#8216;cookie&#8217; =&gt; true<br />));<br />$signed_request = $facebook-&gt;getSignedRequest();<br />function parsePageSignedRequest() {    if (isset($_REQUEST['signed_request'])) {      $encoded_sig = null;      $payload = null;      list($encoded_sig, $payload) = explode(&#8216;.&#8217;, $_REQUEST['signed_request'], 2);      $sig = base64_decode(strtr($encoded_sig, &#8216;-_&#8217;, &#8216;+/&#8217;));      $data = json_decode(base64_decode(strtr($payload, &#8216;-_&#8217;, &#8216;+/&#8217;), true));      return $data;    }    return false;  }  if($signed_request = parsePageSignedRequest()) {    if($signed_request-&gt;page-&gt;liked) {      echo &#8220;&lt;iframe allowtransparency=\&#8221;true\&#8221; frameborder=\&#8221;0\&#8221; <span class="caps">SCROLLING</span>=\&#8221;NO\&#8221; style=\&#8221;width: 512px; height: 750px;\&#8221;  src=\&#8221;http://www.example.com/anyfolder\&#8221; id=\&#8221;any_name\&#8221;  name=\&#8221;anyname\&#8221;&gt;&lt;iframe&gt;&#8221;;</p>
<p>} else { echo &#8220;&lt;img src=\&#8221;http://www.example.com/anyfolder/switch.jpg\&#8221; width=\&#8221;512\&#8221; height=\&#8221;750\&#8221;&gt;&#8221;; } }<br />?&gt;</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=9aff17249644dd9e7fe7612b777b0b9f&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar 15, 07:38 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000580" id="c000580">(Link)</a></div>
<p> <a href="http://www.google.es/" rel="nofollow">ribo</a> said: </div>
<p>Great tut, I’ve been days looking for it.<br />lots of thanks</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=acc22738d1e557082d0fda209672f838&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar 15, 12:19 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000581" id="c000581">(Link)</a></div>
<p> <a href="http://rjjacob.com/" rel="nofollow">RJ Jacob</a> said: </div>
<p>I want the user to click &#8220;Like&#8221; and be redirected out of FB to <a href="http://doubleclick.net/" class="ml-smartlink">a coupon</a> page on another site. When user returns to FB page later, want them to  not be redirected. (So use of redirect should only work first time.)<br />Anyone have any ideas for this <span class="caps">PHP</span> newbie?</p>
</p></div>
</p></div>
<div>
<div class="comment  mycomment">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=02bee2f91e0a8c3aefbfa6bfb5304c51&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar 15, 02:23 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000582" id="c000582">(Link)</a></div>
<p> <a href="http://www.chilipepperdesign.com/" rel="nofollow">Evan Johnson</a> said: </div>
<p>@RJ – Maybe you can capture the Like event with JavaScript? With <a href="http://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/" rel="nofollow">FB.Event.subscribe</a>? You would need to have the Like button in the Tab though, I don’t know if you can capture the Like button at the top of page.</p>
<p>Otherwise, you would need to save the fact that they have been redirected somewhere so you can check on their return visit and <span class="caps">NOT</span> do it again. Maybe a session variable? Good luck!</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=37627a965e92af6d6f5760e226797dbb&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar 15, 05:47 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000583" id="c000583">(Link)</a></div>
<p> andrew mccormick said: </p></div>
<p>thanks for the tutorial.  This works great for people who don’t already like my page. <br />However if people already like my page they are getting redirected to my wall instead of landing on the page with content for people who like  us. If people that already like the page directly click on the app in my tabs they get the correct page, but not by just landing on my page.   any ideas?<br />Here’s the code from the end of my index.php</p>
<p>   }  if($signed_request = parsePageSignedRequest()) {    if($signed_request-&gt;page-&gt;liked) {      include(&#8220;home.php&#8221;);    } else {      include(&#8220;likeus.php&#8221;);    }  }    </p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=8bcc982d8b6b64ff3201c73c11f3a39a&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar 15, 11:51 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000584" id="c000584">(Link)</a></div>
<p> <a href="http://ucangetnoticedhere.com/" rel="nofollow">Tro Baz</a> said: </div>
<p>For those that may have experienced the same problems as i did….I  had more than just an image for the non-fan section, so i created a php  file and called it nonfan.php.</p>
<p>Only the tab.php should contain the appid &amp; app secret info etc. Below is the tab.php code:</p>
<p>&lt;?php<br />// Awesome <a href="http://en.wikipedia.org/wiki/Facebook_Platform" class="ml-smartlink">Facebook Application</a><br />// <br />// Name: My Great <span class="caps">APP</span><br />// </p>
<p>require &#8216;../facebook-php-sdk/src/facebook.php&#8217;;</p>
<p>// Create your Application instance.<br />$facebook = new Facebook(array(  &#8216;appId&#8217;  =&gt; &#8216;MYAPPID&#8217;,  &#8216;secret&#8217; =&gt; &#8216;MYSECRET&#8217;,  &#8216;cookie&#8217; =&gt; true,<br />));</p>
<p>$signed_request = $facebook-&gt;getSignedRequest();<br />function parsePageSignedRequest() {    if (isset($_REQUEST['signed_request'])) {      $encoded_sig = null;      $payload = null;      list($encoded_sig, $payload) = explode(&#8216;.&#8217;, $_REQUEST['signed_request'], 2);      $sig = base64_decode(strtr($encoded_sig, &#8216;-_&#8217;, &#8216;+/&#8217;));      $data = json_decode(base64_decode(strtr($payload, &#8216;-_&#8217;, &#8216;+/&#8217;), true));      return $data;    }    return false;  }  if($signed_request = parsePageSignedRequest()) {    if($signed_request-&gt;page-&gt;liked) { include(&#8220;index.php&#8221;);</p>
<p>     } else { include(&#8220;nonfan.php&#8221;);     }  }
<p>?&gt;</p>
<p>………………<br />The index.php is for the fan content.<br />The nonfan.php for the non-fan content.</p>
<p>Do not include the appid or secret or facebook-php-sdk in the above two files, <span class="caps">ONLY</span> in the tab.php</p>
<p>This worked for me! Thanks to Jessica &amp; Evan and all the other input and of course this blog for being here!</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=37627a965e92af6d6f5760e226797dbb&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar 16, 07:49 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000586" id="c000586">(Link)</a></div>
<p> andy mccormick said: </p></div>
<p>i think i figured it out.  Landing pages are only for people who do  not &#8220;like&#8221; your page.  If someone &#8220;likes&#8221; your page and then comes back  to visit it later on, they will not see your landing page no matter what code you use in your app or .php file.<br />is that correct?</p>
</p></div>
</p></div>
<div>
<div class="comment  mycomment">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=02bee2f91e0a8c3aefbfa6bfb5304c51&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar 16, 09:42 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000587" id="c000587">(Link)</a></div>
<p> <a href="http://www.chilipepperdesign.com/" rel="nofollow">Evan Johnson</a> said: </div>
<p>@Andy – Some folks use that &#8220;landing page&#8221; terminology, yes. I’m not sure it’s standard though. </p>
<p>But yes, the way it works is: there is content for folks who Like  the page, and content for those who do not. It doesn’t matter if it is  the first visit or the 100th – they see content based on whether they  Like the page or not.</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=37627a965e92af6d6f5760e226797dbb&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar 16, 10:36 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000588" id="c000588">(Link)</a></div>
<p> andy mccormick said: </p></div>
<p>Evan,<br />I really appreciate your time on this.  I just seem to get conflicting  replies from different sources.  Before I jump into this stuff with  people asking me to help setup their pages, i want to make sure I am  clear.<br />&#8220;It doesn’t matter if it is the first visit or the 100th – they see content based on whether they Like the page or not&#8221;<br />So if i set up my index.php to direct them to either  &#8220;already_likeus.php&#8221; or &#8220;please_likeus.php&#8221; pages, and someone who likes us visits our page for the 100th time.  It should automatically direct  them to the &#8220;already_likeus.php&#8221; page as soon as they visit our Fan  page?<br />However it’s only directing our like fans, after they go to our page and then click on the tab under our profile pic.</p>
</p></div>
</p></div>
<div>
<div class="comment  mycomment">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=02bee2f91e0a8c3aefbfa6bfb5304c51&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar 17, 07:45 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000589" id="c000589">(Link)</a></div>
<p> <a href="http://www.chilipepperdesign.com/" rel="nofollow">Evan Johnson</a> said: </div>
<p>@andy – So, there are two things going on here.</p>
<p>1) There is the content on a single Tab, which shows different  content based on whether the visitor likes your Page or not. That’s what this article is about. You don’t have to, but you will probably set  this tab as your &#8220;Default Landing Tab&#8221;, which is #2:</p>
<p>2) There is the &#8220;Default Landing Tab&#8221; setting for your Page admin settings on Facebook. This allows you to select <strong>which Tab</strong> (Wall, Info, Photos, Your Custom App, etc) is shown by default – <strong>but only to visitors who have not Liked your Page yet</strong>. Once a visitor has Liked your Page, they land on the Wall by default, no matter what other Tab you set as the &#8220;Default&#8221;. </p>
<p>If a visitor Liked your page and they return they will probably land on the Wall. But they can obviously still click on your Welcome tab (or whatever you set your &#8220;Default Welcome Tab&#8221; to), and when they do so  they will see your &#8220;already_likeus.php&#8221; content on that Tab.</p>
<p>I hope this clarifies!</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=78ac286686882424e632d39e2efdd268&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar 18, 02:36 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000590" id="c000590">(Link)</a></div>
<p> <a href="http://www.punkska.com.ar/" rel="nofollow">JP</a> said: </div>
<p>Ive been fighting with this all day,I tried the codes from Evan,  then those from Jessica and i just tried the code from CJ but i cant  make it work :S</p>
<p>I cant get the content to change, but i also get the upper Facebook bar repeated inside the Tab. I dont know why…</p>
<p>The OAuth 2.0 for Canvas is Activated.<br />And this are the last codes i tried:</p>
<p><span class="caps">TAB</span>.PHP (this is my Tab Url at &#8220;Page Tabs&#8221;)</p>
<p>&lt;?php<br />require &#8216;facebook.php&#8217;;<br />$app_id = &#8220;xxxxxxxxxxx&#8221;;<br />$app_secret = &#8220;xxxxxxxxxxx&#8221;;<br />$facebook = new Facebook(array( &#8216;appId&#8217; =&gt; &#8216;MYAPPID&#8217;, &#8216;secret&#8217; =&gt; &#8216;MYSECRET&#8217;, &#8216;cookie&#8217; =&gt; true,<br />));</p>
<p>$signed_request = $facebook-&gt;getSignedRequest();<br />function parsePageSignedRequest() {  	if (isset($_REQUEST['signed_request'])) {  	$encoded_sig = null;  	$payload = null;  	list($encoded_sig, $payload) = explode(&#8216;.&#8217;, $_REQUEST['signed_request'], 2);  	$sig = base64_decode(strtr($encoded_sig, &#8216;-_&#8217;, &#8216;+/&#8217;));  	$data = json_decode(base64_decode(strtr($payload, &#8216;-_&#8217;, &#8216;+/&#8217;), true));  	  return $data;  	}  	return false;   }   if($signed_request = parsePageSignedRequest()) {  	if($signed_request-&gt;page-&gt;liked) { include(&#8220;index.php&#8221;);<br />} else { include(&#8220;nonfan.php&#8221;); } }</p>
<p>?&gt;</p>
<p>::::::::::::::::::::::::::::::::::::::</p>
<p><span class="caps">NONFAN</span>.PHP (code for non fans)</p>
<p>&lt;html&gt;<br />&lt;head&gt;<br />&lt;title&gt;no fan&lt;/title&gt;<br />&lt;/head&gt; &lt;body&gt; &lt;img src=&#8221;http://www.punkska.com.ar/img/myspace/punkska_myspace_r2_c5.jpg&#8221; width=&#8221;197&#8243; height=&#8221;67&#8243;&gt; &lt;/body&gt;<br />&lt;/html&gt;</p>
<p>::::::::::::::::::::::::::::::::::::::</p>
<p><span class="caps">INDEX</span>.PHP (code for fans)</p>
<p>&lt;html&gt;<br />&lt;head&gt;<br />&lt;title&gt;fan&lt;/title&gt;<br />&lt;/head&gt; &lt;body&gt; &lt;img src=&#8221;http://www.punkska.com.ar/img/myspace/punkska_myspace_r2_c2.jpg&#8221; width=&#8221;105&#8243; height=&#8221;67&#8243;&gt; &lt;/body&gt;<br />&lt;/html&gt;</p>
<p>I hope someone can point me my mistake.<br />Im really bad programming<br />Thanks in advance!</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=117d65c0f3aa851760aa756191eb1176&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar 18, 04:04 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000591" id="c000591">(Link)</a></div>
<p> Mina said: </p></div>
<p>Please Can you upload the exact files which i have to upload to get this script works ? </p>
<p>I confused with the the previous posts !</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=d17b06924459f15c08a23cef041f68b3&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar 20, 06:52 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000594" id="c000594">(Link)</a></div>
<p> <a href="http://chadwittman.com/" rel="nofollow">Chad Wittman</a> said: </div>
<p>Is anyone else having an issue with their iFrame tab loading?  Currently the user has to refresh the url twice, before seeing the tab.  Does anyone have a work around?</p>
<p>I thought maybe slipping a &lt;<span class="caps">META</span> http-equiv=&#8221;expires&#8221; content=&#8221;0&#8243;&gt; would do the trick, but it didn’t seem to help. Any ideas?</p>
<p>Working example:</p>
<p>http://www.facebook.com/SoBusNet?sk=app_190812514291117</p>
</p></div>
</p></div>
<div>
<div class="comment  mycomment">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=02bee2f91e0a8c3aefbfa6bfb5304c51&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar 20, 07:19 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000595" id="c000595">(Link)</a></div>
<p> <a href="http://www.chilipepperdesign.com/" rel="nofollow">Evan Johnson</a> said: </div>
<p>@Chad – Yes, the &#8220;blank tab&#8221; is an ongoing issue. Here are some bugs to watch:</p>
<p>1) <a href="http://bugs.developers.facebook.net/show_bug.cgi?id=15521" rel="nofollow">http://bugs.developers.facebook.net/show_bug.cgi?id=15521</a><br />2) <a href="http://bugs.developers.facebook.net/show_bug.cgi?id=11542" rel="nofollow">http://bugs.developers.facebook.net /show_bug.cgi?id=11542</a><br />3) <a href="http://bugs.developers.facebook.net/show_bug.cgi?id=15423" rel="nofollow">http://bugs.developers.facebook.net/show_bug.cgi?id=15423</a><br />4) <a href="http://bugs.developers.facebook.net/show_bug.cgi?id=15495" rel="nofollow">http://bugs.developers.facebook.net/show_bug.cgi?id=15495</a></p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=e123d47918cfaefe10c7dbd1a8a134cf&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar 20, 07:48 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000596" id="c000596">(Link)</a></div>
<p> Jason said: </p></div>
<p>@ Evan – Thanks for confirming that. I’ve had massive fits of anxiety and anger as to why that was happening.</p>
<p>I’m also having trouble with navigating between tabs. I have 3  iframe apps on a test page and i can’t use the &#8220;back&#8221; and &#8220;forward&#8221;  buttons on the browser. Forward is not an option and clicking back does  nothing.</p>
<p>I don’t know why but I keep getting weird urls such as:<br />http://www.facebook.com/pages/mypage/123456789012345?sk=app_123456789012345#!/pages/mypage/123456789012345?sk=app_123456789012345</p>
<p>instead of a <a href="http://en.wikipedia.org/wiki/Clean_URL" class="ml-smartlink">clean url</a> for each tab I click such as:<br />http://www.facebook.com/pages/mypage/123456789012345?sk=app_123456789012345</p>
<p>I hope someone can help me with this issue. And I’m currently using Jessica’s method for the &#8220;like-gate&#8221;.</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=36011ceeacffa4728799b190c0a2f945&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar 21, 01:54 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000597" id="c000597">(Link)</a></div>
<p> xtianity said: </p></div>
<p>hi Guys!</p>
<p>Level zero noobie here. :D</p>
<p>I want to put fan gate in all of my page tabs so non-liker cannot  see it. It is not being selfish or what… I just want to give privilages  to my loyal followers only.</p>
<p>I did everything using your methods(and codes) but still no avail.  Using my  own app id and secret, I got this error message while checking my tab. Please help me.. (wink wink)</p>
<p>&#8220;Fatal error: Uncaught exception &#8216;Exception&#8217; with message &#8216;Facebook needs the <span class="caps">CURL</span> <span class="caps">PHP</span> extension.&#8217; in /www/zxq.net/p/b/a/pbatambayan/htdocs/facebook/facebook.php:4 <a href="http://en.wikipedia.org/wiki/Stack_trace" class="ml-smartlink">Stack trace</a>: #0 /www/zxq.net/p/b/a/pbatambayan/htdocs/facebook/index.php(6): require() #1 {main} thrown in /www/zxq.net/p/b/a/pbatambayan/htdocs/facebook/facebook.php on line 4&#8243; </p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=e1418e8be97912a14daa0b2358db5519&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Mar 22, 06:38 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000598" id="c000598">(Link)</a></div>
<p> <a href="http://www.facebook.com/pages/I-like-big-butts-and-I-cannot-lie/121567324527376?sk=app_139388209465294" rel="nofollow">J.Mahoney</a> said: </div>
<p>I have gotten this example to work perfectly. Kudos.</p>
<p>I see a lot of people are having issues so I figured that if I posted the &#8220;fan page&#8221; i am using it on they can see first hand.</p>
<p>http://www.facebook.com/pages/I-like-big-butts-and-I-cannot-lie/121567324527376?sk=app_139388209465294</p>
<p>I hope that my use of your example helps others. Thank you so much again.</p>
<p>- JR.</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=db199bd486c60401f208331387b6d906&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Apr  5, 04:03 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000634" id="c000634">(Link)</a></div>
<p> Jamie said: </p></div>
<p>Great article thanks. What I’m unsure of is why you need the function to parse the signed request – it seems:</p>
<p>$signed_request = $facebook-&gt;getSignedRequest();</p>
<p>does the same thing, or am I missing something?</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=063def6d5d6307cb7cfce860ea553ff8&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Apr  7, 01:16 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000635" id="c000635">(Link)</a></div>
<p> Jessica said: </p></div>
<p>Thank you! Thank you! Thank you! Thank you! Thank you! I am just learning <span class="caps">HTML</span>/CSS/PHP and this tutorial saved me! Thanks also to Jessica. Both of you were so so helpful!</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=099d122ad82a5988e9621a9c1f0d91d5&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Apr  9, 07:27 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000637" id="c000637">(Link)</a></div>
<p> <a href="http://www.defactointeractif.com/" rel="nofollow">Geoff</a> said: </div>
<p>Nice article.</p>
<p>I am a .net developer and not a php developer but I applied this  pattern using the .net way of doing it, basically identical just  syntactical difference.  Just to address your point of it pointing to  your php root and php file, this can basically be any server side  technology and using the above pattern it is nice and cleanly done.</p>
<p>If anyone is interested in the .net code just add a comment here or get in touch with me it would be my pleasure to share it.</p>
<p>Nice work.</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=c8b713a064b98db3c422365c284b2ed1&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Apr 11, 05:01 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000638" id="c000638">(Link)</a></div>
<p> John said: </p></div>
<p>@Geoff:</p>
<p>I’m looking to do this in .NET – if you could post the code for it that would be much appreciated.</p>
<p>Thanks!</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=12ce800c486e7a6f43c50efb7f781923&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Apr 14, 11:22 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000640" id="c000640">(Link)</a></div>
<p> <a href="http://www.zgtec.com/" rel="nofollow">Josh</a> said: </div>
<p>Works Great! Thanks</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=274494ed18ca45cb1eccab13dd478199&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Apr 15, 09:17 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000641" id="c000641">(Link)</a></div>
<p> <a href="http://www.listingsmagic.com/" rel="nofollow">Hans</a> said: </div>
<p>I too am getting the issue with the reveal initial page loading  properly.  Any new insights into what is happening here – or more  importantly how to fix it?</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=b386593bcc6c578d8cbda66e1d7d8318&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Apr 19, 08:51 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000645" id="c000645">(Link)</a></div>
<p> Joe said: </p></div>
<p>I think I got it working, I just did this in my body tag, and it worked:</p>
<p>&lt;body&gt;<br />&lt;?php<br />$var_str_signed_request = $_REQUEST['signed_request'];</p>
<p>function parsePageSignedRequest() {    if (isset($_REQUEST['signed_request'])) {      $encoded_sig = null;      $payload = null;      list($encoded_sig, $payload) = explode(&#8216;.&#8217;, $_REQUEST['signed_request'], 2);      $sig = base64_decode(strtr($encoded_sig, &#8216;-_&#8217;, &#8216;+/&#8217;));      $data = json_decode(base64_decode(strtr($payload, &#8216;-_&#8217;, &#8216;+/&#8217;), true));      return $data;    }    return false;  }  if($var_str_signed_request = parsePageSignedRequest()) {    if($var_str_signed_request-&gt;page-&gt;liked) {     require (&#8216;page-liked.php&#8217;);    } else {     require (&#8216;page-unliked.php&#8217;);    };//if($var_str_signed_request-&gt;page-&gt;liked)  };//if($var_str_signed_request = parsePageSignedRequest())<br />?&gt;<br />&lt;/body&gt;</p>
<p>looks good?</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=d17b06924459f15c08a23cef041f68b3&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Apr 19, 03:08 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000646" id="c000646">(Link)</a></div>
<p> <a href="http://chadwittman.com/" rel="nofollow">Chad Wittman</a> said: </div>
<p>We’ve been monitoring all of the associated bugs with this issue. Facebook has noted the bug &amp; has assigned it a priority level (albeit a low  one) that they’re working on it. The issue does not seem fixable from a  developers side, but from Facebook devs. This issue is affecting all level of developers from corporate to amateurs.</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=e524520fde53a5db81b68b5f4bcf32eb&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Apr 21, 12:51 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000651" id="c000651">(Link)</a></div>
<p> <a href="http://www.socialgeek.net/" rel="nofollow">fr0zen</a> said: </div>
<p>Simply create 3 files<br />—————————————<br />index.php<br />liked.php<br />notliked.php<br />—————————————</p>
<p>1.   index.php<br />—————————————</p>
<p>&lt;?php</p>
<p>require &#8216;facebook.php&#8217;;</p>
<p>$app_id = &#8220;YOUR_APPLICATION_ID&#8221;;<br />$app_secret = &#8220;YOUR_APPLICATION_SECRET&#8221;;<br />$facebook = new Facebook(array(        &#8216;appId&#8217; =&gt; $app_id,        &#8216;secret&#8217; =&gt; $app_secret,        &#8216;cookie&#8217; =&gt; true<br />));</p>
<p>$signed_request = $facebook-&gt;getSignedRequest();</p>
<p>$page_id = $signed_request["page"]["id"];<br />$page_admin = $signed_request["page"]["admin"];<br />$like_status = $signed_request["page"]["liked"];<br />$country = $signed_request["user"]["country"];<br />$locale = $signed_request["user"]["locale"];</p>
<p>// If a fan is on your page<br />if ($like_status) {<br />$a = file_get_contents(&#8220;liked.php&#8221;);<br />echo ($a);<br />} else {<br />// If a non-fan is on your page<br />$a = file_get_contents(&#8220;notliked.php&#8221;);<br />echo ($a);<br />}</p>
<p>?&gt;<br />——————————————-</p>
<p>2. liked.php</p>
<p>——————————————-</p>
<p>&lt;!DOCTYPE html&gt;<br />&lt;html lang=&#8221;en&#8221;&gt;<br />&lt;script src=&#8221;js/scripts.js&#8221; type=&#8221;text/javascript&#8221;&gt;&lt;/script&gt;</p>
<p>&lt;script type=&#8217;text/javascript&#8217;&gt;<br />window.fbAsyncInit = function() {<br />FB.Canvas.setSize({ width: 520, height: 4500 });<br />}<br />// Do things that will sometimes call sizeChangeCallback()<br />function sizeChangeCallback() {<br />FB.Canvas.setSize({ width: 520, height: 4500 });<br />}<br />&lt;/script&gt;<br />&lt;head&gt; 	&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html; charset=utf-8&#8243;/&gt; 	&lt;meta name=&#8221;viewport&#8221; content=&#8221;width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no&#8221; /&gt; 	&lt;title&gt;Title&lt;/title&gt; 	&lt;link href=&#8221;style.css&#8221; rel=&#8221;stylesheet&#8221; type=&#8221;text/css&#8221; media=&#8221;screen&#8221; /&gt;</p>
<p>&lt;style type=&#8221;text/css&#8221;&gt; 	overflow:auto; 	overflow-x:hidden; <br />&lt;/style&gt;</p>
<p>&lt;/head&gt;<br />&lt;body&gt;</p>
<p>&lt;iframe src =&#8221;YOUR_WEBSITE_URL&#8221; scrolling=&#8221;no&#8221; marginwidth=&#8221;0&#8243;  marginheight=&#8221;0&#8243; frameborder=&#8221;0&#8243; style=&#8221;background:#fff&#8221; align=&#8221;center&#8221;  width=&#8221;512&#8243; height=&#8221;4000&#8243;&gt;&lt;/iframe&gt;</p>
<p>&lt;div id=&#8221;fb-root&#8221;&gt;&lt;/div&gt;<br />&lt;script src=&#8221;http://connect.facebook.net/en_US/all.js&#8221;&gt;&lt;/script&gt;<br />&lt;script&gt;<br />FB.init({<br />appId : &#8216;APP_ID&#8217;,<br />status : true, // check login status<br />cookie : true, // enable cookies to allow the server to access the session<br />xfbml : true // parse <span class="caps">XFBML</span><br />});<br />&lt;/script&gt;<br />&lt;/body&gt;<br />&lt;/html&gt;<br />——————————-</p>
<p>3. notliked.php</p>
<p>——————————-</p>
<p>&lt;!DOCTYPE html&gt;<br />&lt;html lang=&#8221;en&#8221;&gt;<br />&lt;head&gt; 	&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html; charset=utf-8&#8243;/&gt; 	&lt;meta name=&#8221;viewport&#8221; content=&#8221;width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no&#8221; /&gt; 	&lt;title&gt;Title&lt;/title&gt; 	&lt;link href=&#8221;style.css&#8221; rel=&#8221;stylesheet&#8221; type=&#8221;text/css&#8221; media=&#8221;screen&#8221; /&gt;</p>
<p>	&lt;style type=&#8221;text/css&#8221;&gt; 	overflow:auto;<br />overflow-x:hidden; <br />&lt;/style&gt;</p>
<p>&lt;/head&gt;<br />&lt;body&gt;</p>
<p>&lt;img border=&#8221;0&#8243; src=&#8221;http://img43.imageshack.us/img43/1517/likeme.png&#8221;"&gt;&lt;br&gt;</p>
<p>&lt;/body&gt;<br />&lt;/html&gt;<br />———————————————-</p>
<p>It works!</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=1baaf34d8cc9d6c365534a17a4adb2b1&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Apr 22, 01:54 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000654" id="c000654">(Link)</a></div>
<p> Ari said: </p></div>
<p>Thank you for this helpful post! I stumbled upon it while  researching how to create a Welcome landing tab that only non-fans will  see. I want people who have already liked the page to see the Wall. </p>
<p>Is it possible to do this? Not a fan-gate really since I’m not revealing secret content. I know how to do this with <span class="caps">FBML</span> but that doesn’t  help anymore. :(</p>
<p>Any ideas? Thank you for your time!</p>
</p></div>
</p></div>
<div>
<div class="comment  mycomment">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=02bee2f91e0a8c3aefbfa6bfb5304c51&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Apr 23, 11:51 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000655" id="c000655">(Link)</a></div>
<p> <a href="http://www.chilipepperdesign.com/" rel="nofollow">Evan Johnson</a> said: </div>
<p>@Ari – Visitors who are &#8220;Fans&#8221; see your Wall when they land on your  Page, even if you have another Tab set as the Default Landing Tab. They  can still go view your Welcome tab if they want, but they are sent to  the Wall first. The Default Landing Tab only works for new visitors who  are not fans yet.</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=1d189d882b96a9d30ea47c2b6062630d&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Apr 25, 09:06 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000656" id="c000656">(Link)</a></div>
<p> <a href="http://www.twitter.com/dubelclique" rel="nofollow">Joe Schaeffer</a> said: </div>
<p>@Geoff</p>
<p>I’d love to see your .Net sample code, if you’d be so kind. </p>
<p>Reach me at joe[at]dubelclique[dot]com or @dubelclique on <a href="http://twitter.com/" class="ml-smartlink">Twitter</a>. Thanks very much!</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=e6feda0451cd730dd9e79c83aa20517d&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Apr 26, 07:31 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000657" id="c000657">(Link)</a></div>
<p> Mat said: </p></div>
<p>Thanks Evan. Is it possible to apply this coding so that even the photos and wall are protected until a fan &#8220;Likes&#8221; a page?</p>
</p></div>
</p></div>
<div>
<div class="comment  mycomment">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=02bee2f91e0a8c3aefbfa6bfb5304c51&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Apr 26, 08:49 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000658" id="c000658">(Link)</a></div>
<p> <a href="http://www.chilipepperdesign.com/" rel="nofollow">Evan Johnson</a> said: </div>
<p>@Mat – No, this will only work for your custom tabs. You can remove  and turn off a lot of Wall and Photo features, but I do not believe  there is any way to limit if they are &#8220;fans only&#8221;.</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=02e1ab93d6b5fecf4736920c315e1e5f&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Apr 26, 04:04 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000659" id="c000659">(Link)</a></div>
<p> Adam said: </p></div>
<p>Hi everyone,</p>
<p>I noticed today on two separate pages that the reveal no longer  works. I implement the index.php with the non-fan and fan pages  designated, but nothing happens after the &#8216;like&#8217; anymore.</p>
<p>I was forced to change the non-fan and fan pages to the same page (the second page in the funnel).</p>
<p>Anyone else experience this? Anyone know of a work around? Seems Facebook keeps making it harder and harder for non-agencies (i.e. casual developers).</p>
</p></div>
</p></div>
<div>
<div class="comment  mycomment">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=02bee2f91e0a8c3aefbfa6bfb5304c51&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Apr 28, 07:33 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000663" id="c000663">(Link)</a></div>
<p> <a href="http://www.chilipepperdesign.com/" rel="nofollow">Evan Johnson</a> said: </div>
<p>@Adam – My implementations of the Reveal code still appear to be  working, not sure what issue you are experiencing. You know what they  say about Facebook though: if you don’t like the <span class="caps">API</span>, wait 5 minutes. ;)</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=a47ae350df4bf330c22ca4eca0f346ce&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Apr 29, 05:00 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000665" id="c000665">(Link)</a></div>
<p> <a href="http://www.leukerder.nl/" rel="nofollow">Marien</a> said: </div>
<p>Hi,</p>
<p>Does someone know how i can display the First Name of a facebook user on the non-face page.<br />Currently i am using the liked.php and notlike.php code.</p>
<p>Thanks in advance!</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=77dfcf903c947cf674f2b382de592152&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On May  1, 09:36 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000666" id="c000666">(Link)</a></div>
<p> <a href="http://www.walrusinacanoe.com/" rel="nofollow">David</a> said: </div>
<p>Awesome article, thanks a bunch.</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=d954f27210f25d4f1f6e722f61a3967e&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On May  3, 10:47 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000668" id="c000668">(Link)</a></div>
<p> Matt said: </p></div>
<p>Wow, thanks so much Evan. This has helped a <span class="caps">TON</span>!</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=4a2dd6e1c6d54c9f1cc4c3f9a243bcc9&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On May 11, 10:14 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000673" id="c000673">(Link)</a></div>
<p> <a href="http://bananasdesign.net/" rel="nofollow">Nuno Lourenço</a> said: </div>
<p>Jessica, your tab.php really helped me out!<br />since i’m not so good with php and in order to keep my work organized i did this:</p>
<p>&lt;? require &#8216;facebook.php&#8217;;<br />$app_id = &#8220;xxxxxx&#8221;;<br />$app_secret = &#8220;zzzzz&#8221;;<br />$facebook = new Facebook(array(<br />&#8216;appId&#8217; =&gt; $app_id,<br />&#8216;secret&#8217; =&gt; $app_secret,<br />&#8216;cookie&#8217; =&gt; true<br />));<br />$signed_request = $facebook-&gt;getSignedRequest();<br />function parsePageSignedRequest() {    if (isset($_REQUEST['signed_request'])) {      $encoded_sig = null;      $payload = null;      list($encoded_sig, $payload) = explode(&#8216;.&#8217;, $_REQUEST['signed_request'], 2);      $sig = base64_decode(strtr($encoded_sig, &#8216;-_&#8217;, &#8216;+/&#8217;));      $data = json_decode(base64_decode(strtr($payload, &#8216;-_&#8217;, &#8216;+/&#8217;), true));      return $data;    }    return false;  }  if($signed_request = parsePageSignedRequest()) {    if($signed_request-&gt;page-&gt;liked) {      header(&#8220;Location: index.html&#8221;);    } else {      header(&#8220;Location: nofan.html&#8221;);    }  }</p>
<p>?&gt;</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=9108d039500c52f80cf8746ad8c1a607&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On May 11, 10:15 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000674" id="c000674">(Link)</a></div>
<p> Yaron said: </p></div>
<p>Hi,</p>
<p>first, thanks for this post.<br />I tried implementing the examples and I noticed that the php scripts stop running post the including of &#8216;facebook.php&#8217; (using the &#8220;require&#8221; pragma). thus, of course, the desired goal is not achieved. <br />Any ideas?</p>
<p>thanks again.</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=2dff2663778048d49ebb542735b2c22e&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On May 12, 09:28 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000675" id="c000675">(Link)</a></div>
<p> <a href="http://www.bpulse.co.uk/blog/using-asp-net-to-read-the-facebook-signed_request-object-passed-to-iframe-tabs" rel="nofollow">Ben Parsons</a> said: </div>
<p>I found this page while looking for information on how to vary  content based on whether on not users like a different page to the  current one, but it seems this can’t be done without user authentication or tracking when the user first clicks &#8220;Like&#8221; (which is no use for  users that have already liked.)</p>
<p>Some commenters here have been asking for a version written in <span class="caps">ASP</span>.NET, take a look below to see essentially the same as this article but using C#/ASP.NET</p>
<p>http://www.bpulse.co.uk/blog/using-asp-net-to-read-the-facebook-signed_request-object-passed-to-iframe-tabs</p>
<p>(You can also click my name as I can’t work out how to make a link in this comment area.)</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=e123d47918cfaefe10c7dbd1a8a134cf&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On May 24, 10:16 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000681" id="c000681">(Link)</a></div>
<p> Jason said: </p></div>
<p>So, I have 30 apps that each have a facebook.php file residing in  their respective folders. Since the V3 of the php sdk just came out is  there way to have all 30 apps reference the same facebook.php file? That way I can just replace one file and it would reflect in all my apps.  instead of going into each app one by one and replaceing the facebook.php file.</p>
<p>  I tried using:  &lt;?php  include(&#8216;http://mysite.com/fbtest/facebook.php&#8217;); but the I kept getting an error. Also, i’m not a php guru so perhaps i’m going about this all wrong.    </p></div>
</p></div>
<div>
<div class="comment  mycomment">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=02bee2f91e0a8c3aefbfa6bfb5304c51&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On May 24, 01:41 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000682" id="c000682">(Link)</a></div>
<p> <a href="http://www.chilipepperdesign.com/" rel="nofollow">Evan Johnson</a> said: </div>
<p>@Jason – It all depends on how your webroot folder structure is set up, but this should be possible, yes. You cannot reference <span class="caps">PHP</span> files via public <span class="caps">URL</span> however, it needs to be the relative path on your server. Something  more like: &#8220;/var/www/mysite.com/fbtest&#8221; (or whatever the correct path is for your server environment.</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=7e187d92c6074e7ad8a2c97619453b07&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On May 24, 06:39 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000683" id="c000683">(Link)</a></div>
<p> Jeff said: </p></div>
<p>If you are using getSignedRequest() from the facebook.php include, there’s no reason to include the parse function!</p>
<p>&lt;?php<br />require &#8216;facebook.php&#8217;;<br />$app_id = &#8220;YOUR <span class="caps">APPID</span>&#8220;;<br />$app_secret = &#8220;YOUR <span class="caps">APP</span> <span class="caps">SECRET</span>&#8220;;<br />$facebook = new Facebook(array(<br />&#8216;appId&#8217; =&gt; $app_id,<br />&#8216;secret&#8217; =&gt; $app_secret,<br />&#8216;cookie&#8217; =&gt; true<br />));<br />$signed_request = $facebook-&gt;getSignedRequest();<br />if($signed_request-&gt;page-&gt;liked) {      echo &#8220;This content is for Fans only!&#8221;;    } else {      echo &#8220;Please click on the Like button to view this tab!&#8221;;    }<br />——-</p>
<p>Or, don’t bother to include facebook.php and just use the function. Both methods do the same thing.</p>
<p>&lt;?php<br />function parsePageSignedRequest() {    if (isset($_REQUEST['signed_request'])) {      $encoded_sig = null;      $payload = null;      list($encoded_sig, $payload) = explode(&#8216;.&#8217;, $_REQUEST['signed_request'], 2);      $sig = base64_decode(strtr($encoded_sig, &#8216;-_&#8217;, &#8216;+/&#8217;));      $data = json_decode(base64_decode(strtr($payload, &#8216;-_&#8217;, &#8216;+/&#8217;), true));      return $data;    }    return false;  }<br />$signed_request = parsePageSignedRequest();<br />if($signed_request-&gt;page-&gt;liked) {      echo &#8220;This content is for Fans only!&#8221;;    } else {      echo &#8220;Please click on the Like button to view this tab!&#8221;;    }  }</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=e123d47918cfaefe10c7dbd1a8a134cf&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On May 25, 09:49 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000685" id="c000685">(Link)</a></div>
<p> Jason said: </p></div>
<p>@Evan, Thank you very much!! That definitely pointed me in the right direction, and now I’ve got it working nicely.</p>
<p>@Jeff Thanks also for your input, it is very useful to know that.</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=1e8d45444e8393698226e92afbd7631d&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Jun  5, 06:50 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000690" id="c000690">(Link)</a></div>
<p> <a href="http://www.festivaltix.com.au/" rel="nofollow">JudgeT</a> said: </div>
<p>I’d just like to point out that frozen’s example works perfectly. I only had to add the facebook.php file to the directory. So go with that one guys if you are having problems. This saved my life!!!!</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=f3855e5a62edb92cc8d75d424b86d6be&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Jun  5, 09:18 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000691" id="c000691">(Link)</a></div>
<p> <a href="http://www.google.com/" rel="nofollow">ClassicASP</a> said: </div>
<p>all I got to say is… <span class="caps">THANK</span> <span class="caps">THE</span> <span class="caps">LORD</span> I ran into this.. :)</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=12f7d01c67caf14147c9a39689ce6873&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Jun  6, 10:49 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000692" id="c000692">(Link)</a></div>
<p> <a href="http://www.heidibruner.com/" rel="nofollow">James</a> said: </div>
<p>I was having major trouble with this. Jessica, you’re a saint. Thank you so much.</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=01e5a13f883ea42f034147553d69fa01&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Jun  7, 09:55 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000695" id="c000695">(Link)</a></div>
<p> <a href="http://kifuzzy.net/" rel="nofollow">Juri</a> said: </div>
<p>great work, thank you!!! </p>
<p>writing from germany, sites in german and the site kifuzzy.net is a &#8220;playground&#8221; to test some css and html .. </p>
<p>the fanpage is <br />http://facebook.com/kifuzzy<br />it comes from:<br />http://kifuzzy.net/fb/apps/hp1/liked.php or notliked.php</p>
<p>only some problems with iexplorer version 8.x and up …..</p>
<p>opera 11.x, firefox 4.x, safari 5.x on win-pc works fine :) </p>
<p>i used the index.php to decide wether fan or not a fan, application  side canvas is the directory where the files are, tab url is the same  (both only direcory name without a file.name (canvas must a direcory  without filename, tab-url could be a diret filename)<br />…<br />all i need was:</p>
<p>&lt;?php<br />// der weg ueber drei dateien<br />require &#8216;phpsdk/src/facebook.php&#8217;;<br />$app_id = &#8220;app_id&#8221;;<br />$app_secret = &#8220;the_secret&#8221;;<br />$facebook = new Facebook(array( &#8216;appId&#8217; =&gt; $app_id, &#8216;secret&#8217; =&gt; $app_secret, &#8216;cookie&#8217; =&gt; true<br />));<br />$signed_request = $facebook-&gt;getSignedRequest();<br />$page_id = $signed_request["page"]["id"];<br />$page_admin = $signed_request["page"]["admin"];<br />$like_status = $signed_request["page"]["liked"];<br />$country = $signed_request["user"]["country"];<br />$locale = $signed_request["user"]["locale"];<br />// If a fan is on your page<br />if ($like_status) {<br />$a = file_get_contents(&#8220;liked.php&#8221;);<br />echo ($a);<br />} else {<br />// If a non-fan is on your page<br />$a = file_get_contents(&#8220;notliked.php&#8221;);<br />echo ($a);<br />}<br />?&gt;</p>
<p>thx god for this site and tutorial, you made my day  :))))</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=03f1b479bcc21b4a2e27d254bd67f98d&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Jun 10, 05:51 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000697" id="c000697">(Link)</a></div>
<p> <a href="http://oyemexico.com/" rel="nofollow">Carlos Bolaños</a> said: </div>
<p>Hi, i have a problem </p>
<p>Warning: session_start() [function.session-start]: Cannot send  session cache limiter – headers already sent (output started at  /home/epocamed/public_html/App/OM/indexFBML_OM.php:11) in  /home/epocamed/public_html/App/OM/facebook.php  on line 37</p>
<p>What Hapend!?. please, help me</p>
<p>My fanpages is http://www.facebook.com/OyeMexico</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=b60f6a4b17c8c0419a84ad6828d5af0e&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Jun 15, 06:23 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000700" id="c000700">(Link)</a></div>
<p> Tom said: </p></div>
<p>Thank you so much for this!   (Would be very cool to see this  translated into javascript sdk if it’s possible to do in js alone.)</p>
<p>Is it possible to do this with content that’s on another server?  ie the app is on your server, but the like and not llike pages are on a  different server?</p>
<p>As in pseudo code:</p>
<p>if (like)  show <a href="http://google.com/" class="ml-smartlink">google.com</a> in our iframe<br />else  show <a href="http://bing.com/" class="ml-smartlink">bing.com</a> in our iframe</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=3bad5108ec836b4f62f14e4e2cfc143f&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Jun 23, 08:25 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000705" id="c000705">(Link)</a></div>
<p> DK said: </p></div>
<p>Im getting this error: Parse error: syntax error, unexpected  T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or &#8216;}&#8217; in  /home/content…</p>
<p>Any ideas?</p>
<p>thanks!</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=39506331e92d3e3e6f30b1e4b35b0f7b&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Jun 29, 02:00 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000706" id="c000706">(Link)</a></div>
<p> vadim said: </p></div>
<p>Excellent article. Very helpful, saved me a lot of head banging. Thank you.</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=2359d1280a6d53b98683275129daee4d&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Jun 30, 01:13 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000707" id="c000707">(Link)</a></div>
<p> <a href="http://www.hillmanb2.com/" rel="nofollow">Christopher Bryant</a> said: </div>
<p>Mind numbing repetitious error!</p>
<p>Having a very difficult time getting beyond a pesky error.  Even though I <span class="caps">LIKE</span> my page and have the correct <span class="caps">APP</span> ID &amp; <span class="caps">SECRET</span>, I am constantly being sent to the <span class="caps">NON</span> <span class="caps">FAN</span> page.  I have checked each files, for errors according to the postings  in this blog.  Useful help would be appreciated.  Thanks in advance.</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=e123d47918cfaefe10c7dbd1a8a134cf&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Jun 30, 10:57 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000708" id="c000708">(Link)</a></div>
<p> Jason M. said: </p></div>
<p>Has anyone gotten fangating/signed request to work properly with the New Version 3 <span class="caps">PHP</span> <span class="caps">SDK</span>? My apps break when I switch from version 2 to version 3 of the <span class="caps">PHP</span> <span class="caps">SDK</span>. Thought I would put this out there now, since we will need to upgrade all our apps soon. I don’t think <span class="caps">PHPSDK</span> version 2 will be supported after version 3 has been fully rolled out with the new JavaScript <span class="caps">SDK</span>. Any insights would be greatly appreciated.</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=35230764f073d2b5579c3609b117147b&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Jul  1, 09:32 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000709" id="c000709">(Link)</a></div>
<p> Jeremy said: </p></div>
<p>@Geoff</p>
<p>I am very interested in using the .net coding for the reveal tab. Could you please post an example for me to look at? Thanks.</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=317f01b92ea09f42ba67070ba93210dc&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Jul  4, 04:05 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000712" id="c000712">(Link)</a></div>
<p> amy said: </p></div>
<p>Hi – I copied what fr0zen said:</p>
<p>Simply create 3 files<br />—————————————<br />index.php<br />liked.php<br />notliked.php</p>
<p>Upload the code to the live server and get the following message:</p>
<p>v\Warning: require(facebook.php) [function.require]: failed to open stream: No such file or directory in /var/www/vhosts/xx.com/index.php  on line 3</p>
<p>Does this mean I need to get the facebook.php file form someehere and install it in my folder? Thanks</p>
</p></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=482fa69b674da9e1cd4bd48af4abb854&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Jul  6, 06:42 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000714" id="c000714">(Link)</a></div>
<p> <a href="http://www.simon-taylor.net/" rel="nofollow">Simon</a> said: </div>
<p>I have the exact same error as Amy [above] what is? and where do i get facebook.php from? </p>
<p>What does it contain? </p>
<p>Simon</p>
</p></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <img src="http://www.gravatar.com/avatar.php?gravatar_id=8fa1dc985e4f78723d9a449a63520380&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Jul  7, 01:39 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000715" id="c000715">(Link)</a></div>
<p> <a href="http://schmidtmedia-design.de/" rel="nofollow">SMD</a> said: </div>
<p>Great article.</p>
<p>I had finished a Multitab site and couldn’t get the Fangating to  work.I am simply calling the index.html for likers, non – likers will  see an image.</p>
<p>But it did now thanks to you guys,</p>
<p>Cheers Sabi from <span class="caps">SMD</span> http://www.facebook.com/schmidtmediadesigns</p>
<p>&lt;? require &#8216;facebook.php&#8217;;<br />$app_id = &#8220;YOUR <span class="caps">APP</span> ID&#8221;;<br />$app_secret = &#8220;YOUR <span class="caps">APP</span> <span class="caps">SECRET</span>&#8220;;<br />$facebook = new Facebook(array(<br />&#8216;appId&#8217; =&gt; $app_id,<br />&#8216;secret&#8217; =&gt; $app_secret,<br />&#8216;cookie&#8217; =&gt; true<br />));</p>
<p>$signed_request = $facebook-&gt;getSignedRequest();<br />function parsePageSignedRequest() { if  (isset($_REQUEST['signed_request'])) { $encoded_sig = null; $payload =  null; list($encoded_sig, $payload) = explode(&#8216;.&#8217;,  $_REQUEST['signed_request'], 2); $sig =  base64_decode(strtr($encoded_sig, &#8216;<del><em>&#8216;, &#8216;<ins>/&#8217;)); $data = json_decode(base64_decode(strtr($payload, &#8216;</ins></em></del><em><ins>&#8216;, &#8216;</ins>/&#8217;), true)); return $data; } return false; } if($signed_request =  parsePageSignedRequest()) { if($signed_request-&gt;page-&gt;liked) {  include(&#8220;index.html&#8221;);</em></p>
<p>  <em>
<p>} else { echo &#8220;&lt;img  src=\&#8221;http://66.147.244.51/~zingtabs/schmidtmedia/Travelinspector/reveal1a.jpg\&#8221; width=\&#8221;520\&#8221; height=\&#8221;769\&#8221;&gt;&#8221;; } } </p>
<p>?&gt;&lt;script type=&#8221;text/javascript&#8221;&gt;<br />window.fbAsyncInit = function() {<br />FB.Canvas.setSize({ height: 1920 });<br />}<br />// Do things that will sometimes call sizeChangeCallback()<br />function sizeChangeCallback() {<br />FB.Canvas.setSize();<br />}<br />&lt;/script&gt;<br />&lt;div id=&#8221;fb-root&#8221;&gt;&lt;/div&gt;<br />&lt;script src=&#8221;http://connect.facebook.net/en_US/all.js&#8221;&gt;&lt;/script&gt;<br />&lt;script&gt;<br />FB.init({<br />appId : &#8216;YOUR <span class="caps">APP</span> ID&#8217;,<br />status : true, // check login status<br />cookie : true, // enable cookies to allow the server to access the session<br />xfbml : true // parse <span class="caps">XFBML</span><br />});<br />&lt;/script&gt;</p>
<p>    </em></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <em><img src="http://www.gravatar.com/avatar.php?gravatar_id=eadea4475c00bdf3151b4342342a5b3e&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Jul 11, 02:44 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000720" id="c000720">(Link)</a></div>
<p> <a href="http://chefatlarge.in/" rel="nofollow">Chef at Large</a> said: </em></div>
<p>  <em>
<p>Worked like a charm the very first time.  I’m just trying to  figure out now how to remove the vertical and horizontal scrollbars that have appeared.</p>
<p>Thanks a ton!</p>
<p>    </em></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <em><img src="http://www.gravatar.com/avatar.php?gravatar_id=8fa1dc985e4f78723d9a449a63520380&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Jul 11, 02:50 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000721" id="c000721">(Link)</a></div>
<p> <a href="http://www.schmidtmedia-design.de/" rel="nofollow">SMD</a> said: </em></div>
<p>  <em>
<p>@Simon: you’ll get the facebook.php and facebook_base.php in the library you can download it here http://hyperarts.com/facebook/downloads/HyperArts_SR_PHP.zip or just <a href="http://www.google.com/" class="ml-smartlink">google</a> it.</p>
<p>Cheers,</p>
<p>Sabi</p>
<p>    </em></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <em><img src="http://www.gravatar.com/avatar.php?gravatar_id=317f01b92ea09f42ba67070ba93210dc&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Jul 24, 07:40 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000726" id="c000726">(Link)</a></div>
<p> Amy said: </em></div>
<p>  <em>
<p>Hi – I got the facebook.php file form and can view the files on the domain name fine. I cant get them to work though when I try to view this <span class="caps">URL</span> as a canvas <span class="caps">URL</span>.</p>
<p>On the application profile page &gt; if I select go to App &gt; I can view the image fine</p>
<p>But when I go to the tab on the page I get the following error when i try to view it:</p>
<p>Not Found<br />The requested document was not found on this server.</p>
<p>Help? It feels like Im so close..</p>
<p>    </em></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <em><img src="http://www.gravatar.com/avatar.php?gravatar_id=9e485a441d84514d5d15569db4e2faa6&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Jul 25, 03:17 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000727" id="c000727">(Link)</a></div>
<p> <a href="http://www.pamperme.ie/" rel="nofollow">Niall</a> said: </em></div>
<p>  <em>
<p>OK, I have spent <span class="caps">DAYS</span> at this now and <span class="caps">STILL</span> can’t get it to work. I should point out I am <span class="caps">NOT</span> a <span class="caps">PHP</span> developer but have developers background.</p>
<p>I have used all the code on this page to test my application and no matter what I do I can not get <span class="caps">ANYTHING</span> to return on my app page.</p>
<p>Even if I use the code and do simple text echos to see if it is &#8220;LIKED&#8221; or &#8220;Not <span class="caps">LIKED</span>&#8221; my app page appears <span class="caps">BLANK</span> <span class="caps">EVERY</span> <span class="caps">TIME</span>! not loading <span class="caps">ANYTHING</span>!?!?</p>
<p>I am at my wits end at this stage. May last attempt was using  fr0zens sample as of Apr 21st and even following that to the letter  still gives me the same result!!</p>
<p>Can someone <span class="caps">PLEASE</span> help me before i shoot myself (not really)</p>
<p>Thanks</p>
<p>Niall</p>
<p>    </em></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <em><img src="http://www.gravatar.com/avatar.php?gravatar_id=f481e62321de86a533386e79fe1911f5&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Jul 28, 10:37 PM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000728" id="c000728">(Link)</a></div>
<p> James said: </em></div>
<p>  <em>
<p>Still cannot get this to work, I keep getting</p>
<p>Warning: require_once(base_facebook.php) [function.require-once]:  failed to open stream: No such file or directory in  /home/yewwwcom/public_html/projects/facebook/facebook.php on line 18</p>
<p>Fatal error: require_once() [function.require]: Failed opening  required &#8216;base_facebook.php&#8217;  (include_path=&#8217;.:/usr/lib/php:/usr/local/lib/php&#8217;) in  /home/yewwwcom/public_html/projects/facebook/facebook.php on line 18</p>
<p>I have zero php experience so I have just been trying to follow  exactly what others have done. i.e. naming my php docs exactly the same  etc.</p>
<p>    </em></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <em><img src="http://www.gravatar.com/avatar.php?gravatar_id=8fa1dc985e4f78723d9a449a63520380&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Jul 31, 05:29 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000730" id="c000730">(Link)</a></div>
<p> <a href="http://www.schmidtmedia-design.de/" rel="nofollow">Sabi</a> said: </em></div>
<p>  <em>
<p>@Niall and James:</p>
<p>Did you use the latest Facebook <span class="caps">SDK</span>?</p>
<p>This is the code that works like a charm for me- you can always PM me too. </p>
<p>Cheers Sabi from <span class="caps">SMD</span> http://www.fb.com/schmidtmediadesigns</p>
<p>&lt;? require &#8216;facebook.php&#8217;;<br />$app_id = &#8220;YOUR <span class="caps">APP</span> ID&#8221;;<br />$app_secret = &#8220;YOUR <span class="caps">APP</span> <span class="caps">SECRET</span>&#8220;;<br />$facebook = new Facebook(array(<br />&#8216;appId&#8217; =&gt; $app_id,<br />&#8216;secret&#8217; =&gt; $app_secret,<br />&#8216;cookie&#8217; =&gt; true<br />));</p>
<p>$signed_request = $facebook-&gt;getSignedRequest();<br />function parsePageSignedRequest() { if  (isset($_REQUEST['signed_request'])) { $encoded_sig = null; $payload =  null; list($encoded_sig, $payload) = explode(&#8216;.&#8217;,  $_REQUEST['signed_request'], 2); $sig =  base64_decode(strtr($encoded_sig, &#8221;, &#8216;/&#8217;)); $data =  json_decode(base64_decode(strtr($payload, &#8221;, &#8216;/&#8217;), true)); return  $data; } return false; } if($signed_request = parsePageSignedRequest()) { if($signed_request-&gt;page-&gt;liked) { include(&#8220;index.html&#8221;);</p>
<p>} else { echo &#8220;&lt;img  src=\&#8221;http://66.147.244.51/~zingtabs/schmidtmedia/Travelinspector/reveal1a.jpg\&#8221; width=\&#8221;520\&#8221; height=\&#8221;769\&#8221;&gt;&#8221;; } }</p>
<p>?&gt;&lt;script type=&#8221;text/javascript&#8221;&gt;<br />window.fbAsyncInit = function() {<br />FB.Canvas.setSize({ height: 1920 });<br />}<br />// Do things that will sometimes call sizeChangeCallback()<br />function sizeChangeCallback() {<br />FB.Canvas.setSize();<br />}<br />&lt;/script&gt;<br />&lt;div id=&#8221;fb-root&#8221;&gt;&lt;/div&gt;<br />&lt;script src=&#8221;http://connect.facebook.net/en_US/all.js&#8221;&gt;&lt;/script&gt;<br />&lt;script&gt;<br />FB.init({<br />appId : &#8216;YOUR <span class="caps">APP</span> ID&#8217;,<br />status : true, // check login status<br />cookie : true, // enable cookies to allow the server to access the session<br />xfbml : true // parse <span class="caps">XFBML</span><br />});<br />&lt;/script&gt;</p>
<p>    </em></div>
</p></div>
<div>
<div class="comment  odd">
<div class="comment-meta"> <em><img src="http://www.gravatar.com/avatar.php?gravatar_id=fd4e801769bd2a67a5c0f3da638730a9&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Jul 31, 08:57 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000731" id="c000731">(Link)</a></div>
<p> <a href="http://www.pamperme.ie/" rel="nofollow">Niall</a> said: </em></div>
<p>  <em>
<p>Just to let you know, it took that long for my post to pass the moderator, I managed to work out my problem!</p>
<p>It turns out my domain was <span class="caps">NOT</span> <span class="caps">PHP</span> 5 enabled. Once I sorted that, everything clicked into place!!</p>
<p>Hair growing back….all’s good in the world again! :D</p>
<p>    </em></div>
</p></div>
<div>
<div class="comment  even">
<div class="comment-meta"> <em><img src="http://www.gravatar.com/avatar.php?gravatar_id=00112d0c3f108d73b43d73e1fb820dcc&amp;rating=PG&amp;size=60" class="gravatar" alt="Gravatar Image" style="height: 60px; width: 60px;" />
<div class="tiny-date">On Aug  3, 09:38 AM, <a href="http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php#c000732" id="c000732">(Link)</a></div>
<p> Arun said: </em></div>
<p>  <em>
<p>Thanks a bunch for taking time and posting this article. Can’t  tell you how much I tried for this feature. Finally some how ended up  landing on this page. Just to add more info here, I got some <span class="caps">PHP</span> errrors while using this because of <span class="caps">JSON</span> decode thing. Here is the link to solve that error:</p>
<p>http://blog.silviasoft.com/2009/11/19/fatal-error-call-to-undefined-function-json_decode-php-version/</p>
<p>Also just make sure that your server has <span class="caps">PHP</span> 5.0/above installed without which FB <span class="caps">SDK</span> will throw errors. </p>
<p>Thank you again!!</p>
<p>    </em></div>
</p></div>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=53c30a5e-75f3-8eec-8ac8-cfb13edb5d76" /></div>
<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fericrichers.com%2Fblog%2F2011%2F08%2Fiframe-tab-application-on-facebook%2F&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div class="rw-left"><div class="rw-ui-container rw-class-blog-post rw-urid-10840"></div></div>]]></content:encoded>
			<wfw:commentRss>http://ericrichers.com/blog/2011/08/iframe-tab-application-on-facebook/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Generating Files with JavaScript</title>
		<link>http://ericrichers.com/blog/2011/08/generating-files-with-javascript/</link>
		<comments>http://ericrichers.com/blog/2011/08/generating-files-with-javascript/#comments</comments>
		<pubDate>Sat, 13 Aug 2011 22:01:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Kitchen Sink]]></category>

		<guid isPermaLink="false">http://ericrichers.com/blog/2011/08/generating-files-with-javascript/</guid>
		<description><![CDATA[Generating Files with JavaScript Posted by Martin Angelov on May 17th, 2011 in jQuery PHP DemoDownload When building a web application, you oftentimes need to give users the ability to download a piece of data as a file. It could &#8230; <a href="http://ericrichers.com/blog/2011/08/generating-files-with-javascript/">Read More.. <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div id="main">
<h1 class="postTitle">Generating Files with JavaScript</h1>
<div id="content" class="contentSection">
<div id="featuredImage" style="background-image:url('http://cdn.tutorialzine.com/img/featured/1461.jpg')"></div>
<div id="postAuthor">Posted by <strong>Martin Angelov</strong> on <strong>May 17th, 2011</strong> in</p>
<ul id="postCategories">
<li class="active"><a href="http://tutorialzine.com/category/jquery-tutorials/" title="Browse This Category">jQuery</a></li>
<li class="active"><a href="http://tutorialzine.com/category/php-tutorials/" title="Browse This Category">PHP</a></li>
</ul>
</div>
<div id="topMiniShare" style="opacity: 1; ">
<div class="topMiniShare">        <iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Ftutorialzine.com%2F2011%2F05%2Fgenerating-files-javascript-php%2F&amp;text=Generating Files with JavaScript&amp;via=tutorialzine&amp;count=horizontal" style="width:105px; height:22px;"><br />
        </iframe></p>
<p>        <iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftutorialzine.com%2F2011%2F05%2Fgenerating-files-javascript-php%2F&amp;layout=button_count&amp;show_faces=false&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:150px; height:21px;" allowtransparency="true"></iframe></div>
</div>
<div id="downloadDemo" class="both">
<p>            <a href="http://demo.tutorialzine.com/2011/05/generating-files-javascript-php/" class="greenButton demo" target="_blank">Demo</a><a href="http://demo.tutorialzine.com/2011/05/generating-files-javascript-php/generateFile.zip" class="greenButton download">Download</a>            </p>
<div class="line"></div>
</div>
<p>            <!-- Wide Zine Ad--></p>
<div id="wideZineBanner">
<p>                <a href="http://www.zinescripts.com/products/slickgallery/" target="_blank"><img src="http://cdn.tutorialzine.com/wp-content/themes/tzine/img/banners/banner_wide_1.jpg" width="625" height="100" alt="AJAX Image Gallery Script - SlickGallery 1.0" title="Find out more about SlickGallery, our AJAX gallery script!"/></a>            </p>
</div>
<div class="line" style="margin:25px auto 5px;"></div>
<p>            <!-- Wide Ad End --></p>
<div id="postBody">
<p>When building a web application, you oftentimes need to give users the ability to download a piece of data as a file. It could be a backup of configuration settings, reports, or other piece of information that is generated dynamically.</p>
<p>The usual solution to this problem would be to have a dedicated export script that selects from a database and builds the file you need. However, as we will be proving in this short tutorial, there is another way.</p>
<p>We will make a jQuery plugin which, combined with a simple php script, can generate every kind of textual file, and make it available for download. You will initiate the download from your JavaScript front end by only providing the file contents, and leave the rest to the plugin.</p>
<h3>The HTML</h3>
<p>We shall start by laying down a simple HTML page with a textarea and a download button, so we can demonstrate the plugin at work.</p>
<h4>index.html</h4>
<div id="highlighter_993730" class="syntaxhighlighter  ">
<div class="bar             ">
<div class="toolbar"><a href="#viewSource" title="view source" style="width: 16px; height: 16px; " class="item viewSource">view source</a></p>
<div class="item copyToClipboard"><embed width="16" height="16" id="highlighter_993730_clipboard" type="application/x-shockwave-flash" title="copy to clipboard" allowscriptaccess="always" wmode="transparent" flashvars="highlighterId=highlighter_993730" menu="false" src="/wp-content/plugins/easy-google-syntax-highlighter/scripts/clipboard.swf"></embed></div>
<p><a href="#printSource" title="print" style="width: 16px; height: 16px; " class="item printSource">print</a><a href="#about" title="?" style="width: 16px; height: 16px; " class="item about">?</a></p>
</div>
</div>
<div class="lines">
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>01</code></td>
<td class="content"><code class="plain">&lt;!DOCTYPE html&gt;</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>02</code></td>
<td class="content"><code class="plain">&lt;</code><code class="keyword">html</code><code class="plain">&gt;</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>03</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">&lt;</code><code class="keyword">head</code><code class="plain">&gt;</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>04</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">&lt;</code><code class="keyword">meta</code> <code class="color1">charset</code><code class="plain">=</code><code class="string">"utf-8"</code> <code class="plain">/&gt;</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>05</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>06</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">&lt;</code><code class="keyword">title</code><code class="plain">&gt;Generating files with JS &amp;amp; PHP | Tutorialzine Demo&lt;/</code><code class="keyword">title</code><code class="plain">&gt;</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>07</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>08</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="comments">&lt;!-- Our CSS stylesheet file --&gt;</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>09</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">&lt;</code><code class="keyword">link</code> <code class="color1">rel</code><code class="plain">=</code><code class="string">"stylesheet"</code> <code class="color1">href</code><code class="plain">=</code><code class="string">"assets/css/styles.css"</code> <code class="plain">/&gt;</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>10</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>11</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="comments">&lt;!--[if lt IE 9]&gt;</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>12</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="comments">&lt;script src="<a href="http://html5shiv.googlecode.com/svn/trunk/html5.js">http://html5shiv.googlecode.com/svn/trunk/html5.js</a>"&gt;&lt;/script&gt;</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>13</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="comments">&lt;![endif]--&gt;</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>14</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">&lt;/</code><code class="keyword">head</code><code class="plain">&gt;</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>15</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>16</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">&lt;</code><code class="keyword">body</code><code class="plain">&gt;</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>17</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>18</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">&lt;</code><code class="keyword">header</code><code class="plain">&gt;</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>19</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">&lt;</code><code class="keyword">h1</code><code class="plain">&gt;Generating Files with JavaScript&lt;/</code><code class="keyword">h1</code><code class="plain">&gt;</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>20</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">&lt;</code><code class="keyword">h2</code><code class="plain">&gt;&lt;</code><code class="keyword">a</code> <code class="color1">href</code><code class="plain">=</code><code class="string">"<a href="http://tutorialzine.com/2011/05/generating-files-javascript-php/">http://tutorialzine.com/2011/05/generating-files-javascript-php/</a>"</code><code class="plain">&gt;&amp;laquo; Read and download on Tutorialzine&lt;/</code><code class="keyword">a</code><code class="plain">&gt;&lt;/</code><code class="keyword">h2</code><code class="plain">&gt;</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>21</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">&lt;/</code><code class="keyword">header</code><code class="plain">&gt;</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>22</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>23</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">&lt;</code><code class="keyword">form</code> <code class="color1">action</code><code class="plain">=</code><code class="string">"./"</code> <code class="color1">method</code><code class="plain">=</code><code class="string">"post"</code><code class="plain">&gt;</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>24</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">&lt;</code><code class="keyword">textarea</code><code class="plain">&gt;&lt;/</code><code class="keyword">textarea</code><code class="plain">&gt;</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>25</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">&lt;</code><code class="keyword">a</code> <code class="color1">href</code><code class="plain">=</code><code class="string">"#"</code> <code class="color1">class</code><code class="plain">=</code><code class="string">"blueButton"</code> <code class="color1">id</code><code class="plain">=</code><code class="string">"download"</code><code class="plain">&gt;Download&lt;/</code><code class="keyword">a</code><code class="plain">&gt;</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>26</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">&lt;/</code><code class="keyword">form</code><code class="plain">&gt;</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>27</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>28</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">&lt;</code><code class="keyword">footer</code><code class="plain">&gt;Another cool example: &lt;</code><code class="keyword">a</code> <code class="color1">href</code><code class="plain">=</code><code class="string">"#"</code> <code class="color1">id</code><code class="plain">=</code><code class="string">"downloadPage"</code><code class="plain">&gt;download this page.&lt;/</code><code class="keyword">a</code><code class="plain">&gt; &lt;</code><code class="keyword">b</code><code class="plain">&gt;To download the source code, visit &lt;</code><code class="keyword">a</code> <code class="color1">href</code><code class="plain">=</code><code class="string">"<a href="http://tutorialzine.com/2011/05/generating-files-javascript-php/">http://tutorialzine.com/2011/05/generating-files-javascript-php/</a>"</code><code class="plain">&gt;Tutorialzine.com&lt;/</code><code class="keyword">a</code><code class="plain">&gt;&lt;/</code><code class="keyword">b</code><code class="plain">&gt;&lt;/</code><code class="keyword">footer</code><code class="plain">&gt;</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>29</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>30</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">&lt;</code><code class="keyword">script</code> <code class="color1">src</code><code class="plain">=</code><code class="string">"<a href="http://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js">http://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js</a>"</code><code class="plain">&gt;&lt;/</code><code class="keyword">script</code><code class="plain">&gt;</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>31</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">&lt;</code><code class="keyword">script</code> <code class="color1">src</code><code class="plain">=</code><code class="string">"assets/js/jquery.generateFile.js"</code><code class="plain">&gt;&lt;/</code><code class="keyword">script</code><code class="plain">&gt;</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>32</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">&lt;</code><code class="keyword">script</code> <code class="color1">src</code><code class="plain">=</code><code class="string">"assets/js/script.js"</code><code class="plain">&gt;&lt;/</code><code class="keyword">script</code><code class="plain">&gt;</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>33</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>34</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">&lt;/</code><code class="keyword">body</code><code class="plain">&gt;</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>35</code></td>
<td class="content"><code class="plain">&lt;/</code><code class="keyword">html</code><code class="plain">&gt;</code></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<p>The page uses the HTML5 doctype, as we are using some of the tags defined by the standard. For it to work in IE, we also need to include the <a href="http://remysharp.com/2009/01/07/html5-enabling-script/" target="_blank">HTML5 enabling script</a> in the head section.</p>
<p>Before the closing body tag, we are adding the jQuery library, the <em>generateFile plugin</em> we will be writing in a moment, and the <em>script.js</em> file that listens for events and triggers the file downloads.</p>
<div id="attachment_1465" class="wp-caption alignnone" style="width: 630px"><a href="http://demo.tutorialzine.com/2011/05/generating-files-javascript-php/"><img class="size-full wp-image-1465" title="Generating Files with jQuery and PHP" src="http://cdn.tutorialzine.com/wp-content/uploads/2011/05/downloading-files-jquery-php.jpg" alt="Generating Files with jQuery and PHP" width="620" height="460"/></a></p>
<p class="wp-caption-text">Generating Files with jQuery and PHP</p>
</div>
<h3>The PHP</h3>
<p>As you probably know, generating files is not possible with JavaScript alone. Different solutions exist (some of them even relying on Flash), but using a generic PHP script on the backend provides better control and ease of use (not to mention that it works in every major browser out there).</p>
<p>You can see the generic file generation script below:</p>
<h4>download.php</h4>
<div id="highlighter_435990" class="syntaxhighlighter  ">
<div class="bar">
<div class="toolbar"><a href="#viewSource" title="view source" style="width: 16px; height: 16px; " class="item viewSource">view source</a></p>
<div class="item copyToClipboard"><embed width="16" height="16" id="highlighter_435990_clipboard" type="application/x-shockwave-flash" title="copy to clipboard" allowscriptaccess="always" wmode="transparent" flashvars="highlighterId=highlighter_435990" menu="false" src="/wp-content/plugins/easy-google-syntax-highlighter/scripts/clipboard.swf"></embed></div>
<p><a href="#printSource" title="print" style="width: 16px; height: 16px; " class="item printSource">print</a><a href="#about" title="?" style="width: 16px; height: 16px; " class="item about">?</a></p>
</div>
</div>
<div class="lines">
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>01</code></td>
<td class="content"><code class="keyword">if</code><code class="plain">(</code><code class="functions">empty</code><code class="plain">(</code><code class="variable">$_POST</code><code class="plain">[</code><code class="string">'filename'</code><code class="plain">]) || </code><code class="functions">empty</code><code class="plain">(</code><code class="variable">$_POST</code><code class="plain">[</code><code class="string">'content'</code><code class="plain">])){</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>02</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="functions">exit</code><code class="plain">;</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>03</code></td>
<td class="content"><code class="plain">}</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>04</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>05</code></td>
<td class="content"><code class="comments">// Sanitizing the filename:</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>06</code></td>
<td class="content"><code class="variable">$filename</code> <code class="plain">= preg_replace(</code><code class="string">'/[^a-z0-9\-\_\.]/i'</code><code class="plain">,</code><code class="string">''</code><code class="plain">,</code><code class="variable">$_POST</code><code class="plain">[</code><code class="string">'filename'</code><code class="plain">]);</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>07</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>08</code></td>
<td class="content"><code class="comments">// Outputting headers:</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>09</code></td>
<td class="content"><code class="plain">header(</code><code class="string">"Cache-Control: "</code><code class="plain">);</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>10</code></td>
<td class="content"><code class="plain">header(</code><code class="string">"Content-type: text/plain"</code><code class="plain">);</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>11</code></td>
<td class="content"><code class="plain">header(</code><code class="string">'Content-Disposition: attachment; filename="'</code><code class="plain">.</code><code class="variable">$filename</code><code class="plain">.</code><code class="string">'"'</code><code class="plain">);</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>12</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>13</code></td>
<td class="content"><code class="functions">echo</code> <code class="variable">$_POST</code><code class="plain">[</code><code class="string">'content'</code><code class="plain">];</code></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<p>What this PHP script does is simply add some headers on top of an echo statement. The plugin we are building must pass two parameters along with the POST request: <em>filename</em> and <em>content</em>. The script will print the content of the file, while setting three headers that will force the file download box to appear (instead of your browser simply opening it).</p>
<p>To use the plugin you need to upload this file somewhere on your server  and pass its URL to the plugin we will be coding next.</p>
<h3>The jQuery</h3>
<p>As you saw in the previous section, our plugin has to issue a POST request to <em>download.php</em>. The natural choice for making a request would be by using AJAX. However, there is a shortcoming to using this method – it does not trigger the file download dialog to appear.</p>
<p>So what we need is a bit more old school. We will be dynamically creating a hidden iframe and write a form to it, which we will later submit via POST. The action attribute of the form points to <em>download.php</em>, so the file download dialog will pop up, exactly as we need it to.</p>
<p>Now lets lay down the jQuery code that does this:</p>
<h4>assets/jquery.generateFile.js</h4>
<div id="highlighter_651953" class="syntaxhighlighter  ">
<div class="bar           ">
<div class="toolbar"><a href="#viewSource" title="view source" style="width: 16px; height: 16px; " class="item viewSource">view source</a></p>
<div class="item copyToClipboard"><embed width="16" height="16" id="highlighter_651953_clipboard" type="application/x-shockwave-flash" title="copy to clipboard" allowscriptaccess="always" wmode="transparent" flashvars="highlighterId=highlighter_651953" menu="false" src="/wp-content/plugins/easy-google-syntax-highlighter/scripts/clipboard.swf"></embed></div>
<p><a href="#printSource" title="print" style="width: 16px; height: 16px; " class="item printSource">print</a><a href="#about" title="?" style="width: 16px; height: 16px; " class="item about">?</a></p>
</div>
</div>
<div class="lines">
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>01</code></td>
<td class="content"><code class="plain">(</code><code class="keyword">function</code><code class="plain">($){</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>02</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>03</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="comments">// Creating a jQuery plugin:</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>04</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>05</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">$.generateFile = </code><code class="keyword">function</code><code class="plain">(options){</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>06</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>07</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">options = options || {};</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>08</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>09</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="keyword">if</code><code class="plain">(!options.script || !options.filename || !options.content){</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>10</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="keyword">throw</code> <code class="keyword">new</code> <code class="plain">Error(</code><code class="string">"Please enter all the required config options!"</code><code class="plain">);</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>11</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">}</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>12</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>13</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="comments">// Creating a 1 by 1 px invisible iframe:</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>14</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>15</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="keyword">var</code> <code class="plain">iframe = $(</code><code class="string">'&lt;iframe&gt;'</code><code class="plain">,{</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>16</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">width:1,</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>17</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">height:1,</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>18</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">frameborder:0,</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>19</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">css:{</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>20</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">display:</code><code class="string">'none'</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>21</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">}</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>22</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">}).appendTo(</code><code class="string">'body'</code><code class="plain">);</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>23</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>24</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="keyword">var</code> <code class="plain">formHTML = </code><code class="string">'&lt;form action="" method="post"&gt;'</code><code class="plain">+</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>25</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="string">'&lt;input type="hidden" name="filename" /&gt;'</code><code class="plain">+</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>26</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="string">'&lt;input type="hidden" name="content" /&gt;'</code><code class="plain">+</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>27</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="string">'&lt;/form&gt;'</code><code class="plain">;</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>28</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>29</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="comments">// Giving IE a chance to build the DOM in</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>30</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="comments">// the iframe with a short timeout:</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>31</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>32</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">setTimeout(</code><code class="keyword">function</code><code class="plain">(){</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>33</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>34</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="comments">// The body element of the iframe document:</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>35</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>36</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="keyword">var</code> <code class="plain">body = (iframe.prop(</code><code class="string">'contentDocument'</code><code class="plain">) !== undefined) ?</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>37</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">iframe.prop(</code><code class="string">'contentDocument'</code><code class="plain">).body :</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>38</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">iframe.prop(</code><code class="string">'document'</code><code class="plain">).body;&nbsp;&nbsp; </code><code class="comments">// IE</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>39</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>40</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">body = $(body);</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>41</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>42</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="comments">// Adding the form to the body:</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>43</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">body.html(formHTML);</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>44</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>45</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="keyword">var</code> <code class="plain">form = body.find(</code><code class="string">'form'</code><code class="plain">);</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>46</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>47</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">form.attr(</code><code class="string">'action'</code><code class="plain">,options.script);</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>48</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">form.find(</code><code class="string">'input[name=filename]'</code><code class="plain">).val(options.filename);</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>49</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">form.find(</code><code class="string">'input[name=content]'</code><code class="plain">).val(options.content);</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>50</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>51</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="comments">// Submitting the form to download.php. This will</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>52</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="comments">// cause the file download dialog box to appear.</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>53</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>54</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">form.submit();</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>55</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">},50);</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>56</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">};</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>57</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>58</code></td>
<td class="content"><code class="plain">})(jQuery);</code></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<p>In less than 50 lines (with comments stripped) the above fragment does what we need. It creates a hidden iframe with a form inside it.</p>
<p>Notice the <code>setTimeout()</code> function. Without it we cannot access the document element of the iframe in Internet Explorer. This way, we are giving it time to build the DOM and make it available to us.</p>
<p>And here is how to use this plugin:</p>
<h4>assets/script.js</h4>
<div id="highlighter_75383" class="syntaxhighlighter  ">
<div class="bar              ">
<div class="toolbar"><a href="#viewSource" title="view source" style="width: 16px; height: 16px; " class="item viewSource">view source</a></p>
<div class="item copyToClipboard"><embed width="16" height="16" id="highlighter_75383_clipboard" type="application/x-shockwave-flash" title="copy to clipboard" allowscriptaccess="always" wmode="transparent" flashvars="highlighterId=highlighter_75383" menu="false" src="/wp-content/plugins/easy-google-syntax-highlighter/scripts/clipboard.swf"></embed></div>
<p><a href="#printSource" title="print" style="width: 16px; height: 16px; " class="item printSource">print</a><a href="#about" title="?" style="width: 16px; height: 16px; " class="item about">?</a></p>
</div>
</div>
<div class="lines">
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>01</code></td>
<td class="content"><code class="plain">$(document).ready(</code><code class="keyword">function</code><code class="plain">(){</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>02</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>03</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">$(</code><code class="string">'#download'</code><code class="plain">).click(</code><code class="keyword">function</code><code class="plain">(e){</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>04</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>05</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">$.generateFile({</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>06</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">filename&nbsp;&nbsp;&nbsp; : </code><code class="string">'export.txt'</code><code class="plain">,</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>07</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">content&nbsp;&nbsp;&nbsp;&nbsp; : $(</code><code class="string">'textarea'</code><code class="plain">).val(),</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>08</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">script&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : </code><code class="string">'download.php'</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>09</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">});</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>10</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>11</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">e.preventDefault();</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>12</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">});</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>13</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>14</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">$(</code><code class="string">'#downloadPage'</code><code class="plain">).click(</code><code class="keyword">function</code><code class="plain">(e){</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>15</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>16</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">$.generateFile({</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>17</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">filename&nbsp;&nbsp;&nbsp; : </code><code class="string">'page.html'</code><code class="plain">,</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>18</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">content&nbsp;&nbsp;&nbsp;&nbsp; : $(</code><code class="string">'html'</code><code class="plain">).html(),</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>19</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">script&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : </code><code class="string">'download.php'</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>20</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">});</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>21</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>22</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">e.preventDefault();</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>23</code></td>
<td class="content"><code class="spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="plain">});</code></td>
</tr>
</tbody>
</table>
</div>
<div class="line alt2">
<table>
<tbody>
<tr>
<td class="number"><code>24</code></td>
<td class="content">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="line alt1">
<table>
<tbody>
<tr>
<td class="number"><code>25</code></td>
<td class="content"><code class="plain">});</code></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<p>When calling <code>$.generateFile</code>, you need to pass the name of the file (should be something descriptive), its text content, and the path to download.php. As you can see in the example above, we can generate any kind of file, as long as it is text.</p>
<p><strong>With this our simple plugin is complete!</strong></p>
<h3>Conclusion</h3>
<p>You can use this code to add export features to your web app or enhance certain areas of your site with download functionality. It is even possible to generate doc files and spreadsheets if you follow <a href="http://en.wikipedia.org/wiki/Microsoft_Office_XML_formats" target="_blank">Microsoft Office’s XML formats</a>. The best part is that everything is done with JavaScript and you can easily combine different sources of data.</p>
</div>
</div>
<div id="shareSection" class="contentSection">
<h4>Sharing is caring</h4>
<p>If you enjoyed this post, feel free to<br />
 share it with your friends.</p>
<div id="shareButtons" style="opacity: 1; ">
<p>    <!--</p>
<div class="shareService">        <iframe scrolling="no" height="61" frameborder="0" width="50" src="http://api.tweetmeme.com/button.js?url=http%3A%2F%2Ftutorialzine.com%2F2011%2F05%2Fgenerating-files-javascript-php%2F&amp;style=normal"></iframe>    </p>
</div>
<p>&#8211;></p>
<div class="shareService twitter">        <iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Ftutorialzine.com%2F2011%2F05%2Fgenerating-files-javascript-php%2F&amp;text=Generating Files with JavaScript&amp;via=tutorialzine&amp;count=vertical" style="width:60px; height:80px;"><br />
        </iframe>    </div>
<div class="shareService">        <span class="db-wrapper db-clear db-medium"><span><span class="db-container"><span class="db-body db-medium"><span class="db-count">1</span><span class="db-copy">digg</span><a class="db-anchor">digg</a></span></span></span></span></div>
<div class="shareService">        <iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftutorialzine.com%2F2011%2F05%2Fgenerating-files-javascript-php%2F&amp;layout=button_count&amp;show_faces=false&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowtransparency="true"></iframe>    </div>
<div id="miniShareContainer">        <a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftutorialzine.com%2F2011%2F05%2Fgenerating-files-javascript-php%2F&amp;title=Generating+Files+with+JavaScript" class="stumbleupon" title="Submit to StumbleUpon!" target="_blank"></a><br />
        <a href="http://delicious.com/post?url=http%3A%2F%2Ftutorialzine.com%2F2011%2F05%2Fgenerating-files-javascript-php%2F&amp;title=Generating+Files+with+JavaScript&amp;notes=This+time+we+will+be+making+a+jQuery+plugin+which%2C+combined+with+a+simple+php+script%2C+can+generate+a+file+and+make+it+available+for+download.+Perfect+for+exporting+the+settings+of+your+webapp+or+providing+reports." class="delicious" title="Submit to Delicious!" target="_blank"></a><br />
        <a href="http://reddit.com/submit?url=http%3A%2F%2Ftutorialzine.com%2F2011%2F05%2Fgenerating-files-javascript-php%2F&amp;title=Generating+Files+with+JavaScript" class="reddit" title="Submit to Reddit!" target="_blank"></a><br />
        <a href="http://www.google.com/buzz/post?url=http%3A%2F%2Ftutorialzine.com%2F2011%2F05%2Fgenerating-files-javascript-php%2F" onclick="window.open(this.href,  '_blank',  'resizable=0,scrollbars=0,width=690,height=415');return false;" class="googlebuzz" title="Submit to GoogleBuzz!" target="_blank"></a>    </div>
</div>
</div>
<p>        <script type="text/javascript">            var shareButtons = {"html":"\n\t\n\t<!--
<div class=\"shareService\">\n\t\t<iframe scrolling=\"no\" height=\"61\" frameborder=\"0\" width=\"50\" src=\"http:\/\/api.tweetmeme.com\/button.js?url=http%3A%2F%2Ftutorialzine.com%2F2011%2F05%2Fgenerating-files-javascript-php%2F&amp;style=normal\">< \/iframe>\n\t< \/div>-->\n\t\n\t
<div class=\"shareService twitter\">\n\t\t<iframe allowtransparency=\"true\" frameborder=\"0\" scrolling=\"no\"\n\t\t\tsrc=\"http:\/\/platform.twitter.com\/widgets\/tweet_button.html?url=http%3A%2F%2Ftutorialzine.com%2F2011%2F05%2Fgenerating-files-javascript-php%2F&amp;text=Generating Files with JavaScript&amp;via=tutorialzine&amp;count=vertical\"\n\t\t\tstyle=\"width:60px; height:80px;\">\n\t\t< \/iframe>\n\t< \/div>\n\t\n\t
<div class=\"shareService\">\n\t\t<a class=\"DiggThisButton DiggMedium\">< \/a>\n\t\t<script type=\"text\/javascript\">\n\t\t\t(function() {\n\t\t\tvar s = document.createElement(\"SCRIPT\"), s1 = document.getElementsByTagName(\"SCRIPT\")[0];\n\t\t\ts.type = \"text\/javascript\";\n\t\t\ts.async = true;\n\t\t\ts.src = \"http:\/\/widgets.digg.com\/buttons.js\";\n\t\t\ts1.parentNode.insertBefore(s, s1);\n\t\t\t})();\n\t\t< \/script>\n\t< \/div>\n\t\n\t
<div class=\"shareService\">\n\t\t<iframe src=\"http:\/\/www.facebook.com\/plugins\/like.php?href=http%3A%2F%2Ftutorialzine.com%2F2011%2F05%2Fgenerating-files-javascript-php%2F&amp;layout=button_count&amp;show_faces=false&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=21\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:450px; height:21px;\" allowTransparency=\"true\">< \/iframe>\n\t< \/div>\n\t\n\t
<div id=\"miniShareContainer\">\n\t\t<a href=\"http:\/\/www.stumbleupon.com\/submit?url=http%3A%2F%2Ftutorialzine.com%2F2011%2F05%2Fgenerating-files-javascript-php%2F&amp;title=Generating+Files+with+JavaScript\" class=\"stumbleupon\" title=\"Submit to StumbleUpon!\" target=\"_blank\">< \/a>\n\t\t</a><a href=\"http:\/\/delicious.com\/post?url=http%3A%2F%2Ftutorialzine.com%2F2011%2F05%2Fgenerating-files-javascript-php%2F&amp;title=Generating+Files+with+JavaScript&amp;notes=This+time+we+will+be+making+a+jQuery+plugin+which%2C+combined+with+a+simple+php+script%2C+can+generate+a+file+and+make+it+available+for+download.+Perfect+for+exporting+the+settings+of+your+webapp+or+providing+reports.\" class=\"delicious\" title=\"Submit to Delicious!\" target=\"_blank\">< \/a>\n\t\t</a><a href=\"http:\/\/reddit.com\/submit?url=http%3A%2F%2Ftutorialzine.com%2F2011%2F05%2Fgenerating-files-javascript-php%2F&amp;title=Generating+Files+with+JavaScript\" class=\"reddit\" title=\"Submit to Reddit!\" target=\"_blank\">< \/a>\n\t\t</a><a href=\"http:\/\/www.google.com\/buzz\/post?url=http%3A%2F%2Ftutorialzine.com%2F2011%2F05%2Fgenerating-files-javascript-php%2F\" onclick=\"window.open(this.href,  '_blank',  'resizable=0,scrollbars=0,width=690,height=415');return false;\" class=\"googlebuzz\" title=\"Submit to GoogleBuzz!\" target=\"_blank\">< \/a>\n\t< \/div>\n\t","htmlMINI":"\n\t\n\t
<div class=\"topMiniShare\">\n\t\t<iframe allowtransparency=\"true\" frameborder=\"0\" scrolling=\"no\"\n\t\t\tsrc=\"http:\/\/platform.twitter.com\/widgets\/tweet_button.html?url=http%3A%2F%2Ftutorialzine.com%2F2011%2F05%2Fgenerating-files-javascript-php%2F&amp;text=Generating Files with JavaScript&amp;via=tutorialzine&amp;count=horizontal\"\n\t\t\tstyle=\"width:105px; height:22px;\">\n\t\t< \/iframe>\n\t\t\n\t\t</iframe><iframe src=\"http:\/\/www.facebook.com\/plugins\/like.php?href=http%3A%2F%2Ftutorialzine.com%2F2011%2F05%2Fgenerating-files-javascript-php%2F&amp;layout=button_count&amp;show_faces=false&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=21\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:150px; height:21px;\" allowTransparency=\"true\">< \/iframe>\n\t\t\n\t< \/div>\n\t"};            var postData = {"link":"http:\/\/tutorialzine.com\/2011\/05\/generating-files-javascript-php\/","title":"Generating Files with JavaScript"};        </iframe></div>
<p></a></div>
<p></iframe></div>
<p></script></a></div>
<p></iframe></div>
<p></iframe></script></p>
<div id="relatedSection" class="contentSection">
<h4><span title="Show More Related"></span>Related Tutorials</h4>
<div class="line"></div>
<ul>
<li><a href="http://tutorialzine.com/2011/08/display-favorite-tweets-php-css/" title="Display your Favorite Tweets using PHP and jQuery"><img src="http://cdn.tutorialzine.com/img/posts/1559" alt="Display your Favorite Tweets using PHP and jQuery" width="135" height="135"/></a></li>
<li><a href="http://tutorialzine.com/2011/07/bubble-slideshow-jquery-css/" title="Bubble Slideshow Effect with jQuery"><img src="http://cdn.tutorialzine.com/img/posts/1551" alt="Bubble Slideshow Effect with jQuery" width="135" height="135"/></a></li>
<li><a href="http://tutorialzine.com/2011/07/spinning-newspaper-effect-css3/" title="Having Fun With CSS3: Spinning Newspapers"><img src="http://cdn.tutorialzine.com/img/posts/1543" alt="Having Fun With CSS3: Spinning Newspapers" width="135" height="135"/></a></li>
<li><a href="http://tutorialzine.com/2011/07/about-page-vcard-php-css/" title="Creating a PHP and CSS3 Powered About Page"><img src="http://cdn.tutorialzine.com/img/posts/1530" alt="Creating a PHP and CSS3 Powered About Page" width="135" height="135"/></a></li>
</ul>
<div class="clear"></div>
</div>
<div id="comments" class="contentSection padded30">
<h4><b>13</b> Comments</h4>
<div class="line"></div>
<ol>
<li class="comment even thread-even depth-1" id="comment-17498">
<div id="div-comment-17498" class="comment-body">
<div class="comment-author vcard">        <img alt="" src="http://1.gravatar.com/avatar/ffc9aecd5ec6b3049226b200551e5327?s=60&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D60&amp;r=G" class="avatar avatar-60 photo" height="60" width="60"/>      <cite class="fn"><a href="http://kadeparchment.com/" rel="external nofollow" class="url">kerron</a></cite> <span class="says">says:</span>      </div>
<div class="comment-meta commentmetadata"><a href="http://tutorialzine.com/2011/05/generating-files-javascript-php/#comment-17498"><br />
            May 17, 2011 at 11:05 am</a>        </div>
<p>very useful tut. haven’t tested it out yet, but it will be useful for a little project i’m working on.</p>
<p>cheers!</p>
<div class="reply">        <a class="comment-reply-link" href="/2011/05/generating-files-javascript-php/?replytocom=17498#respond" onclick="return addComment.moveForm(&quot;div-comment-17498&quot;, &quot;17498&quot;, &quot;respond&quot;, &quot;1461&quot;)">Reply</a>     </div>
</div>
</li>
<li class="comment odd alt thread-odd thread-alt depth-1" id="comment-17513">
<div id="div-comment-17513" class="comment-body">
<div class="comment-author vcard">        <img alt="" src="http://0.gravatar.com/avatar/8f3075dc2278a39b600098685cfae85d?s=60&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D60&amp;r=G" class="avatar avatar-60 photo" height="60" width="60"/>      <cite class="fn"><a href="http://codecanyon.net/item/pagemoonator-mootools-scrolling-paginator/159413" rel="external nofollow" class="url">Alex</a></cite> <span class="says">says:</span>      </div>
<div class="comment-meta commentmetadata"><a href="http://tutorialzine.com/2011/05/generating-files-javascript-php/#comment-17513"><br />
            May 18, 2011 at 3:38 am</a>     </div>
<p>Miss-leading title. Add at the end: …and PHP</p>
<div class="reply">        <a class="comment-reply-link" href="/2011/05/generating-files-javascript-php/?replytocom=17513#respond" onclick="return addComment.moveForm(&quot;div-comment-17513&quot;, &quot;17513&quot;, &quot;respond&quot;, &quot;1461&quot;)">Reply</a>     </div>
</div>
</li>
<li class="comment even thread-even depth-1" id="comment-17516">
<div id="div-comment-17516" class="comment-body">
<div class="comment-author vcard">        <img alt="" src="http://0.gravatar.com/avatar/cf9cb254911bfdde830be11e164db78f?s=60&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D60&amp;r=G" class="avatar avatar-60 photo" height="60" width="60"/>      <cite class="fn"><a href="http://beben-koben.blogspot.com/" rel="external nofollow" class="url">Beben Koben</a></cite> <span class="says">says:</span>      </div>
<div class="comment-meta commentmetadata"><a href="http://tutorialzine.com/2011/05/generating-files-javascript-php/#comment-17516"><br />
            May 18, 2011 at 5:28 am</a>     </div>
<p>woh…this is cool</p>
<p>keep posted master :D</p>
<div class="reply">        <a class="comment-reply-link" href="/2011/05/generating-files-javascript-php/?replytocom=17516#respond" onclick="return addComment.moveForm(&quot;div-comment-17516&quot;, &quot;17516&quot;, &quot;respond&quot;, &quot;1461&quot;)">Reply</a>     </div>
</div>
</li>
<li class="comment odd alt thread-odd thread-alt depth-1" id="comment-17635">
<div id="div-comment-17635" class="comment-body">
<div class="comment-author vcard">        <img alt="" src="http://0.gravatar.com/avatar/00b4271f4e07d40b9c3a8bb5aad77049?s=60&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D60&amp;r=G" class="avatar avatar-60 photo" height="60" width="60"/>      <cite class="fn">Sharun Kumar</cite> <span class="says">says:</span>        </div>
<div class="comment-meta commentmetadata"><a href="http://tutorialzine.com/2011/05/generating-files-javascript-php/#comment-17635"><br />
            May 22, 2011 at 10:25 pm</a>        </div>
<p>Cool!!!!!</p>
<div class="reply">        <a class="comment-reply-link" href="/2011/05/generating-files-javascript-php/?replytocom=17635#respond" onclick="return addComment.moveForm(&quot;div-comment-17635&quot;, &quot;17635&quot;, &quot;respond&quot;, &quot;1461&quot;)">Reply</a>     </div>
</div>
</li>
<li class="comment even thread-even depth-1 parent" id="comment-17701">
<div id="div-comment-17701" class="comment-body">
<div class="comment-author vcard">        <img alt="" src="http://0.gravatar.com/avatar/63f4e5fe7a708632a0f451e9203a6bc3?s=60&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D60&amp;r=G" class="avatar avatar-60 photo" height="60" width="60"/>      <cite class="fn"><a href="http://www.pcadviser.ro" rel="external nofollow" class="url">Dan Partac</a></cite> <span class="says">says:</span>        </div>
<div class="comment-meta commentmetadata"><a href="http://tutorialzine.com/2011/05/generating-files-javascript-php/#comment-17701"><br />
            May 25, 2011 at 2:13 am</a>     </div>
<p>Hey Martin,</p>
<p>This does not work for me and I need such a solution, please help me track the issue.</p>
<p>Danny</p>
<div class="reply">        <a class="comment-reply-link" href="/2011/05/generating-files-javascript-php/?replytocom=17701#respond" onclick="return addComment.moveForm(&quot;div-comment-17701&quot;, &quot;17701&quot;, &quot;respond&quot;, &quot;1461&quot;)">Reply</a>     </div>
</div>
<ol class="children">
<li class="comment byuser comment-author-admin bypostauthor odd alt depth-2 parent" id="comment-17730">
<div id="div-comment-17730" class="comment-body">
<div class="comment-author vcard">        <img alt="" src="http://1.gravatar.com/avatar/18635cef09f45858ce6b07c8612c9f5b?s=60&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D60&amp;r=G" class="avatar avatar-60 photo" height="60" width="60"/>      <cite class="fn">Martin Angelov</cite> <span class="says">says:</span>      </div>
<div class="comment-meta commentmetadata"><a href="http://tutorialzine.com/2011/05/generating-files-javascript-php/#comment-17730"><br />
            May 26, 2011 at 12:52 am</a>        </div>
<p>It doesn’t work on the demo site here, or when you set it up on your host?</p>
<p>If it is the latter case, you will need to give a link to your page.</p>
<div class="reply">        <a class="comment-reply-link" href="/2011/05/generating-files-javascript-php/?replytocom=17730#respond" onclick="return addComment.moveForm(&quot;div-comment-17730&quot;, &quot;17730&quot;, &quot;respond&quot;, &quot;1461&quot;)">Reply</a>     </div>
</div>
<ol class="children">
<li class="comment even depth-3" id="comment-17734">
<div id="div-comment-17734" class="comment-body">
<div class="comment-author vcard">        <img alt="" src="http://0.gravatar.com/avatar/63f4e5fe7a708632a0f451e9203a6bc3?s=60&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D60&amp;r=G" class="avatar avatar-60 photo" height="60" width="60"/>      <cite class="fn"><a href="http://www.pcadviser.ro/" rel="external nofollow" class="url">Dan Partac</a></cite> <span class="says">says:</span>       </div>
<div class="comment-meta commentmetadata"><a href="http://tutorialzine.com/2011/05/generating-files-javascript-php/#comment-17734"><br />
            May 26, 2011 at 1:54 am</a>     </div>
<p>Hi,</p>
<p>Thanks for taking your time to reply. </p>
<p>The script does not on my local computer. Steps to replicate:</p>
<p>- Downloaded the package you provided,</p>
<p>- unpacked the archive to my desktop,</p>
<p>- double clicked the index.html file</p>
<p>I also downloaded full page of your live demo, same problem.</p>
<p>Maybe it is supposed to work only from web live sites and not from local machines?</p>
<p>The thing is, I need to implement this into a little app and I need to test it, so it must work on localhost environment, both standalone and as part of my application.</p>
<p>To solve this matter, I can provide you with a Teamviewer connection and check for yourself.</p>
<p>Regards and many thanks,</p>
<p>Danny</p>
<div class="reply">        <a class="comment-reply-link" href="/2011/05/generating-files-javascript-php/?replytocom=17734#respond" onclick="return addComment.moveForm(&quot;div-comment-17734&quot;, &quot;17734&quot;, &quot;respond&quot;, &quot;1461&quot;)">Reply</a>     </div>
</div>
</li>
</ol>
</li>
</ol>
</li>
<li class="comment odd alt thread-odd thread-alt depth-1 parent" id="comment-17801">
<div id="div-comment-17801" class="comment-body">
<div class="comment-author vcard">        <img alt="" src="http://0.gravatar.com/avatar/63f4e5fe7a708632a0f451e9203a6bc3?s=60&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D60&amp;r=G" class="avatar avatar-60 photo" height="60" width="60"/>      <cite class="fn"><a href="http://www.pcadviser.ro/" rel="external nofollow" class="url">Dan Partac</a></cite> <span class="says">says:</span>       </div>
<div class="comment-meta commentmetadata"><a href="http://tutorialzine.com/2011/05/generating-files-javascript-php/#comment-17801"><br />
            May 29, 2011 at 6:55 pm</a>     </div>
<p>Can you help me mate?</p>
<div class="reply">        <a class="comment-reply-link" href="/2011/05/generating-files-javascript-php/?replytocom=17801#respond" onclick="return addComment.moveForm(&quot;div-comment-17801&quot;, &quot;17801&quot;, &quot;respond&quot;, &quot;1461&quot;)">Reply</a>     </div>
</div>
<ol class="children">
<li class="comment even depth-2" id="comment-18120">
<div id="div-comment-18120" class="comment-body">
<div class="comment-author vcard">        <img alt="" src="http://0.gravatar.com/avatar/20ecc928ed46bf8c61bf94f6be313d83?s=60&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D60&amp;r=G" class="avatar avatar-60 photo" height="60" width="60"/>      <cite class="fn">Ron</cite> <span class="says">says:</span>     </div>
<div class="comment-meta commentmetadata"><a href="http://tutorialzine.com/2011/05/generating-files-javascript-php/#comment-18120"><br />
            June 22, 2011 at 6:52 pm</a>        </div>
<p>Keep in mind under localhost environment you will need to have a webserver running that’s capable of serving PHP (e.g. apache). You can’t simply unzip the package, double click on index.html and expect it to work.</p>
<div class="reply">        <a class="comment-reply-link" href="/2011/05/generating-files-javascript-php/?replytocom=18120#respond" onclick="return addComment.moveForm(&quot;div-comment-18120&quot;, &quot;18120&quot;, &quot;respond&quot;, &quot;1461&quot;)">Reply</a>     </div>
</div>
</li>
</ol>
</li>
<li class="comment odd alt thread-even depth-1" id="comment-18263">
<div id="div-comment-18263" class="comment-body">
<div class="comment-author vcard">        <img alt="" src="http://0.gravatar.com/avatar/63f4e5fe7a708632a0f451e9203a6bc3?s=60&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D60&amp;r=G" class="avatar avatar-60 photo" height="60" width="60"/>      <cite class="fn"><a href="http://www.pcadviser.ro" rel="external nofollow" class="url">Dan Partac</a></cite> <span class="says">says:</span>        </div>
<div class="comment-meta commentmetadata"><a href="http://tutorialzine.com/2011/05/generating-files-javascript-php/#comment-18263"><br />
            June 27, 2011 at 10:17 pm</a>       </div>
<p>Thanks mate. That was it. Before I was trying to get it to work on my desktop. </p>
<p>Now moved to my htdocs, browsing</p>
<p><a href="http://localhost/generate/index.html" rel="nofollow">http://localhost/generate/index.html</a></p>
<p>Works! Thank you so much.</p>
<p>Danny</p>
<div class="reply">        <a class="comment-reply-link" href="/2011/05/generating-files-javascript-php/?replytocom=18263#respond" onclick="return addComment.moveForm(&quot;div-comment-18263&quot;, &quot;18263&quot;, &quot;respond&quot;, &quot;1461&quot;)">Reply</a>     </div>
</div>
</li>
<li class="comment even thread-odd thread-alt depth-1 parent" id="comment-18266">
<div id="div-comment-18266" class="comment-body">
<div class="comment-author vcard">        <img alt="" src="http://0.gravatar.com/avatar/63f4e5fe7a708632a0f451e9203a6bc3?s=60&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D60&amp;r=G" class="avatar avatar-60 photo" height="60" width="60"/>      <cite class="fn"><a href="http://www.pcadviser.ro/" rel="external nofollow" class="url">Dan Partac</a></cite> <span class="says">says:</span>       </div>
<div class="comment-meta commentmetadata"><a href="http://tutorialzine.com/2011/05/generating-files-javascript-php/#comment-18266"><br />
            June 28, 2011 at 2:26 am</a>        </div>
<p>Implemented in my application (still on localhost) it gives me this error</p>
<p>iframe.prop is not a function</p>
<p>var body = (iframe.prop(‘contentDocument’) !== undefined) ? </p>
<p>Using jQuery 1.5.2. Any ideas?</p>
<p>Thanks again,</p>
<p>Danny</p>
<div class="reply">        <a class="comment-reply-link" href="/2011/05/generating-files-javascript-php/?replytocom=18266#respond" onclick="return addComment.moveForm(&quot;div-comment-18266&quot;, &quot;18266&quot;, &quot;respond&quot;, &quot;1461&quot;)">Reply</a>     </div>
</div>
<ol class="children">
<li class="comment odd alt depth-2" id="comment-18269">
<div id="div-comment-18269" class="comment-body">
<div class="comment-author vcard">        <img alt="" src="http://0.gravatar.com/avatar/63f4e5fe7a708632a0f451e9203a6bc3?s=60&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D60&amp;r=G" class="avatar avatar-60 photo" height="60" width="60"/>      <cite class="fn"><a href="http://www.pcadviser.ro/" rel="external nofollow" class="url">Dan Partac</a></cite> <span class="says">says:</span>       </div>
<div class="comment-meta commentmetadata"><a href="http://tutorialzine.com/2011/05/generating-files-javascript-php/#comment-18269"><br />
            June 28, 2011 at 3:40 am</a>        </div>
<p>the prop() was introduced in jQuery 1.6.0 and could not work with my 1.5.2 version.</p>
<p>Now everything works perfect.</p>
<p>Thanks again</p>
<div class="reply">        <a class="comment-reply-link" href="/2011/05/generating-files-javascript-php/?replytocom=18269#respond" onclick="return addComment.moveForm(&quot;div-comment-18269&quot;, &quot;18269&quot;, &quot;respond&quot;, &quot;1461&quot;)">Reply</a>     </div>
</div>
</li>
</ol>
</li>
<li class="comment even thread-even depth-1" id="comment-18270">
<div id="div-comment-18270" class="comment-body">
<div class="comment-author vcard">        <img alt="" src="http://0.gravatar.com/avatar/63f4e5fe7a708632a0f451e9203a6bc3?s=60&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D60&amp;r=G" class="avatar avatar-60 photo" height="60" width="60"/>      <cite class="fn"><a href="http://www.pcadviser.ro/" rel="external nofollow" class="url">Dan Partac</a></cite> <span class="says">says:</span>       </div>
<div class="comment-meta commentmetadata"><a href="http://tutorialzine.com/2011/05/generating-files-javascript-php/#comment-18270"><br />
            June 28, 2011 at 4:28 am</a>        </div>
<p>TIP: download.php can be changed to support different file formats:</p>
<p><a href="http://davidwalsh.name/php-header-mime" rel="nofollow">http://davidwalsh.name/php-header-mime</a></p>
<p>:P</p>
<div class="reply">        <a class="comment-reply-link" href="/2011/05/generating-files-javascript-php/?replytocom=18270#respond" onclick="return addComment.moveForm(&quot;div-comment-18270&quot;, &quot;18270&quot;, &quot;respond&quot;, &quot;1461&quot;)">Reply</a>     </div>
</div>
</li>
</ol>
</div>
<div id="respond">
<div id="addCommentSection" class="contentSection padded30">
<h4 id="leavereply"><span title="Subscribe for the comments on this post"><a href="http://tutorialzine.com/2011/05/generating-files-javascript-php/feed/">Subscribe for the comments on this post</a></span>Add Comment</h4>
<h4 id="respondtitle">Add a Reply</h4>
<div class="line"></div>
<div class="cancel-comment-reply">            <small><a rel="nofollow" id="cancel-comment-reply-link" href="/2011/05/generating-files-javascript-php/#respond" style="display:none;">Click here to cancel reply.</a></small>        </div>
<form action="http://tutorialzine.com/wp-comments-post.php" method="post" id="commentform">
<input type="text" name="author" id="author" value="" size="22" tabindex="1" aria-required="true"/>
        <label for="author"><small>Name (required)</small></label></p>
<input type="text" name="email" id="email" value="" size="22" tabindex="2" aria-required="true"/>
        <label for="email"><small>Mail (will not be published) (required)</small></label></p>
<input type="text" name="url" id="url" value="" size="22" tabindex="3"/>
        <label for="url"><small>Website</small></label></p>
<p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
<input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" class="greyButton"/> <abbr style="font-size:10px;margin-left:10px;cursor:help;" title="Allowed tags: &lt;B&gt;, &lt;I&gt;, &lt;A&gt;, &lt;BLOCKQUOTE&gt;">Some HTML Tags are OK, Use Entities For The Rest</abbr></p>
<input type="hidden" name="comment_post_ID" value="1461" id="comment_post_ID"/>
<input type="hidden" name="comment_parent" id="comment_parent" value="0"/>
<p style="display: none;">
<input type="hidden" id="akismet_comment_nonce" name="akismet_comment_nonce" value="6a2d92f235"/></p>
</form>
</div>
</div>
<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fericrichers.com%2Fblog%2F2011%2F08%2Fgenerating-files-with-javascript%2F&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div class="rw-left"><div class="rw-ui-container rw-class-blog-post rw-urid-10830"></div></div>]]></content:encoded>
			<wfw:commentRss>http://ericrichers.com/blog/2011/08/generating-files-with-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firebug Extensions</title>
		<link>http://ericrichers.com/blog/2011/08/firebug-extensions/</link>
		<comments>http://ericrichers.com/blog/2011/08/firebug-extensions/#comments</comments>
		<pubDate>Sat, 13 Aug 2011 18:27:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Kitchen Sink]]></category>

		<guid isPermaLink="false">http://ericrichers.com/blog/2011/08/firebug-extensions/</guid>
		<description><![CDATA[Firebug Extensions From FirebugWiki Jump to: navigation, search Firebug extensions augment or otherwise enhance the Firebug extension. Firebug extensions typically come in the form of Firefox add-ons. List of known Firebug extensions (in alphabetical order): Acebug Adobe BrowserLab AMF Explorer &#8230; <a href="http://ericrichers.com/blog/2011/08/firebug-extensions/">Read More.. <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h1 id="firstHeading" class="firstHeading">Firebug Extensions</h1>
<h3 id="siteSub">From FirebugWiki</h3>
<p>
<div id="jump-to-nav">Jump to: <a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#column-one">navigation</a>, <a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#searchInput">search</a></div>
<p>
<p>Firebug extensions augment or otherwise enhance the Firebug  extension. Firebug extensions typically come in the form of Firefox  add-ons. </p>
<p>
<p>List of known Firebug extensions (in alphabetical order): </p>
<table style="width: 100%;">
<tbody>
<tr>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Acebug"> Acebug</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Adobe_BrowserLab"> Adobe BrowserLab</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#AMF_Explorer"> AMF Explorer</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Arboreal"> Arboreal</a></td>
</tr>
<tr>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Chromebug"> Chromebug</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Closure_Inspector"> Closure Inspector</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#CodeBurner"> CodeBurner</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#ColdFire"> ColdFire</a></td>
</tr>
<tr>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#ConsoleExport"> ConsoleExport</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Crossfire"> Crossfire</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#CSS_Usage"> CSS Usage</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#cssUpdater"> cssUpdater</a></td>
</tr>
<tr>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Dojo_Firebug_Extension"> Dojo Firebug Extension</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Drupal_For_Firebug"> Drupal For Firebug</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Eventbug"> Eventbug</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FireAtlas"> FireAtlas</a></td>
</tr>
<tr>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Firebug_Code_Coverage"> Firebug Code Coverage</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Firebug_Paint_Events"> Firebug Paint Events</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Firecookie"> Firecookie</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Firediff"> Firediff</a></td>
</tr>
<tr>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FireEyes"> FireEyes</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FireFile"> FireFile</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Firefinder"> Firefinder</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#fireflow"> fireflow</a></td>
</tr>
<tr>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Firefocus"> Firefocus</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FireFontFamily"> FireFontFamily</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FireLinkReport"> FireLinkReport</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FirePalette"> FirePalette</a></td>
</tr>
<tr>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FirePath"> FirePath</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FirePHP"> FirePHP</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Firepicker"> Firepicker</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FirePython"> FirePython</a></td>
</tr>
<tr>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Firequark"> Firequark</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FireQuery"> FireQuery</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FireRainbow"> FireRainbow</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FireSass"> FireSass</a></td>
</tr>
<tr>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FireSpider"> FireSpider</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FireStarter"> FireStarter</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Firesymfony"> Firesymfony</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FormBug"> FormBug</a></td>
</tr>
<tr>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Illuminations_for_Developers"> Illuminations for Developers</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Inline_Code_Finder"> Inline Code Finder</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Jiffy"> Jiffy</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#LiveCoder"> Live Coder</a></td>
</tr>
<tr>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Log_to_NetPanel"> Log to NetPanel</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#NetExport"> NetExport</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Net_Panel_History_Overlay"> Net Panel History Overlay</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Omnibug"> Omnibug</a></td>
</tr>
<tr>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Page_Speed"> Page Speed</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Pixel_Perfect"> Pixel Perfect</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#selectbug"> selectbug</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#SenSEO"> SenSEO</a></td>
</tr>
<tr>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Widerbug"> Widerbug</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#XRefresh"> XRefresh</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#YSlow"> YSlow</a></td>
<td><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#ZikulaBug"> ZikulaBug</a></td>
</tr>
</tbody>
</table>
<p>
<p><i>Are you an author of a new extension for Firebug and want us to update the page? Just open a new issue on Firebug <a target="_blank" href="http://code.google.com/p/fbug/issues/list?start=0" class="external text" rel="nofollow">issue list</a>.</i> </p>
<p>
<table id="toc" class="toc">
<tbody>
<tr>
<td>
<div id="toctitle">
<h2>Contents</h2>
<p> <span class="toctoggle">[<a class="internal" id="togglelink">hide</a>]</span></div>
<p>	
<ul>	
<li class="toclevel-1 tocsection-1"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Creating_Extensions"><span class="tocnumber">1</span> <span class="toctext">Creating Extensions</span></a></li>
<p>	
<li class="toclevel-1 tocsection-2"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Existing_Extensions"><span class="tocnumber">2</span> <span class="toctext">Existing Extensions</span></a><br />	
<ul>	
<li class="toclevel-2 tocsection-3"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Miscellaneous"><span class="tocnumber">2.1</span> <span class="toctext">Miscellaneous</span></a><br />	
<ul>	
<li class="toclevel-3 tocsection-4"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Firecookie"><span class="tocnumber">2.1.1</span> <span class="toctext">Firecookie</span></a></li>
<p>	
<li class="toclevel-3 tocsection-5"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Crossfire"><span class="tocnumber">2.1.2</span> <span class="toctext">Crossfire</span></a></li>
<p>	
<li class="toclevel-3 tocsection-6"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FireStarter"><span class="tocnumber">2.1.3</span> <span class="toctext">FireStarter</span></a></li>
<p>	
<li class="toclevel-3 tocsection-7"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Drupal_For_Firebug"><span class="tocnumber">2.1.4</span> <span class="toctext">Drupal For Firebug</span></a></li>
<p>	
<li class="toclevel-3 tocsection-8"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Firediff"><span class="tocnumber">2.1.5</span> <span class="toctext">Firediff</span></a></li>
<p>	
<li class="toclevel-3 tocsection-9"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FireFile"><span class="tocnumber">2.1.6</span> <span class="toctext">FireFile</span></a></li>
<p>	
<li class="toclevel-3 tocsection-10"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#cssUpdater"><span class="tocnumber">2.1.7</span> <span class="toctext">cssUpdater</span></a></li>
<p>	
<li class="toclevel-3 tocsection-11"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Firefocus"><span class="tocnumber">2.1.8</span> <span class="toctext">Firefocus</span></a></li>
<p>	
<li class="toclevel-3 tocsection-12"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FormBug"><span class="tocnumber">2.1.9</span> <span class="toctext">FormBug</span></a></li>
<p>	
<li class="toclevel-3 tocsection-13"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#XRefresh"><span class="tocnumber">2.1.10</span> <span class="toctext">XRefresh</span></a></li>
<p>	
<li class="toclevel-3 tocsection-14"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Firefinder"><span class="tocnumber">2.1.11</span> <span class="toctext">Firefinder</span></a></li>
<p>	
<li class="toclevel-3 tocsection-15"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Omnibug"><span class="tocnumber">2.1.12</span> <span class="toctext">Omnibug</span></a></li>
<p>	
<li class="toclevel-3 tocsection-16"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Firebug_Paint_Events"><span class="tocnumber">2.1.13</span> <span class="toctext">Firebug Paint Events</span></a></li>
<p>	
<li class="toclevel-3 tocsection-17"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Deadbug"><span class="tocnumber">2.1.14</span> <span class="toctext">Deadbug</span></a></li>
<p>	
<li class="toclevel-3 tocsection-18"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Adobe_BrowserLab"><span class="tocnumber">2.1.15</span> <span class="toctext">Adobe BrowserLab</span></a></li>
<p>	
<li class="toclevel-3 tocsection-19"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#ConsoleExport"><span class="tocnumber">2.1.16</span> <span class="toctext">ConsoleExport</span></a></li>
<p>	
<li class="toclevel-3 tocsection-20"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#selectbug"><span class="tocnumber">2.1.17</span> <span class="toctext">selectbug</span></a></li>
<p>								</ul>
<p>							</li>
<p>	
<li class="toclevel-2 tocsection-21"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#UI_Enhancements"><span class="tocnumber">2.2</span> <span class="toctext">UI Enhancements</span></a><br />	
<ul>	
<li class="toclevel-3 tocsection-22"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Acebug"><span class="tocnumber">2.2.1</span> <span class="toctext">Acebug</span></a></li>
<p>	
<li class="toclevel-3 tocsection-23"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#CodeBurner"><span class="tocnumber">2.2.2</span> <span class="toctext">CodeBurner</span></a></li>
<p>	
<li class="toclevel-3 tocsection-24"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Firefinder_2"><span class="tocnumber">2.2.3</span> <span class="toctext">Firefinder</span></a></li>
<p>	
<li class="toclevel-3 tocsection-25"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Firequark"><span class="tocnumber">2.2.4</span> <span class="toctext">Firequark</span></a></li>
<p>	
<li class="toclevel-3 tocsection-26"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Pixel_Perfect"><span class="tocnumber">2.2.5</span> <span class="toctext">Pixel Perfect</span></a></li>
<p>	
<li class="toclevel-3 tocsection-27"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FireRainbow"><span class="tocnumber">2.2.6</span> <span class="toctext">FireRainbow</span></a></li>
<p>	
<li class="toclevel-3 tocsection-28"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FirePalette"><span class="tocnumber">2.2.7</span> <span class="toctext">FirePalette</span></a></li>
<p>	
<li class="toclevel-3 tocsection-29"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Widerbug"><span class="tocnumber">2.2.8</span> <span class="toctext">Widerbug</span></a></li>
<p>	
<li class="toclevel-3 tocsection-30"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Firepicker"><span class="tocnumber">2.2.9</span> <span class="toctext">Firepicker</span></a></li>
<p>	
<li class="toclevel-3 tocsection-31"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FireSass"><span class="tocnumber">2.2.10</span> <span class="toctext">FireSass</span></a></li>
<p>	
<li class="toclevel-3 tocsection-32"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Arboreal"><span class="tocnumber">2.2.11</span> <span class="toctext">Arboreal</span></a></li>
<p>	
<li class="toclevel-3 tocsection-33"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FirePath"><span class="tocnumber">2.2.12</span> <span class="toctext">FirePath</span></a></li>
<p>								</ul>
<p>							</li>
<p>	
<li class="toclevel-2 tocsection-34"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Debugging"><span class="tocnumber">2.3</span> <span class="toctext">Debugging</span></a><br />	
<ul>	
<li class="toclevel-3 tocsection-35"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Chromebug"><span class="tocnumber">2.3.1</span> <span class="toctext">Chromebug</span></a></li>
<p>	
<li class="toclevel-3 tocsection-36"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Eventbug"><span class="tocnumber">2.3.2</span> <span class="toctext">Eventbug</span></a></li>
<p>	
<li class="toclevel-3 tocsection-37"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Firebug_Code_Coverage"><span class="tocnumber">2.3.3</span> <span class="toctext">Firebug Code Coverage</span></a></li>
<p>	
<li class="toclevel-3 tocsection-38"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FirePHP"><span class="tocnumber">2.3.4</span> <span class="toctext">FirePHP</span></a></li>
<p>	
<li class="toclevel-3 tocsection-39"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#fireflow"><span class="tocnumber">2.3.5</span> <span class="toctext">fireflow</span></a></li>
<p>	
<li class="toclevel-3 tocsection-40"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FireQuery"><span class="tocnumber">2.3.6</span> <span class="toctext">FireQuery</span></a></li>
<p>	
<li class="toclevel-3 tocsection-41"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#LiveCoder"><span class="tocnumber">2.3.7</span> <span class="toctext">LiveCoder</span></a></li>
<p>	
<li class="toclevel-3 tocsection-42"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Firesymfony"><span class="tocnumber">2.3.8</span> <span class="toctext">Firesymfony</span></a></li>
<p>	
<li class="toclevel-3 tocsection-43"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#ColdFire"><span class="tocnumber">2.3.9</span> <span class="toctext">ColdFire</span></a></li>
<p>	
<li class="toclevel-3 tocsection-44"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FirePython"><span class="tocnumber">2.3.10</span> <span class="toctext">FirePython</span></a></li>
<p>	
<li class="toclevel-3 tocsection-45"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FireAtlas"><span class="tocnumber">2.3.11</span> <span class="toctext">FireAtlas</span></a></li>
<p>	
<li class="toclevel-3 tocsection-46"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#AMF_Explorer"><span class="tocnumber">2.3.12</span> <span class="toctext">AMF Explorer</span></a></li>
<p>	
<li class="toclevel-3 tocsection-47"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FireLinkReport"><span class="tocnumber">2.3.13</span> <span class="toctext">FireLinkReport</span></a></li>
<p>	
<li class="toclevel-3 tocsection-48"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Flashbug"><span class="tocnumber">2.3.14</span> <span class="toctext">Flashbug</span></a></li>
<p>	
<li class="toclevel-3 tocsection-49"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Closure_Inspector"><span class="tocnumber">2.3.15</span> <span class="toctext">Closure Inspector</span></a></li>
<p>	
<li class="toclevel-3 tocsection-50"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Illuminations_for_Developers"><span class="tocnumber">2.3.16</span> <span class="toctext">Illuminations for Developers</span></a></li>
<p>	
<li class="toclevel-3 tocsection-51"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Dojo_Firebug_Extension"><span class="tocnumber">2.3.17</span> <span class="toctext">Dojo Firebug Extension</span></a></li>
<p>	
<li class="toclevel-3 tocsection-52"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#ZikulaBug"><span class="tocnumber">2.3.18</span> <span class="toctext">ZikulaBug</span></a></li>
<p>								</ul>
<p>							</li>
<p>	
<li class="toclevel-2 tocsection-53"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Performance"><span class="tocnumber">2.4</span> <span class="toctext">Performance</span></a><br />	
<ul>	
<li class="toclevel-3 tocsection-54"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#YSlow"><span class="tocnumber">2.4.1</span> <span class="toctext">YSlow</span></a></li>
<p>	
<li class="toclevel-3 tocsection-55"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#NetExport"><span class="tocnumber">2.4.2</span> <span class="toctext">NetExport</span></a></li>
<p>	
<li class="toclevel-3 tocsection-56"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Net_Panel_History_Overlay"><span class="tocnumber">2.4.3</span> <span class="toctext">Net Panel History Overlay</span></a></li>
<p>	
<li class="toclevel-3 tocsection-57"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Jiffy"><span class="tocnumber">2.4.4</span> <span class="toctext">Jiffy</span></a></li>
<p>	
<li class="toclevel-3 tocsection-58"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Inline_Code_Finder"><span class="tocnumber">2.4.5</span> <span class="toctext">Inline Code Finder</span></a></li>
<p>	
<li class="toclevel-3 tocsection-59"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#SenSEO"><span class="tocnumber">2.4.6</span> <span class="toctext">SenSEO</span></a></li>
<p>	
<li class="toclevel-3 tocsection-60"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#CSS_Usage"><span class="tocnumber">2.4.7</span> <span class="toctext">CSS Usage</span></a></li>
<p>	
<li class="toclevel-3 tocsection-61"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Log_to_NetPanel"><span class="tocnumber">2.4.8</span> <span class="toctext">Log to NetPanel</span></a></li>
<p>	
<li class="toclevel-3 tocsection-62"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#Page_Speed"><span class="tocnumber">2.4.9</span> <span class="toctext">Page Speed</span></a></li>
<p>	
<li class="toclevel-3 tocsection-63"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FireSpider"><span class="tocnumber">2.4.10</span> <span class="toctext">FireSpider</span></a></li>
<p>	
<li class="toclevel-3 tocsection-64"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FireFontFamily"><span class="tocnumber">2.4.11</span> <span class="toctext">FireFontFamily</span></a></li>
<p>	
<li class="toclevel-3 tocsection-65"><a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#FireEyes"><span class="tocnumber">2.4.12</span> <span class="toctext">FireEyes</span></a></li>
<p>								</ul>
<p>							</li>
<p>						</ul>
<p>					</li>
<p>				</ul>
</td>
</tr>
</tbody>
</table>
<p>
<h2> <span class="mw-headline" id="Creating_Extensions"> Creating Extensions </span></h2>
<p>
<ul>	
<li> See <a target="_blank" href="http://getfirebug.com/wiki/index.php/Firebug_Internals" title="Firebug Internals">Firebug Internals</a> </li>
<p>	
<li> <a target="_blank" href="http://getfirebug.com/wiki/index.php/Extension_Installation_Error_Codes" title="Extension Installation Error Codes">Extension Installation Error Codes</a> </li>
<p></ul>
<p>
<h2> <span class="mw-headline" id="Existing_Extensions"> Existing Extensions </span></h2>
<h3> <span class="mw-headline" id="Miscellaneous"> Miscellaneous </span></h3>
<h4> <span class="mw-headline" id="Firecookie"> Firecookie </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-firecookie.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/6/66/Firebug-extlist-firecookie.png/400px-Firebug-extlist-firecookie.png" class="thumbimage" height="119" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-firecookie.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			Firecookie</div>
<p>	</div>
<p></div>
<p>
<p>Firecookie is a an extension for Firebug that allows to view, manage  and debug cookies in your browser. Apart from all the other cookie  managers and viewers available as Firefox extensions, this one is made  as an extension for Firebug. This means that <a target="_blank" href="http://en.wikipedia.org/wiki/Web_developer" class="ml-smartlink">web developers</a> have the functionality accessible within the familiar Firebug&#8217;s UI. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://www.janodvarko.cz/firecookie" class="external text" rel="nofollow">website</a> </li>
<p>	
<li> Download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/6683" class="external text" rel="nofollow">Mozilla Addons</a> site </li>
<p>	
<li> Get the <a target="_blank" href="http://code.google.com/p/firecookie/source/checkout" class="external text" rel="nofollow">source code</a> (Firebug&#8217;s BSD-style license) </li>
<p>	
<li> Report an <a target="_blank" href="http://code.google.com/p/firecookie/" class="external text" rel="nofollow">issue</a> </li>
<p></ul>
<p>
<p>Author: <a target="_blank" href="http://www.softwareishard.com/blog/about/" class="external text" rel="nofollow">Jan Odvarko</a> </p>
<p>
<h4> <span class="mw-headline" id="Crossfire"> Crossfire </span></h4>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php/Crossfire" title="Crossfire">Crossfire</a> is a Firebug extension which implements a JSON protocol to allow remote clients (like an IDE or code editor) to connect to Firebug. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://www.janodvarko.cz/firecookie" class="external text" rel="nofollow">website</a> </li>
<p>	
<li> Download from <a target="_blank" href="http://getfirebug.com/releases/crossfire/" class="external text" rel="nofollow">getfirebug.com</a> </li>
<p>	
<li> Get the <a target="_blank" href="http://code.google.com/p/fbug/source/browse/#svn%2Fextensions%2Fcrossfire%2Fbranches" class="external text" rel="nofollow">source code</a> (Firebug&#8217;s BSD-style license) </li>
<p>	
<li> Report an <a target="_blank" href="http://code.google.com/p/fbug/" class="external text" rel="nofollow">issue</a> </li>
<p></ul>
<p>
<p>Author: Michael G. Collins, FWG </p>
<p>
<h4> <span class="mw-headline" id="FireStarter"> FireStarter </span></h4>
<p>
<p>FireStarter is a Firebug extension that extends Firebug&#8217;s activation model with advanced features. </p>
<p>
<ul>	
<li> Download from <a target="_blank" href="http://getfirebug.com/releases/firestarter/" class="external text" rel="nofollow">getfirebug.com</a> </li>
<p>	
<li> Get the <a target="_blank" href="http://code.google.com/p/fbug/source/browse/#svn%2Ffirestarter%2Fbranches" class="external text" rel="nofollow">source code</a> (Firebug&#8217;s BSD-style license) </li>
<p>	
<li> Report an <a target="_blank" href="http://code.google.com/p/fbug/issues/list" class="external text" rel="nofollow">issue</a> </li>
<p>	
<li> Ask a question in the <a target="_blank" href="http://groups.google.com/group/firebug" class="external text" rel="nofollow">news group</a> </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="Drupal_For_Firebug"> Drupal For Firebug </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-drupalforfirebug.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/8/83/Firebug-extlist-drupalforfirebug.png/400px-Firebug-extlist-drupalforfirebug.png" class="thumbimage" height="134" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-drupalforfirebug.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			Drupal For Firebug</div>
<p>	</div>
<p></div>
<p>
<p>Drupal for Firebug extends Firebug to provide Drupal specific debugging and status messages to help with Drupal development. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://drupal.org/project/drupalforfirebug" class="external text" rel="nofollow">website</a> </li>
<p>	
<li> Download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/8370" class="external text" rel="nofollow">Mozilla Add-ons</a> site. </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="Firediff"> Firediff </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-firediff.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/6/6e/Firebug-extlist-firediff.png/400px-Firebug-extlist-firediff.png" class="thumbimage" height="226" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-firediff.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			Firediff</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=Firediff&amp;action=edit&amp;redlink=1" class="new" title="Firediff (page does not exist)">Firediff</a> is a Firebug extension whose goal is to provide additional insight into the changes that are being made to the components of the page. Firediff currently requires a recent build of Firebug, with a strict requirement of at least version 1.4. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://www.incaseofstairs.com/firediff/" class="external text" rel="nofollow">website</a> </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="FireFile"> FireFile </span></h4>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=FireFile&amp;action=edit&amp;redlink=1" class="new" title="FireFile (page does not exist)">FireFile</a> is a Firebug extension to save CSS files edited with Firebug to your  web server.  This makes Firebug the first CSS editor with live preview  and remote saving, which enables ultra fast web design. </p>
<p>
<ul>	
<li> Download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/52365/" class="external text" rel="nofollow">Mozilla Add-ons</a> site </li>
<p>	
<li> See <a target="_blank" href="https://github.com/tobiasstrebitzer/FireFile/wiki" class="external text" rel="nofollow">FireFile&#8217;s github wiki</a> or <del><a target="_blank" href="http://www.strebitzer.at/projects/firefile/docs/" class="external text" rel="nofollow">more info</a></del> (broken link: server not found) </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="cssUpdater"> cssUpdater </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 202px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-cssupdater.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/b/b6/Firebug-extlist-cssupdater.png" class="thumbimage" height="150" width="200" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-cssupdater.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			cssUpdater</div>
<p>	</div>
<p></div>
<p>
<p>cssUpdater lets you live sync and save your Firebug CSS changes with  one click. So when you reload your site, your layout is preserved. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://www.cssupdater.com/" class="external text" rel="nofollow">website</a> </li>
<p>	
<li> Download from <a target="_blank" href="http://www.cssupdater.com/install" class="external text" rel="nofollow">cssupdater.com</a> or from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/cssupdater/" class="external text" rel="nofollow">Mozilla Add-ons</a> site </li>
<p>	
<li> Report an <a target="_blank" href="http://www.cssupdater.com/disqus" class="external text" rel="nofollow">issue</a> </li>
<p></ul>
<p>
<p>Author: Johan Andersson </p>
<p>
<h4> <span class="mw-headline" id="Firefocus"> Firefocus </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-firefocus.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/9/9f/Firebug-extlist-firefocus.png/400px-Firebug-extlist-firefocus.png" class="thumbimage" height="178" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-firefocus.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			Firefocus</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=Firefocus&amp;action=edit&amp;redlink=1" class="new" title="Firefocus (page does not exist)">Firefocus</a> is a simple Firebug extension that tracks the element that currently  has focus. Its primary purpose is to assist the debugging of advanced  keyboard implementations. Firefocus requires Firebug 1.4 or later. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://www.incaseofstairs.com/firefocus/" class="external text" rel="nofollow">website</a> </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="FormBug"> FormBug </span></h4>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=FormBug&amp;action=edit&amp;redlink=1" class="new" title="FormBug (page does not exist)">FormBug</a> simulates HTML form fill-in and serialization as an aid to testing form-intensive sites. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://home.peteresnyder.com/projects/formbug" class="external text" rel="nofollow">website</a> </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="XRefresh"> XRefresh </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-xrefresh.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/b/bf/Firebug-extlist-xrefresh.png" class="thumbimage" height="265" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-xrefresh.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			XRefresh</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=XRefresh&amp;action=edit&amp;redlink=1" class="new" title="XRefresh (page does not exist)">XRefresh</a> can refresh browser as you modify source files. This is especially  usefull for editing CSS files on a development machine with two  monitors. When you hit CTRL+S (or whatever key for save), XRefresh will  detect it and refresh the web page for you. </p>
<p>
<ul>	
<li> Visit [website] </li>
<p>	
<li> Download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/7711" class="external text" rel="nofollow">Mozilla Add-ons</a>] site (experimental) </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="Firefinder"> Firefinder </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-firefinder.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/1/1a/Firebug-extlist-firefinder.png/400px-Firebug-extlist-firefinder.png" class="thumbimage" height="131" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-firefinder.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			Firefinder</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=Firefinder&amp;action=edit&amp;redlink=1" class="new" title="Firefinder (page does not exist)">Firefinder</a> is an add-on to Firebug, to help find HTML elements matching chosen CSS selector(s) or XPath expression. You can also <a target="_blank" href="http://imotors.com/" class="ml-smartlink">auto</a>-select elements when hovering or via the context menu. </p>
<p>
<p>View the results and then share them with a friend via the  FriendlyFire feature, or click Inspect to go to the corresponding  element in Firebug&#8217;s HTML tab. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://robertnyman.com/firefinder/" class="external text" rel="nofollow">website</a> </li>
<p>	
<li> Download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/11905" class="external text" rel="nofollow">Mozilla Add-ons</a> site </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="Omnibug"> Omnibug </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-omnibug.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/d/d1/Firebug-extlist-omnibug.png/400px-Firebug-extlist-omnibug.png" class="thumbimage" height="232" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-omnibug.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			Omnibug</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=Omnibug&amp;action=edit&amp;redlink=1" class="new" title="Omnibug (page does not exist)">Omnibug</a> is a plugin for Firebug to ease developing web metrics implementations. Each outgoing request (sent by the browser) is checked for a pattern;  if a match occurs, the URL is displayed in a Firebug panel, and decoded  to show the details of the request. In addition, requests can be logged  to the filesystem. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://www.rosssimpson.com/dev/omnibug.html" class="external text" rel="nofollow">website</a> </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="Firebug_Paint_Events"> Firebug Paint Events </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:FirebugPaintEvents.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/e/e2/FirebugPaintEvents.png/400px-FirebugPaintEvents.png" class="thumbimage" height="340" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:FirebugPaintEvents.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			Firebug Paint Events</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=Firebug_Paint_Events&amp;action=edit&amp;redlink=1" class="new" title="Firebug Paint Events (page does not exist)">Firebug Paint Events</a> allows to view details of MozAfterPaint events, using Firebug. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://kylescholz.com/blog/" class="external text" rel="nofollow">website</a> </li>
<p>	
<li> Download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/9620" class="external text" rel="nofollow">Mozilla Add-ons</a> site </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="Deadbug"> Deadbug </span></h4>
<p>
<p>Deadbug modifies the Firebug status bar icon to change to an image of an upside down (i.e. &#8216;dead&#8217;) bug when Firebug is turned off.  This  allows people who are colorblind or have low-contrast displays to easily tell whether Firebug is active. </p>
<p>
<ul>	
<li> <a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Fb_dead_logo1_transparent.png" class="image"><img alt="Fb dead logo1 transparent.png" src="http://getfirebug.com/wiki/images/e/e9/Fb_dead_logo1_transparent.png" height="18" width="18" /></a> Dead bug icon designed by Kara Rawson. </li>
<p>	
<li> <a target="_blank" href="http://collinsmichaelg.me/deadbug-2.0.xpi" class="external text" rel="nofollow">Download</a> </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="Adobe_BrowserLab"> Adobe BrowserLab </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Adobe-browserlab-for-firebug.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/f/fb/Adobe-browserlab-for-firebug.png/400px-Adobe-browserlab-for-firebug.png" class="thumbimage" height="275" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Adobe-browserlab-for-firebug.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			<a target="_blank" href="http://en.wikipedia.org/wiki/Adobe_BrowserLab" class="ml-smartlink">Adobe BrowserLab</a></div>
<p>	</div>
<p></div>
<p>
<p>Launch <a target="_blank" href="http://en.wikipedia.org/wiki/Adobe_BrowserLab" class="ml-smartlink">Adobe BrowserLab</a> directly from Firebug, to preview temporary changes you&#8217;ve made using  Firebug. BrowserLab generates screenshots of your pages (public or  behind a firewall) in multiple browsers. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="https://browserlab.adobe.com/" class="external text" rel="nofollow">website</a> </li>
<p>	
<li> Download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/231196/" class="external text" rel="nofollow">Mozilla Add-ons</a> site </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="ConsoleExport"> ConsoleExport </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Console-export.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/b/bf/Console-export.png/400px-Console-export.png" class="thumbimage" height="173" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Console-export.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			Console Export</div>
<p>	</div>
<p></div>
<p>
<p>ConsoleExport is a Firebug extension that allows exporting logs from the <a target="_blank" href="http://getfirebug.com/wiki/index.php/Console_Panel" title="Console Panel">Console Panel</a>. Once the extension is installed there is a new Export button available in the Console Panel toolbar. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://www.softwareishard.com/blog/consoleexport/" class="external text" rel="nofollow">home page</a> </li>
<p>	
<li> Download from <a target="_blank" href="http://www.softwareishard.com/blog/consoleexport/" class="external text" rel="nofollow">softwareishard.com</a> </li>
<p>	
<li> Author: <a target="_blank" href="http://www.janodvarko.cz/" class="external text" rel="nofollow">Jan Odvarko</a> </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="selectbug"> selectbug </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Selectbug.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/c/c5/Selectbug.png/400px-Selectbug.png" class="thumbimage" height="144" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Selectbug.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			selectbug</div>
<p>	</div>
<p></div>
<p>
<p>selectbug enhances the <a target="_blank" href="http://getfirebug.com/wiki/index.php/CSS_Panel" title="CSS Panel">CSS Panel</a> by a Side Panel, that shows all nodes, to which the selected rule was applied. </p>
<p>
<ul>	
<li> Get the <a target="_blank" href="http://code.google.com/p/fbug/source/browse/#svn%2Fextensions%2Fselectbug%2Fbranches" class="external text" rel="nofollow">source code</a> </li>
<p>	
<li> Author: <a target="_blank" href="http://getfirebug.com/wiki/index.php?title=User:Johnjbarton&amp;action=edit&amp;redlink=1" class="new" title="User:Johnjbarton (page does not exist)">John J. Barton</a> </li>
<p></ul>
<p>
<h3> <span class="mw-headline" id="UI_Enhancements"> UI Enhancements </span></h3>
<h4> <span class="mw-headline" id="Acebug"> Acebug </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 345px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-acebug.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/a/ab/Firebug-extlist-acebug.png" class="thumbimage" height="250" width="343" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-acebug.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			Acebug</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=Acebug&amp;action=edit&amp;redlink=1" class="new" title="Acebug (page does not exist)">Acebug</a> is a <a target="_blank" href="http://en.wikipedia.org/wiki/Add-on_%28Mozilla%29" class="ml-smartlink">Firefox add-on</a> that integrates with Firebug is a simple Firebug extension that brings  some of the awesome features of the Ajax.org Cloud9 Editor (Ace) to  Firebug&#8217;s large command line. </p>
<p>
<p><b>Features</b> </p>
<p>
<ul>	
<li> Syntax Highlighting </li>
<p>	
<li> <a target="_blank" href="http://en.wikipedia.org/wiki/Indentation" class="ml-smartlink">Auto indentation</a> and outdent </li>
<p>	
<li> Highlight matching parentheses </li>
<p>	
<li> Load from file </li>
<p>	
<li> Save to file </li>
<p>	
<li> Execute selection </li>
<p>	
<li> Stream Comment </li>
<p></ul>
<p>
<p><b>We also plan on adding a bunch of new features to Acebug in the future</b> </p>
<p>
<ul>	
<li> Validate as you type </li>
<p>	
<li> Wordwrap </li>
<p>	
<li> <a target="_blank" href="http://imotors.com/" class="ml-smartlink">Auto</a>-completion </li>
<p>	
<li> Fully customizable key bindings including VI and Emacs modes </li>
<p>	
<li> Themes (TextMate themes can be imported) </li>
<p>	
<li> Display hidden characters </li>
<p>	
<li> Integrate with the script panel so that the whole panel works with your chosen syntax highlighting when debugging </li>
<p></ul>
<p>
<p><b>Links</b> </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://www.msi-stuff.com/acebug/" class="external text" rel="nofollow">website</a> </li>
<p>	
<li> Download from <a target="_blank" href="https://addons.mozilla.org/de/firefox/addon/acebug/" class="external text" rel="nofollow">Mozilla Add-ons</a> site </li>
<p>	
<li> Get the source from <a target="_blank" href="https://github.com/MikeRatcliffe/Acebug" class="external text" rel="nofollow">github</a> </li>
<p>	
<li> Use the <a target="_blank" href="https://github.com/MikeRatcliffe/Acebug/issues" class="external text" rel="nofollow">issues list</a> to report an issue </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="CodeBurner"> CodeBurner </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:CodeBurnerForFirebug.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/c/c7/CodeBurnerForFirebug.png/400px-CodeBurnerForFirebug.png" class="thumbimage" height="165" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:CodeBurnerForFirebug.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			CodeBurner</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=CodeBurner&amp;action=edit&amp;redlink=1" class="new" title="CodeBurner (page does not exist)">CodeBurner</a> is a <a target="_blank" href="http://en.wikipedia.org/wiki/Add-on_%28Mozilla%29" class="ml-smartlink">Firefox add-on</a> that integrates with Firebug, to extend it with reference material for  HTML and CSS. The extension&#8217;s core functionality is centered around a  new Reference panel, which contains a search tool for looking up HTML  elements, attributes, and CSS properties. The extension also hooks into  context-menus in the HTML and CSS panels, the DOM crumbtrail, and the  Inspector, adding options to look up a selected item (ie. search for it  in the Reference panel) or to view a code example. </p>
<p>
<p>Author: <a target="_blank" href="http://www.sitepoint.com/" class="external text" rel="nofollow">SitePoint</a> (<a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/10273" class="external text" rel="nofollow">Download</a>) </p>
<p>
<h4> <span class="mw-headline" id="Firefinder_2"> Firefinder </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:FirefinderForFirebug.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/0/0e/FirefinderForFirebug.png/400px-FirefinderForFirebug.png" class="thumbimage" height="131" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:FirefinderForFirebug.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			Firefinder</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=Firefinder&amp;action=edit&amp;redlink=1" class="new" title="Firefinder (page does not exist)">Firefinder</a> is an extension to Firebug and offers the functionality to, in a quick  way, find HTML elements matching chosen CSS selector(s) or XPath  expression. It allows you to instantly test your CSS selectors in the  page while seeing the content at the same time, and matching elements  will be highlighted. </p>
<p>
<p>Author: <a target="_blank" href="http://robertnyman.com/firefinder/" class="external text" rel="nofollow">Robert Nyman</a> (<a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/11905/" class="external text" rel="nofollow">Download</a>) </p>
<p>
<h4> <span class="mw-headline" id="Firequark"> Firequark </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 167px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-firequark.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/5/5a/Firebug-extlist-firequark.png" class="thumbimage" height="334" width="165" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-firequark.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			Firequark</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=Firequark&amp;action=edit&amp;redlink=1" class="new" title="Firequark (page does not exist)">Firequark</a> is an extension to Firebug to aid the process of HTML Screen Scraping. Firequark automatically extracts css selector for a single or multiple  html node(s) from a web page using Firebug (a web development plugin for Firefox). The css selector generated can be given as an input to html  screen scrapers like Scrapi to extract information. Firequark is built  to unleash the power of css selector for use of html screen scraping. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://www.quarkruby.com/2007/9/5/firequark-quick-html-screen-scraping" class="external text" rel="nofollow">website</a> </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="Pixel_Perfect"> Pixel Perfect </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-pixelperfect-thumbnail.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/b/b1/Firebug-extlist-pixelperfect-thumbnail.png/400px-Firebug-extlist-pixelperfect-thumbnail.png" class="thumbimage" height="104" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-pixelperfect-thumbnail.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			Pixel Perfect</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=Pixel_Perfect&amp;action=edit&amp;redlink=1" class="new" title="Pixel Perfect (page does not exist)">Pixel Perfect</a> is a firebug extension that allows <a target="_blank" href="http://en.wikipedia.org/wiki/Web_developer" class="ml-smartlink">web developers</a> to easily overlay a web composition over top of the developed html. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://www.pixelperfectplugin.com/" class="external text" rel="nofollow">website</a> </li>
<p>	
<li> Download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/7943" class="external text" rel="nofollow">Mozilla Add-ons</a> site </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="FireRainbow"> FireRainbow </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-firerainbow.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/9/9e/Firebug-extlist-firerainbow.png/400px-Firebug-extlist-firerainbow.png" class="thumbimage" height="277" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-firerainbow.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			FireRainbow</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=FireRainbow&amp;action=edit&amp;redlink=1" class="new" title="FireRainbow (page does not exist)">FireRainbow</a> brings <a target="_blank" href="http://en.wikipedia.org/wiki/JavaScript_syntax" class="ml-smartlink">Javascript syntax</a> highlighting to Firebug. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://firerainbow.binaryage.com/" class="external text" rel="nofollow">website</a> </li>
<p></ul>
<p>
<p>Author: Antonin Hildebrand, download from [Mozilla Add-ons <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/9603" class="external free" rel="nofollow">https://addons.mozilla.org/en-US/firefox/addon/9603</a>] site </p>
<p>
<h4> <span class="mw-headline" id="FirePalette"> FirePalette </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 302px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-firepalette.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/9/90/Firebug-extlist-firepalette.png" class="thumbimage" height="176" width="300" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-firepalette.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			FirePalette</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=FirePalette&amp;action=edit&amp;redlink=1" class="new" title="FirePalette (page does not exist)">FirePalette</a> provides the <a target="_blank" href="http://en.wikipedia.org/wiki/Color_tool" class="ml-smartlink">color picker</a> to Firebug&#8217;s CSS panel, and a menu item &#8220;Pick xxx color &#8230;&#8221; to the  context menu of color value (#112233, black, rgb(0, 12, 34)) in CSS  panel. It also works correctly with the color that is a part of mixed  CSS values, like &#8220;background: #FF8800 none repeat scroll 0 0&#8243;, &#8220;border:  1px solid black&#8221;. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://blog.endflow.net/?p=143" class="external text" rel="nofollow">website</a> </li>
<p>	
<li> Report an <a target="_blank" href="http://bitbucket.org/kuy/firepalette/issues/" class="external text" rel="nofollow">issue</a> </li>
<p>	
<li> Download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/12377" class="external text" rel="nofollow">Mozilla Add-ons</a> site </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="Widerbug"> Widerbug </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 202px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-widerbug.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/9/96/Firebug-extlist-widerbug.png" class="thumbimage" height="128" width="200" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-widerbug.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			Widerbug</div>
<p>	</div>
<p></div>
<p>
<p>A modified version of Firebug optimized for widescreen monitors. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://www.command-tab.com/2008/01/19/widerbug-widescreen-firebug/" class="external text" rel="nofollow">website</a> </li>
<p>	
<li> Download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/13135" class="external text" rel="nofollow">Mozilla Add-ons</a> site </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="Firepicker"> Firepicker </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-firepicker.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/2/29/Firebug-extlist-firepicker.png/400px-Firebug-extlist-firepicker.png" class="thumbimage" height="141" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-firepicker.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			Firepicker</div>
<p>	</div>
<p></div>
<p>
<p>Firepicker automatically adds <a target="_blank" href="http://en.wikipedia.org/wiki/Color_tool" class="ml-smartlink">color picker</a> to Firebug&#8217;s inline CSS editor. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://thedarkone.github.com/firepicker" class="external text" rel="nofollow">website</a>] </li>
<p>	
<li> Download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/15032" class="external text" rel="nofollow">Mozilla Add-ons</a> site (experimental) </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="FireSass"> FireSass </span></h4>
<p>
<p>FireSass allows Firebug to display the original Sass filename and line number of Sass-generated CSS styles. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://sass-lang.com/" class="external text" rel="nofollow">website</a>] </li>
<p>	
<li> Download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/103988/" class="external text" rel="nofollow">Mozilla Add-ons</a> site </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="Arboreal"> Arboreal </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Arboreal.wiki.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/2/26/Arboreal.wiki.png" class="thumbimage" height="200" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Arboreal.wiki.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			Arboreal</div>
<p>	</div>
<p></div>
<p>
<p>Arboreal is a Firebug extension for <a target="_blank" href="http://en.wikipedia.org/wiki/Document_Object_Model" class="ml-smartlink">DOM tree</a> visualization. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://www.alexspengler.de/arboreal/" class="external text" rel="nofollow">website</a>] </li>
<p>	
<li> Download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/228373/" class="external text" rel="nofollow">Mozilla Add-ons</a> site </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="FirePath"> FirePath </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firepath.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/2/2d/Firepath.png/400px-Firepath.png" class="thumbimage" height="202" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firepath.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			FirePath</div>
<p>	</div>
<p></div>
<p>
<p>FirePath is a Firebug extension that adds a development tool to edit, inspect and generate <a target="_blank" href="http://en.wikipedia.org/wiki/XPath_1.0" class="ml-smartlink">XPath 1.0</a> expressions and <a target="_blank" href="http://en.wikipedia.org/wiki/Cascading_Style_Sheets" class="ml-smartlink">CSS 3</a> selectors. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://code.google.com/p/firepath/" class="external text" rel="nofollow">website</a> </li>
<p>	
<li> Download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/11900/" class="external text" rel="nofollow">Mozilla Add-ons</a> site </li>
<p></ul>
<p>
<h3> <span class="mw-headline" id="Debugging"> Debugging </span></h3>
<h4> <span class="mw-headline" id="Chromebug"> Chromebug </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-chromebug.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/8/8d/Firebug-extlist-chromebug.png/400px-Firebug-extlist-chromebug.png" class="thumbimage" height="134" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-chromebug.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			Chromebug</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php/Chromebug" title="Chromebug">Chromebug</a> is Firebug for <a target="_blank" href="http://en.wikipedia.org/wiki/XUL" class="ml-smartlink">XUL</a> applications, especially Firefox extensions. We use Chromebug to debug Firebug! </p>
<p>
<ul>	
<li> <a target="_blank" href="http://getfirebug.com/wiki/index.php/Chromebug_User_Guide" title="Chromebug User Guide" class="mw-redirect">Chromebug User Guide</a> </li>
<p>	
<li> Requires Firebug 1.5 </li>
<p>	
<li> Works on <a target="_blank" href="http://en.wikipedia.org/wiki/Firefox_3" class="ml-smartlink">Firefox 3.0</a> and later </li>
<p>	
<li> Newsgroup: <a target="_blank" href="http://groups.google.com/group/mozilla.addons.chromebug/topics" class="external text" rel="nofollow">mozilla.addons.chromebug</a> </li>
<p></ul>
<p>
<ul>	
<li> Get <a target="_blank" href="https://code.google.com/p/fbug/source/browse/#svn/chromebug/branches" class="external text" rel="nofollow">source code</a> </li>
<p></ul>
<p>
<p>Author: John J. Barton (<a target="_blank" href="http://getfirebug.com/releases/chromebug/" class="external text" rel="nofollow">Download</a>) </p>
<p>
<h4> <span class="mw-headline" id="Eventbug"> Eventbug </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Eventbug.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/c/cf/Eventbug.png/400px-Eventbug.png" class="thumbimage" height="146" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Eventbug.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			Eventbug</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=Eventbug&amp;action=edit&amp;redlink=1" class="new" title="Eventbug (page does not exist)">Eventbug</a> is a Firebug extension that lists all of the event handlers on the page grouped by event type (see a <a target="_blank" href="http://www.softwareishard.com/blog/firebug/eventbug-alpha-released/" class="external text" rel="nofollow">blog post</a>). </p>
<p>
<ul>	
<li> Requires <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/1843" class="external text" rel="nofollow">Firebug 1.5</a> </li>
<p>	
<li> The <a target="_blank" href="http://code.google.com/p/fbug/source/browse/#svn/eventbug/branches" class="external text" rel="nofollow">source code</a> has Firebug&#8217;s BSD-style license. </li>
<p>	
<li> Use Firebug&#8217;s <a target="_blank" href="http://code.google.com/p/fbug/issues/list" class="external text" rel="nofollow">issue list</a> to report an issue. </li>
<p>	
<li> Use Firebug&#8217;s <a target="_blank" href="http://groups.google.com/group/firebug" class="external text" rel="nofollow">news group</a> to ask a question. </li>
<p></ul>
<p>
<p>Author: John J. Barton, Jan Odvarko (<a target="_blank" href="http://getfirebug.com/releases/eventbug/" class="external text" rel="nofollow">Download</a>) </p>
<p>
<h4> <span class="mw-headline" id="Firebug_Code_Coverage"> Firebug Code Coverage </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-codecoverage-thumbnail.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/c/c6/Firebug-extlist-codecoverage-thumbnail.png/400px-Firebug-extlist-codecoverage-thumbnail.png" class="thumbimage" height="136" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-codecoverage-thumbnail.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			Firebug <a target="_blank" href="http://en.wikipedia.org/wiki/Code_coverage" class="ml-smartlink">Code Coverage</a></div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=Firebug_Code_Coverage&amp;action=edit&amp;redlink=1" class="new" title="Firebug Code Coverage (page does not exist)">Firebug Code Coverage</a> adds entry function <a target="_blank" href="http://en.wikipedia.org/wiki/Code_coverage" class="ml-smartlink">code coverage</a> for JavaScript code. Adds a button next to the Profiler in Firebug. </p>
<p>
<p>Author: Zach Leatherman, download from Mozilla <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/4837" class="external text" rel="nofollow">Add-ons site</a> (experimental) </p>
<p>
<p> <a target="_blank" href="http://getfirebug.com/wiki/index.php?title=Code_Coverage_for_Firebug&amp;action=edit&amp;redlink=1" class="new" title="Code Coverage for Firebug (page does not exist)">Code Coverage for Firebug</a> This Firebug extension is used to report Javascript code coverage. Zach&#8217;s extension was migrated to Firebug 1.6/<a target="_blank" href="http://en.wikipedia.org/wiki/Firefox_3.6" class="ml-smartlink">Firefox 3.6</a> </p>
<p>
<p>Author: Jun Ma, download from Mozilla <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/code-coverage-v2-for-firebug/" class="external text" rel="nofollow">Add-ons site</a> (experimental) </p>
<p>
<h4> <span class="mw-headline" id="FirePHP"> FirePHP </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 279px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-firephp-thumbnail.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/d/dc/Firebug-extlist-firephp-thumbnail.png" class="thumbimage" height="300" width="277" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-firephp-thumbnail.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			FirePHP</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=FirePHP&amp;action=edit&amp;redlink=1" class="new" title="FirePHP (page does not exist)">FirePHP</a> enables you to print to your Firebug Console using a simple PHP  function call. All data is sent via a set of X-FirePHP-Data response  headers. This means that the debugging data will not interfere with the  content on your page. Thus FirePHP is ideally suited for AJAX  development. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://www.firephp.org/" class="external text" rel="nofollow">website</a> </li>
<p>	
<li> Report an <a target="_blank" href="http://code.google.com/p/firephp/" class="external text" rel="nofollow">issue</a> </li>
<p>	
<li> Join <a target="_blank" href="http://groups.google.com/group/FirePHP" class="external text" rel="nofollow">FirePHP group</a> </li>
<p></ul>
<p>
<p>Author: Christoph Dorn, download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/6149" class="external text" rel="nofollow">Mozilla Add-ons</a> site </p>
<p>
<h4> <span class="mw-headline" id="fireflow"> fireflow </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-fireflow.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/f/f6/Firebug-extlist-fireflow.png/400px-Firebug-extlist-fireflow.png" class="thumbimage" height="156" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-fireflow.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			fireflow</div>
<p>	</div>
<p></div>
<p>
<p>fireflow uses the <a target="_blank" href="https://developer.mozilla.org/en/Code_snippets/JavaScript_Debugger_Service" class="external text" rel="nofollow">JSD</a> to get method call callbacks and logs them in a tree format. It supports searching and adding filters on card. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://blog.imaginea.com/fireflow/" class="external text" rel="nofollow">website</a> </li>
<p>	
<li> Download from <a target="_blank" href="http://hibernatequeryanalyzer.googlecode.com/files/fireflow-0.3.xpi" class="external text" rel="nofollow">Google Code</a> </li>
<p></ul>
<p>
<p>Author: Apurba Nath </p>
<p>
<h4> <span class="mw-headline" id="FireQuery"> FireQuery </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 371px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-firequery.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/b/b8/Firebug-extlist-firequery.png" class="thumbimage" height="369" width="369" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-firequery.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			FireQuery</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=FireQuery&amp;action=edit&amp;redlink=1" class="new" title="FireQuery (page does not exist)">FireQuery</a> adds a collection of <a target="_blank" href="http://en.wikipedia.org/wiki/JQuery" class="ml-smartlink">jQuery</a>-related enhancements to Firebug. Recommended for all jQuery developers. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://firequery.binaryage.com/" class="external text" rel="nofollow">website</a> </li>
<p></ul>
<p>
<p>Author: Antonin Hildebrand, download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/12632" class="external text" rel="nofollow">Mozilla Add-ons</a> site </p>
<p>
<h4> <span class="mw-headline" id="LiveCoder"> LiveCoder </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-livecoder-thumbnail.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/4/4e/Firebug-extlist-livecoder-thumbnail.png/400px-Firebug-extlist-livecoder-thumbnail.png" class="thumbimage" height="205" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-livecoder-thumbnail.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			LiveCoder</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=LiveCoder&amp;action=edit&amp;redlink=1" class="new" title="LiveCoder (page does not exist)">LiveCoder</a> lets you poke at the browser&#8217;s DOM, just like Firebug. But LiveCoder  also lets you examine Firebug itself. In addition to examining the DOM,  you can alter it including changing functions. This is a great way to  debug your code and test fixes more quickly. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://getlivecoder.com/" class="external text" rel="nofollow">website</a> </li>
<p></ul>
<p>
<p>Author: Steve Souders, download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/5291/" class="external text" rel="nofollow">Mozilla Add-ons</a> site (experimental) </p>
<p>
<h4> <span class="mw-headline" id="Firesymfony"> Firesymfony </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 368px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-firesymfony.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/b/b5/Firebug-extlist-firesymfony.png" class="thumbimage" height="233" width="366" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-firesymfony.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			Firesymfony</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=Firesymfony&amp;action=edit&amp;redlink=1" class="new" title="Firesymfony (page does not exist)">Firesymfony</a> integrates debugging support for the <a target="_blank" href="http://en.wikipedia.org/wiki/Symfony" class="ml-smartlink">Symfony</a> PHP development framework in to Firebug. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://www.firesymfony.org/website" class="external autonumber" rel="nofollow">[1]</a> </li>
<p>	
<li> Download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/9096/" class="external text" rel="nofollow">Mozilla Add-ons</a> site </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="ColdFire"> ColdFire </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-coldfire.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/a/a4/Firebug-extlist-coldfire.png/400px-Firebug-extlist-coldfire.png" class="thumbimage" height="120" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-coldfire.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			ColdFire</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=ColdFire&amp;action=edit&amp;redlink=1" class="new" title="ColdFire (page does not exist)">ColdFire</a> is an extension to Firebug which displays ColdFusion debugging  information in a Firebug tab as opposed to the bottom of the page.  Because ColdFire sends debugging data to the browser via custom HTTP  headers it does not break CSS page layouts and works well with AJAX and  Flash Remoting requests. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://coldfire.riaforge.org/" class="external text" rel="nofollow">website</a> </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="FirePython"> FirePython </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-firepython.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/0/0d/Firebug-extlist-firepython.png/400px-Firebug-extlist-firepython.png" class="thumbimage" height="183" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-firepython.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			FirePython</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=FirePython&amp;action=edit&amp;redlink=1" class="new" title="FirePython (page does not exist)">FirePython</a> enables you to debug your application&#8217;s server side Python code from  within your browser. FirePython is a server-side Python library, which  hooks into standard Python logging module and sends logging events to a  client-side using a <a target="_blank" href="http://en.wikipedia.org/wiki/Firefox" class="ml-smartlink">Firefox browser</a> extension called <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/11090" class="external text" rel="nofollow">FireLogger</a>. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://firepython.binaryage.com/" class="external text" rel="nofollow">website</a> </li>
<p>	
<li> Download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/11090" class="external text" rel="nofollow">Mozilla Add-ons</a> site </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="FireAtlas"> FireAtlas </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-fireatlas.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/f/f5/Firebug-extlist-fireatlas.png/400px-Firebug-extlist-fireatlas.png" class="thumbimage" height="161" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-fireatlas.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			FireAtlas</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=FireAtlas&amp;action=edit&amp;redlink=1" class="new" title="FireAtlas (page does not exist)">FireAtlas</a> is an extension to Firebug dedicated to <a target="_blank" href="http://www.asp.net/ajax/" class="external text" rel="nofollow">ASP.NET AJAX</a>debugging. This extension will provide you with useful services when developing <a target="_blank" href="http://en.wikipedia.org/wiki/ASP.NET_AJAX" class="ml-smartlink">ASP.NET AJAX</a> web sites: </p>
<p>
<ul>	
<li> PageRequestManager events tracing </li>
<p>	
<li> WebService calls tracing and inspection </li>
<p>	
<li> Partial Update inspection within Firebug Net Panel </li>
<p>	
<li> Application components listing </li>
<p></ul>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://fireatlas.chesnaistechnologies.com/" class="external text" rel="nofollow">website</a> </li>
<p>	
<li> Download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/12121" class="external text" rel="nofollow">Mozilla Add-ons</a> site </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="AMF_Explorer"> AMF Explorer </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-amfexplorer-thumbnail.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/c/c9/Firebug-extlist-amfexplorer-thumbnail.png/400px-Firebug-extlist-amfexplorer-thumbnail.png" class="thumbimage" height="300" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-amfexplorer-thumbnail.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			AMF Explorer</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=AMF_Explorer&amp;action=edit&amp;redlink=1" class="new" title="AMF Explorer (page does not exist)">AMF Explorer</a> is based on the JSON Explorer and XML Explorer features of Firebug, AMF Explorer allows web developers to view deserialized AMF messages in Firebug&#8217;s Net panel. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://amfexplorer.riaforge.org/" class="external text" rel="nofollow">website</a> </li>
<p>	
<li> Download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/78928" class="external text" rel="nofollow">Mozilla Add-ons</a> site </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="FireLinkReport"> FireLinkReport </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-firelinkreport-thumbnail.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/f/fb/Firebug-extlist-firelinkreport-thumbnail.png/400px-Firebug-extlist-firelinkreport-thumbnail.png" class="thumbimage" height="116" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-firelinkreport-thumbnail.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			FireLinkReport</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=FireLinkReport&amp;action=edit&amp;redlink=1" class="new" title="FireLinkReport (page does not exist)">FireLinkReport</a> allows viewing all links on the currently open page. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://www.softwarecocktail.com/projects/firelinkreport/" class="external text" rel="nofollow">website</a> </li>
<p>	
<li> Download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/58834" class="external text" rel="nofollow">Mozilla Add-ons</a> site (experimental) </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="Flashbug"> Flashbug </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-flashbug.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/d/d2/Firebug-extlist-flashbug.png/400px-Firebug-extlist-flashbug.png" class="thumbimage" height="132" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-flashbug.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			Flashbug</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=Flashbug&amp;action=edit&amp;redlink=1" class="new" title="Flashbug (page does not exist)">Flashbug</a> is a Firebug extension for Flash. Displays all the running .SWF file  trace output. Requires Flash Player Debugger to work properly. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://blog.coursevector.com/flashbug/" class="external text" rel="nofollow">website</a> </li>
<p>	
<li> Download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/14465" class="external text" rel="nofollow">Mozilla Add-ons</a> site </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="Closure_Inspector"> Closure Inspector </span></h4>
<p>
<p>A development extension to Firebug for working with Closure Library and Closure Compiler </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://code.google.com/p/closure-inspector/" class="external text" rel="nofollow">website</a> </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="Illuminations_for_Developers"> Illuminations for Developers </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Illumination.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/c/cd/Illumination.png/400px-Illumination.png" class="thumbimage" height="262" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Illumination.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			Illumination</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=Illuminations_for_Developers&amp;action=edit&amp;redlink=1" class="new" title="Illuminations for Developers (page does not exist)">Illuminations for Developers</a> A tool to help you develop web applications by investing Firebug with the knowledge of your JavaScript framework and your workflow with it. </p>
<p>
<ul>	
<li> Requires Firebug 1.6 or later </li>
<p>	
<li> Works on <a target="_blank" href="http://en.wikipedia.org/wiki/Firefox_3.6" class="ml-smartlink">Firefox 3.6</a> and later </li>
<p>	
<li> Visit <a target="_blank" href="http://www.illuminations-for-developers.com/" class="external text" rel="nofollow">website</a> </li>
<p>	
<li> Supports ExtJS 2.x, 3.x, 4.x, and Sencha Touch </li>
<p>	
<li> Preliminary support for Dojo 1.5, SproutCore, YUI3, Closure Lib, qooXdoo, and <a target="_blank" href="http://en.wikipedia.org/wiki/JQuery_UI" class="ml-smartlink">jQuery UI</a> </li>
<p></ul>
<p>
<p>Author: Steven Roussey (<a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/illuminations-for-developers/" class="external text" rel="nofollow">Mozilla Add-ons</a>) <b><a target="_blank" href="https://addons.mozilla.org/firefox/downloads/file/127292/illuminations_for_developers_for_firebug-1.1.8-fx.xpi?src=external-Firebug-Wiki" class="external text" rel="nofollow">Download</a></b> </p>
<p>
<h4> <span class="mw-headline" id="Dojo_Firebug_Extension"> Dojo Firebug Extension </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Ddt-presentation.PNG" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/f/f3/Ddt-presentation.PNG/400px-Ddt-presentation.PNG" class="thumbimage" height="100" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Ddt-presentation.PNG" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			Dojo Firebug Extension</div>
<p>	</div>
<p></div>
<p>
<p>Easy access to Dojo features: list dijit registry, and inspect visual widgets, view and breakpoint connections and subscriptions. </p>
<p>
<ul>	
<li> Requires Firebug 1.6 (preferred Firebug 1.7+). </li>
<p>	
<li> Works on Firefox 3.6 and later </li>
<p>	
<li> The source code has Firebug&#8217;s BSD-style license. </li>
<p>	
<li> Use Firebug&#8217;s issue list to report an issue. </li>
<p>	
<li> <a target="_blank" href="http://getfirebug.com/wiki/index.php/DojoFirebugExtension_Reference_Guide" title="DojoFirebugExtension Reference Guide">Documentation</a> here (<a target="_blank" href="http://getfirebug.com/wiki/index.php/DojoFirebugExtension_Reference_Guide" class="external free" rel="nofollow">http://getfirebug.com/wiki/index.php/DojoFirebugExtension_Reference_Guide</a>) </li>
<p></ul>
<p>
<p>Author: Patricio Reyna Almandos and Fernando Gomez (Download <a target="_blank" href="https://getfirebug.com/releases/dojofirebugextension/1.6/" class="external text" rel="nofollow">version for Firebug 1.6</a>, for <a target="_blank" href="https://getfirebug.com/releases/dojofirebugextension/1.7/" class="external text" rel="nofollow">version for Firebug 1.7</a>) </p>
<p>
<h4> <span class="mw-headline" id="ZikulaBug"> ZikulaBug </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:ZikulaBug.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/a/a0/ZikulaBug.png/400px-ZikulaBug.png" class="thumbimage" height="134" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:ZikulaBug.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			ZikulaBug</div>
<p>	</div>
<p></div>
<p>
<p>ZikulaBug is a Firebug extension, which provides a friendly interface for <a target="_blank" href="http://en.wikipedia.org/wiki/Zikula" class="ml-smartlink">Zikula</a>&#8216;s DebugToolbar. It allows to browse Zikula debug data grouped in eight tabs: General, Configuration, SQL,  Templates, Function Executions, Log Console, HTTP request and Settings. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="https://github.com/zikula/ZikulaBug/wiki" class="external text" rel="nofollow">website</a> </li>
<p>	
<li> Download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/zikulabug/" class="external text" rel="nofollow">Mozilla Addons</a> site </li>
<p></ul>
<p>
<p>Author: Paweł Preneta </p>
<p>
<h3> <span class="mw-headline" id="Performance"> Performance </span></h3>
<h4> <span class="mw-headline" id="YSlow"> YSlow </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-yslow-thumbnail.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/5/53/Firebug-extlist-yslow-thumbnail.png/400px-Firebug-extlist-yslow-thumbnail.png" class="thumbimage" height="248" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-yslow-thumbnail.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			YSlow</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=YSlow&amp;action=edit&amp;redlink=1" class="new" title="YSlow (page does not exist)">YSlow</a> analyzes web pages and suggests ways to improve their performance based on a set of rules for high performance web pages. YSlow is a Firefox add-on integrated with the Firebug web development tool. YSlow grades web page based on one of three predefined ruleset or a user-defined ruleset. It  offers suggestions for improving the page&#8217;s performance, summarizes the  page&#8217;s components, displays statistics about the page, and provides  tools for performance analysis, including Smush.it™ and <a target="_blank" href="http://en.wikipedia.org/wiki/JSLint" class="ml-smartlink">JSLint</a>. </p>
<p>
<p>YSlow gives you: </p>
<p>
<ul>	
<li> Performance report card </li>
<p>	
<li> HTTP/HTML summary </li>
<p>	
<li> List of components in the page </li>
<p>	
<li> Tools including <a target="_blank" href="http://en.wikipedia.org/wiki/JSLint" class="ml-smartlink">JSLint</a> </li>
<p></ul>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://developer.yahoo.com/yslow/" class="external text" rel="nofollow">website</a> </li>
<p></ul>
<p>
<p>Author: <a target="_blank" href="http://developer.yahoo.com/yslow/" class="external text" rel="nofollow">Yahoo, Inc.</a> (<a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/5369" class="external text" rel="nofollow">Download</a>) </p>
<p>
<h4> <span class="mw-headline" id="NetExport"> NetExport </span></h4>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=NetExport&amp;action=edit&amp;redlink=1" class="new" title="NetExport (page does not exist)">NetExport</a> is a Firebug extension that allows exporting data from the Net panel. </p>
<p>
<ul>	
<li> Requires <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/1843" class="external text" rel="nofollow">Firebug 1.5</a> </li>
<p>	
<li> Uses <a target="_blank" href="http://www.softwareishard.com/blog/firebug/http-archive-specification/" class="external text" rel="nofollow">HTTP Archive</a> format for export. </li>
<p>	
<li> The extension appends a new <b>Export button</b> into Net panel&#8217;s toolbar. </li>
<p>	
<li> The <a target="_blank" href="http://code.google.com/p/fbug/source/browse/#svn/netexport/branches/" class="external text" rel="nofollow">source code</a> has Firebug&#8217;s BSD-style license. </li>
<p>	
<li> Use Firebug&#8217;s <a target="_blank" href="http://code.google.com/p/fbug/issues/list" class="external text" rel="nofollow">issue list</a> to report an issue. </li>
<p>	
<li> Use Firebug&#8217;s <a target="_blank" href="http://groups.google.com/group/firebug" class="external text" rel="nofollow">discussion group</a> to ask a question. </li>
<p></ul>
<p>
<p>Author: Jan Odvarko (<a target="_blank" href="http://getfirebug.com/releases/netexport/" class="external text" rel="nofollow">Download</a>, <a target="_blank" href="http://www.softwareishard.com/blog/netexport/" class="external text" rel="nofollow">website</a>) </p>
<p>
<h4> <span class="mw-headline" id="Net_Panel_History_Overlay"> Net Panel History Overlay </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-history.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/4/41/Firebug-extlist-history.png/400px-Firebug-extlist-history.png" class="thumbimage" height="86" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-history.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			Net Panel History Overlay</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=Net_Panel_History_Overlay&amp;action=edit&amp;redlink=1" class="new" title="Net Panel History Overlay (page does not exist)">Net Panel History Overlay</a> adds history functionality to firebug net panel. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://digitalmihailo.blogspot.com/" class="external text" rel="nofollow">website</a> </li>
<p></ul>
<p>
<p>Author: Mihailo Lalevic, download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/7189" class="external text" rel="nofollow">Mozilla Add-ons</a> site (experimental) </p>
<p>
<h4> <span class="mw-headline" id="Jiffy"> Jiffy </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-jiffy-thumbnail.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/6/66/Firebug-extlist-jiffy-thumbnail.png/400px-Firebug-extlist-jiffy-thumbnail.png" class="thumbimage" height="145" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-jiffy-thumbnail.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			Jiffy</div>
<p>	</div>
<p></div>
<p>
<p>The <a target="_blank" href="http://getfirebug.com/wiki/index.php?title=Jiffy&amp;action=edit&amp;redlink=1" class="new" title="Jiffy (page does not exist)">Jiffy</a> Firefox extension adds an additional panel to Firebug that provides a  visual view of the Javascript time measurements captured by Jiffy-Web. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://billwscott.com/jiffyext/" class="external text" rel="nofollow">website</a> </li>
<p>	
<li> Join <a target="_blank" href="http://groups.google.com/group/jiffy-web" class="external text" rel="nofollow">Jiffy-Web group</a> </li>
<p></ul>
<p>
<p>Author: <a target="_blank" href="http://looksgoodworkswell.blogspot.com/" class="external text" rel="nofollow">Bill Scott</a> of <a target="_blank" href="http://www.netflix.com/" class="external text" rel="nofollow">NetFlix</a>, download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/7613" class="external text" rel="nofollow">Mozilla Add-ons</a> site (experimental) </p>
<p>
<h4> <span class="mw-headline" id="Inline_Code_Finder"> Inline Code Finder </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-inlinecodefinder.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/e/e0/Firebug-extlist-inlinecodefinder.png" class="thumbimage" height="240" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-inlinecodefinder.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			Inline Code Finder</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=Inline_Code_Finder&amp;action=edit&amp;redlink=1" class="new" title="Inline Code Finder (page does not exist)">Inline Code Finder</a> looks for any of these in a web page: </p>
<p>
<ul>	
<li> inline JavaScript events </li>
<p>	
<li> Inline style </li>
<p>	
<li> javascript: links </li>
<p></ul>
<p>
<p>The idea is to promote separation between content (HTML),  presentation (CSS) and interaction (JavaScript) &#8211; especially the ideas  and thinking behind the <a target="_blank" href="http://en.wikipedia.org/wiki/Unobtrusive_JavaScript" class="ml-smartlink">unobtrusive JavaScript</a> approach. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://www.robertnyman.com/inline-code-finder/" class="external text" rel="nofollow">website</a> </li>
<p></ul>
<p>
<p>Author: Robert Nyman, download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/9641" class="external text" rel="nofollow">Mozilla Add-ons</a> site </p>
<p>
<h4> <span class="mw-headline" id="SenSEO"> SenSEO </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-senseo.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/9/9c/Firebug-extlist-senseo.png/400px-Firebug-extlist-senseo.png" class="thumbimage" height="374" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-senseo.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			SenSEO</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=SenSEO&amp;action=edit&amp;redlink=1" class="new" title="SenSEO (page does not exist)">SenSEO</a> analyzes web pages and tells you how good they fulfill on-page <a target="_blank" href="http://jtracking.com/" class="ml-smartlink">Search Engine optimization</a> criteria. SenSEO is a Firefox add-on integrated with the popular Firebug web development tool. The code is based on the YSlow extension. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://sensational-seo.com/" class="external text" rel="nofollow">website</a> </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="CSS_Usage"> CSS Usage </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-cssusage.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/e/e7/Firebug-extlist-cssusage.png/400px-Firebug-extlist-cssusage.png" class="thumbimage" height="239" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-cssusage.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			CSS Usage</div>
<p>	</div>
<p></div>
<p>
<p>With <a target="_blank" href="http://getfirebug.com/wiki/index.php?title=CSS_Usage&amp;action=edit&amp;redlink=1" class="new" title="CSS Usage (page does not exist)">CSS Usage</a> you can look at your CSS rules and see which ones of them are actually used on your website and which aren&#8217;t. </p>
<p>
<ul>	
<li> Visit [website] </li>
<p>	
<li> Download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/10704" class="external text" rel="nofollow">Mozilla Add-ons</a> site </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="Log_to_NetPanel"> Log to NetPanel </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-logtonetpanel.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/5/5b/Firebug-extlist-logtonetpanel.png/400px-Firebug-extlist-logtonetpanel.png" class="thumbimage" height="154" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-logtonetpanel.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			Log to NetPanel</div>
<p>	</div>
<p></div>
<p>
<p>Log to NetPanel allows you to add markers to the Net panel from  javascript. They appear as extra bars below the network downloads. That  way, you can find out at what point in the download sequence specific  javascript code is running. If you log twice with the same name, a bar  will appear from the first to the second point in time. </p>
<p>
<ul>	
<li> Download <a target="_blank" href="http://code.google.com/p/log-to-net-panel/downloads/list" class="external text" rel="nofollow">here</a> </li>
<p>	
<li> See <a target="_blank" href="http://code.google.com/p/log-to-net-panel/" class="external text" rel="nofollow">more info</a> </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="Page_Speed"> Page Speed </span></h4>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=Page_Speed&amp;action=edit&amp;redlink=1" class="new" title="Page Speed (page does not exist)">Page Speed</a> is an open-source Firefox/Firebug Add-on. Webmasters and web developers can use Page Speed to evaluate the performance of their web pages and to get suggestions on how to improve them. </p>
<p>
<ul>	
<li> Visit <a target="_blank" href="http://code.google.com/speed/page-speed/" class="external text" rel="nofollow">website</a> </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="FireSpider"> FireSpider </span></h4>
<p>
<p><a target="_blank" href="http://xrado.hopto.org/post/firespider-extension-for-firebug" class="external text" rel="nofollow">FireSpider</a> is a an extension for Firebug that can help you find broken or misleading urls and optimize your web page for search engines. </p>
<p>
<h4> <span class="mw-headline" id="FireFontFamily"> FireFontFamily </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-firefontfamily.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/9/91/Firebug-extlist-firefontfamily.png/400px-Firebug-extlist-firefontfamily.png" class="thumbimage" height="86" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:Firebug-extlist-firefontfamily.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			FireFontFamily</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=FireFontFamily&amp;action=edit&amp;redlink=1" class="new" title="FireFontFamily (page does not exist)">FireFontFamily</a> highlights the rendered font-family inside the Style Side Panel </p>
<p>
<ul>	
<li> Download from <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/111672/" class="external text" rel="nofollow">Mozilla Add-ons</a> site </li>
<p></ul>
<p>
<h4> <span class="mw-headline" id="FireEyes"> FireEyes </span></h4>
<p>
<div class="thumb tright">	
<div class="thumbinner" style="width: 402px;"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:FireEyes.png" class="image"><img alt="" src="http://getfirebug.com/wiki/images/thumb/a/ad/FireEyes.png/400px-FireEyes.png" class="thumbimage" height="302" width="400" /></a><br />	
<div class="thumbcaption">	
<div class="magnify"><a target="_blank" href="http://getfirebug.com/wiki/index.php/File:FireEyes.png" class="internal" title="Enlarge"><img src="http://getfirebug.com/wiki/skins/common/images/magnify-clip.png" alt="" height="11" width="15" /></a></div>
<p>			FireFontFamily</div>
<p>	</div>
<p></div>
<p>
<p><a target="_blank" href="http://getfirebug.com/wiki/index.php?title=FireEyes&amp;action=edit&amp;redlink=1" class="new" title="FireEyes (page does not exist)">FireEyes</a> is an unprecedented, nextgen web accessibility tool that ensures both static and dynamic content within a web portfolio are compliant with standards such as Section 508, <a target="_blank" href="http://en.wikipedia.org/wiki/Web_Content_Accessibility_Guidelines" class="ml-smartlink">WCAG 1.0</a>, and <a target="_blank" href="http://en.wikipedia.org/wiki/Web_Content_Accessibility_Guidelines" class="ml-smartlink">WCAG</a> 2.0. You can use another tool, but it won&#8217;t be fully JavaScript aware or handle event-based page content, like FireEyes. </p>
<p>
<ul>	
<li> Download from <a target="_blank" href="http://www.deque.com/products/worldspace-fireeyes" class="external text" rel="nofollow">FireEyes</a> site </li>
<p></ul>
<p>Technorati Tags: <a class="performancingtags" href="http://technorati.com/tag/firebug" rel="tag">firebug</a>, <a class="performancingtags" href="http://technorati.com/tag/browser%20debug%20tools" rel="tag">browser debug tools</a>, <a class="performancingtags" href="http://technorati.com/tag/firefox" rel="tag">firefox</a>, <a class="performancingtags" href="http://technorati.com/tag/open%20source" rel="tag">open source</a></p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=d63c63ce-4786-8e2b-b036-c1bfce0d3f15" /></div>
<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fericrichers.com%2Fblog%2F2011%2F08%2Ffirebug-extensions%2F&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div class="rw-left"><div class="rw-ui-container rw-class-blog-post rw-urid-10810"></div></div>]]></content:encoded>
			<wfw:commentRss>http://ericrichers.com/blog/2011/08/firebug-extensions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title></title>
		<link>http://ericrichers.com/blog/2011/08/1078/</link>
		<comments>http://ericrichers.com/blog/2011/08/1078/#comments</comments>
		<pubDate>Sat, 13 Aug 2011 18:22:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[browser debugging]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://ericrichers.com/blog/2011/08/1078/</guid>
		<description><![CDATA[
