<?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>Kadir Özdemir &#187; Smarty</title>
	<atom:link href="http://www.skorp.eu/tag/smarty/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.skorp.eu</link>
	<description>Programlama, Güvenlik, Design ve hayatimdan kesintiler</description>
	<lastBuildDate>Fri, 02 Dec 2011 14:29:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Smarty kullanimi</title>
		<link>http://www.skorp.eu/2008/02/01/smarty-kullanimi/</link>
		<comments>http://www.skorp.eu/2008/02/01/smarty-kullanimi/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 18:37:31 +0000</pubDate>
		<dc:creator>Skorp</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Smarty]]></category>

		<guid isPermaLink="false">http://www.skorp.eu/2008/02/01/smarty-kullanimi/</guid>
		<description><![CDATA[Herkeze Merhaba, burda yazdigimiz konuda smarty yi nasil kurcanizi söylemistik. Simdi ise Smartyde her sayfada $smarty-&#62;template_dir $smarty-&#62;config_dir $smarty-&#62;cache_dir $smarty-&#62;compile_dir bu degiskenleri yeniden doldurmamak icin basit bir sinif olusturup buna Smarty den miras almasini sagliyacagiz. Böylelikle yeni yapmis oldugumuz Smarty sinifindan bir Instance (kopya) alip islemlerimize devam ede biliriz. bunu SmartyTest.php adinda kaydedin require_once('Smarty/libs/Smarty.class.php'); class SmartyTest extends [...]]]></description>
			<content:encoded><![CDATA[<p>Herkeze Merhaba,<br />
<a HREF="http://www.skorp.eu/2006/11/16/smarty-windows-kurulumu/" TARGET="_blank">burda</a> yazdigimiz konuda smarty yi nasil kurcanizi söylemistik.<br />
Simdi ise Smartyde her sayfada<br />
$smarty-&gt;template_dir<br />
$smarty-&gt;config_dir<br />
$smarty-&gt;cache_dir<br />
$smarty-&gt;compile_dir<br />
bu degiskenleri yeniden doldurmamak icin basit bir sinif olusturup buna Smarty den miras almasini sagliyacagiz.<br />
Böylelikle yeni yapmis oldugumuz Smarty sinifindan bir Instance (kopya) alip islemlerimize devam ede biliriz.</p>
<p>bunu SmartyTest.php adinda kaydedin<br />
<code><br />
require_once('Smarty/libs/Smarty.class.php');<br />
class SmartyTest extends Smarty{<br />
function SmartyTest()<br />
{<br />
$this-&gt;Smarty();<br />
$this-&gt;template_dir = 'Smarty/templates';<br />
$this-&gt;compile_dir = 'Smarty/templates_c';<br />
$this-&gt;config_dir = 'Smarty/configs';<br />
$this-&gt;cache_dir = 'Smarty/cache';<br />
}<br />
}<br />
</code> böylelikle $this-&gt;template_dir,$this-&gt;compile_dir,$this-&gt;config_dir,$this-&gt;cache_dir<br />
hepsi root klasörümüzde (html) Smarty klasörü icini gösteriyor.kullanim cok basit<br />
<code>require_once("SmartyTest.php");<br />
$smarty = new SmartyTest;<br />
...<br />
</code><br />
Kolay gelsin sorunuz sora bilirsiniz.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.skorp.eu/2008/02/01/smarty-kullanimi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows a Smarty kuralim</title>
		<link>http://www.skorp.eu/2006/11/16/smarty-windows-kurulumu/</link>
		<comments>http://www.skorp.eu/2006/11/16/smarty-windows-kurulumu/#comments</comments>
		<pubDate>Thu, 16 Nov 2006 08:21:05 +0000</pubDate>
		<dc:creator>Skorp</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Smarty]]></category>

		<guid isPermaLink="false">http://www.kadir-oezdemir.com/2006/11/16/smarty-windows-kurulumu/</guid>
		<description><![CDATA[Evet bugun okulda bos bos otururken birazcik smarty i incelemek geldi icimden onun icin ilk olarak smarty yi windows da nasil calistiricamiza bakalim bugünlük. Öncelikle Bilgisayarimizda bir Webserver kurulu olmali henüz webserveri olmiyan varsa, onlara www.apachefriends.org dan xammp i download edip kurmalarini öneririm. Diyelimki Xammp i basariyla kurduk yada basari ile calisiyor bile, http://smarty.php.net/download.php en [...]]]></description>
			<content:encoded><![CDATA[<p>Evet bugun okulda bos bos otururken birazcik smarty i incelemek geldi icimden onun icin ilk olarak smarty yi windows da nasil calistiricamiza bakalim bugünlük.</p>
<p>Öncelikle Bilgisayarimizda bir Webserver kurulu olmali henüz webserveri olmiyan varsa, onlara www.apachefriends.org dan xammp i download edip kurmalarini öneririm.</p>
<p>Diyelimki Xammp i basariyla kurduk yada basari ile calisiyor bile,<br />
http://smarty.php.net/download.php en son versionu yüklüyoruz dosyalari ben direk xammp klasörü icine koyuyorum siz nereye korsunuz orasi size kalmis.</p>
<p>sonra bir php dosyasi yapip icine</p>
<pre class="brush: php; title: ; notranslate">
&lt; ?php

phpinfo();
?&gt;
</pre>
<p>yazip kaydediyoruz browserimizde dosyayi aciyoruz yukarlarda bi yerde</p>
<p><strong>Configuration File (php.ini) Path</strong> orda php.ini dosyasinin nerde oldugunu yazar, xammp i installerle kurduysaniz bu <em>c:xamppapachebin</em> dosyasi icinde olmali<br />
dosyayi aciyor ve <strong><em>include_path</em></strong> olan kisma smarty icinde olan libs klasorunun yolunu yaziyoruz su sekilde</p>
<p>bende yol boyle: <em>C:Programmexamppsmartylibs</em><br />
yani include_path su sekil görünüuyor sonra: <em>include_path = &#8220;.;C:Programmexamppphppear;C:Programmexamppsmartylibs&#8221;</p>
<p></em><br />
bunu yaptikdan sonra htdocs klasoru icine bir <em>templates</em> birde <em>config</em> klasorleri aciyoruz, htdocs disina ise bir <em>templates_c</em> birde <em>cache</em> klasoru olusturuyoruz.</p>
<p>evet artik sadece bir smarty li kod yazmak gerekiyor.</p>
<p>kurulum oldumu diye denemek isteyenler asagidaki kodu deniye bilir:<br />
index.php</p>
<pre class="brush: php; title: ; notranslate">
&lt; ?php

// load Smarty library
require('Smarty.class.php');

$smarty = new Smarty;

$smarty-&gt;template_dir = 'C:Programmexampphtdocstesttemplates';
$smarty-&gt;config_dir = 'C:Programmexampphtdocstestconfig';
$smarty-&gt;cache_dir = 'C:Programmexampphtdocstestcache';
$smarty-&gt;compile_dir = 'C:Programmexampphtdocstesttemplates_c';

$smarty-&gt;assign('name','Kadir');

$smarty-&gt;display('index.tpl');
?&gt;
</pre>
<p>index.tpl</p>
<pre class="brush: php; title: ; notranslate">
&lt;html&gt;
&lt;body&gt;
Slm, {$name}!
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>yukardaki <em>$smarty->template_dir,$smarty->config_dir,$smarty->cache_dir,$smarty->compile_dir</em> kendinize gore ayarlayin.</p>
<p>bugünlük bukadar yeter;)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.skorp.eu/2006/11/16/smarty-windows-kurulumu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

