<?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>Zack LiveTutorials | Best Premium WordPress Themes - Zack Live</title>
	<atom:link href="http://zacklive.com/tag/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://zacklive.com</link>
	<description>Free Online Resource</description>
	<lastBuildDate>Wed, 21 Dec 2011 20:18:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Design a Master CSS Stylesheet</title>
		<link>http://zacklive.com/design-a-master-css-stylesheet/902/</link>
		<comments>http://zacklive.com/design-a-master-css-stylesheet/902/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 07:27:49 +0000</pubDate>
		<dc:creator>Zack</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Master Stylesheet]]></category>
		<category><![CDATA[Stylesheet]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://zacklive.com/?p=902</guid>
		<description><![CDATA[Every time we start a new website, we need to write our CSS code from the beginning. Actually, many of the codes are the same as our previous website, like settings of blockquote, title(&#60;h1&#62; to &#60;h6&#62;), etc. I was thinking that we can create a CSS template for all websites which containing most common CSS settings. [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://zacklive.com/wp-content/uploads/2010/02/CSSEditLogo.png" alt="" title="CSS Master Stylesheet" width="400" height="400" class="aligncenter size-full wp-image-903" /><br />
Every time we start a new website, we need to write our CSS code from the beginning. Actually, many of the codes are the same as our previous website, like settings of blockquote, title(&lt;h1&gt; to &lt;h6&gt;), etc. I was thinking that we can create a CSS template for all websites which containing most common CSS settings.</p>
<p>I lately found <a title="Master CSS Stylesheet" href="http://www.crucialwebhost.com/blog/master-stylesheet-the-most-useful-css-technique/">Kyle</a> has done this, his master stylesheet has everything I need for a new website. I tried to add something to the stylesheet, but not much can be added, but the global browser setting I learn from <a href="http://leftjustified.net/journal/2004/10/19/global-ws-reset/" title="CSS Global Reset">Andrew</a>, which may be useful:</p>
<pre class="brush: css; title: ; notranslate">
* {
	padding:0;
	margin:0;
}
</pre>
<p><span id="more-902"></span>So here is my stylesheet:</p>
<pre class="brush: css; title: ; notranslate">
/***** Browser Settings *****/
* {
	padding:0;
	margin:0;
}
/***** Global Settings *****/

html, body {
border:0;
margin:0;
padding:0;
}

body {
font:100%/1.25 Arial, Helvetica, sans-serif;
}

/***** Headings *****/

h1, h2, h3, h4, h5, h6 {
margin:0;
padding:0;
font-weight:normal;
font-family: Arial, Helvetica, sans-serif;
}

h1 {
padding:30px 0 25px 0;
letter-spacing:-1px;
font-size:2em;
}

h2 {
padding:20px 0;
letter-spacing:-1px;
font-size:1.5em;
}

h3 {
font-size:1em;
font-weight:bold;
}

/***** Common Formatting *****/

p, ul, ol {
margin:0;
padding:0 0 1.25em 0;
}

ul, ol {
padding:0 0 1.25em 2.5em;
}

blockquote {
margin:1.25em;
padding:1.25em 1.25em 0 1.25em;
}

small {
font-size:0.85em;
}

img {
border:0;
}

sup {
position:relative;
bottom:0.3em;
vertical-align:baseline;
}

sub {
position:relative;
bottom:-0.2em;
vertical-align:baseline;
}

acronym, abbr {
cursor:help;
letter-spacing:1px;
border-bottom:1px dashed;
}

/***** Links *****/

a,
a:link,
a:visited,
a:hover {
text-decoration:underline;
}

/***** Forms *****/

form {
margin:0;
padding:0;
display:inline;
}

input, select, textarea {
font:1em Arial, Helvetica, sans-serif;
}

textarea {
width:100%;
line-height:1.25;
}

label {
cursor:pointer;
}

/***** Tables *****/

table {
border:0;
margin:0 0 1.25em 0;
padding:0;
}

table tr td {
padding:2px;
}

/***** Wrapper *****/

#wrap {
width:960px;
margin:0 auto;
}

/***** Global Classes *****/

.clear         { clear:both; }
.float-left    { float:left; }
.float-right   { float:right; }

.text-left     { text-align:left; }
.text-right    { text-align:right; }
.text-center   { text-align:center; }
.text-justify  { text-align:justify; }

.bold          { font-weight:bold; }
.italic        { font-style:italic; }
.underline     { border-bottom:1px solid; }
.highlight     { background:#ffc; }

.img-left      { float:left;margin:4px 10px 4px 0; }
.img-right     { float:right;margin:4px 0 4px 10px; }

.nopadding     { padding:0; }
.noindent      { margin-left:0;padding-left:0; }
.nobullet      { list-style:none;list-style-image:none; }
</pre>
<p>Let&#8217;s name this as version 0.1, we will improve it when we learn new technique.</p>
<p>You can also find more information about master stylesheet from <a href="http://webdesign.about.com/od/css/a/master_stylesht.htm">this post</a>.</p>
<p  class="related_post_title">Related Posts</p><ul class="related_post"><li><a href="http://zacklive.com/dynamic-unobtrusive-javascript-progresspercentage-bar/2766/" title="Dynamic Unobtrusive Javascript Progress/Percentage Bar">Dynamic Unobtrusive Javascript Progress/Percentage Bar</a></li><li><a href="http://zacklive.com/videojs-html5-video-player-with-pure-htmlcss-skins/2673/" title="VideoJS: HTML5 Video Player with Pure HTML/CSS Skins">VideoJS: HTML5 Video Player with Pure HTML/CSS Skins</a></li><li><a href="http://zacklive.com/pure-css-gui-icons-84-gui-icons-created-by-css-and-semantic-html/2636/" title="Pure CSS GUI icons: 84 GUI Icons Created by CSS and Semantic HTML">Pure CSS GUI icons: 84 GUI Icons Created by CSS and Semantic HTML</a></li><li><a href="http://zacklive.com/spritebox-javascript-tool-for-sprite-image/2534/" title="Spritebox: JavaScript Tool for Sprite Image">Spritebox: JavaScript Tool for Sprite Image</a></li><li><a href="http://zacklive.com/css-how-to-center-your-images/585/" title="CSS: How to Center Your Images">CSS: How to Center Your Images</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://zacklive.com/design-a-master-css-stylesheet/902/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello World Tutorial for Kohana</title>
		<link>http://zacklive.com/hello-world-tutorial-for-kohana/15/</link>
		<comments>http://zacklive.com/hello-world-tutorial-for-kohana/15/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 04:44:47 +0000</pubDate>
		<dc:creator>Zack</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[Kohana]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://blogiii.com/zack/?p=12</guid>
		<description><![CDATA[It seems unnecessary to write a Hello World tuorial for a PHP framework, because when someone comes to framework, he is no longer a beginner, can figure out his own Hello World. But this idea comes up in my brain, and I guess it might be helpful for someone who is the first time to [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center"><a href="http://i252.photobucket.com/albums/hh6/Xanxuss/kohana-hello.png"><img class="aligncenter" src="http://i252.photobucket.com/albums/hh6/Xanxuss/kohana-hello.png" alt="Kohana hello world" width="450" height="405" /></a></p>
<p>It seems unnecessary to write a Hello World tuorial for a PHP framework, because when someone comes to framework, he is no longer a beginner, can figure out his own Hello World. But this idea comes up in my brain, and I guess it might be helpful for someone who is the first time to work with MVC or OOP. It&#8217;s quite simple, let&#8217;s get started.</p>
<p>You should have <a title="kohana tutorial" href="http://blogiii.com/zack/install-kohana-on-windows/11/">installed Kohana</a> correctly, now we create a <em>hello.php</em> in /application/controllers/, here is the content of the file:</p>
<blockquote><p>&lt;?php<br />
/**<br />
* Hello World controller<br />
*/<br />
class Hello_Controller extends Template_Controller<br />
{<br />
function __construct()<br />
{<br />
parent::__construct();<br />
}</p>
<p>function index()<br />
{<br />
$this-&gt;template-&gt;title = &#8220;Hello World&#8221;;<br />
$this-&gt;template-&gt;content = &#8220;Hello, welcome to Kohana World !!!&#8221;;<br />
}<br />
}<br />
?&gt;</p></blockquote>
<p><span id="more-15"></span></p>
<p>We have a <em>Hello </em>Controller with a index method, so we can call this page in the URL: localhost/kohana/index.php/hello. If you cannot understand this, you may want to see &#8216;<em>Show me, don&#8217;t tell me</em>&#8216; section in <a title="kohana 101" href="http://oscar.nom.za/dl/kohana101.pdf">Kohana 101</a>. In the <em>Hello</em> Controller, we set the title and content of our Hello World page, of course you can change the title and content into anything.</p>
<p>Now we have a Controller, we also need a View to reveal the page. Create a <em>template.php</em> in /applicaion/views/, and type in the fellowing codes:</p>
<blockquote><p>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Strict//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&#8221;&gt;<br />
&lt;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221; xml:lang=&#8221;en&#8221; lang=&#8221;en&#8221;&gt;</p>
<p>&lt;head&gt;</p>
<p>&lt;title&gt;&lt;?php echo $title ?&gt;&lt;/title&gt;</p>
<p>&lt;body&gt;</p>
<p>&lt;h2&gt;&lt;?php echo $title ?&gt;&lt;/h2&gt;</p>
<p>&lt;p&gt;&lt;?php echo $content ?&gt;&lt;/p&gt;</p>
<p>&lt;/body&gt;<br />
&lt;/html&gt;</p></blockquote>
<p>Very simple HTML codes, echo the title and content set in the <em>Hello </em>Controller to the page, that&#8217;s all what it does. You can see how Kohana works, processing in Controller, sending the result to View, and the View exhibit the page.</p>
<p>Usually I&#8217;d like to add a profiler to a example page, so that we can see some system information. It&#8217;s very easy to do that, just add one line to the Construt function in the Controller:</p>
<blockquote><p>$this-&gt;profiler = new Profiler;</p></blockquote>
<p>So the Hello Controller file should look like this:</p>
<blockquote><p>&lt;?php<br />
/**<br />
* Hello World controller<br />
*/<br />
class Hello_Controller extends Template_Controller<br />
{<br />
function __construct()<br />
{<br />
parent::__construct();<br />
$this-&gt;profiler = new Profiler;<br />
}</p>
<p>function index()<br />
{<br />
$this-&gt;template-&gt;title = &#8220;Hello World&#8221;;<br />
$this-&gt;template-&gt;content = &#8220;Hello, welcome to Kohana World !!!&#8221;;<br />
}<br />
}<br />
?&gt;</p></blockquote>
<p>We can now visit <em>localhost/kohana/index.php/hello</em>, you will have a page the same as the image above.</p>
<p>You already have some basic concepts of Kohana now, I highly recommand you to read <a title="kohana 101" href="http://oscar.nom.za/dl/kohana101.pdf">Kohana 101</a>, or if you are even not sure how to setup your own Kohana, you can read my post, <a title="kohana tutorial" href="http://blogiii.com/zack/install-kohana-on-windows/11/">Install Kohana on Windows</a>. Hope this can help you.</p>
<p  class="related_post_title">Related Posts</p><ul class="related_post"><li><a href="http://zacklive.com/fuel-band-new-php-framework-based-on-php-5-3/3176/" title="Fuel: Band New PHP Framework Based on PHP 5.3">Fuel: Band New PHP Framework Based on PHP 5.3</a></li><li><a href="http://zacklive.com/fuel-cms-cms-based-on-codeigniter-php-framework/2052/" title="FUEL CMS: CMS Based on CodeIgniter PHP Framework">FUEL CMS: CMS Based on CodeIgniter PHP Framework</a></li><li><a href="http://zacklive.com/say-hello-to-kohana-3/917/" title="Say Hello to Kohana 3">Say Hello to Kohana 3</a></li><li><a href="http://zacklive.com/install-kohana-on-windows/14/" title="Install Kohana on Windows">Install Kohana on Windows</a></li><li><a href="http://zacklive.com/treesaver-javascript-framework-for-creating-magazine-style-layouts/3026/" title="Treesaver: JavaScript Framework for Creating Magazine-style Layouts">Treesaver: JavaScript Framework for Creating Magazine-style Layouts</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://zacklive.com/hello-world-tutorial-for-kohana/15/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Install Kohana on Windows</title>
		<link>http://zacklive.com/install-kohana-on-windows/14/</link>
		<comments>http://zacklive.com/install-kohana-on-windows/14/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 01:49:12 +0000</pubDate>
		<dc:creator>Zack</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Kohana]]></category>
		<category><![CDATA[TortoiseSVN]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://blogiii.com/zack/?p=11</guid>
		<description><![CDATA[I&#8217;m new to Kohana, making this tutorial just want to do something for the community. Please let me know, if you found any mistakes. Ok, let&#8217;s cut to the chase. I suppose you have your server installed, if not I recommand AppServ. It&#8217;s better to use the latest version of Kohana from SVN, so you [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m new to Kohana, making this tutorial just want to do something for the community. Please let me know, if you found any mistakes. Ok, let&#8217;s cut to the chase.</p>
<p>I suppose you have your server installed, if not I recommand <a title="AppServ" href="http://www.appservnetwork.com/?modules=&amp;applang=tw">AppServ</a>. It&#8217;s better to use the latest version of Kohana from SVN, so you might need <a title="Tortoise SVN" href="http://tortoisesvn.tigris.org/">TortoiseSVN</a>. I create a folder called Kohana in my webroot, check out the truck folder from SVN, it&#8217;s quite easy to do it, right click, select SVN Check&#8230;</p>
<p style="text-align: center"><img class="aligncenter" src="http://i252.photobucket.com/albums/hh6/Xanxuss/Kohana-Setup2.png" alt="tortoise SVN" width="178" height="260" /></p>
<p>Type http://svn.kohanaphp.com/trunk in URL of repository, click ok, and wait for the download.</p>
<p style="text-align: center"><img class="aligncenter" src="http://i252.photobucket.com/albums/hh6/Xanxuss/Kohana-Setup3.png" alt="tortoise SVN" width="456" height="357" /></p>
<p style="text-align: center"><img class="aligncenter" src="http://i252.photobucket.com/albums/hh6/Xanxuss/Kohana-Setup-1.png" alt="tortoise SVN" /></p>
<p>And then you will have three folders: application, modules and system; and three files: index.php, kohana.png, Kohana License.html. To see if Kohana is installed properly, type localhost/Kohana, you will see the welcome page:</p>
<p style="text-align: center"><img class="aligncenter" src="http://i252.photobucket.com/albums/hh6/Xanxuss/Kohana-Setup4.png" alt="Kohana welcome page" width="450" height="291" /></p>
<p><span id="more-14"></span></p>
<p>Now you may want to do some configuration. Open config.php in /application/config/ folder, the first setting is the site domain, we are using localhost here, so just leave it as &#8216;/kohana/&#8217;. For the second one site protocol, we mostly use &#8216;http&#8217;. That&#8217;s all what we do for this moment.</p>
<p>I would like to do some test now. Create a test.php file in /application/controllers/, type in the fellowing codes:</p>
<blockquote><p>&lt;?php<br />
/**<br />
* Test controller<br />
*/<br />
class Test_Controller extends Template_Controller<br />
{<br />
function __construct()<br />
{</p>
<p>parent::__construct();<br />
//Generate system information, you should try to comment this line to see what will the page be.<br />
$this-&gt;profiler = new Profiler;<br />
}</p>
<p>function index()</p>
<p>{<br />
//Set the page title.<br />
$this-&gt;template-&gt;title = &#8216;Test Page&#8217;;<br />
}<br />
}<br />
?&gt;</p></blockquote>
<p>We also need to create a template.php in /application/views/, it looks like this:</p>
<blockquote><p>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Strict//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&#8221;&gt;<br />
&lt;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221; xml:lang=&#8221;en&#8221; lang=&#8221;en&#8221;&gt;</p>
<p>&lt;head&gt;</p>
<p>&lt;title&gt;&lt;?php echo $title ?&gt;&lt;/title&gt;</p>
<p>&lt;body&gt;</p>
<p>&lt;h2&gt;&lt;?php echo $title ?&gt;&lt;/h2&gt;</p>
<p>&lt;/body&gt;<br />
&lt;/html&gt;</p></blockquote>
<p>Back to the blowser, we have visited localhost/kohana, and now we go to localhost/kohana/index.php/test, you should have a page like this:</p>
<p style="text-align: center"><img src="http://i252.photobucket.com/albums/hh6/Xanxuss/Kohana-Setup5.png" alt="Kohana setup" width="450" height="401" /></p>
<p style="text-align: left">There are only two parts in this page, the first one is the title of the page, setting by &#8216;$this-&gt;template-&gt;title = &#8220;Test Page&#8221;;&#8217; and the second part is a table of some system information generated by the profiler library: &#8216;$this-&gt;profiler = new Profiler;&#8217;</p>
<p style="text-align: left">Ok, that&#8217;s all, for further issue, you should keep an eye on my blog and <a title="kohana php" href="http://kohanaphp.com">Kohana official website</a>.</p>
<p  class="related_post_title">Related Posts</p><ul class="related_post"><li><a href="http://zacklive.com/hello-world-tutorial-for-kohana/15/" title="Hello World Tutorial for Kohana">Hello World Tutorial for Kohana</a></li><li><a href="http://zacklive.com/argentum-free-open-source-invoicing-and-project-management-system/2458/" title="Argentum: Free Open Source Invoicing and Project Management System">Argentum: Free Open Source Invoicing and Project Management System</a></li><li><a href="http://zacklive.com/fuel-cms-cms-based-on-codeigniter-php-framework/2052/" title="FUEL CMS: CMS Based on CodeIgniter PHP Framework">FUEL CMS: CMS Based on CodeIgniter PHP Framework</a></li><li><a href="http://zacklive.com/design-a-master-css-stylesheet/902/" title="Design a Master CSS Stylesheet">Design a Master CSS Stylesheet</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://zacklive.com/install-kohana-on-windows/14/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

