<?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>SnowCMS &#187; Developer updates</title>
	<atom:link href="http://www.snowcms.com/category/developer-updates/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.snowcms.com</link>
	<description>It snows here...a lot.</description>
	<lastBuildDate>Sun, 20 Jun 2010 05:47:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Getting closer! But still a ways to go!</title>
		<link>http://www.snowcms.com/getting-closer-but-still-a-ways-to-go-55/</link>
		<comments>http://www.snowcms.com/getting-closer-but-still-a-ways-to-go-55/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 05:11:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Developer updates]]></category>

		<guid isPermaLink="false">http://www.snowcms.com/?p=55</guid>
		<description><![CDATA[I hope before the end of this week that I can finally complete the major parts of the user system that regular users, use Such as logging in, registering, resending activation emails, and resetting their passwords. By the time I finish that, I should be able to start on the Admin Control Panel, or an [...]]]></description>
			<content:encoded><![CDATA[<p>I hope before the end of this week that I can finally complete the major parts of the user system that regular users, use <img src='http://www.snowcms.com/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' />  Such as logging in, registering, resending activation emails, and resetting their passwords. By the time I finish that, I should be able to start on the Admin Control Panel, or an installer.</p>
<p>I personally can&#8217;t wait! I have put a lot of work into SnowCMS over the past couple years, and I have finally figured out what SnowCMS should be and what SnowCMS will be, and everybody will be able to use this great system I have developed, and eventually, what everybody has developed as a community to extend this platform.</p>
<p>Well, I am quite tired from a long day at school. Till next time, cya!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.snowcms.com/getting-closer-but-still-a-ways-to-go-55/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sorry about the lack of new posts!</title>
		<link>http://www.snowcms.com/sorry-about-the-lack-of-new-posts-53/</link>
		<comments>http://www.snowcms.com/sorry-about-the-lack-of-new-posts-53/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 08:16:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Developer updates]]></category>
		<category><![CDATA[News and updates]]></category>
		<category><![CDATA[developers]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[snowcms]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.snowcms.com/?p=53</guid>
		<description><![CDATA[I apologize for the lack of posts lately. I have yet to post anymore tutorials on how to use some of SnowCMS&#8217;s tools, like how I did with the API class. But don&#8217;t worry, although I have not been that active posting here, I have been fairly busy working on SnowCMS. I recently completed a [...]]]></description>
			<content:encoded><![CDATA[<p>I apologize for the lack of posts lately. I have yet to post anymore tutorials on how to use some of SnowCMS&#8217;s tools, like how I did with the <a href="http://www.snowcms.com/it-has-been-awhile-43/" target="_blank">API class</a>. But don&#8217;t worry, although I have not been that active posting here, I have been fairly busy working on SnowCMS.</p>
<p>I recently completed a new tool for SnowCMS, the <a href="http://snowcms.googlecode.com/svn/docs/files/core/form-class-php.html" target="_blank">Form class</a>. The Form class allows you to create forms (if you didn&#8217;t notice) that can then be hooked into via the API and changed, without you needing to do any extra effort, you simply make the Form how you want to, and then display it. Right before the form is displayed (or processed), the API runs a hook which allows the modification of the form, from adding, changing and removing fields. In fact, currently the registration form uses this Form class, and the very first SnowCMS plugin hooks into the form and adds a CAPTCHA verification image. It&#8217;s very simple to do!</p>
<p>For the time being, I need to get some sleep (it is 12:15AM at the time of this post), but I hope to soon create a more in depth guide to the creation of forms using the Form class.</p>
<p>Cya soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.snowcms.com/sorry-about-the-lack-of-new-posts-53/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keeping your credentials secure</title>
		<link>http://www.snowcms.com/keeping-your-credentials-secure-49/</link>
		<comments>http://www.snowcms.com/keeping-your-credentials-secure-49/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 18:15:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Developer updates]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[information]]></category>
		<category><![CDATA[snowcms]]></category>

		<guid isPermaLink="false">http://www.snowcms.com/?p=49</guid>
		<description><![CDATA[One big goal of SnowCMS is providing a secure system, but of course, who wouldn&#8217;t want that? In order to keep that system secure, user credentials also need to be kept secure, because if someone gets a hold of that information, especially of a member who has powers, your site would likely become compromised. So [...]]]></description>
			<content:encoded><![CDATA[<p>One big goal of SnowCMS is providing a secure system, but of course, who wouldn&#8217;t want that? In order to keep that system secure, user credentials also need to be kept secure, because if someone gets a hold of that information, especially of a member who has powers, your site would likely become compromised.</p>
<p>So how do we keep your password secure? For starters, the password kept in the members database is salted with your username and then encrypted using SHA1. By salting your password, it helps prevent the use of rainbow tables (You know, those sites that have databases with plain text strings and their encrypted counterpart). Then there is logging in, when you submit your credentials through the log in form, your password gets salted with your supplied username, hashed using SHA1, then salted with a randomly generated string which is done by the server. Your plain text password is deleted before the form is sent to the server. Now, this only will occur if you have JavaScript enabled, of course. Once the hashed password is sent to the server, it takes out your members row, and salts (The last salt generated) the hashed password in the database and hashes it, then compares it to the one received from you. If they match, that means your password is correct.</p>
<p>Securing your password before being sent to the server might seem a bit overkill, but it can be very useful. As you never know, someone could be logging POST data, which would contain your log in credentials. All they would get would be your encrypted password which is salted with a randomly generated string. The only way they could <em>ever</em> use that password to log in to your account would be if the server were to generate the same random string, which is highly unlikely.</p>
<p>There are two ways that SnowCMS keeps your password from ever being seen by human eyes, but there is still one more. Cookies! No, not those kind, the Internet kind. With every page load, your browser sends the cookies to the server, where they can then be used to identify whether or not you are logged in. Instead of sending your password just with your username salting the password, there is also a randomly generated hash in the database that salts your password in the cookie&#8230; Just in case <img src='http://www.snowcms.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Not all people have access to SSL, which would stop such possible attacks, which is why we at SnowCMS have decided to use such tactics to protect not only the system itself from security issues, but also the people who use our system as well.</p>
<p>Just a reminder, the <a title="SnowCMS Dev Forum" href="http://dev.snowcms.com/" target="_blank">SnowCMS Dev Forum</a> is now open to the public, if you are interested in having part in the development, or just like to see what is happening, you should come and join us.</p>
<p>Till next time, cya!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.snowcms.com/keeping-your-credentials-secure-49/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It has been awhile</title>
		<link>http://www.snowcms.com/it-has-been-awhile-43/</link>
		<comments>http://www.snowcms.com/it-has-been-awhile-43/#comments</comments>
		<pubDate>Sun, 06 Dec 2009 02:39:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Developer updates]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[flakes]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[improvement]]></category>
		<category><![CDATA[mod system]]></category>

		<guid isPermaLink="false">http://www.snowcms.com/?p=43</guid>
		<description><![CDATA[It has been a bit since I have talked about SnowCMS, so I thought I should make a post to keep things going. In order to allow developers to see all of what goes on in SnowCMS in a more orderly fashion, such as API&#8217;s available, the SnowCMS SVN includes documentation which is compiled every [...]]]></description>
			<content:encoded><![CDATA[<p>It has been a bit since I have talked about SnowCMS, so I thought I should make a post to keep things going.</p>
<p>In order to allow developers to see all of what goes on in SnowCMS in a more orderly fashion, such as API&#8217;s available, the SnowCMS SVN includes documentation which is compiled every now and again (by antimatter15, not me&#8230;), which is <a href="http://snowcms.googlecode.com/svn/docs/index.html" target="_blank">available here</a>. We know that a system can be great, but that system isn&#8217;t useful if no one knows how to use what the system has to offer, so developers take advantage of what SnowCMS has to offer. Currently we have a few available classes and such to aid developers create plugins much faster, and without requiring plugins to have code that multiple plugins might end up having to include themselves, which is unnecessary. So I thought that I would, over the next week or more, make some posts about how to use the various API&#8217;s and classes available to future developers.</p>
<h1><a title="API documentation" href="http://snowcms.googlecode.com/svn/docs/files/core/api-class-php.html" target="_blank">API</a></h1>
<p>The name is pretty self explanatory, but <a title="API documentation" href="http://snowcms.googlecode.com/svn/docs/files/core/api-class-php.html" target="_blank">as you can see</a>, there are many available methods which can be used by plugins, and of course, this will no doubt be the most used by plugins.</p>
<h3><a href="http://snowcms.googlecode.com/svn/docs/files/core/api-class-php.html#API.add_hook" target="_blank">Adding a hook</a></h3>
<p>A plugin can add a hook via the $api, to modify the behavior of the system, or just do some action at the time of the hooks execution. Here is an example:<br />
<code><br />
/* ... */</p>
<p># Your function which will be called on later...<br />
function my_hook(&amp;$str)<br />
{<br />
$str = "I HOOKED YOU!";<br />
}</p>
<p># Register your hook with the API<br />
# The first parameter contains the hooks name, the second is the callback, so either a function name<br />
# or an array containing the object and the method to call, so: array($obj, 'method') would be like calling<br />
# on $obj-&gt;method(); The third parameter is the importance of your hook over any other possibly registered<br />
# callbacks. Defaults to 10, but the lower the number, the sooner that callback will be called upon. Last,<br />
# but not least is the number of arguments your callback accepts.<br />
$api-&gt;add_hook('the_hooks_name', 'my_hook', 10, 1);</p>
<p>/* ... */<br />
# Now somewhere in SnowCMS's code, a hook is ran, and if you registered a callback on that hook,<br />
# your callback, is, erm, called <img src='http://www.snowcms.com/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /><br />
$text = "Hi...";<br />
$api-&gt;run_hook('the_hooks_name', array(&amp;$text));<br />
echo $text;<br />
</code><br />
Now once all that was ran, &#8220;Hi&#8230;&#8221; would not be seen on the screen, but &#8220;I HOOKED YOU!&#8221; would be because the function my_hook had $str be a reference parameter, and when run_hook was called, $text was defined as a reference as well, allowing any function that hooked into this hook to change what $text contained. Of course, just changing text won&#8217;t be the only thing available through hooks, but there will be a lot more, but that depends upon the hook itself. Right now there is a <a href="http://code.google.com/p/snowcms/wiki/Hooks" target="_blank">small list available at Google Code</a> of currently available hooks in the system, but as time progresses, the list will grow <img src='http://www.snowcms.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<h3><a href="http://snowcms.googlecode.com/svn/docs/files/core/api-class-php.html#API.add_action" target="_blank">Adding an action</a></h3>
<p>When SnowCMS refers to an action, we mean an action in the URL. With the API, plugins can register actions to add some major, or possibly not so major, but still important, features to the system. Like say if there was a forum plugin and they wanted the forums index page to be accessible through index.php?action=forum, well, you can do that, and quite easily, I might add.</p>
<p>Adding that accessible page is done like this:<br />
<code><br />
/* ... */<br />
$api-&gt;add_action('forum', 'forum_index', 'location\of\the\forum_index.php');<br />
/* ... */<br />
</code><br />
Now when index.php?action=forum is accessed in a browser, the file &#8220;location\of\the\forum_index.php&#8221; is loaded and the function forum_index is called on. You can also leave the third parameter blank (the location of the function) and forum_index would just be called on. Through this method plugins can add pretty significant features to the system, like forums, pages, blogs, news, directories, or anything, really. Pretty slick, huh?</p>
<h3><a href="http://snowcms.googlecode.com/svn/docs/files/core/api-class-php.html#API.add_subaction" target="_blank">Adding a sub action</a></h3>
<p>Along with adding an action, you can also add a sub action, the difference is that the action must implement the usage of sub actions. Such as the forum plugin (there isn&#8217;t really one, yet, I am just using it as an example <img src='http://www.snowcms.com/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> ) it must use the API (which larger plugins really ought to, but don&#8217;t have to, use the API system to allow any other possible plugins to enhance the plugin itself&#8230;) to see if there are any sub actions which are registered (More on that later).</p>
<p>So now say you wanted to add a feature or something of the like to the forum plugin (index.php?action=forum) such as a statistics page. You would do this:<br />
<code><br />
/* ... */<br />
$api-&gt;add_subaction('forum', 'stats', 'stats_page', 'location\of\the\stats_page.php');<br />
/* ... */<br />
</code><br />
When you would access index.php?action=forum&amp;sa=stats &#8220;location\of\the\stats_page.php&#8221; would be loaded and stats_page would be called upon, but of course, just as with add_action, the location of the function can be left empty.</p>
<h3><a href="http://snowcms.googlecode.com/svn/docs/files/core/api-class-php.html#API.add_group" target="_blank">Adding a group</a></h3>
<p>Since we wanted to keep SnowCMS simple, we thought by default the system would only have 2 groups, an administrative group (administrator) and a member group (member, of course! But there is also a group called guest which you can&#8217;t assign yourself <img src='http://www.snowcms.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ). Why? Well, think about it. Most operating systems have 2 groups, administrators, which can really do everything, then there are members, which just plain get the privilege of using the computer <img src='http://www.snowcms.com/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' />  So there are only those two groups. However, plugins are likely to add features which members shouldn&#8217;t be always allowed to use, nor should administrators be the only group allowed to use it either. So to make that work, plugins can register groups, which administrators can assign to members, which therefore elevate the abilities of that member.</p>
<p>First things first, a plugin needs to register the group, otherwise an administrator can&#8217;t assign (or at least, easily) the group to a member.<br />
<code><br />
/* ... */<br />
$api-&gt;add_group('forum_moderator', l('Forum Moderator'));<br />
/* ... */<br />
</code><br />
The first parameter is the groups identifier, which is the string stored inside the database, the second parameter is the human readable name of the group, in this case, Forum Moderator (I bet you are wondering what the l() function call is for, that is for language support, but more on that later <img src='http://www.snowcms.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ).</p>
<p>Now, when you want to see if the current member is allowed to perform the tasks restricted only to forum moderators, you would do a little something like this:<br />
<code><br />
/* ... */</code></p>
<p>if($member-&gt;is_a(&#8216;forum_moderator&#8217;))<br />
{<br />
/* They are a forum moderator, proceed <img src='http://www.snowcms.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  */<br />
}<br />
else<br />
{<br />
/* They aren&#8217;t a forum moderator, yell at them! <img src='http://www.snowcms.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' />  */<br />
}</p>
<p>/* &#8230; */</p>
<p>There you have it&#8230; And of course you don&#8217;t need to worry about the checking of administrator&#8217;s, if the member is an administrator, any call to the method is_a is automatically returned as true.</p>
<p>So there you have it&#8230; A insight on how to use SnowCMS&#8217;s API class, that is all for the time being, but come back soon and I will be posting about other tools available in the SnowCMS which developers will be able to take advantage of.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.snowcms.com/it-has-been-awhile-43/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SnowCMS v1.0 publicly available, but&#8230;</title>
		<link>http://www.snowcms.com/snowcms-v1-0-publicly-available-but-36/</link>
		<comments>http://www.snowcms.com/snowcms-v1-0-publicly-available-but-36/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 03:10:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Developer updates]]></category>
		<category><![CDATA[News and updates]]></category>
		<category><![CDATA[public]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[v1]]></category>

		<guid isPermaLink="false">http://www.snowcms.com/?p=36</guid>
		<description><![CDATA[On behalf of the SnowCMS team, I would like to announce that SnowCMS v1.0, which the SnowCMS Dev Team has worked on for some time, is now publicly available at the SnowCMS Google Code repository. However, there is a slight catch&#8230; As of today, SnowCMS v1.0 is dead, but that doesn&#8217;t mean that the SnowCMS [...]]]></description>
			<content:encoded><![CDATA[<p>On behalf of the SnowCMS team, I would like to announce that SnowCMS v1.0, which the SnowCMS Dev Team has worked on for some time, is now publicly available at the <a href="http://code.google.com/p/snowcms/source/browse/#svn/branches/1.0">SnowCMS Google Code repository</a>. However, there is a slight catch&#8230;</p>
<p>As of today, SnowCMS v1.0 is dead, but that doesn&#8217;t mean that the SnowCMS project is dead. We, the SnowCMS Dev team, have started to plan a newer version of SnowCMS, which will be SnowCMS v2.0, and this time the system will be bare bones, with only the basics, such as member management and a plug-in system, much like that of WordPress.</p>
<p>Now don&#8217;t think that the system with ship with only member management, that is merely the only feature which will be enabled by default, plug-ins made by the SnowCMS Dev team to extend the bare boned functionality of the system using the hooks and API&#8217;s provided with SnowCMS. We are looking forward to creating an extremely modular system, and as time passes, you should start to see code appear in the repository and more information posted here.</p>
<p>You are probably thinking why has this happened a second time? First there was SnowCMS v0.7 and now SnowCMS v1.0&#8230; Why did this occur? The problem was that we tried to provide a system with to many features and such at one time and after awhile, we just became overwhelmed with what we had to do, so we stopped, and we decided to once again start new, light, and well planned.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.snowcms.com/snowcms-v1-0-publicly-available-but-36/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Lots of pondering going on</title>
		<link>http://www.snowcms.com/lots-of-pondering-going-on-23/</link>
		<comments>http://www.snowcms.com/lots-of-pondering-going-on-23/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 04:24:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Developer updates]]></category>
		<category><![CDATA[bbc]]></category>
		<category><![CDATA[bbcode]]></category>
		<category><![CDATA[flakes]]></category>
		<category><![CDATA[mod system]]></category>
		<category><![CDATA[snowcms]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[updating]]></category>

		<guid isPermaLink="false">http://www.snowcms.com/?p=23</guid>
		<description><![CDATA[Right now Myles and I are pondering about quite a few things to put into SnowCMS. Mod system Of course SnowCMS will have a modification system, and the dev team and I were thinking about how to do it. Some systems have a sort of API system, where basically every so often, the system will [...]]]></description>
			<content:encoded><![CDATA[<p>Right now Myles and I are pondering about quite a few things to put into SnowCMS.</p>
<p><strong>Mod system</strong><br />
Of course SnowCMS will have a modification system, and the dev team and I were thinking about how to do it. Some systems have a sort of API system, where basically every so often, the system will call on some kind of hooks are integrated for developers to latch on to. But there is not much power. Sure it would be simple for use to make, and then updating SnowCMS powered sites would be a snap, we don&#8217;t want to take the easy way out <img src='http://www.snowcms.com/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> </p>
<p>Other systems allow you to modify all the files themselves. It can be a little more complicated, but it also poses a threat to users if they were to install malicious modifications. Probably pretty unlikely, but hey! It can happen&#8230;</p>
<p>Another way is super easy. Not having one at all. Of course, we wouldn&#8217;t do that. We have come to a unanimous decision to have file based editing for the modification system. Oh, and did I mention modifications are referred to as &#8216;flakes&#8217;?</p>
<p><strong>Mod security</strong><br />
As I mentioned about allowing people to modify the sources of the system can be dangerous. So how are we as developers going to combat that?</p>
<p>Pretty simple, well, at least simple in concept. What will happen is people will be able to submit modifications to our site (Eventually we will have a modifications database, of course!) and once the team has reviewed it (Either developers, or maybe a modification team) and approved the modification to be done well and doesn&#8217;t do anything bad, the file will have its hash taken (SHA-1, most likely) and stored in a publically accessible way (In a database and can have the data retrieved). Now once the modification is uploaded to your site, and once your about to install it, your system will hash the file and send it off to SnowCMS.com. We (well, the server&#8230;) will then take that hash and check to see if it exists and is approved in our database. If it is, you will see a message saying the modification is safe and has been approved by the SnowCMS team.</p>
<p>A pretty good idea. Because if that modification which you uploaded to your site was changed in any way, it won&#8217;t be in our database. Simple, but darn effective =P.</p>
<p><strong>Updating</strong><br />
Since SnowCMS will feature a modification (flake) system, updating will be pretty straight forward. Once SnowCMS goes gold, whenever an update is out (Like 1.0.1) we will have those updates put into a flake package. That way even when you have modifications installed, you should be able to update pretty easily with little to no errors. But of course, in the beta and RC stage, you will not be able to update via this system due to the major amount of code changes that will occur. Sorry!</p>
<p><strong>BBCode</strong><br />
Like I talked about in previous posts, I certainly hope by either public beta release or when 1.0 goes gold, we will have the new BBCode parser complete. Still working on it.</p>
<p>Well, a lot of information about SnowCMS v1.0. Until next time, see ya! XD.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.snowcms.com/lots-of-pondering-going-on-23/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New BBCode parser?</title>
		<link>http://www.snowcms.com/new-bbcode-parser-13/</link>
		<comments>http://www.snowcms.com/new-bbcode-parser-13/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 07:15:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Developer updates]]></category>
		<category><![CDATA[bbc]]></category>
		<category><![CDATA[bbcode]]></category>
		<category><![CDATA[improvement]]></category>
		<category><![CDATA[parser]]></category>

		<guid isPermaLink="false">http://www.snowcms.com/?p=13</guid>
		<description><![CDATA[I was working on SnowCMS (Yeah, I am back again ), and I started to become super annoyed that the same BBCode tags cannot be nested within one another. So in just a couple minutes, I tried to figure out a way to get those to work. I tried doing something like this before, but [...]]]></description>
			<content:encoded><![CDATA[<p>I was working on SnowCMS (Yeah, I am back again <img src='http://www.snowcms.com/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> ), and I started to become super annoyed that the same BBCode tags cannot be nested within one another. So in just a couple minutes, I tried to figure out a way to get those to work. I tried doing something like this before, but for the life of me, I couldn&#8217;t get it!</p>
<p> </p>
<p>Not to long ago I began pondering how I could approach this problem, and how other systems do it. I then thought, XML! I remembered that in PHP using <a title="XML Parser" href="http://www.php.net/manual/en/ref.xml.php" target="_blank">XML Parser</a> it parses the XML file into levels with by tags, and that is how I am approaching it <img src='http://www.snowcms.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p> </p>
<p>I already have a <em>very very very</em> (Did I say <em>very</em>?) rough prototype, only ~32 lines of code, the function parses this string:</p>
<blockquote><p>[b]Hello there![/b] [i]Why? [color=red]CAUSE![/color][/i]</p></blockquote>
<p>Into:</p>
<blockquote><p>Array<br />
(<br />
    [1] =&gt; [b]<br />
    [2] =&gt; Hello there!<br />
    [3] =&gt; [/b]<br />
    [4] =&gt; <br />
    [5] =&gt; [i]<br />
    [6] =&gt; Why?<br />
    [7] =&gt; [color=red]<br />
    [8] =&gt; CAUSE!<br />
    [9] =&gt; [/color]<br />
    [11] =&gt; [/i]<br />
)</p></blockquote>
<p>Right now it isn&#8217;t parsed very pretty like <img src='http://www.snowcms.com/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' />  But for the time being, it works for the most part! I can&#8217;t wait to dig deeper into this idea tomorrow&#8230; Seeya for now! (It is 12:15AM at the time I am posting this, Lol)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.snowcms.com/new-bbcode-parser-13/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
