<?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>ZkuSMO.cz &#187; SimpleViewer</title>
	<atom:link href="http://www.zkusmo.cz/stitky/simpleviewer/feed" rel="self" type="application/rss+xml" />
	<link>http://www.zkusmo.cz</link>
	<description>Blog uživatele SMO zkusmo o všem!</description>
	<lastBuildDate>Thu, 02 Feb 2012 19:30:29 +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>Flash fotogalerie pomocí SimpleViewer</title>
		<link>http://www.zkusmo.cz/foto/flash-fotogalerie-pomoci-simpleviewer</link>
		<comments>http://www.zkusmo.cz/foto/flash-fotogalerie-pomoci-simpleviewer#comments</comments>
		<pubDate>Wed, 18 Mar 2009 18:24:51 +0000</pubDate>
		<dc:creator>SMO</dc:creator>
				<category><![CDATA[Foto]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programování]]></category>
		<category><![CDATA[fotogalerie]]></category>
		<category><![CDATA[SimpleViewer]]></category>

		<guid isPermaLink="false">http://smo82.ic.cz/wordpress/?p=157</guid>
		<description><![CDATA[Na stránkách <a title="SimpleViewer" href="http://www.airtightinteractive.com/simpleviewer/" target="_blank">SimpleVieweru</a> jsou zdarma ke stažení zdrojové kódy SimpleViewer v1.9. Ukážeme si jak, tuto pěknou flashovou fotogalerii upravit k obrazu svému a publikovat jí na webu - třeba v tomto blogu. :-)]]></description>
			<content:encoded><![CDATA[<p>Na stránkách <a title="SimpleViewer" href="http://www.airtightinteractive.com/simpleviewer/" target="_blank">SimpleVieweru</a> jsou zdarma ke stažení zdrojové kódy SimpleViewer v1.9. Ukážeme si jak tuto pěknou flashovou fotogalerii upravit k obrazu svému a publikovat jí na webu &#8211; třeba v tomto blogu.</p>
<p><span id="more-157"></span></p>
<p>1.  Stáhnout soubor <a title="Stahuj SimpeVieweer 1.9" href="http://www.airtightinteractive.com/simpleviewer/simpleviewer.zip" target="_blank">http://www.airtightinteractive.com/simpleviewer/simpleviewer.zip</a></p>
<p>2.  Rozbalit ZIP soubor do vhodného adresáře a seznámit se danými soubory a adresáři.</p>
<ul>
<li>adresář <strong>images</strong> je místo pro fotky s větším rozlišením (<em>doporučuji max. 900 x 670 px</em>)</li>
<li>adresář <strong>thumbs</strong> je místo pro fotky s malým rozlišením (<em>doporučuji max. 170 x 130 px</em>)</li>
<li>soubor <strong>gallery.xml</strong> je klíčový datový soubor ze seznamem publikovaných fotografií</li>
<li>soubor <strong>index.html</strong> je soubor pro spuštění fotogalerie</li>
<li><strong>swfobject.js</strong> je pomocný soubor obsahující JavaScriptové funkce potřební k funkčnosti</li>
<li><strong>viewer.swf</strong> je pomocný flashový soubor tvořící výsledný grafický vzhled v prohlížeči</li>
</ul>
<p>3. Pomocí grafického editoru vhodně upravit <em>&#8222;syrové&#8220;</em> fotky z fotoaparátu a nakopírovat do příslušných adresářů.</p>
<p style="padding-left: 30px;">Pro práci z fotografiemi používám <a title="Zoner Media Photo Studio" href="http://www.zoner.cz/produkty/" target="_blank">Zoner Media Photo Studio</a>. Myslím, že práce s fotkami je zde opravdu efektivní. Lze zde jednoduše označit několik fotografií, zadat výsledný rozměr v pixelech a ZMPS za nás všechny fotky přerozměruje.</p>
<p style="text-align: center;"><a class="highslide-image" onclick="return hs.expand(this, {captionId:'caption_1237147023664'});" href="http://www.zkusmo.cz/obr-clanky/foto/flash-fotogalerie-pomoci-simpleviewer/zmps.jpg"><img title="Click to enlarge" src="http://www.zkusmo.cz/obr-clanky/foto/flash-fotogalerie-pomoci-simpleviewer/small/zmps.jpg" alt="image" /></a></p>
<div id="caption_1237147023664" class="highslide-caption">ZMPS &#8211; přerozměrování fotek</div>
<p>4.  Vytvořit nebo vygenerovat soubor <strong>gallery.xml</strong> ze seznamem názvů fotek.</p>
<p style="padding-left: 30px;">Předtím, než vygenerujeme XML soubor bych vhodně pojmenoval soubory s fotkami. A to ve formátu <em>prefix_cislo.jpg</em>. Konkrétně teda <em>ap_01.jpg</em>. Takovéto hromadné přejmenování hravě zvládne <a title="TotalCommander" href="http://www.totalcommander.cz/" target="_blank">TotalCommander</a>. Akci vyvoláme v menu <em>Soubor &gt; Hromadné přejmenování</em>.</p>
<p style="text-align: center;"><a class="highslide-image" onclick="return hs.expand(this, {captionId:'caption_1237148127885'});" href="http://www.zkusmo.cz/obr-clanky/foto/flash-fotogalerie-pomoci-simpleviewer/tc.jpg"><img title="Click to enlarge" src="http://www.zkusmo.cz/obr-clanky/foto/flash-fotogalerie-pomoci-simpleviewer/small/tc.jpg" alt="image" /></a></p>
<div id="caption_1237148127885" class="highslide-caption" style="text-align: center;">TotalCommander &#8211; hromadné přejmenování souborů</div>
<p style="padding-left: 30px;">Pro tento případ jsem si napsal v <a title="PHP" href="http://cz.php.net/" target="_blank">PHPčku</a> skriptík, který XML soubor vygeneruje. Stačí zde vhodně zadat počáteční proměnné jako je: počáteční číslo první fotky, celkový počet fotek a prefix názvu soubor.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
  <span style="color: #000088;">$cislo</span>   <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>     <span style="color: #666666; font-style: italic;">// počáteční číslo</span>
  <span style="color: #000088;">$celkem</span>  <span style="color: #339933;">=</span> <span style="color: #cc66cc;">16</span><span style="color: #339933;">;</span>    <span style="color: #666666; font-style: italic;">// celkem fotek </span>
  <span style="color: #000088;">$prefix</span>  <span style="color: #339933;">=</span> <span style="color: #0000ff;">'a&amp;p'</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// prefix názvu souborů</span>
  <span style="color: #000088;">$text</span>    <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Vygenerováno 1.3.2009 v 20:10 hod. | SMO © 2009'</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;=</span> <span style="color: #000088;">$celkem</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$cislo</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$cislo</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'0'</span><span style="color: #339933;">.</span><span style="color: #000088;">$cislo</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
    <span style="color: #000088;">$soubor</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;image&gt;n&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$soubor</span><span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;  &lt;filename&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$prefix</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;_&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$cislo</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;.jpg&lt;/filename&gt;n&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$soubor</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;  &lt;caption&gt;&lt;![CDATA[&lt;font color=&quot;</span><span style="color: #666666; font-style: italic;">#ffe21a&quot; size=&quot;10&quot;&gt;&quot;;
</span>    <span style="color: #000088;">$soubor</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$text</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;font&gt;]]&gt;&lt;/caption&gt;n&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$soubor</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;/image&gt;n&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$cislo</span><span style="color: #339933;">++;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #000088;">$file</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;gallery.xml&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;w&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #990000;">fwrite</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #339933;">,</span> <span style="color: #000088;">$soubor</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p style="padding-left: 30px;">Do záhlaví XML souboru je nutno ještě přidat hlavičku, informace o grafickém vzhledu a maximálních velikostech fotogalerie.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;simplevieawergallery</span> <span style="color: #000066;">maxImageWidth</span>=<span style="color: #ff0000;">&quot;570&quot;</span> <span style="color: #000066;">maxImageHeight</span>=<span style="color: #ff0000;">&quot;550&quot;</span></span>
<span style="color: #009900;">   <span style="color: #000066;">textColor</span>=<span style="color: #ff0000;">&quot;0xFFFFFF&quot;</span> <span style="color: #000066;">frameColor</span>=<span style="color: #ff0000;">&quot;0xFFFFFF&quot;</span> <span style="color: #000066;">frameWidth</span>=<span style="color: #ff0000;">&quot;3&quot;</span></span>
<span style="color: #009900;">   <span style="color: #000066;">stagePadding</span>=<span style="color: #ff0000;">&quot;17&quot;</span> <span style="color: #000066;">navPadding</span>=<span style="color: #ff0000;">&quot;17&quot;</span> <span style="color: #000066;">thumbnailColumns</span>=<span style="color: #ff0000;">&quot;5&quot;</span></span>
<span style="color: #009900;">   <span style="color: #000066;">thumbnailRows</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">navPosition</span>=<span style="color: #ff0000;">&quot;top&quot;</span> <span style="color: #000066;">vAlign</span>=<span style="color: #ff0000;">&quot;center&quot;</span></span>
<span style="color: #009900;">   <span style="color: #000066;">hAlign</span>=<span style="color: #ff0000;">&quot;center&quot;</span> <span style="color: #000066;">enableRightClickOpen</span>=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #009900;">   <span style="color: #000066;">backgroundImagePath</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">imagePath</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">thumbPath</span>=<span style="color: #ff0000;">&quot;&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span></pre></div></div>

<p>5. Hotovo. <img src='http://www.zkusmo.cz/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Výsledná fotogalarie vypadá takto.</p>
<p><iframe src="http://zkusmo.cz/obr-clanky/foto/flash-fotogalerie-pomoci-simpleviewer/ap/" width="600" height="600" frameborder="0" scrolling="no" name="fg"></iframe></p>
<p>Fotogaleriie ve větším rozlišení možno shlédnout na: <a title="Ajíček &amp; Pájíček" href="http://zkusmo.cz/fotogalerie/2009/2009-02-28_ajicek_pajicek/" target="_blank">http://zkusmo.cz/fotogalerie/2009/2009-02-28_ajicek_pajicek/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.zkusmo.cz/foto/flash-fotogalerie-pomoci-simpleviewer/feed</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
	</channel>
</rss>

