<?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>Oracle of ONE1 &#187; web development</title>
	<atom:link href="http://dvector.com/oracle/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://dvector.com/oracle</link>
	<description>Obscure words of unity</description>
	<lastBuildDate>Wed, 31 Aug 2011 21:25:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Manipulating SVG Drawings</title>
		<link>http://dvector.com/oracle/2011/01/25/manipulating-svg-drawings/</link>
		<comments>http://dvector.com/oracle/2011/01/25/manipulating-svg-drawings/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 09:00:19 +0000</pubDate>
		<dc:creator>one1</dc:creator>
				<category><![CDATA[graphics]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[svg]]></category>

		<guid isPermaLink="false">http://dvector.com/oracle/?p=444</guid>
		<description><![CDATA[I first looked at using SVG in web sites about 5 or 6 years ago. At that time, a special browser plugin was needed to view an SVG and the javascript tools were not developed. I abandoned that first effort, even though the benefits of SVG were obvious. Flash to today: All of the current [...]]]></description>
			<content:encoded><![CDATA[<p>I first looked at using SVG in web sites about 5 or 6 years ago. At that time, a special browser plugin was needed to view an SVG and the javascript tools were not developed. I abandoned that first effort, even though the benefits of SVG were obvious. Flash to today: All of the current versions of the major browsers support SVG and the tools to manipulate the image are ready for general usage.</p>
<p><span id="more-444"></span></p>
<h3>What is an SVG?</h3>
<p>An<a href="http://en.wikipedia.org/wiki/Scalable_Vector_Graphics"> SVG is a vector graphic</a> that is described by its XML file. That means, for example, that each shape may be created or manipulated by simply modifying the XML descriptive text. I use the open source <a href="http://inkscape.org/">Inkscape software</a> to create my base graphics.</p>
<h3>About this Tutorial</h3>
<p>The intent is to create a simple SVG with layers (groups in SVG) and then show or hide those layers dependent upon user actions on a web page. The demonstrated example may be viewed at <a href="http://bd-designs.com/">bd-designs.com</a>. All links in this post and all references used to develop the demonstration may be<a href="http://www.delicious.com/bujanga/manipulating-svg-drawings"> found via my delicious</a>. Let&#8217;s get started.</p>
<h2>The SVG Drawing</h2>
<h3>Create the drawing</h3>
<ol>
<li>Import a scanned drawing into layer1 of a new Inkscape drawing</li>
<li>Add a layer for the head
<ol>
<li>Use the oval drawing tool to draw the head as a simple vector shape</li>
</ol>
</li>
<li>Add a layer for the body
<ol>
<li>Use the Bezier curves tool to draw the body sides</li>
<li>Use the oval tool to draw the body bottom</li>
</ol>
</li>
<li>Continue to add layers and vector shapes until the drawing with colors is complete</li>
<li>Delete layer1, the layer with the scanned bitmap</li>
<li>Save the file</li>
</ol>
<h3>Derive Layer Information from SVG</h3>
<p>An SVG is a XML formatted text file. This means it may be viewed and edited in any basic text editor. For this demonstration, we are interested in only a few of the XML fields.</p>
<p>The <em>&lt;g&gt;&#8230;&lt;/g&gt;</em> tag means group in SVG and is similar to the concept of layers when drawing. The <em>id</em> is the name of the group. Make a note of all of the groups and relate them to the layers you created in your drawing, shown by<em> inkscape:label</em>.</p>
<h3>Set Scale and Viewbox</h3>
<p>How your image appears in an HTML page is controlled by a number of settings, both in SVG and in HTML. For this demonstration, the whole SVG should appear in the page and its size will be set by HTML. Therefore in SVG set:</p>
<ul>
<li>viewBox=&#8221;0 0 width height&#8221;</li>
<li>width=100%&#8221;</li>
<li>height=&#8221;100%&#8221;</li>
</ul>
<p>The <em>width </em>and <em>height </em>attributes already exist but you may have to add the <em>viewBox </em>attribute just after <em>width </em>and <em>height</em>.</p>
<h2>The HTML Page</h2>
<p>The intent of the page is to show how to draw a ballerina. The various steps are to be shown in an accordion menu. When each step is clicked, the drawing should show the layers associated with that step. When a user clicks back any number of steps, those subsequent layers should be hidden. This is done using the jQuery UI Accordion and svgweb.</p>
<h3>Load the Libraries</h3>
<p>In <em>head</em> place the following or similar code:</p>
<pre>&lt;script src="svgweb/src/svg.js" data-path="svgweb/src/"&gt;&lt;/script&gt;
&lt;link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/&gt;
&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"&gt;&lt;/script&gt;
&lt;script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"&gt;&lt;/script&gt;
</pre>
<h3>Set the On-Load Actions</h3>
<p>In <em>head</em> place the following or similar code:</p>
<pre>&lt;script&gt;
  $(document).ready(function() {
    // SET THE UI ACCORDION
    // TO JQUERY UI
    $("#accordion").accordion();

    // ACCESS THE SVG ON LOAD
    // TO SVGWEB
    window.addEventListener('SVGLoad', function() {
      var doc = document.getElementById('ballerina').contentDocument;
      // GET THE SVG ELEMENT
      var lay_head = doc.getElementById('layer2');
      ... other layers
      // SET THE SVG ELEMENT'S ATTRIBUTE
      var attr = 'display:none';
      lay_head.setAttribute('style', attr);
      ... other attribute sets
    }, false);
   });
&lt;/script&gt;
</pre>
<p>At this point, the document is ready to have its accordion menu fully implemented in HTML and the SVG may be displayed in its initial conditions. Some modifications to the above javascript will be needed later but lets move on to  the HTML portion.</p>
<h3>Accordion Container</h3>
<p>The markup of your accordion container needs pairs of headers and content panels:</p>
<pre>&lt;div id="accordion"&gt;
  &lt;h3&gt;&lt;a href="#"&gt;&lt;b&gt;Introduction&lt;/b&gt;&lt;/a&gt;&lt;/h3&gt;
    &lt;div&gt;&lt;p&gt;Here you will learn how to draw a ballerina.&lt;/p&gt;&lt;/div&gt;
  &lt;h3&gt;&lt;a href="#"&gt;&lt;b&gt;Step 1: Head&lt;/b&gt;&lt;/a&gt;&lt;/h3&gt;
    &lt;div&gt;&lt;p&gt;Draw a circle.&lt;/p&gt;&lt;/div&gt;
  ... more accordion items
&lt;/div&gt;
</pre>
<h3>Image Object</h3>
<p>If you are working with HTML 5, you may insert an SVG image directly but I find it more familiar to use the object tag. The object HTML must make exceptions for earlier versions of IE. The width and height set here are the actual display width and heights. If the <em>viewBox </em>was properly set earlier, the SVG will scale to fit the dimensions set here.</p>
<pre>&lt;!--[if !IE]&gt;--&gt;
  &lt;object data="images/ballerina04.svg" type="image/svg+xml" id="ballerina" width="282" height="416"&gt;
&lt;!--&lt;![endif]--&gt;
&lt;!--[if lt IE 9]&gt;
  &lt;object src="images/ballerina04.svg" classid="image/svg+xml" width="282" height="416" id="ballerina"&gt;
&lt;![endif]--&gt;
&lt;!--[if gte IE 9]&gt;
  &lt;object data="images/ballerina04.svg" type="image/svg+xml" width="282" height="416" id="ballerina"&gt;
&lt;![endif]--&gt;
  &lt;/object&gt;
</pre>
<h3>Toggle Layers</h3>
<p>Once this point is reached, the document successfully displays the accordion menu and the SVG graphic in its initialized state. What is missing, is the ability to change the layers displayed depending on the accordion menu selected. More specifically, we need to act upon the change event of the accordion menu and that action depends upon which menu is active. Conveniently, the jQuery accordion menu provides just what we need.</p>
<pre>// GET THE INDEX OF THE ACTIVE MENU OPTION
var active = $( ".selector" ).accordion( "option", "active" );
</pre>
<p>and</p>
<pre>// CALLBACK FUNCTION TO ACT ON THE CHANGE EVENT
$( ".selector" ).accordion({
  change: function(event, ui) { ... }
});
</pre>
<p>Its time to put it all together and modify the previously created call to create the accordion menu:</p>
<pre>// SET THE UI ACCORDION
// TO JQUERY UI
$("#accordion").accordion({
  change: function(event, ui) {
    var active = $('#accordion').accordion('option', 'active');
    // active is a 0-based index to the active menu option
    // MANIPULATE THE SVG
    // GET SVG OBJECTS
    var obj = document.getElementById('ballerina');
    var doc = obj.contentDocument;
    var lay_head = doc.getElementById('layer2');
    var lay_body = doc.getElementById('layer3');
    ... other layers

    // SET SVG ATTRIBUTES
    var attr = 'display:inline';
    switch(active){
      case 1:
        lay_head.setAttribute('style', attr);
        break;
      case 2:
        lay_body.setAttribute('style', attr);
        break;
      ... other cases
    }

    // SET SVG ATTRIBUTES = HIDE
    var attr = 'display:none';
    switch(active){
      case 0:
        lay_head.setAttribute('style', attr);
      case 1:
        lay_body.setAttribute('style', attr);
      ... other cases
    }
  }
});
</pre>
<h2>Conclusion</h2>
<p>The page is now complete with basic interactivity. Please do view the source of the example page, it has the full, working code for that menu and that image. I am certain you will think of many uses for layered SVG images and that is just a sample of what can be done using SVG and javascript.</p>
<div id="_mcePaste" style="width: 1px;height: 1px;overflow: hidden">The markup of your accordion container needs pairs of headers and content panels</div>
]]></content:encoded>
			<wfw:commentRss>http://dvector.com/oracle/2011/01/25/manipulating-svg-drawings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Release of ggis-InlinePost v1.1</title>
		<link>http://dvector.com/oracle/2010/06/26/release-of-ggis-inlinepost-v1-1/</link>
		<comments>http://dvector.com/oracle/2010/06/26/release-of-ggis-inlinepost-v1-1/#comments</comments>
		<pubDate>Sat, 26 Jun 2010 16:12:35 +0000</pubDate>
		<dc:creator>one1</dc:creator>
				<category><![CDATA[ggis InlinePost]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[ggis-inlinepost]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://dvector.com/oracle/?p=399</guid>
		<description><![CDATA[The version 1.1 of ggis-InlinePost is released into the wild on June 26, 2010. It is available for download from the WP plugin directory. This release fixes a few minor issues, converts to standard shortcode conventions, and has been tested with the recently released WordPress 3.0.
Changelog

FIX: Shortcodes within an inlined post are now processed. Uses [...]]]></description>
			<content:encoded><![CDATA[<p>The version 1.1 of ggis-InlinePost is released into the wild on June 26, 2010. It is available for download from the <a href="http://downloads.wordpress.org/plugin/ggis-inline-post.1.1.zip">WP plugin directory</a>. This release fixes a few minor issues, converts to standard shortcode conventions, and has been tested with the recently released WordPress 3.0.</p>
<h3>Changelog</h3>
<ol>
<li>FIX: Shortcodes within an inlined post are now processed. Uses do_shortcode().</li>
<li>FIX: Comment metadata now shows correct number of comments made.</li>
<li>NEW: Change code convention to shortcode which allows use of the standard shortcode functions. Old insert methods are deprecated but will still work.</li>
<li>NEW: Recursive inlining now allowed when using new shortcode styling. Protection against infinite loop coded.</li>
<li>NEW Added the showcontent attribute to control display of the post&#8217;s content.</li>
</ol>
<p><span id="more-399"></span></p>
<h3>Shortcode convention</h3>
<p>Users will mainly notice that the code used to inline a post has been updated to the shortcode convention.</p>
<pre>&#91;ggisinlinepost id="%id" attribute1="%attr1" attribute2="%attr2"]
</pre>
<p>The previous code convention while deprecated will still work: <em>&#91;-ggis-inlinepost id=&#8221;%id&#8221; titletag=&#8221;%tag&#8221;-]</em>.</p>
<p>Usage is covered on the <a href="http://dvector.com/oracle/ggis-inlinepost/">ggis-inlinepost page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dvector.com/oracle/2010/06/26/release-of-ggis-inlinepost-v1-1/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Release of ggis-InlinePost v1.0</title>
		<link>http://dvector.com/oracle/2010/06/03/release-of-ggis-inlinepost-v1-0/</link>
		<comments>http://dvector.com/oracle/2010/06/03/release-of-ggis-inlinepost-v1-0/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 20:06:49 +0000</pubDate>
		<dc:creator>one1</dc:creator>
				<category><![CDATA[ggis InlinePost]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[ggis-inlinepost]]></category>

		<guid isPermaLink="false">http://dvector.com/oracle/?p=377</guid>
		<description><![CDATA[Today, I release the version 1.0 of ggis-InlinePost. It is available for download from the WP plugin directory. This release fixes the improper newline formatting reported by a few users. Additionally, it adds or enhances the following:

FIX: Correct paragraph/newline formatting.
NEW: Inlined post now recognizes the &#8216;more&#8217; shortcode.
NEW: If a post requires a password, the password [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I release the version 1.0 of ggis-InlinePost. It is available for download from the <a title="Download ggis-inline-post.1.0" href="http://downloads.wordpress.org/plugin/ggis-inline-post.1.0.zip">WP plugin directory</a>. This release fixes the improper newline formatting reported by a few users. Additionally, it adds or enhances the following:</p>
<ol>
<li>FIX: Correct paragraph/newline formatting.</li>
<li>NEW: Inlined post now recognizes the &#8216;more&#8217; shortcode.</li>
<li>NEW: If a post requires a password, the password entry form will be displayed.</li>
<li>UPDATE: Improved display of metadata.</li>
</ol>
<p><span id="more-377"></span></p>
<p>The metadata uses the following CSS classes for display:</p>
<ul>
<li>entry-meta</li>
<li>meta-sep</li>
<li>meta-prep</li>
</ul>
<p>Please post your questions or comments on this post here.</p>
]]></content:encoded>
			<wfw:commentRss>http://dvector.com/oracle/2010/06/03/release-of-ggis-inlinepost-v1-0/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Dynamically Load a Model &#8211; CakePHP</title>
		<link>http://dvector.com/oracle/2009/10/20/dynamically-load-a-model-cakephp/</link>
		<comments>http://dvector.com/oracle/2009/10/20/dynamically-load-a-model-cakephp/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 13:54:46 +0000</pubDate>
		<dc:creator>one1</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[cakephp]]></category>

		<guid isPermaLink="false">http://dvector.com/oracle/?p=346</guid>
		<description><![CDATA[Occassionally, I need to load an unrealted model into a controller. There are a number of ways to do this but some are better than others. The following is taken from reply by gwoo to a discussion thread.

App::import() only includes the file. So you would new to create a new instance every time. This is [...]]]></description>
			<content:encoded><![CDATA[<p>Occassionally, I need to load an unrealted model into a controller. There are a number of ways to do this but some are better than others. The following is taken from reply by gwoo to a discussion thread.</p>
<p><span id="more-346"></span></p>
<p>App::import() only includes the file. So you would new to create a new instance every time. This is not recommended</p>
<p>ClassRegistry::init() loads the file, adds the instance to the a object map and returns the instance. This is an easy and convenient way to access models.</p>
<p>Controller::loadModel(); Uses ClassRegistry::init() adds the model to a property of the controller and also allows persistModel to be enabled.</p>
<p>While you &#8220;can&#8221; do any of these things, you should ask yourself why you are creating dependencies on models that are not natural to the controller. If you &#8220;have&#8221; to do use any of these, then I would do so in reverse order of the way i described them. IE, Controller::loadModel() then CR::init() and actually I never use App::import() for models.</p>
]]></content:encoded>
			<wfw:commentRss>http://dvector.com/oracle/2009/10/20/dynamically-load-a-model-cakephp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cloud Words</title>
		<link>http://dvector.com/oracle/2009/03/23/cloud-words/</link>
		<comments>http://dvector.com/oracle/2009/03/23/cloud-words/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 14:19:27 +0000</pubDate>
		<dc:creator>one1</dc:creator>
				<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://dvector.com/oracle/?p=224</guid>
		<description><![CDATA[I have thrown together a simple proof of concept (POC) in cakePHP for displaying cloud words. What are cloud words? Word frequencies displayed in a cloud similar to a tag cloud. A tag cloud may be found on right column of this blog site. The POC may be tested here.
What does it do?
Cloud Words allows [...]]]></description>
			<content:encoded><![CDATA[<p>I have thrown together a simple proof of concept (POC) in cakePHP for displaying cloud words. What are cloud words? Word frequencies displayed in a cloud similar to a tag cloud. A tag cloud may be found on right column of this blog site. The POC may be tested <a title="Cloud Words test" href="http://cake.6ruffg04t.com/cloud_words">here</a>.</p>
<h2>What does it do?</h2>
<p>Cloud Words allows for the upload and analysis of plain text and MS Word files. MS Word files are converted to plain text for the analysis. The analysis simply does a count total for each word in the file. A simple word count is actually not very useful since the most common words will dominate the count list. The most common words are generally not very useful for understanding the contents of a document. &#8220;THE&#8221; is the single word found most often in documents.</p>
<p><span id="more-224"></span></p>
<p>In order to improve the usefulness of the word count, some filtering must be done. For this POC, I am only applying a single filter though for real-life usage I would recommend additional filters. The filter used in this POC removes the 200 most common words from the word count. This count is saved and associated with the file.</p>
<p>The clouds are created from the word counts. A composite cloud, which sums the counts from all the files, displays the top 100 words in a cloud. Each file&#8217;s cloud displays the top 50 words. In the cloud, the order of the words is randomized and the size of the word is mathematically related to its count total.</p>
<p>Clicking a word shows all files that word is found in. The files are listed in word frequency order and the count is displayed.</p>
<h2>Best comparison usage</h2>
<p>This is a very simple solution and therefore it is very easy to get poor or unbalanced results. For the best results, follow these suggestions:</p>
<ol>
<li> Documents should be of similar length</li>
<li>Documents should have a similar formatting purpose (letter vs report)</li>
<li>Each document should have a reasonable word distribution</li>
</ol>
<p>To illustrate my meaning, I will review some testing documents I used and how they affected the results. I used 5 documents: one 1-page letter, one 1-page conversational policy, one 2-page conversational policy, one 1-page executive summary, and one 6-page retention of records policy. The retention of records policy completely overwhelmed all the other documents. This was due to its length but also due to its repetition of key words such as &#8220;year&#8221;.</p>
<h2>Recommended improvements</h2>
<p>The word count process works well. Improvements can be made in cleaning the resulting word counts and making them more useful. This could be done by a few processes:</p>
<ol>
<li>Additional filters applied to the word count list
<ul>
<li>Aggregate plural and singular forms</li>
<li>Removal of MS Word formatting clues</li>
<li>User added white list words &#8211; must include in count</li>
<li>User added black list words &#8211; must exclude from count</li>
</ul>
</li>
<li>Statistical monitoring
<ul>
<li>Ensure each document has a reasonable word distribution</li>
<li>Statistically weight word count by document length</li>
</ul>
</li>
</ol>
<p>Some improvements to the cloud display could also be made. These include:</p>
<ol>
<li>Show list of word contexts when hovering over word</li>
<li>Allow white list or key word list highlighting in cloud &#8211; different color perhaps</li>
<li>Highlight words that are found in a comparison document. This could be a job description or call for papers.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://dvector.com/oracle/2009/03/23/cloud-words/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Consequence of Mac\Unix\Win Format Text Files</title>
		<link>http://dvector.com/oracle/2008/12/08/consequence-of-macunixwin-format-text-files/</link>
		<comments>http://dvector.com/oracle/2008/12/08/consequence-of-macunixwin-format-text-files/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 16:45:14 +0000</pubDate>
		<dc:creator>one1</dc:creator>
				<category><![CDATA[karma]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[comment error]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://dvector.com/oracle/?p=174</guid>
		<description><![CDATA[Last week, I was working on updating some old PHP code from 1999 and 2000. Now this is working code in PHP4 but was not quite up to todays standards. As an example it used the PHP code start tag of &#60;? instead of the much better &#60;?php. Also needed to make certain that all [...]]]></description>
			<content:encoded><![CDATA[<p>Last week, I was working on updating some old PHP code from 1999 and 2000. Now this is working code in PHP4 but was not quite up to todays standards. As an example it used the PHP code start tag of <strong><em>&lt;?</em></strong> instead of the much better <strong><em>&lt;?php</em></strong>. Also needed to make certain that all of my variables were declared and that no global or unsanitized variables were used. Overall not a big deal just a good use for grep or sed.</p>
<p>A WinXP laptop is my where I write most of my code and the files are then uploaded to a FreeBSD server. I do not and have never owned a Mac. Usually for this type of action, I would run grep or sed on my FreeBSD server but instead decided to try Windows Grep. I ran Windows Grep with the proper regular expressions and voila, my PHP start tags were updated. Next, the files were uploaded to a new server for testing. ERRORS, errors everywhere.</p>
<p>About half of the updated files were kicking out errors or failing completely. The failed files were rather random and the code looked just fine in the editor. What was going on?</p>
<h2>Comments not recognized by PHP</h2>
<p><span id="more-174"></span></p>
<p>Digging a little it became obvious that the comments were not being properly recognized by PHP. Multi-line comments were fine but not the single line comments.</p>
<pre>// This type of comment would cause all following
// lines to also be viewed as a comment.

/* This type of comment worked fine and as expected.
*/</pre>
<p>Try searching for this type of prolem in Google and you will find NOTHING. I dug into my php.ini files, read relevant PHP documentation, searched many different terms, spent a few hours on IRC, and reformatted code. Nothing worked.</p>
<p>Finally I thought, well maybe my character encoding is incorrect (getting desparate by now). So I fired up my code in Notepad++, went to view the character encoding and noticed that the file was in Mac format. Huh? Well now, that could be a problem so I changed the file to Windows format, uploaded it to the server, and it worked!</p>
<h2>Proper text format conversions</h2>
<p>Windows uses a pair of CR and LF characters to terminate lines. UNIX (Including Linux and FreeBSD) uses an LF character only. Apple uses a CR character only. Time to dig into the text toolbox. On my FreeBSD, I have used the win2unix tool before, this time, I would use mac2unix. Sorry Windows, this type of work is much easier done in FreeBSD.</p>
<p>Uploaded all of my files to FreeBSD, ran mac2unix on all files, and then downloaded the files back to Windows. Comments in PHP now work as expected.</p>
<h4>As a side note: It is important to be aware that text files should be uploaded in your FTP client in ASCII format. This allows for the automatic conversion between the different file formats.</h4>
]]></content:encoded>
			<wfw:commentRss>http://dvector.com/oracle/2008/12/08/consequence-of-macunixwin-format-text-files/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Donate to GGIS Plugins and Modules</title>
		<link>http://dvector.com/oracle/2008/11/04/donate-to-ggis-plugins-and-modules/</link>
		<comments>http://dvector.com/oracle/2008/11/04/donate-to-ggis-plugins-and-modules/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 16:40:52 +0000</pubDate>
		<dc:creator>one1</dc:creator>
				<category><![CDATA[joomla]]></category>
		<category><![CDATA[karma]]></category>
		<category><![CDATA[nonprofit]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[donate]]></category>
		<category><![CDATA[Milwaukee Achiever]]></category>
		<category><![CDATA[red cross]]></category>

		<guid isPermaLink="false">http://dvector.com/oracle/?p=160</guid>
		<description><![CDATA[I regularly develop GPL open source plugins, modules, and widgets for Joomla and WordPress. On ocassion, a users has asked if a donation would help support this development. The comment alone is a great compliment and incentive. Cash is always greatly appreciated but in this case, if you find one of my plugins useful please [...]]]></description>
			<content:encoded><![CDATA[<p>I regularly develop GPL open source plugins, modules, and widgets for Joomla and WordPress. On ocassion, a users has asked if a donation would help support this development. The comment alone is a great compliment and incentive. Cash is always greatly appreciated but in this case, if you find one of my plugins useful please make a donation to one of these great organizations instead.</p>
<p><a title="Red Cross Donate" href="http://www.redcrossinsewis.org/donate"><strong>American Red Cross in Southeastern Wisconsin</strong></a> &#8211; Provides relief to victims of disasters and helps people prevent, prepare for, and respond to emergencies in Dodge, Kenosha, Milwaukee, Ozaukee, Racine, Walworth, and Waukesha Counties.</p>
<p><a title="Milwaukee Achiever Donate" href="http://milwaukeeachiever.org/donations/"><strong>Milwaukee Achiever Literacy Services</strong></a> &#8211; Inspires and empowers adult learners to gain the skills necessary to enrich their lives through education and training in an atmosphere of mutual acceptance and respect.</p>
]]></content:encoded>
			<wfw:commentRss>http://dvector.com/oracle/2008/11/04/donate-to-ggis-plugins-and-modules/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Plugin ggis-InlinePost for WordPress</title>
		<link>http://dvector.com/oracle/2008/11/02/plugin-ggis-inlinepost-for-wordpress/</link>
		<comments>http://dvector.com/oracle/2008/11/02/plugin-ggis-inlinepost-for-wordpress/#comments</comments>
		<pubDate>Sun, 02 Nov 2008 23:20:04 +0000</pubDate>
		<dc:creator>one1</dc:creator>
				<category><![CDATA[ggis InlinePost]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[ggis-inlinepost]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://dvector.com/oracle/?p=155</guid>
		<description><![CDATA[New plugin for Wordpress developed. It should be available on the their site shortly. In the meantime, it will be available for download here.
If you have any comments or questions, please add them here.
//UPDATE 5/11/2010
Usage is convered on the ggis-inlinepost page.
]]></description>
			<content:encoded><![CDATA[<p>New plugin for Wordpress developed. It should be available on the their site shortly. In the meantime, it will be available for <a title="ggis Inline Posts" href="http://wordpress.org/extend/plugins/ggis-inline-post/">download here</a>.</p>
<p>If you have any comments or questions, please add them here.</p>
<p>//UPDATE 5/11/2010</p>
<p>Usage is convered on the <a href="http://dvector.com/oracle/ggis-inlinepost/">ggis-inlinepost page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dvector.com/oracle/2008/11/02/plugin-ggis-inlinepost-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Plugin ggis-scdesc for Joomla</title>
		<link>http://dvector.com/oracle/2008/10/31/plugin-ggis_sc_desc-for-joomla/</link>
		<comments>http://dvector.com/oracle/2008/10/31/plugin-ggis_sc_desc-for-joomla/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 22:16:09 +0000</pubDate>
		<dc:creator>one1</dc:creator>
				<category><![CDATA[plg_ggis-sc-desc]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://dvector.com/oracle/?p=128</guid>
		<description><![CDATA[A 1.5 native plugin enabling you to display section or category descriptions within content. This is a very simple, single purpose plugin that does only and exactly what it claims. On occassion, an article may wish to include the description from a section or category. Copying that description means it may need to be updated [...]]]></description>
			<content:encoded><![CDATA[<p><strong>A 1.5 native plugin enabling you to display section or category descriptions within content.</strong> This is a very simple, single purpose plugin that does only and exactly what it claims. On occassion, an article may wish to include the description from a section or category. Copying that description means it may need to be updated in multiple places if changes are made. With this plugin, just update the section/category description and all of the articles remain current.</p>
<p><span id="more-128"></span></p>
<h3>Installation</h3>
<ol>
<li>Download the <a title="ggis-scdesc_latest.zip" href="https://www.gruffgoat.com/clients/ftp/joomla/ggis_scdesc/ggis_scdesc_latest.zip">latest version of the plugin here</a></li>
<li><a title="ggis-scdesc_latest.md5" href="https://www.gruffgoat.com/clients/ftp/ggis-scdesc/ggis-scdesc_latest.md5"></a></li>
<li>Install via the standard Joomla interface</li>
<li>Enable the plugin</li>
<li>Minimal parameters may be set by clicking the plugin in the Plugin Manager</li>
</ol>
<h3>Basic usage (either the catid or the secid, not both, is required)</h3>
<p>{ggis-scdesc catid=&#8221;10&#8243;} or<br />
{ggis-scdesc secid=&#8221;10&#8243;}</p>
<h3>Example of usage with parameters</h3>
<p>{ggis-scdesc catid=&#8221;10&#8243; showtitle=&#8221;0&#8243; showname=&#8221;0&#8243; showdesc=&#8221;1&#8243;}</p>
<h3>Parameters:</h3>
<ul>
<li>catid: id of category</li>
<li>secid: id of section</li>
<li>showtitle: Show the linked title(0/1, default=0)</li>
<li>showname: Show the name(0/1, default=0)</li>
<li>showdesc: Show the description(0/1, default=1)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://dvector.com/oracle/2008/10/31/plugin-ggis_sc_desc-for-joomla/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Module ggis-tabnews for Joomla</title>
		<link>http://dvector.com/oracle/2008/10/31/module-ggis-tabnews-for-joomla/</link>
		<comments>http://dvector.com/oracle/2008/10/31/module-ggis-tabnews-for-joomla/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 21:57:29 +0000</pubDate>
		<dc:creator>one1</dc:creator>
				<category><![CDATA[mod_ggis-tabnews]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[ggis_tabnews]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://dvector.com/oracle/?p=124</guid>
		<description><![CDATA[Module ggis-tabnews is a module developed for Joomla 1.5. Basically, it takes all articles in a category or section and outputs them to a tabbed box. It depends on the Joomla Works Tabs &#38; Slides plugin for the tabbing javascript. A future release may remove that dependency.
Where to get it?
This is currently not a public [...]]]></description>
			<content:encoded><![CDATA[<p>Module ggis-tabnews is a module developed for Joomla 1.5. Basically, it takes all articles in a category or section and outputs them to a tabbed box. It depends on the <a title="Joomla Works" href="http://www.joomlaworks.gr/">Joomla Works</a> Tabs &amp; Slides plugin for the tabbing javascript. A future release may remove that dependency.</p>
<h3>Where to get it?</h3>
<p>This is currently not a public release but if you are interested in it, please drop a comment on this article.</p>
<h3>Expected Usage</h3>
<p>This module was developed for a very specific usage and has not been developed or tested beyond that. I do however, see a wide variety of applications for this module. A client wished to display offsite class locations by county in a tabbed box. Additionally; the person editing the locations, while familiar with the basic editor interface on the front-end, was not expected to handle much complexity in layout.<br />
<span id="more-124"></span></p>
<h4>Structural setup</h4>
<ol>
<li>Create a section named Section Locations</li>
<li>Create categories under Section Locations for each class type, ie.
<ul>
<li>Category Lifeguarding Locations</li>
</ul>
<ul>
<li>Category Lifeguarding Instructor Locations</li>
</ul>
<ul>
<li>Category Water Safety Instructor Locations</li>
</ul>
</li>
<li>Under each category, create an article for each county listing that county&#8217;s offsite class locations, ie.
<ul>
<li>Article Dane County</li>
<li>Article Dodge County</li>
<li>Article Milwaukee County</li>
<li>Article Waukesha County</li>
</ul>
</li>
<li>Control the display of the county articles by setting the publish flag</li>
</ol>
<p>The outline of the above should be similar to:</p>
<ol>
<li>Section Locations
<ol>
<li>Category Lifeguarding Locations
<ol>
<li>Article Dane County</li>
<li>Article Dodge County</li>
<li>Article Milwaukee County</li>
<li>Article Waukesha County</li>
</ol>
</li>
<li>Category Lifeguarding Instructor Locations
<ol>
<li>Article Dane County</li>
<li>Article Dodge County</li>
<li>Article Milwaukee County</li>
<li>Article Waukesha County</li>
</ol>
</li>
<li>Category Water Safety Instructor Locations
<ol>
<li>Article Dane County</li>
<li>Article Dodge County</li>
<li>Article Milwaukee County</li>
<li>Article Waukesha County</li>
</ol>
</li>
</ol>
</li>
</ol>
<p></p>
<h4>Make it easy for the editor</h4>
<ol>
<li>Add a menu item to the user&#8217;s menu that links directly to Section Locations
<ul>
<li>This gives the editor easy access to the offsite class locations articles</li>
</ul>
</li>
</ol>
<p></p>
<h4>Using the module</h4>
<ol>
<li>Use the mod_ggis-tabnews module that pulls all articles in a category and properly formats and outputs them</li>
<li>Make a copy of the module for each category
<ul>
<li>For the example&#8217;s case, 3 copies</li>
</ul>
</li>
<li>Rename the copies
<ul>
<li>Tabbed Lifeguarding</li>
<li>Tabbed Lifeguard Instructor</li>
<li>Tabbed Water Safety Instructor</li>
</ul>
</li>
<li>Assign each copy a unique position. This is easily done by typing your unique position into the Postion dropdown when editing the module.
<ul>
<li>lifeguard_locations</li>
<li>lifeguardinstructor_locations</li>
<li>watersafetyinstructor_locations</li>
</ul>
</li>
<li>Set the module&#8217;s parameters as appropriate. Especially set either the Section ID or the Category ID.</li>
</ol>
<p></p>
<h4>Displaying the module</h4>
<p>For the example, the module is intended to display in an article. That is why a unique, non-templated position was used in step 4 above. Modules may displaye<br />
d in any article using Joomla&#8217;s <em>loadposition</em> plugin. In our example, there are 3 descriptive articles titled;</p>
<ul>
<li>Lifeguarding</li>
<li>Lifeguard Instructor</li>
<li>Water Safety Instructor</li>
</ul>
<p>To display the module in the Lifeguarding article, include the plugin text where you wish the module to appear.</p>
<ul>
<li>(loadposition lifeguard_locations}</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://dvector.com/oracle/2008/10/31/module-ggis-tabnews-for-joomla/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

