<?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>Bin-Blog &#187; (X)HTML</title>
	<atom:link href="http://www.bin-co.com/blog/category/xhtml/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bin-co.com/blog</link>
	<description>Learn about the latest in Web Development - as soon as I do.</description>
	<lastBuildDate>Tue, 13 Oct 2009 18:55:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Naked Day &#8211; Disabling CSS for the Day</title>
		<link>http://www.bin-co.com/blog/2009/04/naked-day-disabling-css-for-the-day/</link>
		<comments>http://www.bin-co.com/blog/2009/04/naked-day-disabling-css-for-the-day/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 18:30:17 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[(X)HTML]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[naked]]></category>
		<category><![CDATA[standards]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=253</guid>
		<description><![CDATA[Keeping with tradition, this site will be baring all on 9th April 2009. If you haven't heard about Naked day, this should be enlightening...]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2009/04/naked-day-09.png" alt="Naked Day 09" title="Naked Day 09" width="313" height="96" class="alignnone size-full wp-image-254 intro" align="right" /></p>
<p class="intro">Keeping with tradition, this site will be baring all on 9th April 2009. If you haven&#8217;t heard about Naked day, this should be enlightening&#8230;</p>
<h2>Where did my Design go?</h2>
<p>The idea behind this event is to <a href="http://naked.dustindiaz.com/">promote Web Standards</a>. Plain and simple. This includes proper use of (x)html, semantic markup, a good hierarchy structure, and of course, a good &#8216;ol play on words. It&#8217;s time to show off your &lt;body&gt;.</p>
<h2>How to participate</h2>
<p>Fill out the <a href="http://naked.dustindiaz.com#signup">naked day signup form</a>, then your website will be included  in the official list within the next hour.</p>
<p>Then on <em>April 9th, simply  <strong>remove all CSS from your website, stripping it entirely of its design.</strong></em></p>
<p>I have been doing this for a few years now&#8230;</p>
<ul>
<li><a href="http://binnyva.blogspot.com/2006/04/preparations-for-naked-css-day.html">Preparations for Naked CSS Day</a></li>
<li><a href="http://binnyva.blogspot.com/2006/04/happy-naked-css-day-everyone.html">Happy Naked CSS Day Everyone</a></li>
<li><a href="http://binnyva.blogspot.com/2007/04/naked-days-are-here-again.html">Naked Days are here again!</a></li>
<li><a href="http://binnyva.blogspot.com/2006/04/annual-naked-xhtml-day.html">Annual Naked (X)HTML Day</a></li>
</ul>
<p>I know its kinda pointless &#8211; since I use a third party wordpress theme &#8211; but I still support the movement.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2009/04/naked-day-disabling-css-for-the-day/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Web Installer: The Code</title>
		<link>http://www.bin-co.com/blog/2007/07/web-installer-the-code/</link>
		<comments>http://www.bin-co.com/blog/2007/07/web-installer-the-code/#comments</comments>
		<pubDate>Tue, 10 Jul 2007 20:50:21 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[(X)HTML]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[installer]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/2007/07/web-installer-the-code/</guid>
		<description><![CDATA[The last two posts on web installer did not include any code. I wanted to dump all code into one post &#8211; this is it. Please note that this is what I did &#8211; you don&#8217;t have to copy my code as it is. Just look at the code and modify it according to your [...]]]></description>
			<content:encoded><![CDATA[<p class="intro">The <a href="http://www.bin-co.com/blog/2007/07/web-application-installer/">last two posts</a> on <a href="http://www.bin-co.com/blog/2007/07/3-simple-steps-to-create-a-web-installer/">web installer</a> did not include any code. I wanted to dump all code into one post &#8211; this is it. Please note that this is what I did &#8211; you don&#8217;t have to copy my code as it is. Just look at the code and modify it according to your needs.</p>
<h2>Getting Database Details</h2>
<h3>The Form/Frontend</h3>
<pre><code class="html">&lt;form action="" method="post"&gt;
&lt;h1&gt;Installation : Step 1&lt;/h1&gt;
Please provide the database connection details...
&lt;fieldset&gt;
&lt;legend&gt;Database Details&lt;/legend&gt;

&lt;label for='host'&gt;Database Host&lt;/label&gt;&lt;input type='text' name='host' value='localhost' /&gt;&lt;br /&gt;
&lt;label for='db_user'&gt;Database User&lt;/label&gt;&lt;input type='text' name='db_user' value='root' /&gt;&lt;br /&gt;
&lt;label for='password'&gt;Database Password&lt;/label&gt;&lt;input type='text' name='password' /&gt;&lt;br /&gt;
&lt;label for='database'&gt;Database&lt;/label&gt;&lt;input type='text' name='database' value='nexty' /&gt;&lt;br /&gt;
&lt;/fieldset&gt;

&lt;input type="hidden" name="step" value="2" /&gt;&lt;br /&gt;
&lt;input type="submit" name="action" value="Continue &gt;&gt;" /&gt;&lt;br /&gt;
&lt;/form&gt;</code></pre>
<h3>Backend</h3>
<p>Make sure that the given database details are correct.</p>
<pre><code class="php">// The First step is Setting up Database connection
//					   (the '2' is NOT a typo)
if($_REQUEST['step'] == 2) {
	//Save the data to the Session
	if(isset($_REQUEST['host'])) $_SESSION['host'] = $_REQUEST['host'];
	if(isset($_REQUEST['db_user'])) $_SESSION['db_user'] = $_REQUEST['db_user'];
	if(isset($_REQUEST['password'])) $_SESSION['password'] = $_REQUEST['password'];
	if(isset($_REQUEST['database'])) $_SESSION['database'] = $_REQUEST['database'];
	if(isset($_REQUEST['url'])) $_SESSION['url'] = $_REQUEST['url'];

	if(mysql_connect($_SESSION['host'],$_SESSION['db_user'],$_SESSION['password'])) { //Try to connect to the DB.
		$QUERY['success'][] = 'Connection to Database server successful';

		if(mysql_select_db($_SESSION['database'])) {//Select the provided database.
			$QUERY['success'][] = "Database '$_SESSION[database]' selected";

		} else {
			$QUERY['error'][] = 'The given database('.$_SESSION['database'].') does not exist. Please povide a valid database.';
			$_REQUEST['step'] = 1;
		}
	} else {
		$QUERY['error'][] = 'Unable to connect to the database. Make sure that the entered details are correct';
		$_REQUEST['step'] = 1;
	}
}</code></pre>
<p>Notice the over use of $_SESSION? That will come in use if I decide to add a Back button that enables the users to modify the data entered previously.</p>
<h2>Database Creation</h2>
<pre><code class="php">//Create the database only if it does not exist
//See if the database exists
$tables_sql = mysql_query("SHOW TABLES") or die(mysql_error());
$necessary_tables = array('Context','Project','Reminder','Setting','Task','TaskContext','User');
while($table = mysql_fetch_row($tables_sql)) {
	$necessary_tables = array_diff($necessary_tables,array($table[0])); //Remove the table from the array if it exists
}

//If there are no tables in the array that means that the all the necessary tables are present in the Database
//If some tables are missing, that means we have to create those tables...
if($necessary_tables) {
	$quries = &lt;&lt;&lt;END
-- Insert all the SQL to create the necessary tables here...
END;

	//Execute all the queries
	$all_quires = explode(";",$quries);
	$query_count = 0;
	foreach($all_quires as $query) {
		$query = trim($query);
		if($query) {
			@mysql_query($query);
			$query_count++;
		}
	}
	$QUERY['success'][] = "Database Populated.";
} else {
	$QUERY['error'][] = "Tables already in Database - I did not overwrite it. If you want to remove the old data, please delete the tables and run the installer script agian.";
}
</code></pre>
<h2>Saving the Database connection details</h2>
<pre><code class="php">
//I don't know how to escape the $ charector in heredocs - so I did this...
$config = '$config';//Heh, Heh <img src='http://www.bin-co.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />
$system_installed = '$system_installed';
$configuration = &lt;&lt;&lt;END
&lt;?php
//Configuration file for Nexty
$system_installed = true;
$config = array(
	'db_host'		=&gt;	'$_SESSION[host]',
	'db_user'		=&gt;	'$_SESSION[db_user]',
	'db_password'	=&gt;	'$_SESSION[password]',
	'db_database'	=&gt;	'$_SESSION[database]',
	'url'			=&gt;	'$_SESSION[url]',
	'absolute_path'	=&gt;	'$abs'
);

END;
if(is_writable('../configuration.php')) {
        // ...Write the $config text into the configuration.php file...

	$QUERY['success'][] = 'Saved the configuration file. &lt;a href="'.$_REQUEST['url'].'"&gt;Go to Nexty&lt;/a&gt;';
} else {
	$QUERY['error'][] = 'Configuration file (configuration.php) is not writable. Please copy the configuration code and enter it into the "configuration.php" file. Then press continue.';
}
</code></pre>
<p>See the <a href="https://nexty.svn.sourceforge.net/svnroot/nexty/install/">install folder for Nexty</a> in the Subversion server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2007/07/web-installer-the-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Templating System</title>
		<link>http://www.bin-co.com/blog/2007/06/css-templating-system/</link>
		<comments>http://www.bin-co.com/blog/2007/06/css-templating-system/#comments</comments>
		<pubDate>Mon, 11 Jun 2007 09:18:21 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[(X)HTML]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Sites]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[nexty]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/2007/06/css-templating-system/</guid>
		<description><![CDATA[In Nexty I used CSS to create a inexpensive templating system. You can see it in action in the settings page of Nexty. Currently I use it only for changing the icon sets. But you can change the colors and the layout using this system.

Before starting, I must say that CSS is not the most [...]]]></description>
			<content:encoded><![CDATA[<p class="intro">In <a href="http://nexty.sourceforge.net/">Nexty</a> I used CSS to create a inexpensive templating system. You can see it in action in the settings page of Nexty. Currently I use it only for changing the icon sets. But you can change the colors and the layout using this system.</p>
<p><img src='http://www.bin-co.com/blog/wp-content/uploads/2007/06/icons1.png' alt='CSS Templating for Icons' /></p>
<p>Before starting, I must say that CSS is not the most powerful solution for templating. Using a server side solution is much more recommended. But for my purposes, CSS was good enough.</p>
<h2>(X)HTML Code</h2>
<p>If you want to use CSS templating, your app must be semantically valid. In other words, there is no way you can theme a tag soup.</p>
<p>Make sure that the stylesheet used for templating appears at the last. This will make sure that all the rules in the above stylesheets can be overwritten easily. In Nexty, I have a base stylesheet, then the theme stylesheet and at the end the hacks stylesheet&#8230;</p>
<pre><code class="css">&lt;link href="<a href="http://www.bin-co.com/php/programs/apps/nexty/demo/css/style.css">css/style.css</a>" rel="stylesheet" type="text/css" /&gt;
&lt;link href="<a href="http://www.bin-co.com/php/programs/apps/nexty/demo/images/themes/crystal/theme.css">images/themes/crystal/theme.css</a>" rel="stylesheet" type="text/css" /&gt;
&lt;!--[if IE]&gt;
&lt;link rel="stylesheet" href="css/style_ie.css" type="text/css" media="all" /&gt;
&lt;![endif]--&gt;</code></pre>
<h2>PHP Code</h2>
<p>Very little PHP is involved to creating this system &#8211; I depend on it just to change the path of the CSS Stylesheet. The code used is&#8230;</p>
<pre><code class="php">&lt;link href="images/themes/&lt;?=$theme?&gt;/theme.css" rel="stylesheet" type="text/css" /&gt;</code></pre>
<p>The <code>$theme</code> variable will change if the user changes the theme.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2007/06/css-templating-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Iconify Links with CSS</title>
		<link>http://www.bin-co.com/blog/2007/06/iconify-links-with-css/</link>
		<comments>http://www.bin-co.com/blog/2007/06/iconify-links-with-css/#comments</comments>
		<pubDate>Tue, 05 Jun 2007 18:12:49 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[(X)HTML]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[icons]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[nexty]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/2007/06/iconify-links-with-css/</guid>
		<description><![CDATA[Using icons is a must for all Web 2.0 apps. I have used this principle liberally in Nexty. When I was creating Nexty, I learned a simple trick that made using icons with CSS much easier.
Go to Nexty to see the icons

3 Types of Icons
I used 3 different classes for showing icons. They are..
icon
This class [...]]]></description>
			<content:encoded><![CDATA[<p class="intro">Using icons is a must for all Web 2.0 apps. I have used this principle liberally in <a href="http://nexty.sourceforge.net/">Nexty</a>. <a href="http://www.bin-co.com/blog/2007/05/what-i-learned-from-nexty/">When I was creating Nexty, I learned</a> a simple trick that made using icons with CSS much easier.</p>
<p>Go to <a href="http://www.bin-co.com/php/programs/apps/nexty/demo/">Nexty</a> to see the icons</p>
<p><img src='http://www.bin-co.com/blog/wp-content/uploads/2007/06/icons.png' alt='Iconification of Links in Nexty' /></p>
<h2>3 Types of Icons</h2>
<p>I used 3 different classes for showing icons. They are..</p>
<h3>icon</h3>
<p>This class removes the text of the link and put the icon in its place. The icon is clickable.</p>
<p>You can see this technique used in the <a href="http://www.bin-co.com/php/programs/apps/nexty/demo/projects/">Projects page</a>. See that &#8216;Edit&#8217;(Pencil) and &#8216;Delete&#8217; icons? They use this class.</p>
<h4>XHTML code</h4>
<pre><code class="html">&lt;a class="icon edit" href="edit.php?project=6"&gt;Rename&lt;a&gt;</code></pre>
<h4>CSS Code</h4>
<pre><code class="css">.icon {
	font-size:0px; /*Hides the text*/
	padding:6px 8px;
}
.edit {
	background:url(edit.png) no-repeat left center;
}</code></pre>
<h3>with-icon</h3>
<p>This class shows the icon left of the link text. Both the icon and the text are clickable.</p>
<p>The &#8216;Create new task&#8217; link in the <a href="http://www.bin-co.com/php/programs/apps/nexty/demo/">home page</a> is an example of this.</p>
<h4>XHTML code</h4>
<pre><code class="html">&lt;a class="with-icon tasks" href="tasks/new.php"&gt;Create New Task...&lt;/a&gt;</code></pre>
<h4>CSS Code</h4>
<pre><code class="css">
.with-icon {
	padding-left:18px;
}
.tasks {
	background:url(tasks.png) no-repeat left center;
}
</code></pre>
<h3>list-with-icon</h3>
<p>This will insert the icon in every item for the given list.</p>
<p>The drop down menus &#8211; Sections, Projects and Contexts are created using this technique.</p>
<h4>XHTML code</h4>
<pre><code class="html">&lt;ul class="menu-with-icon projects"&gt;
&lt;li&gt;...&lt;/li&gt;
&lt;li&gt;...&lt;/li&gt;
&lt;/ul&gt;</code></pre>
<h4>CSS Code</h4>
<pre><code class="css">
.list-with-icon li,.list-with-icon dt {
	padding-left:18px;
}
.projects li {
	background:url(projects.png) no-repeat left center;
}
</code></pre>
<h2>Icon Size</h2>
<p>My icons were 16&#215;16 pixels &#8211; if you are using icons with a different size, you will have to change the amount accordingly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2007/06/iconify-links-with-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
