<?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>Benjamin Ashcroft &#187; fancybox</title>
	<atom:link href="http://www.benjaminashcroft.com/tag/fancybox/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.benjaminashcroft.com</link>
	<description>Manchester based web developer and designer of high quality websites, printed matter and moving images.</description>
	<lastBuildDate>Tue, 17 Aug 2010 12:19:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>A Flexible Automatic Jquery gallery.</title>
		<link>http://www.benjaminashcroft.com/web-design/a-flexible-automatic-jquery-gallery/.</link>
		<comments>http://www.benjaminashcroft.com/web-design/a-flexible-automatic-jquery-gallery/.#comments</comments>
		<pubDate>Mon, 20 Jul 2009 16:35:10 +0000</pubDate>
		<dc:creator>Benjash</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[easing]]></category>
		<category><![CDATA[fancybox]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[lightbox]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[pikachoose]]></category>
		<category><![CDATA[slider.js]]></category>
		<category><![CDATA[snippet]]></category>

		<guid isPermaLink="false">http://www.benjaminashcroft.com/?p=91</guid>
		<description><![CDATA[I&#8217;ve been working on site recently which features a number of galleries in lightboxes. Using the fancybox lightbox plugin it launches an iframe with the gallery. I highly recomend the Pikachoose gallery simple for its amazing simplicity and ease of use. Easy to style and adapt to my own needs, including a inbuilt carousel feature [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on site recently which features a number of galleries in lightboxes. Using the fancybox lightbox plugin it launches an iframe with the gallery. </p>
<p>I highly recomend the <a href="http://pikachoose.com/demo/">Pikachoose</a> gallery simple for its amazing simplicity and ease of use. Easy to style and adapt to my own needs, including a inbuilt carousel feature utilizing slider.js.<em> I&#8217;ll post a link to an example lightbox gallery soon.</em></p>
<h2>List images from a folder automatically via PHP</h2>
<p>Heres a little code snippet I used to list all the images in a folder.</p>
<pre name="code" class="php">

// the directory, where your images are stored
$imgdir = '/images/'; 

// list of filetypes you
$allowed_types = array('png','jpg','jpeg','gif'); want to show

$dimg = opendir($imgdir);
while($imgfile = readdir($dimg))
{
 if(in_array(strtolower(substr($imgfile,-3)),$allowed_types))
 {
  $a_img[] = $imgfile;
  sort($a_img);
  reset ($a_img);
 }
}
// total image number
$totimg = count($a_img); 

for($x=0; $x < $totimg; $x++)
{
 $size = getimagesize($imgdir.'/'.$a_img[$x]);

 // do whatever
 $halfwidth = ceil($size[0]/2);
 $halfheight = ceil($size[1]/2);
 echo '
<li><img src="'.$imgdir.''.$a_img[$x].'"/></a></li>

';
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.benjaminashcroft.com/web-design/a-flexible-automatic-jquery-gallery/./feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
