<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>A Beautiful Blog</title>
	
	<link>http://abeautifulsite.net/blog</link>
	<description />
	<lastBuildDate>Tue, 27 Jul 2010 19:15:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/abeautifulsite" /><feedburner:info uri="abeautifulsite" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Surreal CMS Adds Change Notifications</title>
		<link>http://feedproxy.google.com/~r/abeautifulsite/~3/N5vFRcR0bnQ/</link>
		<comments>http://abeautifulsite.net/blog/2010/07/surreal-cms-adds-change-notifications/#comments</comments>
		<pubDate>Sun, 18 Jul 2010 00:48:34 +0000</pubDate>
		<dc:creator>Cory LaViska</dc:creator>
				<category><![CDATA[News & Updates]]></category>
		<category><![CDATA[Surreal CMS]]></category>

		<guid isPermaLink="false">http://abeautifulsite.net/blog/?p=1217</guid>
		<description><![CDATA[A lot of designers have been asking for this lately, so we decided to launch Change Notifications over at Surreal CMS today.  This new feature allows Pro users to receive emails whenever their editors publish changes to any of their &#8230; <a class="more-link" href="http://abeautifulsite.net/blog/2010/07/surreal-cms-adds-change-notifications/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A lot of designers have been asking for this lately, so we decided to launch <em>Change Notifications</em> over at <a href="http://surrealcms.com/">Surreal CMS</a> today.  This new feature allows Pro users to receive emails whenever their editors publish changes to any of their websites.<br />
<span id="more-1217"></span><br />
<em>Change Notifications</em> are enabled on a per-site basis, so you can choose to turn them on or off for each website.  To prevent inbox clutter, emails are only sent once per hour in digest-format.  At a glance, you&#8217;ll quickly know who edited which pages without ever having to login to the CMS.</p>
<p>To enable this feature, go to the <em>Advanced</em> section in your website&#8217;s configuration panel: <strong>Websites &gt; Configure &gt; Advanced</strong></p>
<p>As always, we love feedback, so feel free to send us your thoughts and suggestions!</p>
<img src="http://feeds.feedburner.com/~r/abeautifulsite/~4/N5vFRcR0bnQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://abeautifulsite.net/blog/2010/07/surreal-cms-adds-change-notifications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://abeautifulsite.net/blog/2010/07/surreal-cms-adds-change-notifications/</feedburner:origLink></item>
		<item>
		<title>Tips for Supporting UTF-8 in Your PHP5 Applications</title>
		<link>http://feedproxy.google.com/~r/abeautifulsite/~3/K0INKBI94pE/</link>
		<comments>http://abeautifulsite.net/blog/2010/07/tips-for-supporting-utf-8-in-your-php5-applications/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 16:25:03 +0000</pubDate>
		<dc:creator>Cory LaViska</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://abeautifulsite.net/blog/?p=1210</guid>
		<description><![CDATA[Here are some great tips that will help any PHP5 developer support UTF-8 in their applications.  This list isn&#8217;t comprehensive, but it will allow you to do most basic operations while avoiding troublesome character encoding issues. Most articles on this &#8230; <a class="more-link" href="http://abeautifulsite.net/blog/2010/07/tips-for-supporting-utf-8-in-your-php5-applications/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here are some great tips that will help any PHP5 developer support UTF-8 in their applications.  This list isn&#8217;t comprehensive, but it will allow you to do most basic operations while avoiding troublesome character encoding issues.<span id="more-1210"></span></p>
<p>Most articles on this subject tend to be very confusing, as they try to explain in detail how encoding works.  This article, however, was written for the average PHP developer who simply wants to support UTF-8 characters in their applications.  If you have additional tips, please feel free to share them in the comments below.</p>
<p>Note that, for the purpose of this article, the term <em>extended characters</em> refers to any UTF-8 character that falls <em>outside</em> of the ISO-8859-1 spectrum.  (I.E. Chinese characters, Russian characters, certain Polish characters, etc.)</p>
<h2>Webpages</h2>
<ul>
<li>First and foremost, make sure your <em>files</em> are UTF-8 encoded.
<ul>
<li>Most text editors have an option for this somewhere in the <strong>File </strong>menu  or in their preferences.  Look for something called <em>File Encoding</em>.</li>
<li>It&#8217;s important that the files themselves be UTF-8 encoded,  especially if they contain <em>extended characters</em>.  Otherwise, you  will almost certainly run into display issues.</li>
<li>If possible, select <em>UTF-8 without BOM</em>.</li>
</ul>
</li>
<li>Make sure every page has the UTF-8 meta tag:
<pre class="brush: xml;">&lt;meta http-equiv=&quot;Content-Type&quot;
    content=&quot;text/html; charset=utf-8&quot; /&gt;</pre>
<ul>
<li>This works on most servers, but not all.  If the meta tag option doesn&#8217;t work, you can try adding this line to your .htaccess file:
<pre class="brush: plain;">AddDefaultCharset UTF-8</pre>
</li>
</ul>
</li>
</ul>
<h2>Working with Strings</h2>
<ul>
<li>Include this at the beginning of every page:
<pre class="brush: php;">mb_internal_encoding(&quot;UTF-8&quot;);</pre>
</li>
<li>STOP USING THE NORMAL PHP STRING FUNCTIONS ON UTF-8 INPUT!
<ul>
<li>Until PHP6 comes out, it&#8217;s important to use the <a href="http://www.php.net/manual/en/ref.mbstring.php">Multibyte  String Functions</a> instead of the standard string functions.</li>
<li>Many of the MB String Functions mimic standard string functions:
<ul>
<li><a href="http://www.php.net/manual/en/function.mb-strstr.php">mb_strstr</a></li>
<li><a href="http://www.php.net/manual/en/function.mb-strlen.php">mb_strlen</a></li>
<li><a href="http://www.php.net/manual/en/function.mb-strpos.php">mb_strpos</a></li>
<li><a href="http://www.php.net/manual/en/function.mb-substr.php">mb_substr</a></li>
<li>&#8230;etc&#8230;</li>
</ul>
</li>
<li>Using standard string functions on strings containing <em>extended  characters</em> will result in erroneous output!</li>
</ul>
</li>
<li>Stick with <a href="http://www.php.net/manual/en/ref.pcre.php">PCRE</a> functions  when working with regular expressions.
<ul>
<li><a href="http://www.php.net/manual/en/function.preg-match.php">preg_match</a>,  <a href="http://www.php.net/manual/en/function.preg-replace.php">preg_replace</a>,  etc.</li>
<li>If you absolutely need to use <em>ereg_</em> functions, use their <em>mb_</em> equivalents (above).</li>
</ul>
</li>
<li>Use <a href="http://php.net/htmlspecialchars">htmlspecialchars</a> instead  of <a href="http://php.net/htmlentities">htmlentities</a>.
<ul>
<li>Using htmlentities will cause problems with <em>extended characters</em>,  usually leading to erroneous output!</li>
</ul>
</li>
</ul>
<h2>Database Settings (MySQL)</h2>
<ul>
<li>Set your database collation to UTF-8 (utf8_general_ci)
<ul>
<li>This can be done in phpMyAdmin using the <strong>Operations</strong> tab. (Make sure you have the database itself selected, not one of the tables.)</li>
</ul>
</li>
<li>Make sure all your database <em>tables</em> are UTF-8 (utf8_general_ci)
<ul>
<li>Again, this can be done in phpMyAdmin by selecting a table first, then selecting the <strong>Operations</strong> tab.</li>
</ul>
</li>
<li>Make sure all your <em>fields</em> are all UTF-8 (utf8_general_ci), where applicable.
<ul>
<li>This includes all fields of type <em>text</em>, <em>varchar</em>, <em>enum</em>, <em>char</em>, etc.  (Anything that stores textual data.)</li>
</ul>
</li>
<li>Always use the following <em>immediately</em> after opening your database connection:
<pre class="brush: php;">mysql_set_charset('utf8',$link);</pre>
<ul>
<li>If that doesn&#8217;t work on your version of PHP/MySQL, <a href="http://www.php.net/manual/en/function.mysql-set-charset.php#86455">look here for a workaround</a>.</li>
</ul>
</li>
</ul>
<h2>Working with Files</h2>
<p>In PHP5, I have yet to this day found a way to work with files that have <em>extended characters</em> in their filename.  I am led to believe that this is a problem within PHP itself, which is why version 6 is taking so long to develop.  (PHP6 is scheduled to have full Unicode support.)</p>
<p>There is absolutely no problems with reading and writing to files that contain <em>extended characters</em> in their <em>content</em>, but the filenames themselves cannot contain them.  This is currently the only limitation that I personally haven&#8217;t found a workaround for.  Fortunately, it&#8217;s usually not an issue since web-safe filenames don&#8217;t current include <em>extended characters</em> which cause problems.</p>
<img src="http://feeds.feedburner.com/~r/abeautifulsite/~4/K0INKBI94pE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://abeautifulsite.net/blog/2010/07/tips-for-supporting-utf-8-in-your-php5-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://abeautifulsite.net/blog/2010/07/tips-for-supporting-utf-8-in-your-php5-applications/</feedburner:origLink></item>
		<item>
		<title>Why Adobe InContext Editing Will Never Be the Same</title>
		<link>http://feedproxy.google.com/~r/abeautifulsite/~3/YRxWQ9O_NCA/</link>
		<comments>http://abeautifulsite.net/blog/2010/04/why-adobe-incontext-editing-will-never-be-the-same/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 02:03:52 +0000</pubDate>
		<dc:creator>Cory LaViska</dc:creator>
				<category><![CDATA[News & Updates]]></category>
		<category><![CDATA[Surreal CMS]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[InContext Editing]]></category>

		<guid isPermaLink="false">http://abeautifulsite.net/?p=814</guid>
		<description><![CDATA[Adobe&#8217;s recent announcement to discontinue their free InContext Editing service has surprised and outraged many web designers.  However, the service isn&#8217;t really being discontinued.  Instead, it is getting integrated with Adobe&#8217;s Business Catalyst service.  As a result, come 2011, designers &#8230; <a class="more-link" href="http://abeautifulsite.net/blog/2010/04/why-adobe-incontext-editing-will-never-be-the-same/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Adobe&#8217;s <a href="http://abeautifulsite.net/2010/04/adobe-discontinues-incontext-editing-service/">recent announcement</a> to discontinue their free InContext Editing service has <a href="http://forums.adobe.com/thread/212596?start=0&amp;tstart=0">surprised and outraged</a> many web designers.  However, the service isn&#8217;t really being discontinued.  Instead, it is getting integrated with Adobe&#8217;s <a href="http://businesscatalyst.com/">Business Catalyst</a> service.  As a result, come 2011, designers who wish to continue using InContext Editing&#8217;s functionality for their clients will have to do so with a paid subscription to Business Catalyst (BC).<span id="more-814"></span></p>
<p>Alright, we all know that you can&#8217;t get something for nothing.  But there&#8217;s more to the story than meets the eye.  It seems as though Adobe wants more than just your money.  They want your web hosting, too.  The <a href="http://forums.adobe.com/message/2755760#2755760">following post</a> comes directly from the InContext Editing forum:</p>
<blockquote><p>The hosting was one of the top problems in using ICE and the shear  number of FTP servers and different implementations and settings made  difficult to support everything. Even for a web professional, FTP can  raise problems and cause support incidents.</p>
<p>The integration of InContext Editing in Business Catalyst should help us  solve this problem, as we&#8217;ll have a single FTP server which is in our  back yard. This why I think you will not have to solve server problems  and have time to focus on what&#8217;s important: creating great websites for  your customers.</p></blockquote>
<p>Adobe&#8217;s excuse for not allowing you to host your own websites in BC is that they can&#8217;t support multiple FTP servers? Ouch.  But wait, it gets better:</p>
<blockquote><p>On the BC system hosting, you cannot run PHP, ColdFusion or ASP code.</p></blockquote>
<p>Yes, you read that correctly.  <strong>You cannot run any type of server-side scripting on your Business Catalyst-hosted websites.</strong> Instead, <a href="http://forums.adobe.com/message/2756449#2756449">Adobe believes</a> that they can &#8220;cover most of your needs&#8221; with &#8220;predefined modules&#8221;:</p>
<blockquote><p>The system comes with a large number of predefined modules that you can  use directly. [...]  Although we&#8217;re  not using or supporting PHP, I am pretty sure that we can cover most of  your needs with the current system.</p></blockquote>
<p>In essence, InContext Editing has gone from a flexible, <em>FTP-in-and-start-editing</em> system to a restrictive, out-of-the-box application.  Why?  Probably because it&#8217;s easier and less expensive for Adobe to support.  Unfortunately for designers, this simply isn&#8217;t acceptable for clients who are used to the flexibility of what server-side languages have to offer.  In my personal experience, 99% of the time clients want something <em>just a little different</em> that what &#8220;the box&#8221; has to offer.</p>
<h2>Considering an Alternative</h2>
<p>My suggestion to anyone using Adobe InContext Editing is to consider looking into alternative content management solutions.  Our company, <em>A Beautiful Site, LLC.</em>, offers one of the leading <em>simple CMS</em> services on the web.  Here&#8217;s a quick breakdown of what you get with <a href="http://surrealcms.com/">Surreal CMS</a> that you will allegedly not get with the future version of InContext Editing:</p>
<ul>
<li>The ability to <strong>host your own websites</strong></li>
<li>The flexibility to use <strong>any type of server-side language</strong> you choose</li>
<li>Access from <strong>your own domain/subdomain</strong> with the ability to <strong>theme and brand</strong> the CMS as your own solution</li>
<li>An <strong>inexpensive pro plan</strong> that can manage unlimited websites</li>
<li><strong>One-on-one email support</strong> (both free and pro accounts)</li>
<li><a href="http://surrealcms.com/compare">Competitive features</a> that are continuously being enhanced and improved</li>
<li><a href="http://surrealcms.com/google_analytics">Google Analytics integration</a> for pro users</li>
</ul>
<p>Having been around since 2008, <a href="http://surrealcms.com/">Surreal CMS</a> has grown steadily because of their dedication to serving <em>you</em>, the designer, not a board room full of profit-seeking shareholders.  That&#8217;s why they have already begun working on supporting <strong>repeating regions</strong>, an essential InContext Editing feature, which is expected to be available as soon as this summer.</p>
<img src="http://feeds.feedburner.com/~r/abeautifulsite/~4/YRxWQ9O_NCA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://abeautifulsite.net/blog/2010/04/why-adobe-incontext-editing-will-never-be-the-same/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://abeautifulsite.net/blog/2010/04/why-adobe-incontext-editing-will-never-be-the-same/</feedburner:origLink></item>
		<item>
		<title>Adobe InContext Editing Users Speak Out</title>
		<link>http://feedproxy.google.com/~r/abeautifulsite/~3/eZCGOUg1EJg/</link>
		<comments>http://abeautifulsite.net/blog/2010/04/adobe-incontext-editing-users-speak-out/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 00:21:45 +0000</pubDate>
		<dc:creator>Cory LaViska</dc:creator>
				<category><![CDATA[News & Updates]]></category>
		<category><![CDATA[Surreal CMS]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[InContext Editing]]></category>

		<guid isPermaLink="false">http://abeautifulsite.net/?p=808</guid>
		<description><![CDATA[First and foremost, I am not targeting Adobe as a company, but rather their decision to abruptly end the InContext Editing content management service.  It is evident by the recent uproar in their own forum that many people feel misled, &#8230; <a class="more-link" href="http://abeautifulsite.net/blog/2010/04/adobe-incontext-editing-users-speak-out/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>First and foremost, I am not targeting <a href="http://www.adobe.com/">Adobe</a> as a company, but rather their decision to abruptly end the <a href="http://www.adobe.com/products/incontextediting/">InContext Editing</a> content management service.  It is evident by the recent uproar in <a href="http://forums.adobe.com/thread/212596?start=0&amp;tstart=0">their own forum</a> that many people feel misled, deceived, or otherwise disenchanted by this announcement &#8212; an announcement that will ultimately leave thousands of designers without a reasonably-priced content management solution for their clients.<span id="more-808"></span></p>
<p>To give you an idea of what some people are saying, here are some actual quotes from Adobe InContext users:</p>
<blockquote><p>&#8220;The  only reason I bought Dreamweaver CS4 was because of InContext.&#8221;</p>
<p>&#8220;Unreal,  we [...] purchased DreamWeaver CS4  because of the supposed &#8220;included&#8221; content manager InContext.&#8221;</p>
<p>&#8220;Today I made a decision for the company. We will no longer publish ANY  pages for use with InContext Editing.&#8221;</p>
<p>&#8220;InContext is a great idea, but the price should be already included into [DreamWeaver's] price. This is where it is starting to become a little evil.&#8221;</p>
<p>&#8220;As creative suite owner i expected InContext Editing to come as a  bonus.&#8221;</p>
<p>&#8220;If Adobe chooses to charge for InContext, I definitely will have to drop  it.&#8221;</p>
<p>&#8220;There are other options out there I&#8217;m not afraid to use, since I don&#8217;t  want to be nickeled and dimed to death!&#8221;</p>
<p>&#8220;People are upset that they paid x-amount of dollars for Dreamweaver and  will be charged an extra fee to use InContext.&#8221;</p>
<p>&#8220;Is this bait and switch? Adobe has come down a notch in their reputation  IMO.&#8221;</p></blockquote>
<p>Those are all from the <a href="http://forums.adobe.com/thread/212596?start=0&amp;tstart=0">first page</a>.  In fact, there are hundreds of other posts on the same topic, many of which reaffirm these same points.  Amidst all of the confusion, however, one thing is clear: a lot of Adobe&#8217;s customers feel like they&#8217;ve been cheated.  Many claim to have purchased InContext Editing as a service that came advertised with <a href="http://www.adobe.com/products/creativesuite/">Creative Suite</a> 4.  Adobe argues that was simply not the case:</p>
<blockquote><p>Paid Dreamweaver feature?  Not really. We intend to run the service as a standalone editing service. However, we want or intend to give Dreamweaver users some integration features that would help them create editable websites faster, using Dreamweaver&#8217;s design view and InContext Editing commands. This was the message we tried to send, but seems that it needs more clarity.</p></blockquote>
<p>Although there are some obvious ethical issues at hand here, Adobe is covered legally because their <a href="http://incontextediting.adobe.com/terms_of_use/">licensing agreement</a> essentially guarantees nothing at all to end users.  Of course people aren&#8217;t going to be happy about it, but Adobe sees more money that can be made elsewhere.  Specifically in their <a href="http://businesscatalyst.com/">Business Catalyst</a> service.  From the <a href="http://www.adobe.com/products/incontextediting/">InContext Editing</a> website:</p>
<blockquote><p>InContext Editing will be discontinued as a standalone service in 2011.  However, InContext Editing has become a part of Adobe Business  Catalyst®, a hosted application for building and managing online  businesses that can also import your existing website. <a href="http://www.businesscatalyst.com/" target="_blank">Find out</a> more about Business Catalyst and how you can continue to use InContext  Editing beyond 2011.</p></blockquote>
<p>Indeed, this does seem like a classic &#8220;bait and switch&#8221; tactic, even if it was a simple miscommunication on Adobe&#8217;s part.</p>
<img src="http://feeds.feedburner.com/~r/abeautifulsite/~4/eZCGOUg1EJg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://abeautifulsite.net/blog/2010/04/adobe-incontext-editing-users-speak-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://abeautifulsite.net/blog/2010/04/adobe-incontext-editing-users-speak-out/</feedburner:origLink></item>
		<item>
		<title>Sending Plain-text + HTML Emails in PHP</title>
		<link>http://feedproxy.google.com/~r/abeautifulsite/~3/IHGVu5I69-U/</link>
		<comments>http://abeautifulsite.net/blog/2010/04/sending-plain-text-html-emails-in-php/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 22:05:58 +0000</pubDate>
		<dc:creator>Cory LaViska</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://abeautifulsite.net/?p=803</guid>
		<description><![CDATA[You can easily add some basic headers and send HTML emails using the PHP mail() function, but sometimes the resulting messages don&#8217;t seem to display correctly in certain email clients &#8212; especially those that don&#8217;t support HTML emails.  The best &#8230; <a class="more-link" href="http://abeautifulsite.net/blog/2010/04/sending-plain-text-html-emails-in-php/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>You can easily add some basic headers and send HTML emails using the PHP mail() function, but sometimes the resulting messages don&#8217;t seem to display correctly in certain email clients &#8212; especially those that don&#8217;t support HTML emails.  The best thing to do is send both a plain-text version and an HTML version of your message in the same email.<span id="more-803"></span></p>
<h2>Enter PEAR</h2>
<p>Fortunately, the <a href="http://pear.php.net/">PEAR</a> project makes this really easy.  First, you&#8217;ll need to make sure the following PEAR packages are installed:</p>
<pre class="brush: plain;">
Mail
Mail_Mime
</pre>
<p>To do this from a terminal window, just type <strong>pear list</strong>.  If the aforementioned packages aren&#8217;t showing as installed, you&#8217;ll need to install them.  Although installing PEAR packages is beyond the scope of this article, you can <em>usually</em> get them installed with the following commands.  (You may need to use <em>sudo</em> or be logged in as <em>root</em> for this to work.)</p>
<pre class="brush: plain;">
pear install mail
pear install mail_mime
</pre>
<h2>Preparing the Email</h2>
<p>Once PEAR is enabled, preparing the email is really simple.  First, you&#8217;ll need to include the required PEAR classes:</p>
<pre class="brush: php;">
include('Mail.php');
include('Mail/mime.php');
</pre>
<p>Once that&#8217;s out of the way, you can send HTML/Plain-text emails with the following code:</p>
<pre class="brush: php;">
// The content of the message in both plain-text and HTML
$message_text = '...';
$message_html = '&lt;html&gt;...&lt;/html&gt;';

// Set the message content
$message = new Mail_mime(&quot;\n&quot;);
$message-&gt;setTXTBody($message_text);
$message-&gt;setHTMLBody($message_html);

// Get the body and headers
$body = $message-&gt;get();
$headers = $message-&gt;headers(array(
	'From' =&gt; 'Surreal CMS &lt;sender@example.com&gt;',
	'Subject' =&gt; 'This is the subject of the message'
));

// Send the message
$mail = Mail::factory('mail');
$mail-&gt;send('recipient@example.com', $headers, $body);
</pre>
<p>Of course, if you&#8217;re using template files for your emails you could replace the first couple of lines with something like this:</p>
<pre class="brush: php;">
$message_text = file_get_contents('message.txt');
$message_html = file_get_contents('message.html');
</pre>
<p>This, of course, will populate the email with the contents of both <strong>message.txt</strong> and <strong>message.html</strong>.</p>
<img src="http://feeds.feedburner.com/~r/abeautifulsite/~4/IHGVu5I69-U" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://abeautifulsite.net/blog/2010/04/sending-plain-text-html-emails-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://abeautifulsite.net/blog/2010/04/sending-plain-text-html-emails-in-php/</feedburner:origLink></item>
		<item>
		<title>Adobe Discontinues InContext Editing Service</title>
		<link>http://feedproxy.google.com/~r/abeautifulsite/~3/BETm5VB7CGQ/</link>
		<comments>http://abeautifulsite.net/blog/2010/04/adobe-discontinues-incontext-editing-service/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 23:46:50 +0000</pubDate>
		<dc:creator>Cory LaViska</dc:creator>
				<category><![CDATA[News & Updates]]></category>
		<category><![CDATA[Surreal CMS]]></category>

		<guid isPermaLink="false">http://abeautifulsite.net/?p=796</guid>
		<description><![CDATA[Adobe has announced that, effective May 5th, 2010, their InContext Editing service will be discontinued.  The company has announced that they will cease development of the online content management service and disallow new users and website registrations at that time.  &#8230; <a class="more-link" href="http://abeautifulsite.net/blog/2010/04/adobe-discontinues-incontext-editing-service/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Adobe has announced that, effective May 5th, 2010, their <a href="http://www.adobe.com/products/incontextediting/">InContext Editing</a> service will be discontinued.  The company has announced that they will cease development of the online content management service and disallow new users and website registrations at that time.  Existing users will be able to continue using it through early to mid-2011.  After that, Adobe InContext Editing will shutdown indefinitely as a standalone service.<span id="more-796"></span></p>
<p>The <a href="http://www.adobe.com/products/incontextediting/faq/">FAQ page</a> on Adobe&#8217;s website stated the following:</p>
<blockquote><p><strong>Why is Adobe discontinuing the development of InContext Editing?</strong><br />
Improved content management support was the most commonly requested  feature from customers. To meet our customers&#8217; demands for more advanced  functionality, InContext Editing will be integrated with Business  Catalyst, our online business platform. In addition to offering an  advanced yet easy-to-use content management system, Business Catalyst  combines more than five essential online business tools in one  integrated solution. It enables web professionals to build what their  clients need, whether it&#8217;s a simple informative website or a powerful  online store — quickly and without programming.</p></blockquote>
<p>Also according to their FAQ page, technical support will also be discontinued for the InContext Service.  That leaves current Adobe InContext Editor users with few options.  Either subscribe to a <a href="http://businesscatalyst.com/pricing/designer"><em>Standard</em></a> ($995) or <a href="http://businesscatalyst.com/pricing/designer"><em>Premium</em></a> ($1995) plan with Adobe&#8217;s <a href="http://businesscatalyst.com/">Business Catalyst</a> platform, or find themselves an alternative <a href="http://surrealcms.com/">simple CMS</a> solution for their websites.</p>
<img src="http://feeds.feedburner.com/~r/abeautifulsite/~4/BETm5VB7CGQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://abeautifulsite.net/blog/2010/04/adobe-discontinues-incontext-editing-service/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://abeautifulsite.net/blog/2010/04/adobe-discontinues-incontext-editing-service/</feedburner:origLink></item>
		<item>
		<title>Surreal CMS Gets Google Analytics, Syntax Highlighting</title>
		<link>http://feedproxy.google.com/~r/abeautifulsite/~3/XsBXhz1WI9k/</link>
		<comments>http://abeautifulsite.net/blog/2010/04/surreal-cms-gets-google-analytics-syntax-highlighting/#comments</comments>
		<pubDate>Sat, 10 Apr 2010 20:51:07 +0000</pubDate>
		<dc:creator>Cory LaViska</dc:creator>
				<category><![CDATA[Surreal CMS]]></category>

		<guid isPermaLink="false">http://abeautifulsite.net/?p=788</guid>
		<description><![CDATA[Last week we launched a couple of new features over at Surreal CMS.  The first one, and probably the most exciting, is Google Analytics Integration.  Using OAuth, pro users can safely and securely give their clients access to their website&#8217;s &#8230; <a class="more-link" href="http://abeautifulsite.net/blog/2010/04/surreal-cms-gets-google-analytics-syntax-highlighting/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Last week we launched a couple of new features over at <a href="http://surrealcms.com/">Surreal CMS</a>.  The first one, and probably the most exciting, is <a href="http://surrealcms.com/google_analytics">Google Analytics Integration</a>.  Using OAuth, pro users can safely and securely give their clients access to their website&#8217;s analytics information — and it&#8217;s just as easy to use as everything else in Surreal CMS:<span id="more-788"></span></p>
<p><img class="aligncenter size-full" title="Google Analytics Integration Screenshot" src="/blog/wp-content/uploads/2010/04/google_analytics.jpg" alt="Google Analytics Integration Screenshot" />It literally takes about 15-20 seconds to set this up if you already have a Google Analytics account.  We even made <a href="http://www.youtube.com/watch?v=6Zv63yG9kFw">a short video</a> to show you how it all works!</p>
<p>The other feature we released was <strong>syntax highlighting</strong> for (X)HTML, CSS, JavaScript, and XML files, courtesy of the <a href="http://marijn.haverbeke.nl/codemirror/">CodeMirror</a> project.  This is available to both free and pro users.</p>
<p>Keep an eye out in the coming months for more great features and, if you haven&#8217;t already, don&#8217;t forget to sign up for a free account over at <a href="http://surrealcms.com/">Surreal CMS</a>!</p>
<img src="http://feeds.feedburner.com/~r/abeautifulsite/~4/XsBXhz1WI9k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://abeautifulsite.net/blog/2010/04/surreal-cms-gets-google-analytics-syntax-highlighting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://abeautifulsite.net/blog/2010/04/surreal-cms-gets-google-analytics-syntax-highlighting/</feedburner:origLink></item>
		<item>
		<title>A Fresh, Free Sans-serif Typeface called ”Maven”</title>
		<link>http://feedproxy.google.com/~r/abeautifulsite/~3/xwN-7pj6L2o/</link>
		<comments>http://abeautifulsite.net/blog/2010/04/a-fresh-free-sans-serif-typeface-called-maven/#comments</comments>
		<pubDate>Sat, 10 Apr 2010 15:44:15 +0000</pubDate>
		<dc:creator>Cory LaViska</dc:creator>
				<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://abeautifulsite.net/?p=785</guid>
		<description><![CDATA[Our friends over at Vissol have just released a beautiful new typeface into the wild.  If you&#8217;re into typography and you like free fonts, you definitely want to check out Maven. Maven is available in three variations: light, book, and &#8230; <a class="more-link" href="http://abeautifulsite.net/blog/2010/04/a-fresh-free-sans-serif-typeface-called-maven/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Our friends over at <a href="http://vissol.co.uk/">Vissol</a> have just released a beautiful new typeface into the wild.  If you&#8217;re into typography and you like <strong>free fonts</strong>, you definitely want to check out <a href="http://vissol.co.uk/blog/maven/">Maven</a>.<span id="more-785"></span></p>
<p><a href="http://vissol.co.uk/blog/maven"><img class="aligncenter size-full wp-image-786" title="Maven" src="/blog/wp-content/uploads/2010/04/maven.jpg" alt="Maven" width="539" height="109" /></a></p>
<p>Maven is available in three variations: <em>light</em>, <em>book</em>, and <em>bold</em>.  Feel free to download it, design with it, and pass it along to your friends.  Just don&#8217;t forget to visit the Vissol team to <a href="http://vissol.co.uk/blog/maven/">tell them what you think</a> about it!</p>
<img src="http://feeds.feedburner.com/~r/abeautifulsite/~4/xwN-7pj6L2o" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://abeautifulsite.net/blog/2010/04/a-fresh-free-sans-serif-typeface-called-maven/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://abeautifulsite.net/blog/2010/04/a-fresh-free-sans-serif-typeface-called-maven/</feedburner:origLink></item>
		<item>
		<title>Office 2007 Files Downloading as ZIP Files in Internet Explorer</title>
		<link>http://feedproxy.google.com/~r/abeautifulsite/~3/Jr_XJqLS1Y4/</link>
		<comments>http://abeautifulsite.net/blog/2010/03/office-2007-files-downloading-as-zip-in-internet-explorer/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 03:30:51 +0000</pubDate>
		<dc:creator>Cory LaViska</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[office 2007]]></category>

		<guid isPermaLink="false">http://abeautifulsite.net/?p=777</guid>
		<description><![CDATA[Today I learned that Microsoft Office 2007 files (you know, the new ones that end in DOCX, XLSX, and PPTX) don&#8217;t always download properly in Internet Explorer. In fact, IE tends to see them as ZIP files and forces their &#8230; <a class="more-link" href="http://abeautifulsite.net/blog/2010/03/office-2007-files-downloading-as-zip-in-internet-explorer/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today I learned that Microsoft Office 2007 files (you know, the new ones that end in DOC<strong>X</strong>, XLS<strong>X</strong>, and PPT<strong>X</strong>) don&#8217;t always download properly in Internet Explorer. In fact, IE tends to see them as ZIP files and forces their extension to change to <strong>.zip</strong> when you select <strong>download</strong>. This is because IE is checking for the MIME type instead of blindly going by file extensions. Ironically, since it doesn&#8217;t recognize the new Office 2007 files for what they are, IE renames their extensions to <strong>.zip</strong> upon downloading.<span id="more-777"></span></p>
<p>If you&#8217;re wondering why the extensions get changed to <strong>.zip</strong>, it&#8217;s because the new Office 2007 formats are nothing more than a series of XML documents zipped up with their own special file extensions. Java <strong>.jar</strong> files and Mozilla Firefox <strong>.xpi</strong> files do mostly the same thing, so this isn&#8217;t a new concept, but it does seem to introduce a bit of a problem for Internet Explorer users.</p>
<p>There seem to be a number of &#8220;solutions&#8221; out there, but many of them involve telling the end user to change a setting in their browser or something like that — definitely not the best solution. Another option is to simply rename the affected file(s) to the appropriate extension(s) and open them up in Office as usual. Although this works, it&#8217;s still not a great solution since most users won&#8217;t know to do that.</p>
<p>The best solution I found was on a <a href="http://www.webdeveloper.com/forum/showthread.php?threadid=162526">forum</a>, where a user suggested setting the MIME types manually on the server. This is obviously a better solution, since end users get the expected behavior and are able to download files with the proper extension. For Apache servers, simply add the following to your config file or create an <strong>.htaccess</strong> file in the root directory of your website:</p>
<pre class="brush: plain;">
AddType application/vnd.ms-word.document.macroEnabled.12 .docm
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
AddType application/vnd.ms-powerpoint.template.macroEnabled.12 potm
AddType application/vnd.openxmlformats-officedocument.presentationml.template potx
AddType application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam
AddType application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm
AddType application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
AddType application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm
AddType application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
AddType application/vnd.ms-excel.addin.macroEnabled.12 xlam
AddType application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
AddType application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
AddType application/vnd.ms-excel.template.macroEnabled.12 xltm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx
</pre>
<p>Note that, if you&#8217;re updating your main config file, you&#8217;ll have to restart Apache before the changes will take affect. With <strong>.htaccess </strong>files you shouldn&#8217;t need to restart the server.</p>
<p>Now your users will be able to download Office 2007 files from your server without any problems.  If you&#8217;ve discovered another method for solving this problem, please share it in the comments!</p>
<img src="http://feeds.feedburner.com/~r/abeautifulsite/~4/Jr_XJqLS1Y4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://abeautifulsite.net/blog/2010/03/office-2007-files-downloading-as-zip-in-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://abeautifulsite.net/blog/2010/03/office-2007-files-downloading-as-zip-in-internet-explorer/</feedburner:origLink></item>
		<item>
		<title>Use HTML5 and CSS3 Today with 52Framework</title>
		<link>http://feedproxy.google.com/~r/abeautifulsite/~3/FABdxBl-joU/</link>
		<comments>http://abeautifulsite.net/blog/2010/02/use-html5-and-css3-today-with-52framework/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 23:02:22 +0000</pubDate>
		<dc:creator>Cory LaViska</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML/XHTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://abeautifulsite.net/?p=767</guid>
		<description><![CDATA[There&#8217;s a lot of talk about HTML5 and CSS3 these days, especially since Safari/Chrome, Firefox, and Opera have begun supporting some of the most anticipated features of both specifications.  If you&#8217;ve ever used border-radius or box-shadow then you&#8217;ve already touched &#8230; <a class="more-link" href="http://abeautifulsite.net/blog/2010/02/use-html5-and-css3-today-with-52framework/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a lot of talk about <a href="http://www.alistapart.com/articles/previewofhtml5">HTML5</a> and <a href="http://www.google.com/url?sa=t&amp;source=web&amp;ct=res&amp;cd=1&amp;ved=0CAoQFjAA&amp;url=http%3A%2F%2Fwww.css3.info%2F&amp;rct=j&amp;q=css3&amp;ei=h5JwS8reCcS0tgej7amDBg&amp;usg=AFQjCNFTm78j1LXdlhGiQFk1hPaPiZmb6A">CSS3</a> these days, especially since <a href="http://webkit.org/blog/22/css3-goodies-borders-and-backgrounds/">Safari/Chrome</a>, <a href="http://www.marcofolio.net/css/new_css3_properties_added_to_firefox_3.6.html">Firefox</a>, and <a href="http://www.css3.info/opera-10-alpha-continues-the-css3-push/">Opera</a> have begun supporting some of the most anticipated features of both specifications.  If you&#8217;ve ever used <strong>border-radius </strong>or <strong>box-shadow </strong>then you&#8217;ve already touched on CSS3 a bit.  However, the chances are that, at least at the time of this writing, you haven&#8217;t done much with HTML5.  And, chances are, it&#8217;s probably because you&#8217;ve heard about the lack of browser support for HTML5 thus far (which is to be expected, considering that the <a href="http://dev.w3.org/html5/spec/Overview.html">specification</a> is still just a draft).<span id="more-767"></span></p>
<p>That said, I stumbled across a very interesting framework today that may help bridge the gap between the present and the future &#8212; when HTML5 and CSS3 is supported by all major browsers.  <a href="http://www.52framework.com/">52Framework</a> boasts features such as rounded corners, text-shadow, box-shadow, HTML5 markup, a grid system, and a built-in CSS reset.  Best of all, it&#8217;s compatible with all major browsers, including the infamous IE6.  You can see a <a href="http://www.52framework.com/demo/">working demo of an HTML5 page</a> using with 52Framework on their website or <a href="http://www.52framework.com/">download the latest release</a> from their homepage.  If you&#8217;re just curious to see what it&#8217;s all about, you can take a peak at <a href="http://www.52framework.com/documentation/view/whats_in_the_box/">what&#8217;s inside the box</a>.</p>
<p style="text-align: center;"><a href="http://www.52framework.com/"><img class="aligncenter size-full" title="52framework" src="/blog/wp-content/uploads/2010/02/52framework.jpg" alt="" /></a></p>
<p>Although still in beta, 52Framework looks like a promising alternative for anyone looking to take advantage of the upcoming HTML5 + CSS3 specifications.  As nice as it is, however, I don&#8217;t think it&#8217;s something I would rely on for heavy production use&#8230;at least not without some very thorough testing on a lot of different browsers.</p>
<img src="http://feeds.feedburner.com/~r/abeautifulsite/~4/FABdxBl-joU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://abeautifulsite.net/blog/2010/02/use-html5-and-css3-today-with-52framework/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://abeautifulsite.net/blog/2010/02/use-html5-and-css3-today-with-52framework/</feedburner:origLink></item>
	</channel>
</rss><!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
