<?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>The Knowledge Supply Chain &#187; open source</title>
	<atom:link href="http://www.ipov.net/apps/blog/tag/open-source/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ipov.net/apps/blog</link>
	<description></description>
	<lastBuildDate>Fri, 17 Jun 2011 21:52:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Drupal 6 Ajax Screenshot Gallery</title>
		<link>http://www.ipov.net/apps/blog/2009/09/drupal-6-ajax-screenshot-gallery/</link>
		<comments>http://www.ipov.net/apps/blog/2009/09/drupal-6-ajax-screenshot-gallery/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 15:06:24 +0000</pubDate>
		<dc:creator>robert.sanders</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://www.ipov.net/blog/?p=112</guid>
		<description><![CDATA[We recently wanted to put up a carousel-style image gallery of product screenshots in our Drupal based website. After a good bit of research, I wound up with several “solutions”, but none of them did quite what I wanted; luckily I hit upon a solution by a bit of good luck simply by noticing some [...]]]></description>
			<content:encoded><![CDATA[<p>We recently wanted to put up a carousel-style image gallery of product screenshots in our Drupal based website.  After a good bit of research, I wound up with several “solutions”, but none of them did quite what I wanted; luckily I hit upon a solution by a bit of good luck simply by noticing some settings that had been enabled in the course of trying out some of the existing plugins.<br />
<span id="more-112"></span></p>
<p>Before getting into my solution, I&#8217;ll mention the two modules that are closest to what I want to achieve:</p>
<ol>
<li><span><a href="http://drupal.org/project/galleria" target="_blank">Galleria </a>– this module produces 	a carousel-style listing of image thumbnails, when a thumbnail is 	clicked on the full-size image is shown.  However, this module has the following problems for my use case:</span>
<ol>
<li>The thumbnails are simply the 		original image file with an explicit width and height set; this 		means that if you have a lot of them, it can take quite a while for 		them all to load.</li>
<li>Loading is not actually 		asynchronous, but there is a significant delay while the javascript 		initializes during which the content is hidden.  There is no 		progress indicator during this time.</li>
<li>The admin panel for the module 		has very limited options – the worst is that it doesn&#8217;t let you 		set the size of the carousel (which can be overridden in CSS), but 		does ask you to specify how many images to display – the images 		are scaled (using CSS) to fit in the carousel&#8217;s default size (you 		can hack the JS code to fix this, but then have to reset a number 		of other CSS properties).</li>
</ol>
</li>
<li><a href="http://drupal.org/project/fancy_slide" target="_blank">Fancy Slide </a>- this module seems 	to  be very new and as such has pretty much no documentation.  If 	its development continues it could become a viable alternative to my 	needs. The biggest problem with this module currently is lack of 	control over the presentation.</li>
</ol>
<p>The following solution uses existing modules.  It seems logical that this technique is already out there, but as I can&#8217;t find it documented, I&#8217;m doing that here.  The main modules you&#8217;ll need:</p>
<ul>
<li><a href="http://drupal.org/project/imageapi">ImageAPI</a></li>
<li><a href="http://drupal.org/project/imagecache">ImageCache</a></li>
<li><a href="http://drupal.org/project/cck">CCK</a>, <a href="http://drupal.org/project/cck">CCK Filefield</a>, <a href="http://drupal.org/project/imagefield">CCK Imagefield</a></li>
<li><a href="http://drupal.org/project/views">Views</a></li>
<li><a href="http://drupal.org/project/thickbox">Thickbox </a>-   for some reason the 	latest version of the Lightbox2 module is creating JS errors when 	mixed with the lastest JQuery version.</li>
</ul>
<p>After installing the modules listed above here&#8217;s what you do:</p>
<div>
<h4>Admin &gt; Site Building &gt; ImageCache</h4>
<p style="padding-left: 30px;">Add a preset, in my case “medium_thumbnail” which is a simple Scale to 128&#215;128 pixels.</p>
</div>
<div>
<h4>Admin &gt; Content Management &gt; Content types</h4>
<div>
<p>Add a new node content type, I called mine “Screenshot.”  There is no need for the “Body.”  Once the basic node type is added go to “Manage Fields” and add the following:</p>
<p>An Image field for the screen shot.  When configuring it enable the “Title text settings” set its input type to textarea (no default value).  Disable the “Description field.”</p>
<ul>
<li>Label: Screenshot</li>
<li>Name:  field_screen  (doesn&#8217;t 	really mater)</li>
<li>Type: File</li>
<li>Form Element: Image</li>
</ul>
<p>The “Screen Gallery” field is my way of organizing multiple galleries.  It may be more correct to use Taxonomy, but this keeps the settings in one place which I like.  You need to add at least one entry in the list of acceptable values.  Please feel free to write me if you think using Taxonomy or another approach is better.</p>
<ul>
<li>Label:  Screen Gallery</li>
<li>Name:  field_gallery</li>
<li>Type: Text</li>
<li>Form Element Select</li>
</ul>
<p>Finally, the Sort Order.  If I have time I may experiment with the Nodequeue module in an attempt to replace this, but for now this provides a way to order the screenshots.  If we use a decimal , and then enter “Integers” (1.0, 2.0) this will leave us room to insert new screenshots between existing ones.</p>
<ul>
<li>Label:  Sort Order</li>
<li>Name:  field_order</li>
<li>Type:  Decimal,  precision = 12 ,  	scale = 2</li>
<li>Form Element:  Text</li>
</ul>
</div>
</div>
<p>At this point you probably want to create one or two Screenshot nodes so that you have something to look at while building the view.  Go to “Create content” &gt; Screenshot.  Enter the Node Title.  Scroll down to the “Screenshot” field and upload an image file; once it has uploaded you should get a “Title” field next to the file where you can enter a description (note that entering HTML here probably won&#8217;t work too well as the contents of this field are output as an attribute).</p>
<p>Now for the final part: creating a View.  Go to  <strong>Admin &gt; Site building &gt; Views</strong> and  “Add.”  Use the settings:</p>
<div style="padding-left: 30px;">
<ul>
<li><span>Type: Grid   &#8211; you could probably 	also use table, etc., but Grid works for me.  Size the width to 	whatever size is going to work for your content.   You may need to 	create a CSS entry to add some padding to the grid cells  e.g.</span>
<div style="font-family:Courier New;">
<div>.views-view-grid td {</div>
<div>padding: 0.8em;</div>
<div>}</div>
</div>
</li>
<li>Row Style:  Fields</li>
<li>Since I have a limited number of 	images, I set, Use Pager: No,  Items to display:  Unlimited.</li>
<li>Filters:
<ul>
<li>Node: Published = Yes</li>
<li>Node: Type = Screenshot</li>
<li>Content: Screen Gallery 		(field_gallery) and then set the “name” of the gallery from one 		of the allowed values you entered in the CCK list.</li>
</ul>
</li>
<li>Sort criteria:
<ul>
<li>Content: Sort Order asc</li>
</ul>
</li>
<li>Fields:
<ul>
<li>Content: Screenshot = Thickbox: 		medium_thumbnail image   &#8211; this option is only available if you&#8217;ve 		installed Thickbox and set at least one ImageCache setting.</li>
<li>Node: Title    &#8211; this will 		display the title of the Node (not the image title) directly under 		the thumbnail.</li>
</ul>
</li>
</ul>
<p>Now save the View.  Mine is called “ccs_screens”, so I can embed it into a Page Node using</p>
<div style="font-family:Courier New;">
<div>&lt;?php</div>
<div>$view = views_get_view(&#8216;ccs_screens&#8217;);</div>
<div>print $view-&gt;execute_display(&#8216;default&#8217;, $args);</div>
<div>?&gt;</div>
</div>
</div>
<p>That&#8217;s it.  You can see our screenshots page at <a href="../../content/cosolvent-screenshots-0">http://www.ipov.net/content/cosolvent-screenshots-0</a></p>
<p>If I have time I&#8217;ll also setup a quick screencast and update this post with a link to it.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.ipov.net%2Fapps%2Fblog%2F2009%2F09%2Fdrupal-6-ajax-screenshot-gallery%2F&amp;title=Drupal%206%20Ajax%20Screenshot%20Gallery" id="wpa2a_2"><img src="http://www.ipov.net/apps/blog/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.ipov.net/apps/blog/2009/09/drupal-6-ajax-screenshot-gallery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash development with open source tools</title>
		<link>http://www.ipov.net/apps/blog/2009/09/flash-dev-environment-with-open-source-tools/</link>
		<comments>http://www.ipov.net/apps/blog/2009/09/flash-dev-environment-with-open-source-tools/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 03:33:30 +0000</pubDate>
		<dc:creator>joseph.gay</dc:creator>
				<category><![CDATA[Flash / Flex]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flashdevelop]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://www.ipov.net/blog/?p=94</guid>
		<description><![CDATA[A start to finish guide for setting up an Actionscript 3 development environment using open source tools that will work within the context of an agile process on Linux, or Windows.]]></description>
			<content:encoded><![CDATA[<p><strong>Why?</strong></p>
<ul>
<li><span style="background-color: #ffffff;">You want to do Flash work that is mostly development oriented. The environment described here will be useful for a programmer or small team using supplements from a designer as opposed to a designer working in the Flash IDE with supplements from a programmer.</span></li>
<li><span style="background-color: #ffffff;">You want a command line interface and a tool chain that can work easily with existing continuous integration and web deployment tools.</span></li>
</ul>
<p><span id="more-94"></span></p>
<p>The following steps will take you through the required set up for a sample project. There is a link to the full source at the end.</p>
<p><strong>Step 1: Download the Flex SDK</strong></p>
<p>Adobe&#8217;s open source <a title="Flex SDK 3 Download" href="http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex3sdk">Flex SDK</a> provides, among other things, an Actionscript compiler binary: mxmlc. It&#8217;s not just useful for compiling mxml based Flex applications however; it can also be used to compile lightweight, pure Actionscript 3 projects. The download will consist of a single zip file which you may extract to a directory of your choice. On windows, I choose c:\flex, and on linux I choose /usr/local/share/adobe-flex/sdk. You&#8217;ll just need to remember the path when you set up your build environment. Note that for the compiler to work, you&#8217;ll need to have Java 1.6+ installed.</p>
<p><strong>Step 2: Download the Flash debugger standalone player and plugins</strong></p>
<p>Ok, so this part isn&#8217;t open source, but you can&#8217;t have Flash these days without Adobe&#8217;s Flash player. The <a title="Adobe Flash Downloads" href="http://www.adobe.com/support/flashplayer/downloads.html">debug flash player</a> will conveniently display a stack trace whenever there&#8217;s an error. The trace will even include line numbers if you build your swfs with the debug flag, which you will see how to do below. The debug enabled browser plugins are installed in the same manner as the normal browser plugins. If you&#8217;re running Windows, installing the ActiveX control will result in having a debug enabled player in IE. On both Linux and Windows, installing the &#8216;Plugin content debugger&#8217; will give you a debug enabled player in browsers like Firefox and Chrome. The standalone player can be placed anywhere. On Linux I&#8217;ve copied the flashplayer executable to /usr/local/bin, which is on my PATH.</p>
<p><strong>Step 3: Install Ant and the Flex SDK Ant tasks</strong></p>
<p>Since the Flex SDK internals are predominately written in Java, Ant is used as the build tool of choice for most Flex and Actionscript 3 projects. Accordingly, Adobe provides a set of Ant tasks for invoking various SDK related commands from within Ant. First <a title="Apache Ant home page" href="http://ant.apache.org">install Ant</a> (if you&#8217;re on a Linux system, you&#8217;re better off using your distribution&#8217;s package manager rather than Apache&#8217;s packages). Copy the file flexTasks.jar from &lt;flex sdk path&gt;/ant/lib to your Ant installation&#8217;s lib folder. On my Ubuntu Jaunty system for example, it was /usr/share/ant/lib. You will also copy from the flex Ant folder the file flexTasks.tasks to your project folder once it is created.</p>
<p><strong>Step 4: Choosing an editor/IDE</strong></p>
<p>Now that you can compile Actionscript files and view the results, you&#8217;ll need to select an Actionscript aware editor or IDE. If you are using Vim, there are a number of syntax files around the web. I&#8217;ve had luck with the ones found on <a href="http://www.abdulqabiz.com/blog/archives/2007/10/12/vim-actionscript-and-mxml-syntax-files/">Adbul Qabiz&#8217;s blog</a> for example. On Emacs, you will find what you need on the <a href="http://www.emacswiki.org">Emacs Wiki</a>, including some <a href="http://www.emacswiki.org/emacs/FlymakeActionscriptThree">FlyMake</a> code (build as you type). If you are running Windows, there is a tailored open source solution available: <a href="http://www.flashdevelop.org/wikidocs/index.php?title=Main_Page">FlashDevelop</a>. FlashDevelop provides IDE functionality for Actionscript 2 and 3, Flex, Air, and haXe. If you&#8217;re accustomed to Eclipse, Visual Studio, NetBeans, etc., you should feel right at home with FlashDevelop.</p>
<p><strong>Step 5: Creating a project template</strong></p>
<p>The main aim here is to build your project by issuing one command from the command line. You&#8217;ll start by creating a project folder, and inside the project folder you will create a file called build.xml for use with Ant. If you intend to collaborate with others on the project, it&#8217;s also a good idea to separate system specific variables into another file. At iPOV, we use a separate file called build-user.properties. Here are samples of both files:</p>
<pre class="brush: xml">&lt;project name="miniplayer" default="build-all" basedir="."&gt;
    &lt;description&gt;
           Builds iPOV Hello World
        To use, :
          1. Copy %flex_sdk_3%/ant/lib/flexTasks.jar  to %ANT_HOME%/lib
          2. Copy build-user.properties.default to build-user.properties
            (so it doesn't get commited to SVN) and
            edit the paths for your install.
          3. Invoke the build "&gt;ant [build-target-name]" (either via commandline of GUI launcher)
    &lt;/description&gt;

    &lt;!-- Import the property definitions. --&gt;
    &lt;property file="build-user.properties" /&gt;
    &lt;property name="PROJECT_NAME" value="ipov_hello-world"/&gt;
    &lt;property name="PROJECT_VERSION" value="1.0.0"/&gt;
    &lt;property name="DEPLOY_DIR" value="bin"/&gt;
    &lt;property name="MAIN_CLASS" value="src/net/ipov/hello_world/Main.as"/&gt;

    &lt;taskdef resource="flexTasks.tasks" classpath="${TASK_HOME}/flexTasks.jar" /&gt;

    &lt;target name="build-all" depends="build-swf,build-debug-swf"/&gt;

    &lt;target name="build-swf" depends="init"&gt;
        &lt;mxmlc file="${MAIN_CLASS}"
            output="${DEPLOY_DIR}/${PROJECT_NAME}-${PROJECT_VERSION}.swf"
            debug="false" optimize="true" fork="true"
            default-background-color="0xffffff" &gt;
            &lt;source-path path-element="src/" /&gt;
        &lt;/mxmlc&gt;
    &lt;/target&gt;

    &lt;target name="build-debug-swf" depends="init"&gt;
        &lt;mxmlc file="${MAIN_CLASS}"
            output="${DEPLOY_DIR}/${PROJECT_NAME}-${PROJECT_VERSION}.swf"
            debug="true" optimize="false" fork="true"
            default-background-color="0xffffff" &gt;
            &lt;source-path path-element="src/" /&gt;
        &lt;/mxmlc&gt;
    &lt;/target&gt;

    &lt;target name="init"&gt;
        &lt;mkdir dir="${DEPLOY_DIR}"/&gt;
    &lt;/target&gt;

&lt;/project&gt;<span style="background-color: #ffffff; font-size: small; "> </span></pre>
<pre class="brush: plain">#
# Copy this file to .user.properties and then edit it to match your system
#
FLEX_HOME=c:/flex3/sdk
TASK_HOME=c:/bin/apache-ant-1.7.1/lib</pre>
<p>Replace ipov_hello-world above with your project name, and replace the net/ipov path with the namespace you will use for your main source files.</p>
<p>If you are using FlashDevelop, you will now create a new AS3 project using Project -&gt; New Project. For Location, browse to your project folder where you have placed the two files above. For Package, type your primary namespace (net.ipov.hello_world in this example). FlashDevelop will create the necessary files and folders for you. Outside of FlashDevelop, you can simply create a folder called src, and inside place folders corresponding to your primary namespace. Then create a file called Main.as inside your primary namespace folder to act as the entry point for your application. Here the content of Main.as in the Hello, World! sample:</p>
<pre class="brush: as3">package net.ipov.hello_world
{
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.text.TextField;

    [SWF(height='300', width='400')]
    public class Main extends Sprite {

        private var _params:Object;

        public function Main():void {
            _params = root.loaderInfo.parameters ? root.loaderInfo.parameters : new Object();

            if (stage) init();
            else addEventListener(Event.ADDED_TO_STAGE, init);

        }

        private function init(e:Event = null):void {
            removeEventListener(Event.ADDED_TO_STAGE, init);
            // entry point
            var helloText:TextField = new TextField();
            helloText.text = "Hello, World!";
            stage.addChild(helloText);
        }

    }

}</pre>
<p>Once you have set up your project folder, invoke the following commands from the root of the project to build and launch the application:</p>
<pre class="brush: plain">~/projects/as3-hello-world $ ant
Buildfile: build.xml

init:

build-swf:
    [mxmlc] Loading configuration file /usr/local/share/adobe-flex/sdk/frameworks/flex-config.xml
    [mxmlc] /home/joseph/projects/as3-hello-world/build/ipov_hello-world-1.0.0.swf (833 bytes)

build-debug-swf:
    [mxmlc] Loading configuration file /usr/local/share/adobe-flex/sdk/frameworks/flex-config.xml
    [mxmlc] /home/joseph/projects/as3-hello-world/build/ipov_hello-world-1.0.0.swf (1021 bytes)

build-all:

BUILD SUCCESSFUL
Total time: 9 seconds
~/projects/as3-hello-world $ flashplayer build/ipov_hello-world-1.0.0.swf</pre>
<p>If you are using FlashDevelop, you can also use Project -&gt; Test Movie (F5 on the keyboard). When prompted to configure the compiler, set your Flex SDK location under AS3Context, and set the standalone Flash player location under FlashViewer.</p>
<p>That should be enough to get started developing AS3 applications. Future articles will include information about unit testing, continuous integration, deployment, and Adobe Captivate Widget development.</p>
<p><a href="http://www.ipov.net/blog/wp-content/uploads/2009/09/as3-hello-world.zip">as3-hello-world-source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ipov.net/apps/blog/2009/09/flash-dev-environment-with-open-source-tools/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

