<?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>Serpito &#187; Ajax</title>
	<atom:link href="http://www.serpito.com/etiket/ajax/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.serpito.com</link>
	<description>Güncel Teknoloji ve Yazılım Blogu</description>
	<lastBuildDate>Fri, 03 Feb 2012 11:44:15 +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>PHP: JSON: AJAX: Youtube Video Aramaları</title>
		<link>http://www.serpito.com/php-json-ajax-youtube-video-aramalari/</link>
		<comments>http://www.serpito.com/php-json-ajax-youtube-video-aramalari/#comments</comments>
		<pubDate>Mon, 27 Jun 2011 16:19:07 +0000</pubDate>
		<dc:creator>Atilla Akoğlu</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Uygulamalar]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[gdata]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[json api]]></category>
		<category><![CDATA[json youtube]]></category>
		<category><![CDATA[youtube arama motoru]]></category>
		<category><![CDATA[youtube search]]></category>
		<category><![CDATA[Youtube Video Arama]]></category>
		<category><![CDATA[zeki müren]]></category>

		<guid isPermaLink="false">http://www.serpito.com/?p=1395</guid>
		<description><![CDATA[Yine uzun bi aradan sonra yazacak bi malzeme aklıma gelmişken, not düşeyim.  Youtube video arama tekniğini (gdata json api) kullanarak basit bir ajax arama sistemi yapalım. Uygulamada 2 farklı php dosyası oluşturduk. Ana dosya (index.php) ve ajax postun cevaplandığı arama (videosearch.php) dosyası uygulamanın çalışması için yeterlidir. Basit bir arama formu ile aranan kelime,  jquery post <a href="http://www.serpito.com/php-json-ajax-youtube-video-aramalari/"> read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.serpito.com/wp-content/uploads/youtube.jpg"><img class="alignleft size-full wp-image-1480" title="youtube" src="http://www.serpito.com/wp-content/uploads/youtube.jpg" alt="" width="300" height="196" /></a>Yine uzun bi aradan sonra yazacak bi malzeme aklıma gelmişken, not düşeyim.  Youtube video arama tekniğini (<a href="http://code.google.com/apis/youtube/2.0/developers_guide_json.html" target="_blank">gdata json api</a>) kullanarak basit bir ajax arama sistemi yapalım.</p>
<p>Uygulamada 2 farklı php dosyası oluşturduk. Ana dosya (index.php) ve ajax postun cevaplandığı arama (videosearch.php) dosyası uygulamanın çalışması için yeterlidir.</p>
<p>Basit bir arama formu ile aranan kelime,  jquery post methodu ile, videosearch.php dosyasına aktarılır ve youtube gdata apisine gönderilir.</p>
<p>index.php kodlarını inceleyelim: <span id="more-1395"></span></p>
<pre class="brush: php; ">

&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;title&gt;Youtube JSON Video Arama - Serpito&lt;/title&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;?php
if(isset($_GET[&#039;q&#039;])){
?&gt;
$.ajax({
type: &#039;POST&#039;,
url: &#039;videosearch.php&#039;,
data: &#039;key=&lt;?=$_GET[&#039;q&#039;]?&gt;&#039;,
success:function(ajaxCevap) {
$(&#039;#sonuclar&#039;).html(ajaxCevap);
}
});
&lt;?php
}
?&gt;
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Serpito.com demo&lt;/h1&gt;
&lt;hr /&gt;
&lt;form method=&quot;get&quot;&gt;&lt;strong&gt;Aranacak kelime:&lt;/strong&gt; &lt;input type=&quot;text&quot; name=&quot;q&quot; value=&quot;&lt;?=$_GET[&#039;q&#039;]?&gt;&quot;/&gt; &lt;input type=&quot;submit&quot; value=&quot;Ara&quot; /&gt;&lt;/form&gt;
&lt;p&gt;&amp;amp;nbsp;&lt;/p&gt;

&lt;div id=&quot;sonuclar&quot; align=&quot;center&quot;&gt;
&lt;?php
if(isset($_GET[&#039;q&#039;])){
?&gt;
&lt;img src=&quot;http://www.biyografim.net/images/fav-loader.gif&quot; align=&quot;middle&quot; /&gt;
&lt;br /&gt;
&lt;strong&gt;Sonuçlar yükleniyor&lt;/strong&gt;
&lt;?php
}else{
?&gt;

&lt;strong&gt;Videolar için arama kutucuğunu kullanınız.&lt;/strong&gt;
&lt;?php
}
?&gt;
&lt;/div&gt;

&lt;hr /&gt;

&lt;div style=&quot;clear:both;&quot;&gt;&lt;/div&gt;
&lt;br /&gt;&lt;br /&gt;
Bu demo &lt;strong&gt;&lt;a href=&quot;http://www.serpito.com/php-json-ajax-youtube-video-aramalari/&quot;&gt;PHP: JSON: AJAX: Youtube Video Aramaları&lt;/a&gt;&lt;/strong&gt; yazısı için hazırlanmıştır.

&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>index.php ile alınan arama kelimesi, kodlarda görebileceğiniz gibi jquery yardımıyla videosearch.php dosyasına post edilir ve gelen cevap <strong>sonuclar</strong> div katmanının içine aktarılır.</p>
<p>videosearch.php kodları:</p>
<pre class="brush: php; ">

&lt;style&gt;
html{font-family:Verdana, Geneva, sans-serif; font-size:11px;}

a{color:#009; text-decoration:none;}
a img{border:none;}
&lt;/style&gt;
&lt;?php
$key=$_POST[&#039;key&#039;];

function VideoSearch($searchTerms) {
$googleBaseUrl = &quot;http://gdata.youtube.com/feeds/api/videos?q=&quot;.$searchTerms.&quot;&amp;amp;format=5&amp;amp;start-index=1&amp;amp;max-results=20&amp;amp;v=2&amp;amp;alt=jsonc&quot;; /* CURL ile bağlanılacak youtube gdata bağlantısı*/
$googleFullUrl = $googleBaseUrl;
$curlObject = curl_init();
curl_setopt($curlObject,CURLOPT_URL,$googleFullUrl);
curl_setopt($curlObject,CURLOPT_RETURNTRANSFER,true);
curl_setopt($curlObject,CURLOPT_HEADER,false);
curl_setopt($curlObject,CURLOPT_REFERER,&quot;http://www.serpito.com/&quot;);
$returnGoogleSearch = curl_exec($curlObject);
curl_close($curlObject);
$returnGoogleSearch = json_decode($returnGoogleSearch,true); /*json formatında gelen cevap decode edilir*/
return $returnGoogleSearch[&#039;data&#039;][&#039;items&#039;];
}

$setSearchTerms = urlencode($key);
$searchResults = VideoSearch($setSearchTerms);
if(sizeof($searchResults)&gt;0){
foreach($searchResults as $result){
?&gt;
&lt;div style=&quot;width:150px; float:left; padding:3px; margin:5px; height:130px; overflow:hidden;&quot;&gt;
&lt;a href=&quot;http://www.youtube.com/watch?v=&lt;?=$result[&#039;id&#039;]?&gt;&quot; title=&quot;&lt;?=$result[&#039;title&#039;]?&gt;&quot;&gt;
&lt;img src=&quot;&lt;?=$result[&#039;thumbnail&#039;][&#039;sqDefault&#039;]?&gt;&quot; width=&quot;120&quot; alt=&quot;&lt;?=$result[&#039;title&#039;]?&gt;&quot; title=&quot;&lt;?=$result[&#039;title&#039;]?&gt;&quot;/&gt;
&lt;/a&gt;
&lt;p align=&quot;center&quot;&gt;
&lt;a href=&quot;http://www.youtube.com/watch?v=&lt;?=$result[&#039;id&#039;]?&gt;&quot; title=&quot;&lt;?=$result[&#039;title&#039;]?&gt;&quot;&gt;
&lt;?=$result[&#039;title&#039;]?&gt;
&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;?php
}
}
?&gt;
</pre>
<p>Uygulamanın çalışır demosu için <a href="http://serpito.com/projects/youtube/?q=zeki+m%C3%BCren" target="_blank">tıklayınız.</a></p>
<p>Uygulama dosyalarını indirmek için <a href="http://www.box.net/shared/tyh6onka8oojqc3rkvt8" target="_blank">tıklayınız.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.serpito.com/php-json-ajax-youtube-video-aramalari/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Ajax script arşivi &#8211; ajaxdude.com</title>
		<link>http://www.serpito.com/ajax-script-arsivi-ajaxdude-com/</link>
		<comments>http://www.serpito.com/ajax-script-arsivi-ajaxdude-com/#comments</comments>
		<pubDate>Wed, 05 May 2010 14:27:13 +0000</pubDate>
		<dc:creator>Atilla Akoğlu</dc:creator>
				<category><![CDATA[Güncel]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[arşiv]]></category>
		<category><![CDATA[demos]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[samples]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://www.serpito.com/?p=1063</guid>
		<description><![CDATA[Web geliştiriciler için  script uyarlamak veya örnek uygulama araştırmak gereğinden fazla vakit alan bir eylemdir. Uzun zamandır elimde biriken Ajax, jQuery eklentileri yayınlamak ve kamunun hizmetine açmak düşüncesiyle ajaxdude.com adında bir domain üzerinde basit bir proje yayınladım. Etiket sistemiyle navigasyonu imkanı veren bu sistemde, şuan için 106 farklı script uygulaması bulunmaktadır. Her uygulamanın demo adresi <a href="http://www.serpito.com/ajax-script-arsivi-ajaxdude-com/"> read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ajaxdude.com" target="_blank"><img class="size-full wp-image-1064 alignleft" title="Ajaxdude logo" src="http://www.serpito.com/wp-content/uploads/22.jpg" alt="Ajaxdude.com" width="224" height="69" /></a>Web geliştiriciler için  script uyarlamak veya örnek uygulama araştırmak gereğinden fazla vakit alan bir eylemdir. Uzun zamandır elimde biriken Ajax, jQuery eklentileri yayınlamak ve kamunun hizmetine açmak düşüncesiyle <a href="http://www.ajaxdude.com" target="_blank">ajaxdude.com</a> adında bir domain üzerinde basit bir proje yayınladım.</p>
<p><span id="more-1063"></span></p>
<p>Etiket sistemiyle navigasyonu imkanı veren bu sistemde, şuan için 106 farklı script uygulaması bulunmaktadır. Her uygulamanın demo adresi ve kaynak adresi detaylarında paylaşılmaktadır.</p>
<div id="attachment_1065" class="wp-caption aligncenter" style="width: 518px"><a href="http://www.ajaxdude.com"><img class="size-full wp-image-1065" title="Ajax dude navi" src="http://www.serpito.com/wp-content/uploads/91.jpg" alt="Ajaxdude.com navigation" width="508" height="243" /></a><p class="wp-caption-text">Ajaxdude.com - Latest Ajax Scripts, demos</p></div>
<p>Web geliştiriciler için faydalı olacağını düşündüğüm bu proje için global yapmayı daha uygun gördüm. Ortalama bir kullanın da rahatça anlayabileceği basit ingilizce var zaten.</p>
<p>İlerleyen zamanlarda daha farklı eklenti ve opsiyon eklemeyi düşünüyorum. Şimdilik web dünyasında işe yarar ve popüler olan bütün Ajax &#8211; jQuery scriptlerini bu adreste bulabileceksiniz.</p>
<p><a href="http://www.ajaxdude.com" target="_blank">Adres için buradan buyrun </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.serpito.com/ajax-script-arsivi-ajaxdude-com/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PHP:AJAX: Fancy Captcha Uygulaması</title>
		<link>http://www.serpito.com/php-ajax-fancy-captcha-uygulamasi/</link>
		<comments>http://www.serpito.com/php-ajax-fancy-captcha-uygulamasi/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 16:20:20 +0000</pubDate>
		<dc:creator>Atilla Akoğlu</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Uygulamalar]]></category>
		<category><![CDATA[Ajax Captcha]]></category>
		<category><![CDATA[Captcha]]></category>
		<category><![CDATA[catchpa]]></category>
		<category><![CDATA[Fancy Captcha]]></category>

		<guid isPermaLink="false">http://www.serpito.com/?p=967</guid>
		<description><![CDATA[Özellikle formlar aracılığı ile kullanıcılarla etkileşimde olunan durumlarda işlem yapanın gerçek bir kullanıcı mı yoksa otomatik bir bot mu olduğunu kontrol etmek zorunlu olmaktadır. Piyasada bulunan Captcha uygulamalarından en dikkat çekici olanını inceleyelim. Jquery UI kullanarak gerçekleştirilen bu sistemde basit bir index kullanımı ile aktif hale gelebiliyor. Kodları inceleyelim; index.html &#38;lt;html&#38;gt; &#38;lt;head&#38;gt; &#38;lt;meta http-equiv=&#38;quot;Content-type&#38;quot; content=&#38;quot;text/html; <a href="http://www.serpito.com/php-ajax-fancy-captcha-uygulamasi/"> read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-968" title="fancy-capchta" src="http://www.serpito.com/wp-content/uploads/fancy-capchta.gif" alt="Ajax Fancy Catpcha Script" width="543" height="117" /></p>
<p>Özellikle formlar aracılığı ile kullanıcılarla etkileşimde olunan durumlarda işlem yapanın gerçek bir kullanıcı mı yoksa otomatik bir bot mu olduğunu kontrol etmek zorunlu olmaktadır. Piyasada bulunan <a href="http://www.google.com.tr/search?hl=tr&amp;q=ajax+captcha&amp;sourceid=navclient-ff&amp;rlz=1B3GGGL_trTR338TR338&amp;ie=UTF-8&amp;aq=0&amp;oq=ajax+capt" target="_blank">Captcha</a> uygulamalarından en dikkat çekici olanını inceleyelim.</p>
<p><a href="http://jqueryui.com" target="_blank">Jquery UI</a> kullanarak gerçekleştirilen bu sistemde basit bir index kullanımı ile aktif hale gelebiliyor. Kodları inceleyelim;</p>
<p><span id="more-967"></span></p>
<h3>index.html</h3>
<pre class="brush: php; ">

&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
 &amp;lt;meta http-equiv=&amp;quot;Content-type&amp;quot; content=&amp;quot;text/html; charset=utf-8&amp;quot;&amp;gt;
 &amp;lt;title&amp;gt;Serpito.com Ajax Captcha Uygulaması&amp;lt;/title&amp;gt;
 &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;latest-jquery/jquery-1.3.2.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
 &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;latest-jquery-ui/jquery-ui-1.7.2.custom.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
 &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;captcha/jquery.captcha.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
 &amp;lt;link href=&amp;quot;captcha/captcha.css&amp;quot; rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; /&amp;gt;
 &amp;lt;style type=&amp;quot;text/css&amp;quot; media=&amp;quot;screen&amp;quot;&amp;gt;
 body { background-color: white; }
 &amp;lt;/style&amp;gt;
 &amp;lt;script type=&amp;quot;text/javascript&amp;quot; charset=&amp;quot;utf-8&amp;quot;&amp;gt;
 $(function() {
 $(&amp;quot;.ajax-fc-container&amp;quot;).captcha({
 borderColor: &amp;quot;silver&amp;quot;,
 text: &amp;quot;Gerçek bir kullanıcıysan &amp;lt;span&amp;gt;makas&amp;lt;/span&amp;gt; i daireye sürükle.&amp;quot;
 });
 });
 &amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;

&amp;lt;div&amp;gt;captcha uygulamasını görebilmek için tarayıcınızın javascript özelliğini açmalısınız!&amp;lt;/div&amp;gt;

&amp;lt;!-- ornek icin basit bir form --&amp;gt;
&amp;lt;form action=&amp;quot;captcha/captcha.php&amp;quot; method=&amp;quot;post&amp;quot; id=&amp;quot;myForm&amp;quot;&amp;gt;
 &amp;lt;p&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;myField1&amp;quot; value=&amp;quot;&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;
 &amp;lt;p&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;myField2&amp;quot; value=&amp;quot;&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;
 &amp;lt;p&amp;gt;&amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;submit&amp;quot; value=&amp;quot;formu gönder!&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/form&amp;gt;
&amp;lt;!-- form sonu --&amp;gt;

&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
</pre>
<p>Uygulamanı tüm dosyalarını tek tek buraya kodlamak boşuna vakit kaybı olacaktır. Basit bir şekilde formlara entegre etmenin yolunu paylaştık.</p>
<p>Uygulamanın <a href="http://www.serpito.com/projects/ajax-fancy-captcha-php/">çalışır demosunu incelemek için tıklayınız.</a></p>
<p>Uygulama dosyalarını <a href="http://www.box.net/shared/xdupcy5uga" target="_blank">zip şeklinde indirmek için tıklayınız. </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.serpito.com/php-ajax-fancy-captcha-uygulamasi/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Ajax: Fly to Basket (Uçan Sepet) Uygulaması</title>
		<link>http://www.serpito.com/ajax-fly-to-basket-ucan-sepet-uygulamasi/</link>
		<comments>http://www.serpito.com/ajax-fly-to-basket-ucan-sepet-uygulamasi/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 13:29:57 +0000</pubDate>
		<dc:creator>sword fish</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Uygulamalar]]></category>
		<category><![CDATA[basket]]></category>
		<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[fly to basket]]></category>
		<category><![CDATA[sepet]]></category>

		<guid isPermaLink="false">http://www.serpito.com/?p=955</guid>
		<description><![CDATA[E-ticaret sistemlerimizde kullanıcıların ürünleri sepete atıp atmadıklarından emin olmaları çok önemlidir. Kullanıcı emin olmadığı bir işlemde urunu birden fazla sepete ekleye bilir. Bu uygulamamızda ürünü kullanıcı sepete eklediğinde görsel olarak ürünümüzün fotografını sepet olarak belirtmiş olduğumuz bölmeye gönderiyoruz. Sayfamızda yer alacak olan ürünler için örnek bir kod: &#38;lt;div class=&#38;quot;product_container&#38;quot;&#38;gt; &#38;lt;div id=&#38;quot;slidingProduct8&#38;quot; class=&#38;quot;sliding_product&#38;quot;&#38;gt; &#38;lt;img src=&#38;quot;images/d4abf6cf79b0770a99b01d791595abc3.jpg&#38;quot; width=&#38;quot;90&#38;quot; <a href="http://www.serpito.com/ajax-fly-to-basket-ucan-sepet-uygulamasi/"> read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>E-ticaret sistemlerimizde kullanıcıların ürünleri sepete atıp atmadıklarından emin olmaları çok önemlidir. Kullanıcı emin olmadığı bir işlemde urunu birden fazla sepete ekleye bilir. Bu uygulamamızda ürünü kullanıcı sepete eklediğinde görsel olarak ürünümüzün fotografını sepet olarak belirtmiş olduğumuz bölmeye gönderiyoruz.<br />
<img class="aligncenter size-full wp-image-959" title="Fly to Basket" src="http://www.serpito.com/wp-content/uploads/1.gif" alt="" width="600" height="119" /><br />
<span id="more-955"></span><br />
Sayfamızda yer alacak olan ürünler için örnek bir kod:</p>
<pre class="brush: php; ">

			&amp;lt;div class=&amp;quot;product_container&amp;quot;&amp;gt;
				&amp;lt;div id=&amp;quot;slidingProduct8&amp;quot; class=&amp;quot;sliding_product&amp;quot;&amp;gt;
					&amp;lt;img src=&amp;quot;images/d4abf6cf79b0770a99b01d791595abc3.jpg&amp;quot; width=&amp;quot;90&amp;quot; height=&amp;quot;120&amp;quot;&amp;gt;
					Erkekler ve Diğer Felekatler&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;
					12.50
				&amp;lt;/div&amp;gt;
				&amp;lt;a href=&amp;quot;#&amp;quot; onclick=&amp;quot;addToBasket(8);return false&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;images/basket.gif&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;
				&amp;lt;div class=&amp;quot;clear&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;
			&amp;lt;/div&amp;gt;
</pre>
<p>Sepete Ekle(basket.gif) tıklanıldığında &#8220;addToBasket(8)&#8221; ile ürün id mizi &#8220;addProduct.php&#8221; dosyamıza yolluyoruz ve gelen productId ye göre select case ile ürün özelliklerini belirleyip &#8220;Alışveriş Sepeti&#8221; alanına yazdırıyoruz.</p>
<p>addProduct.php kodlarımız</p>
<pre class="brush: php; ">

&amp;lt;?
header(&amp;quot;Content-Type: text/html; charset=iso-8859-9&amp;quot;);
if(!isset($_POST[&#039;productId&#039;]))exit;
switch($_POST[&#039;productId&#039;]){

	case &amp;quot;1&amp;quot;;
		echo &amp;quot;1|||Ölümcül İklim|||20&amp;quot;;
		break;
	case &amp;quot;2&amp;quot;;
		echo &amp;quot;2|||Cesur Teklif|||25&amp;quot;;
		break;
	case &amp;quot;3&amp;quot;;
		echo &amp;quot;3|||Kan Kokusu|||35&amp;quot;;
		break;
	case &amp;quot;4&amp;quot;;
		echo &amp;quot;4|||Ödünç Yaşam|||10&amp;quot;;
		break;
	case &amp;quot;5&amp;quot;;
		echo &amp;quot;5|||Alamut Cenneti|||22&amp;quot;;
		break;
	case &amp;quot;6&amp;quot;;
		echo &amp;quot;6|||Pazartesi Erkeğie|||14&amp;quot;;
		break;
	case &amp;quot;7&amp;quot;;
		echo &amp;quot;7|||Gilead|||15&amp;quot;;
		break;
	case &amp;quot;8&amp;quot;;
		echo &amp;quot;8|||Erkekler ve Diğer Felekatler|||12.5&amp;quot;;
		break;
}
?&amp;gt;
</pre>
<p>Sepetimizde yer alan ürünlerin adetlerini ve fiyat toplamını ise &#8220;fly-to-basket.js&#8221; dosyamız aracılığıyla hesaplıyoruz. &#8220;fly-to-basket.js&#8221; dosyamızdaki &#8220;flyingSpeed&#8221; değişkenimiz ile ürüne tıklanıldığında sepete gitme hızını belirlemiş oluyoruz.</p>
<p>Uygulamamızda sadece ürünün sepete gitme işlemini gerçekleştirdik. Sepete gitti anda kullanıcının sepetine veri tabanında eklemek istiyorsak &#8220;addProduct.php&#8221; dosyamızda case in altına veri tabanımıza ekleyecek olan mysql kodlarımızı yazabiliriz.</p>
<pre class="brush: php; ">

	case &amp;quot;7&amp;quot;;
		echo &amp;quot;7|||Gilead|||15&amp;quot;;
                $q=$dba-&amp;gt;query(&amp;quot;INSERT INTO sepet(urun_ıd,user_id) VALUES (7,&#039;$_session[&#039;user_id&#039;]&#039;) &amp;quot;);
		break;
</pre>
<p>Uygulamanın <a href="http://www.serpito.com/projects/flybasket/">çalışır demosunu incelemek için tıklayınız.</a></p>
<p>Uygulama dosyalarını <a href="http://www.box.net/shared/thtz71sg93" target="_blank">zip şeklinde indirmek için tıklayınız. </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.serpito.com/ajax-fly-to-basket-ucan-sepet-uygulamasi/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>PHP:Jquery: Reddit Tarzı puanlama uygulaması</title>
		<link>http://www.serpito.com/php-jquery-reddit-tarzi-puanlama/</link>
		<comments>http://www.serpito.com/php-jquery-reddit-tarzi-puanlama/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 10:05:34 +0000</pubDate>
		<dc:creator>Atilla Akoğlu</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Uygulamalar]]></category>
		<category><![CDATA[jquery pack]]></category>
		<category><![CDATA[jquery vote]]></category>
		<category><![CDATA[puanlama scripti]]></category>
		<category><![CDATA[reddit]]></category>
		<category><![CDATA[reddit style]]></category>
		<category><![CDATA[uygulama]]></category>
		<category><![CDATA[vote script]]></category>

		<guid isPermaLink="false">http://www.serpito.com/?p=888</guid>
		<description><![CDATA[İçerik paylaşımında ve kullanıcılar arası etkileşimi sağlayabilmek için yayınlanan içeriklerin beğeniye göre listelenmesi ve şekillendirilmesi çok önemlidir. Bu uygulamada Reddit tarzı içerik oylama servislerinin özellikle kullandığı  Yukarı -  Aşağı şeklinde puanlama olayını inceleyeceğiz. Veritabanı için gereken tabloları aşağıdaki görselden inceleyebilirsiniz. Uygulama için gereken veritabanı tabloları ve verileri aşağıdaki mysql satırlarını çalıştırarak elde edebilirsiniz. CREATE TABLE <a href="http://www.serpito.com/php-jquery-reddit-tarzi-puanlama/"> read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-890" title="serpito-reddit-jquery" src="http://www.serpito.com/wp-content/uploads/serpito-reddit.gif" alt="Jquery vote demo" width="600" height="167" /></p>
<p>İçerik paylaşımında ve kullanıcılar arası etkileşimi sağlayabilmek için yayınlanan içeriklerin beğeniye göre listelenmesi ve şekillendirilmesi çok önemlidir. Bu uygulamada <a href="http://www.reddit.com" target="_blank">Reddit</a> tarzı içerik oylama servislerinin özellikle kullandığı  <img class="alignnone" title="Yukarı" src="http://www.serpito.com/projects/serpito-reddit-vote/images/thumb_up.png" alt="" width="16" height="16" />Yukarı -  <img class="alignnone" title="Aşağı" src="http://www.serpito.com/projects/serpito-reddit-vote/images/thumb_down.png" alt="" width="16" height="16" />Aşağı şeklinde puanlama olayını inceleyeceğiz.</p>
<p><span id="more-888"></span></p>
<p>Veritabanı için gereken tabloları aşağıdaki görselden inceleyebilirsiniz.</p>
<p><img class="aligncenter size-full wp-image-894" title="table_structure" src="http://www.serpito.com/wp-content/uploads/table_structure.jpg" alt="" width="464" height="147" /></p>
<p>Uygulama için gereken veritabanı tabloları ve verileri aşağıdaki mysql satırlarını çalıştırarak elde edebilirsiniz.</p>
<pre class="brush: php; ">

CREATE TABLE IF NOT EXISTS `reddit_vote` (
`id` int(11) NOT NULL auto_increment,
`title` varchar(255) character set latin5 NOT NULL,
`link` varchar(255) NOT NULL,
`votes_up` int(11) NOT NULL default &#039;0&#039;,
`votes_down` int(11) NOT NULL default &#039;0&#039;,
PRIMARY KEY  (`id`)
)

INSERT INTO `reddit_vote` (`id`, `title`, `link`, `votes_up`, `votes_down`) VALUES
(1, &#039;Google&#039;, &#039;http://www.google.com.tr/&#039;, 6, 0),
(2, &#039;Serpito&#039;, &#039;http://www.serpito.com/&#039;, 6, 1),
(3, &#039;Facebook&#039;, &#039;http://www.facebook.com/&#039;, 1, 4),
(5, &#039;Php:Excel Dosyası Oluşturma&#039;, &#039;http://www.serpito.com/phpde-excell-dosyasi-olusturma/&#039;, 9, 0),
(6, &#039;PHP ile Masaüstü uygulaması geliştirmek (PHP-GTK)&#039;, &#039;http://www.serpito.com/php-ile-masaustu-uygulamasi-gelistirmek-php-gtk/&#039;, 8, 0),
(7, &#039;PHP:Jquery: Scroll Down Auto Load Data (Sayfayı aşağı kaydırınca otomatik veri yükleme)&#039;, &#039;http://www.serpito.com/scroll-down-auto-load-data/&#039;, 8, 0),
(8, &#039;PHP: Dinamik PDF dosyası oluşturma (FPDF class)&#039;, &#039;http://www.serpito.com/php-dinamik-pdf-olusturma/&#039;, 1, 5);
</pre>
<p>Sıra geldi index.php dosyasını kodlamaya;</p>
<h3>index.php</h3>
<pre class="brush: php; ">

&lt;?php
include_once(&quot;mysql.php&quot;); // herzamanki mysql dosyasi
?&gt;

&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Serpito.Com- Jquery Oylama Demo&lt;/title&gt;

&lt;style type=&#039;text/css&#039;&gt;
body {
background: #e8e6de;
}

a {
outline:none;
}

.entry {
width: 710px;
background: #ffffff;
padding:8px;
border:1px solid #bbbbbb;
margin:5px auto;
-moz-border-radius:8px;
}

span.link a {
font-size:150%;
color: #000000;
text-decoration:none;
}

a.vote_up, a.vote_down {
display:inline-block;
background-repeat:none;
background-position:center;
height:16px;
width:16px;
margin-left:4px;
text-indent:-900%;
}

a.vote_up {
background:url(&quot;images/thumb_up.png&quot;);
}

a.vote_down {
background:url(&quot;images/thumb_down.png&quot;);
}
#panel{
color:#900;
background-color:#C8E6E2;
width:100%;
margin-bottom:10px;
}
&lt;/style&gt;

&lt;script type=&#039;text/javascript&#039; src=&#039;jquery.pack.js&#039;&gt;&lt;/script&gt;
&lt;script type=&#039;text/javascript&#039;&gt;
$(function(){
$(&quot;a.vote_up&quot;).click(function(){
//get the id
the_id = $(this).attr(&#039;id&#039;);

// show the spinner
$(this).parent().html(&quot;&lt;img src=&#039;images/spinner.gif&#039;/&gt;&quot;);

//fadeout the vote-count
$(&quot;span#votes_count&quot;+the_id).fadeOut(&quot;fast&quot;);

//the main ajax request
$.ajax({
type: &quot;POST&quot;,
data: &quot;action=vote_up&amp;amp;amp;amp;amp;id=&quot;+$(this).attr(&quot;id&quot;),
url: &quot;votes.php&quot;,
success: function(msg)
{
$(&quot;span#votes_count&quot;+the_id).html(msg);
//fadein the vote count
$(&quot;span#votes_count&quot;+the_id).fadeIn();
//remove the spinner
$(&quot;span#vote_buttons&quot;+the_id).remove();
}
});
});

$(&quot;a.vote_down&quot;).click(function(){
//get the id
the_id = $(this).attr(&#039;id&#039;);

// show the spinner
$(this).parent().html(&quot;&lt;img src=&#039;images/spinner.gif&#039;/&gt;&quot;);

//the main ajax request
$.ajax({
type: &quot;POST&quot;,
data: &quot;action=vote_down&amp;amp;amp;amp;amp;id=&quot;+$(this).attr(&quot;id&quot;),
url: &quot;votes.php&quot;,
success: function(msg)
{
$(&quot;span#votes_count&quot;+the_id).fadeOut();
$(&quot;span#votes_count&quot;+the_id).html(msg);
$(&quot;span#votes_count&quot;+the_id).fadeIn();
$(&quot;span#vote_buttons&quot;+the_id).remove();
}
});
});
});
&lt;/script&gt;

&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;&lt;/head&gt;
&lt;body&gt;

&lt;div id=&quot;panel&quot;&gt;
&lt;center&gt;&lt;h2&gt;Serpito.com&lt;/h2&gt;
Bu demo &lt;a href=&quot;http://www.serpito.com/php-jquery-reddit-tarzi-puanlama/&quot;&gt;PHP:Jquery: Reddit Tarzı puanlama uygulaması&lt;/a&gt;  icin hazirlanmistir.
&lt;/center&gt;
&lt;/div&gt;

&lt;?php
/**
Display the results from the database
**/
$q = &quot;SELECT * FROM reddit_vote ORDER BY id DESC&quot;;
$r = mysql_query($q);

if(mysql_num_rows($r)&gt;0): //table is non-empty
while($row = mysql_fetch_assoc($r)):
$net_vote = $row[&#039;votes_up&#039;] - $row[&#039;votes_down&#039;]; //this is the net result of voting up and voting down
?&gt;
&lt;div class=&#039;entry&#039;&gt;

&lt;span class=&#039;link&#039;&gt;
&lt;a href=&#039;&lt;?php echo $row[&#039;link&#039;]; ?&gt;&#039;&gt; &lt;?php echo $row[&#039;title&#039;]; ?&gt; &lt;/a&gt;
&lt;/span&gt;

&lt;span class=&#039;votes_count&#039; id=&#039;votes_count&lt;?php echo $row[&#039;id&#039;]; ?&gt;&#039;&gt;&lt;?php echo $net_vote.&quot; oy&quot;; ?&gt;&lt;/span&gt;

&lt;span class=&#039;vote_buttons&#039; id=&#039;vote_buttons&lt;?php echo $row[&#039;id&#039;]; ?&gt;&#039;&gt;
&lt;a href=&#039;javascript:;&#039; class=&#039;vote_up&#039; id=&#039;&lt;?php echo $row[&#039;id&#039;]; ?&gt;&#039;&gt;Yukarı!&lt;/a&gt;
&lt;a href=&#039;javascript:;&#039; class=&#039;vote_down&#039; id=&#039;&lt;?php echo $row[&#039;id&#039;]; ?&gt;&#039;&gt;Aşağı!&lt;/a&gt;
&lt;/span&gt;

&lt;/div&gt;
&lt;?php
endwhile;
endif;
?&gt;

&lt;/body&gt;
&lt;/html&gt;

&amp;amp;amp;nbsp;
</pre>
<p>index.php kodları Jquery yardımıyla <strong>votes.php</strong> ile etkileşim halinde olur. Sayfa yenilenmeden kullanıcının oyunu işleme alır ve değişikliği gösterir.</p>
<h3>votes.php</h3>
<pre class="brush: php; ">

&lt;?php
include_once(&quot;mysql.php&quot;);

function getAllVotes($id)
{
/**
Returns an array whose first element is votes_up and the second one is votes_down
**/
$votes = array();
$q = &quot;SELECT * FROM reddit_vote WHERE id = $id&quot;;
$r = mysql_query($q);
if(mysql_num_rows($r)==1)//id found in the table
{
$row = mysql_fetch_assoc($r);
$votes[0] = $row[&#039;votes_up&#039;];
$votes[1] = $row[&#039;votes_down&#039;];
}
return $votes;
}

function getEffectiveVotes($id)
{
/**
Returns an integer
**/
$votes = getAllVotes($id);
$effectiveVote = $votes[0] - $votes[1];
return $effectiveVote;
}

$id = $_POST[&#039;id&#039;];
$action = $_POST[&#039;action&#039;];

//get the current votes
$cur_votes = getAllVotes($id);

//ok, now update the votes

if($action==&#039;vote_up&#039;) //voting up
{
$votes_up = $cur_votes[0]+1;
$q = &quot;UPDATE reddit_vote SET votes_up = $votes_up WHERE id = $id&quot;;
}
elseif($action==&#039;vote_down&#039;) //voting down
{
$votes_down = $cur_votes[1]+1;
$q = &quot;UPDATE reddit_vote SET votes_down = $votes_down WHERE id = $id&quot;;
}

$r = mysql_query($q);
if($r) //voting done
{
$effectiveVote = getEffectiveVotes($id);
echo $effectiveVote.&quot; oy&quot;;
}
elseif(!$r) //voting failed
{
echo &quot;Hata!&quot;;
}
?&gt;
</pre>
<p><strong>Uygulamanın <a href="http://www.serpito.com/projects/serpito-reddit-vote/" target="_blank">çalışır demosunu incelemek için tıklayınız.</a></strong></p>
<p><strong>Uygulama dosyalarını <a href="http://www.box.net/shared/ztuebph5yy" target="_blank">zip şeklinde indirmek için tıklayınız.</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.serpito.com/php-jquery-reddit-tarzi-puanlama/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Jquery LightBox Text Yayınlama</title>
		<link>http://www.serpito.com/jquery-lightbox-text/</link>
		<comments>http://www.serpito.com/jquery-lightbox-text/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 11:41:12 +0000</pubDate>
		<dc:creator>sword fish</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Uygulamalar]]></category>
		<category><![CDATA[LightBox]]></category>
		<category><![CDATA[text]]></category>

		<guid isPermaLink="false">http://www.serpito.com/?p=781</guid>
		<description><![CDATA[Daha önceki Slider Galeri uygulamamızda galerimizde yer alan fotograflar istediğimiz nesne tıklanıldığında aktif oluyor ve ekrana gelen panelden fotograf geçişlerini sağlıyorduk. Bu örnegimizde ise link e tıklanıldığında ekrana kendi belirlemiş olduğumuz içerik gelecek. Örneğimizde &#8220;Site İçeriği&#8221; linkine tıklanıldığında gumusluoglu.com blogunda yer alan 7 adet uygulamanın başlıkları ekrana gelecek ve tıklandığında linkler blog yazıları yeni bir <a href="http://www.serpito.com/jquery-lightbox-text/"> read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-675" title="Clipboard01" src="http://www.gumusluoglu.com/wp-content/uploads/2010/02/Clipboard01.gif" alt="" hspace="5" width="235" height="140" />Daha önceki Slider Galeri uygulamamızda galerimizde yer alan fotograflar istediğimiz nesne tıklanıldığında aktif oluyor ve ekrana gelen panelden fotograf geçişlerini sağlıyorduk.</p>
<p>Bu örnegimizde ise link e tıklanıldığında ekrana kendi belirlemiş olduğumuz içerik gelecek.</p>
<p>Örneğimizde &#8220;Site İçeriği&#8221; linkine tıklanıldığında gumusluoglu.com blogunda yer alan 7 adet uygulamanın başlıkları ekrana gelecek ve tıklandığında linkler blog yazıları yeni bir pencerede açılacak.<br />
<span id="more-781"></span></p>
<h3>Html kodlarımız</h3>
<pre class="brush: php; ">

&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;title&amp;gt;Gumusluoglu.com Basit iletişim penceresi &amp;lt;/title&amp;gt;
&amp;lt;meta name=&#039;author&#039; content=&#039;Müslüm Gümüşlüoğlu&#039; /&amp;gt;
&amp;lt;meta name=&#039;copyright&#039; content=&#039;2010 Müslüm Gümüşlüoğlu&#039; /&amp;gt;
&amp;lt;link type=&#039;text/css&#039; href=&#039;css/basic.css&#039; rel=&#039;stylesheet&#039; media=&#039;screen&#039; /&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;div id=&#039;basic-modal&#039; align=&amp;quot;center&amp;quot;&amp;gt;
	&amp;lt;a href=&#039;#&#039; class=&#039;basic&#039; style=&amp;quot;text-align:center&amp;quot;&amp;gt;Site İçeriği&amp;lt;/a&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;div id=&amp;quot;basic-modal-content&amp;quot;&amp;gt;
	&amp;lt;h3 align=&amp;quot;center&amp;quot;&amp;gt;Örnek Uygulama&amp;lt;/h3&amp;gt;
	&amp;lt;p&amp;gt;Bu örnek www.gumusluoglu.com sitesi için basit iletişim penceresi amacı ile yapılmıştır.&amp;lt;/p&amp;gt;
	&amp;lt;p&amp;gt;&amp;lt;a href=&#039;http://www.gumusluoglu.com/&#039; target=&amp;quot;_blank&amp;quot;&amp;gt;Ana Sayfa&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
    &amp;lt;p&amp;gt;&amp;lt;a href=&#039;http://www.gumusluoglu.com/kategoriler/jquery-accordion-ve-dorpdown-menu/&#039;  target=&amp;quot;_blank&amp;quot;&amp;gt;jQuery Accordion ve Dropdown Menu&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
    &amp;lt;p&amp;gt;&amp;lt;a href=&#039;http://www.gumusluoglu.com/kategoriler/slider-galeri/&#039;  target=&amp;quot;_blank&amp;quot;&amp;gt;Slider Galeri&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
    &amp;lt;p&amp;gt;&amp;lt;a href=&#039;http://www.gumusluoglu.com/kategoriler/mootools-slider-buton/&#039;  target=&amp;quot;_blank&amp;quot;&amp;gt;Mootools Slider Buton&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
    &amp;lt;p&amp;gt;&amp;lt;a href=&#039;http://www.gumusluoglu.com/kategoriler/surukle-paylas-drag-to-share-2/&#039;  target=&amp;quot;_blank&amp;quot;&amp;gt;Sürükle  Paylaş (Drag to Share)&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
    &amp;lt;p&amp;gt;&amp;lt;a href=&#039;http://www.gumusluoglu.com/kategoriler/jquery-online-klavye/&#039;  target=&amp;quot;_blank&amp;quot;&amp;gt;jQuery Online Klavye&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
    &amp;lt;p&amp;gt;&amp;lt;a href=&#039;http://www.gumusluoglu.com/kategoriler/surukle-paylas-drag-to-share-2/&#039;  target=&amp;quot;_blank&amp;quot;&amp;gt;Sürükle Paylaş (Drag to Share)&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;script type=&#039;text/javascript&#039; src=&#039;js/jquery.js&#039;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type=&#039;text/javascript&#039; src=&#039;js/jquery.simplemodal.js&#039;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type=&#039;text/javascript&#039; src=&#039;js/basic.js&#039;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
</pre>
<p><strong>Uygulamanın çalışır <a href="http://www.gumusluoglu.com/examples/Jquery_LightBox_Text" target="_blank">demosunu incelemek için tıklayınız</a>.</strong></p>
<p><strong>Uygulama dosyalarını <a href="http://www.box.net/shared/e28uf1ys1n" target="_blank">zip şeklinde indirmek için tıklayınız.</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.serpito.com/jquery-lightbox-text/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Jquery İletişim Formu</title>
		<link>http://www.serpito.com/jquery-iletisim-formu/</link>
		<comments>http://www.serpito.com/jquery-iletisim-formu/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 10:01:30 +0000</pubDate>
		<dc:creator>sword fish</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Uygulamalar]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[jquery form]]></category>
		<category><![CDATA[jquery iletişim]]></category>

		<guid isPermaLink="false">http://www.serpito.com/?p=770</guid>
		<description><![CDATA[Web sistemlerimizde yer alan iletişim formlarını jquery ve ajax ile daha görsel ve kullanışlı bir hale getirebiliriz. Bu örneğimizde buton veya linke tıklanıldığında iletişim formumuz ekrana geliyor ve gerekli alanların doğruluk kontrolü yapılarak eposta yoluyoruz.Bu iletişim formu SimpleModal üzerine kurulmuştur. OnOpen, onShow ve onClose geriçağırımlarının kullanımı yanı sıra SimpleModal ile Ajax kullanımı gösterir. İndex.html kodlarımız <a href="http://www.serpito.com/jquery-iletisim-formu/"> read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-1520" title="jquery" src="http://www.serpito.com/wp-content/uploads/jquery.jpg" alt="" width="246" height="174" />Web sistemlerimizde yer alan iletişim formlarını jquery ve ajax ile daha görsel ve kullanışlı bir hale getirebiliriz. Bu örneğimizde buton veya linke tıklanıldığında iletişim formumuz ekrana geliyor ve gerekli alanların doğruluk kontrolü yapılarak eposta yoluyoruz.Bu iletişim formu SimpleModal üzerine kurulmuştur. OnOpen, onShow ve onClose geriçağırımlarının kullanımı yanı sıra SimpleModal ile Ajax kullanımı gösterir.<span id="more-770"></span></p>
<p>İndex.html kodlarımız</p>
<pre class="brush: php; ">

&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-9&quot; /&gt;
&lt;link type=&#039;text/css&#039; href=&#039;css/contact.css&#039; rel=&#039;stylesheet&#039; media=&#039;screen&#039; /&gt;
&lt;/head&gt;
&lt;div id=&#039;contact-form&#039; align=&quot;center&quot;&gt;&lt;h2&gt;Gumusluoglu.Com Jquery İletişim Formu &amp;Ouml;rneği&lt;/h2&gt;

&lt;input type=&#039;button&#039; name=&#039;contact&#039; value=&#039;İletişim Formu&#039; class=&#039;contact demo&#039;/&gt; or &lt;a href=&#039;#&#039; class=&#039;contact&#039;&gt;İletişim Formu&lt;/a&gt;
&lt;/div&gt;
&lt;!-- Load JavaScript files --&gt;
&lt;script type=&#039;text/javascript&#039; src=&#039;js/jquery.js&#039;&gt;&lt;/script&gt;
&lt;script type=&#039;text/javascript&#039; src=&#039;js/jquery.simplemodal.js&#039;&gt;&lt;/script&gt;
&lt;script type=&#039;text/javascript&#039; src=&#039;js/contact.js&#039;&gt;&lt;/script&gt;
&lt;body&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p><a href="http://www.box.net/shared/laszolmmai" target="_blank"><img class="alignleft size-full wp-image-1476" title="download" src="http://www.serpito.com/wp-content/uploads/download.png" alt="" width="149" height="25" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.serpito.com/jquery-iletisim-formu/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>PHP:AJAX: Beğeni Oylama Uygulaması (Favourite &#8211; Love)</title>
		<link>http://www.serpito.com/php-ajax-begeni-oylama-uygulamasi/</link>
		<comments>http://www.serpito.com/php-ajax-begeni-oylama-uygulamasi/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 09:16:11 +0000</pubDate>
		<dc:creator>Atilla Akoğlu</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Uygulamalar]]></category>
		<category><![CDATA[create table]]></category>
		<category><![CDATA[favourite]]></category>
		<category><![CDATA[love]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[resim oylama]]></category>
		<category><![CDATA[sosyal ağlar]]></category>

		<guid isPermaLink="false">http://www.serpito.com/?p=657</guid>
		<description><![CDATA[Özellikle sosyal ağlarda ağımızdaki kişilerin paylaştığı içeriklere karşı etkileşim halinde olmanın en önemli yolu beğenini göstermektir. Bu uygulamamızda yayınlanan resimleri favorilere ekleme veya beğenme olayını inceleyeceğiz. Öncelikle aşağıdaki yazdığım MySQL satırları ile uygulama için gerekli veritabanı tablolarını açabilirsiniz. CREATE TABLE IF NOT EXISTS `demo_images` ( `img_id` int(11) NOT NULL auto_increment, `img_name` varchar(60) character set utf8 <a href="http://www.serpito.com/php-ajax-begeni-oylama-uygulamasi/"> read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-765" title="favourite" src="http://www.serpito.com/wp-content/uploads/favourite.gif" alt="PHP:Ajax- favourite" width="602" height="167" /></p>
<p>Özellikle sosyal ağlarda ağımızdaki kişilerin paylaştığı içeriklere karşı etkileşim halinde olmanın en önemli yolu beğenini göstermektir.</p>
<p>Bu uygulamamızda yayınlanan resimleri favorilere ekleme veya beğenme olayını inceleyeceğiz. <span id="more-657"></span></p>
<p>Öncelikle aşağıdaki yazdığım MySQL satırları ile uygulama için gerekli veritabanı tablolarını açabilirsiniz.</p>
<pre class="brush: php; ">

CREATE TABLE IF NOT EXISTS `demo_images` (
`img_id` int(11) NOT NULL auto_increment,
`img_name` varchar(60) character set utf8 collate utf8_swedish_ci default NULL,
`img_url` varchar(200) NOT NULL,
`love` int(11) default NULL,
PRIMARY KEY (`img_id`)
)

INSERT INTO `demo_images` (`img_id`, `img_name`, `img_url`, `love`) VALUES
(1, &#039;Antalya&#039;, &#039;http://www.serpito.com/projects/favourite/antalya.jpg&#039;, 1),
(2, &#039;Düden Şelalesi&#039;, &#039;http://www.serpito.com/projects/favourite/duden.jpg&#039;, 1),
(3, &#039;Konyaaltı Plajı&#039;, &#039;http://www.serpito.com/projects/favourite/konyaalti.jpg&#039;, NULL);

CREATE TABLE IF NOT EXISTS `demo_image_IP` (
`ip_id` int(11) NOT NULL auto_increment,
`img_id_fk` int(11) default NULL,
`ip_add` varchar(40) default NULL,
PRIMARY KEY (`ip_id`),
KEY `img_id_fk` (`img_id_fk`)
)
</pre>
<p>Uygulamamızın index dosyasını yazalım.</p>
<h3>index.php</h3>
<pre class="brush: php; ">

&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;title&gt;Serpito.com - Ajax Favourite Demo&lt;/title&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;
$(document).ready(function()
{
$(&quot;span.on_img&quot;).mouseover(function ()
{
$(this).addClass(&quot;over_img&quot;);
});

$(&quot;span.on_img&quot;).mouseout(function ()
{
$(this).removeClass(&quot;over_img&quot;);
});
});

$(function() {
$(&quot;.love&quot;).click(function()
{
var id = $(this).attr(&quot;id&quot;);
var dataString = &#039;id=&#039;+ id ;
var parent = $(this);

$(this).fadeOut(300);
$.ajax({
type: &quot;POST&quot;,
url: &quot;ajax_love.php&quot;,
data: dataString,
cache: false,

success: function(html)
{
parent.html(html);
parent.fadeIn(300);
}
});

return false;

});
});
&lt;/script&gt;
&lt;style type=&quot;text/css&quot;&gt;
body
{
font-family:Arial, Helvetica, sans-serif;
font-size:14px;
font-weight:bold;
color:#FFFFFF
}
a
{
color:#FFFFFF

}
a:hover
{
color:#FFFFFF

}
.on_img
{
background-image:url(on.gif);
background-repeat:no-repeat;

padding-left:35px;

cursor:pointer;
width:60px;

}

.over_img
{
background-image:url(over.gif);
background-repeat:no-repeat;

padding-left:35px;

cursor:pointer;
width:60px;
}
.box
{
background-color:#303030; padding:6px;
height:17px;
}
a
{
text-decoration:none;

}
a:hover
{
text-decoration:none;

}
&lt;/style&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;div align=&quot;center&quot;&gt;

&lt;div style=&quot;width:600px&quot; &gt;

&lt;div style=&quot;color:#333333&quot; align=&quot;left&quot;&gt;&lt;h3&gt;Beğenini göster&lt;/h3&gt;&lt;/div&gt;
&lt;?php
include(&#039;mysql.php&#039;);
$sql=mysql_query(&quot;select * from demo_images&quot;);
while($row=mysql_fetch_array($sql))
{

$img_id=$row[&#039;img_id&#039;];
$img_name=$row[&#039;img_name&#039;];
$img_url=$row[&#039;img_url&#039;];
$love=$row[&#039;love&#039;];
?&gt;

&lt;div style=&quot;margin-bottom:30px&quot;&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;a href=&quot;#&quot; id=&quot;&lt;?php echo $img_id; ?&gt;&quot;&gt;
&lt;span align=&quot;left&quot;&gt; &lt;?php echo $love; ?&gt; &lt;/span&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;img src=&#039;&lt;?php echo $img_url; ?&gt;&#039; /&gt;
&lt;/div&gt;
&lt;?php

}
?&gt;

&lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>Ajax ile arkaplanda çalışacak olan ajax_love.php dosyamızı yazıyoruz.</p>
<h3>ajax_love.php</h3>
<pre class="brush: php; ">
&lt;?php
include(&quot;mysql.php&quot;);
$ip=$_SERVER[&#039;REMOTE_ADDR&#039;];

if($_POST[&#039;id&#039;])
{
$id=$_POST[&#039;id&#039;];

$ip_sql=mysql_query(&quot;select ip_add from demo_image_IP where img_id_fk=&#039;$id&#039; and ip_add=&#039;$ip&#039;&quot;);
$count=mysql_num_rows($ip_sql);

if($count==0)
{
$sql = &quot;update demo_images set love=love+1 where img_id=&#039;$id&#039;&quot;;
mysql_query( $sql);
$sql_in = &quot;insert into demo_image_IP (ip_add,img_id_fk) values (&#039;$ip&#039;,&#039;$id&#039;)&quot;;
mysql_query( $sql_in);

$result=mysql_query(&quot;select love from demo_images where img_id=&#039;$id&#039;&quot;);
$row=mysql_fetch_array($result);
$love=$row[&#039;love&#039;];
?&gt;
&lt;span align=&quot;left&quot;&gt;&lt;?php echo $love; ?&gt;&lt;/span&gt;
&lt;?
}
else
{
echo &#039;Hayır !&#039;;
}

}

?&gt;
</pre>
<p><strong>Uygulamanın çalışır <a href="http://www.serpito.com/projects/favourite/" target="_blank">demosunu incelemek için tıklayınız</a>.</strong></p>
<p>Uygulama dosyalarını <a href="http://www.box.net/shared/0pmh05hokv" target="_blank">zip şeklinde indirmek için tıklayınız.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.serpito.com/php-ajax-begeni-oylama-uygulamasi/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP:Jquery: Scroll Down Auto Load Data (Sayfayı aşağı kaydırınca otomatik veri yükleme)</title>
		<link>http://www.serpito.com/scroll-down-auto-load-data/</link>
		<comments>http://www.serpito.com/scroll-down-auto-load-data/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 16:13:41 +0000</pubDate>
		<dc:creator>Atilla Akoğlu</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Uygulamalar]]></category>
		<category><![CDATA[Web kaynakları]]></category>
		<category><![CDATA[ajax load]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[jquery get method]]></category>
		<category><![CDATA[load data]]></category>
		<category><![CDATA[scroll load data]]></category>
		<category><![CDATA[scrolling page]]></category>
		<category><![CDATA[sortfolio]]></category>
		<category><![CDATA[window scroll]]></category>

		<guid isPermaLink="false">http://www.serpito.com/?p=662</guid>
		<description><![CDATA[Bu uygulamada bazı web sitelerinde görülen sayfa altına scroll edilince yeni verilerin Ajax ile yüklenme olayını inceleyeceğiz. Örnek site için sortfolio.  Bu uygulama ile sayfa hareketine göre verilerin daha düzenli ve verimli kullanılmasını sağlıyoruz. Tabi ki sunucu performansından büyük tasarruf  ediyoruz. Bu uygulama demosu için de daha önce kullandığım mysql.php database class yapısını kullandım. En <a href="http://www.serpito.com/scroll-down-auto-load-data/"> read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Bu uygulamada bazı web sitelerinde görülen sayfa altına scroll edilince yeni verilerin Ajax ile yüklenme olayını inceleyeceğiz. Örnek site için <a href="http://sortfolio.com/" target="_blank">sortfolio</a>.  Bu uygulama ile sayfa hareketine göre verilerin daha düzenli ve verimli kullanılmasını sağlıyoruz. Tabi ki sunucu performansından büyük tasarruf  ediyoruz.</p>
<p><img class="aligncenter size-full wp-image-720" title="scroll" src="http://www.serpito.com/wp-content/uploads/scroll.gif" alt="Scroll window auto load" width="587" height="149" /></p>
<p>Bu uygulama demosu için de daha önce kullandığım mysql.php database class yapısını kullandım. En kısa zamanda bu class &#8216;ı da detaylıca açıklayacağım.<br />
Uygulamamız için gereken kodlara geçelim:  <span id="more-662"></span></p>
<h3>index.php kodları</h3>
<pre class="brush: php; ">

&lt;style type=&quot;text/css&quot;&gt;
*{ margin:0px; padding:0px }
body
{
font-family:&#039;Georgia&#039;,Times New Roman, Times, serif;
font-size:18px;
}
.message_box
{
height:auto;
width:600px;
border:solid 1px #48B1D9;
padding:5px ;
}
#panel{
color:#333;
background-color:#C8E6E2;
width:100%;
}
#last_msg_loader
{
text-align: right;
width: 920px;
margin: -125px auto 0 auto;
}
.number
{
float:right;
background-color:#48B1D9;
color:#000;
font-weight:bold;
}
&lt;/style&gt;
&lt;?php
include(&#039;mysql.php&#039;);
$last_msg_id=$_GET[&#039;last_msg_id&#039;];
$action=$_GET[&#039;action&#039;];

if($action &lt;&gt; &quot;get&quot;)
{
?&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$(document).ready(function()
{
function last_msg_funtion()
{
var ID=$(&quot;.message_box:last&quot;).attr(&quot;id&quot;);
$(&#039;div#last_msg_loader&#039;).html(&#039;&lt;img src=&quot;wait.gif&quot;&gt;&#039;);
$.post(&quot;scroll.php?action=get&amp;amp;amp;last_msg_id=&quot;+ID,

function(data){
if (data != &quot;&quot;) {
$(&quot;.message_box:last&quot;).after(data);
}
$(&#039;div#last_msg_loader&#039;).empty();
});
};

$(window).scroll(function(){
if ($(window).scrollTop() == $(document).height() - $(window).height()){
last_msg_funtion();
}
});
});
&lt;/script&gt;
&lt;title&gt;Serpito.Com - Scroll Load Demo&lt;/title&gt;
&lt;div id=&quot;panel&quot;&gt;
&lt;center&gt;&lt;h2&gt;Serpito.com&lt;/h2&gt;
Bu demo &lt;a href=&quot;http://www.serpito.com/scroll-down-auto-load-data/&quot;&gt;PHP:Jquery: Scroll Down Auto Load Data&lt;/a&gt; icin hazirlanmistir.
&lt;/center&gt;
&lt;/div&gt;
&lt;?php
//Include load_first.php
$sql=$dba-&gt;query(&quot;SELECT ID,post_title,post_name FROM wp_posts WHERE post_status=&#039;publish&#039; ORDER BY ID DESC LIMIT 25&quot;);
while($row=$dba-&gt;fetch_array($sql))
{
$msgID= $row[&#039;ID&#039;];
$msg= $row[&#039;post_title&#039;];
$link=$row[&#039;post_name&#039;];
?&gt;
&lt;div id=&quot;&lt;?php echo $msgID; ?&gt;&quot; &gt;
&lt;a href=&quot;http://www.serpito.com/&lt;?php echo $link; ?&gt;/&quot;&gt;&lt;?php echo $link; ?&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;?php
}

?&gt;
&lt;div id=&quot;last_msg_loader&quot;&gt;&lt;/div&gt;
&lt;?php
}else{
include(&#039;scroll.php&#039;); //include load_second.php
}
$dba-&gt;close();
?&gt;

&amp;nbsp;
</pre>
<h3>scroll.php kodları</h3>
<pre class="brush: php; ">

&lt;?php
include(&#039;mysql.php&#039;);
$last_msg_id=$_GET[&#039;last_msg_id&#039;];
$sql=$dba-&gt;query(&quot;SELECT * FROM wp_posts WHERE ID&lt;&#039;$last_msg_id&#039; and post_status=&#039;publish&#039; ORDER BY ID DESC LIMIT 5&quot;);
$last_msg_id=&quot;&quot;;
while($row=$dba-&gt;fetch_array($sql))
{
$msgID= $row[&#039;ID&#039;];
$link=$row[&#039;post_name&#039;];
$msg= $row[&#039;post_title&#039;];
?&gt;
&lt;div id=&quot;&lt;?php echo $msgID; ?&gt;&quot; &gt;
&lt;a href=&quot;http://www.serpito.com/&lt;?php echo $link; ?&gt;&quot;&gt;&lt;?php echo $link; ?&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;?php
}
$dba-&gt;close();
?&gt;
</pre>
<p><a href="http://serpito.com/projects/scroll-load/" target="_blank"><img class="alignleft size-full wp-image-1475" title="demo" src="http://www.serpito.com/wp-content/uploads/demo.png" alt="" width="80" height="25" /></a></p>
<p>&nbsp;</p>
<p><a href="http://www.box.net/shared/hcbur76e9h" target="_blank"><img class="alignleft size-full wp-image-1476" title="download" src="http://www.serpito.com/wp-content/uploads/download.png" alt="" width="149" height="25" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.serpito.com/scroll-down-auto-load-data/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Twitter Tarzı Jquery &#8211; CSS More Çubuğu</title>
		<link>http://www.serpito.com/twitter-tarzi-more-bar/</link>
		<comments>http://www.serpito.com/twitter-tarzi-more-bar/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 12:04:04 +0000</pubDate>
		<dc:creator>Atilla Akoğlu</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Uygulamalar]]></category>
		<category><![CDATA[dba]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[load more]]></category>
		<category><![CDATA[load more bar]]></category>
		<category><![CDATA[more]]></category>
		<category><![CDATA[more bar]]></category>
		<category><![CDATA[more çubuğu]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[uygulama]]></category>

		<guid isPermaLink="false">http://www.serpito.com/?p=655</guid>
		<description><![CDATA[Twitter&#8217;a dadanmışken tam olsun artık. Sayfa altında yer alan more çubuğu nasıl çalışıyor, ne gibi yararları var sorularına cevap arayalım. Takip listendeki insanların feedleri  çok sık güncellenebileceği için (benim listemde dakikada ortalama 30 twit geliyor)  profil sayfanızın  ilk yüklendiği sırada en son gönderilen 20 twit listeleniyor. Bu şekilde aynı anda binlerce satır verinin yüklenmesi önleniyor <a href="http://www.serpito.com/twitter-tarzi-more-bar/"> read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="size-full wp-image-685   aligncenter" title="Twitter More" src="http://www.serpito.com/wp-content/uploads/more1.gif" alt="" width="559" height="124" /></p>
<p>Twitter&#8217;a dadanmışken tam olsun artık. Sayfa altında yer alan <strong>more </strong>çubuğu nasıl çalışıyor, ne gibi yararları var sorularına cevap arayalım. <span id="more-655"></span></p>
<p><img class="aligncenter size-full wp-image-686" title="Twitter more" src="http://www.serpito.com/wp-content/uploads/more2.gif" alt="Twitter more" width="561" height="92" />Takip listendeki insanların feedleri  çok sık güncellenebileceği için (benim listemde dakikada ortalama 30 twit geliyor)  profil sayfanızın  ilk yüklendiği sırada en son gönderilen 20 twit listeleniyor. Bu şekilde aynı anda binlerce satır verinin yüklenmesi önleniyor ve hem sunucu hem de kullanıcı için rahat bir servis sağlanıyor.</p>
<p><strong>More çubuğu daha fazla verinin istenildiği zaman sayfaya yüklenmesini sağlıyor.</strong></p>
<p>Uygulamayı gerçekleştirebilmek için öncelikle bir veritabanına yani veri topluluğuna ihtiyacımız var.</p>
<p>Elinizde hazır bir veritabanı yoksa aşağıdaki Mysql kodu ile örnek bir veritabanı tablosu açabilirsiniz.</p>
<pre class="brush: php; ">

CREATE TABLE messages(
id INT AUTO_INCREMENT PRIMARY KEY,
message TEXT
);
//messages tablosu açıldı, içine örnek veri girmek için aşağıdaki kodu da çalıştırabilirsiniz.

INSERT INTO `messages` (`msg_id`, `message`) VALUES (NULL, &#039;denemes21we sadkas jkf klf kfn&#039;);
INSERT INTO `messages` (`msg_id`, `message`) VALUES (NULL, &#039;sdsadk2as jkf klsdssdsdf kfn&#039;);INSERT INTO `messages` (`msg_id`, `message`) VALUES (NULL, &#039;dene2mese sadkas jkf klf kfn&#039;);INSERT INTO `messages` (`msg_id`, `message`) VALUES (NULL, &#039;denemaaes2e sadkas jkf klf kfn&#039;);INSERT INTO `messages` (`msg_id`, `message`) VALUES (NULL, &#039;denemesdsse sadkas jkf klf kfn&#039;);INSERT INTO `messages` (`msg_id`, `message`) VALUES (NULL, &#039;deneme5632ssdsde sadkas jkf klf kfn&#039;);INSERT INTO `messages` (`msg_id`, `message`) VALUES (NULL, &#039;denegffgmese sadkas jkf klf kfn&#039;);
INSERT INTO `messages` (`msg_id`, `message`) VALUES (NULL, &#039;denemese sad546546kas jkf klf kfn&#039;);INSERT INTO `messages` (`msg_id`, `message`) VALUES (NULL, &#039;densdaseme456546se sadkas jkf klf kfn&#039;);INSERT INTO `messages` (`msg_id`, `message`) VALUES (NULL, &#039;denedasdmese sadkas jkf klf kfn&#039;);INSERT INTO `messages` (`msg_id`, `message`) VALUES (NULL, &#039;denaasemese sadkas jkf klf kfn&#039;);INSERT INTO `messages` (`msg_id`, `message`) VALUES (NULL, &#039;dendasd45emese sadkas jkf klf kfn&#039;);INSERT INTO `messages` (`msg_id`, `message`) VALUES (NULL, &#039;deneasdamese sadkas jkf klf kfn&#039;);
</pre>
<p>Yukarıdaki Mysql kodları demo için kullanabileceğiniz ham maddeleri sağlar. Eğer ki local bilgisayarınızda çalışma imkanı bulamadıysanız <a href="http://www.serpito.com/php-kurulumu/" target="_blank">buradan local PHP ve Mysql server kurulumu</a> hakkında bilgi alabilirsiniz. Ama ben Serpito.com&#8217;un çalışan hazır veritabanını kullanacağım.</p>
<p>WordPress veritabanı yapısında wp_posts tablosunda tutulan postları listeleyerek siz küçük bir Ajax Load Bar demosu hazırladım.</p>
<p>Uygulama dosyalarını tek tek buraya yazalım:<br />
(Özellikle yorum satırlarına dikkat ederseniz daha rahat anlaşılır.)</p>
<h3>index.php kodları:</h3>
<pre class="brush: php; ">

&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;title&gt;Serpito.com - Jquery &amp;amp;amp;amp; Ajax Twitter tarzı more uygulası&lt;/title&gt;
&lt;style type=&quot;text/css&quot;&gt;
*{ margin:0px; padding:0px }
ol.timeline
{
list-style:none
}
ol.timeline li
{
position:relative;
border-bottom:1px #dedede dashed;
padding:8px;
}
#panel{
color:#333;
background-color:#C8E6E2;
width:100%;
}
.morebox
{
font-weight:bold;
color:#B0AD28;
text-align:center;
border:solid 1px #CCC;
padding:8px;
font-size:14px;
margin-top:8px;
margin-bottom:8px;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
}
.morebox a{ color:#333333; text-decoration:none}
.morebox a:hover{ color:#333333; text-decoration:none}
#container{margin-left:60px; width:580px }
&lt;/style&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$(function()
{
$(&#039;.more&#039;).live(&quot;click&quot;,function()
{
var ID = $(this).attr(&quot;id&quot;);
if(ID)
{
$(&quot;#more&quot;+ID).html(&#039;&lt;img src=&quot;images/wait.gif&quot; /&gt;&#039;);

$.ajax({
type: &quot;POST&quot;,
url: &quot;more.php&quot;,
data: &quot;lastmsg=&quot;+ ID,
cache: false,
success: function(html){
$(&quot;ol#updates&quot;).append(html);
$(&quot;#more&quot;+ID).remove(); // more cubugu kaldiriliyor
}
});
}
else
{
$(&quot;.morebox&quot;).html(&#039;Baska veri kalmadi&#039;);// Listelenecek veri kalmadi
}

return false;
});
});
&lt;/script&gt;

&lt;/head&gt;

&lt;body&gt;
&lt;div id=&quot;panel&quot;&gt;
&lt;center&gt;&lt;h2&gt;Serpito.com&lt;/h2&gt;
Bu demo &lt;a href=&quot;http://www.serpito.com/twitter-tarzi-more-bar/&quot;&gt;Twitter Tarzı Jquery – CSS More Çubuğu&lt;/a&gt; yazısı için hazırlanmıştır.
&lt;/center&gt;
&lt;/div&gt;
&lt;div id=&#039;container&#039;&gt;
&lt;ol id=&quot;updates&quot;&gt;
&lt;?php
include(&#039;mysql.php&#039;); // kisisel olarak kullandigim bu dosyadaki $dba veritabani sinifini daha sonra detaylica aciklayacagim.
$sql=$dba-&gt;query(&quot;select ID,post_title,post_name from wp_posts where post_status=&#039;publish&#039; ORDER BY ID DESC LIMIT 20&quot;); // ilk acilista 10 satir getiriliyor
while($row=$dba-&gt;fetch_assoc($sql))
{

$title=$row[&#039;post_title&#039;];
$link=$row[&#039;post_name&#039;];
$msg_id=$row[&#039;ID&#039;];
?&gt;
&lt;li&gt;
&lt;?php echo $title.&quot; &lt;a href=&#039;http://www.serpito.com/&quot;.$link.&quot;&#039;&gt;http://www.serpito.com/&quot;.$link.&quot;&lt;/a&gt;&quot;; ?&gt;
&lt;/li&gt;
&lt;?php } ?&gt;
&lt;/ol&gt;

&lt;div id=&quot;more&lt;?php echo $msg_id; ?&gt;&quot;&gt;
&lt;a href=&quot;#&quot; id=&quot;&lt;?php echo $msg_id; ?&gt;&quot;&gt;more&lt;/a&gt;
&lt;/div&gt;

&lt;/div&gt;

&lt;?php
$dba-&gt;close();
?&gt;
&lt;/body&gt;
&lt;/html&gt;

&amp;amp;nbsp;
</pre>
<h3>more.php kodları:</h3>
<pre class="brush: php; ">

&lt;?php
include(&quot;mysql.php&quot;);
if(isSet($_POST[&#039;lastmsg&#039;]))
{
$lastmsg=$_POST[&#039;lastmsg&#039;];
$lastmsg=mysql_real_escape_string($lastmsg);
$result=mysql_query(&quot;select ID,post_title,post_name from wp_posts where ID&lt;&#039;$lastmsg&#039; and post_status=&#039;publish&#039; order by ID desc limit 20&quot;);
while($row=mysql_fetch_array($result))
{
$title=$row[&#039;post_title&#039;];
$link=$row[&#039;post_name&#039;];
$msg_id=$row[&#039;ID&#039;];
?&gt;
&lt;li&gt;
&lt;?php echo $title.&quot; &lt;a href=&#039;http://www.serpito.com/&quot;.$link.&quot;&#039;&gt;http://www.serpito.com/&quot;.$link.&quot;&lt;/a&gt;&quot;; ?&gt;
&lt;/li&gt;
&lt;?php
}
?&gt;

&lt;div id=&quot;more&lt;?php echo $msg_id; ?&gt;&quot;&gt;
&lt;a href=&quot;#&quot; id=&quot;&lt;?php echo $msg_id; ?&gt;&quot;&gt;more&lt;/a&gt;
&lt;/div&gt;
&lt;?php
}
?&gt;

&lt;?php
$dba-&gt;close();
?&gt;

&amp;amp;nbsp;
</pre>
<p>Kodlama olayımız bu kadar. </p>
<p><a href="http://serpito.com/projects/load-more/" target="_blank"><img class="alignleft size-full wp-image-1475" title="demo" src="http://www.serpito.com/wp-content/uploads/demo.png" alt="" width="80" height="25" /></a></p>
<p>&nbsp;</p>
<p><a href="http://www.box.net/shared/2i3pqcpc3f" target="_blank"><img class="alignleft size-full wp-image-1476" title="download" src="http://www.serpito.com/wp-content/uploads/download.png" alt="" width="149" height="25" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.serpito.com/twitter-tarzi-more-bar/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

