<?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>Softwyre</title>
	<atom:link href="http://www.softwyre.com/blogs/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.softwyre.com/blogs</link>
	<description></description>
	<lastBuildDate>Tue, 20 Jul 2010 22:58:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Backing Up is a Beautiful Thing</title>
		<link>http://www.softwyre.com/blogs/by-design/backing-up-is-a-beautiful-thing/</link>
		<comments>http://www.softwyre.com/blogs/by-design/backing-up-is-a-beautiful-thing/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 16:36:31 +0000</pubDate>
		<dc:creator>Softwyre Staff</dc:creator>
				<category><![CDATA[By Design]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Hardwyre]]></category>
		<category><![CDATA[Protect]]></category>
		<category><![CDATA[softwyre]]></category>
		<category><![CDATA[Time Machine]]></category>

		<guid isPermaLink="false">http://www.softwyre.com/blogs/?p=540</guid>
		<description><![CDATA[Monday morning I came in and booted up my machine ready to get some work done and to my surprise all I had on the screen was a flashing icon showing that there was no operating system found. My first instinct was to restart the computer, thinking it may just be a fluke error.  Again, [...]]]></description>
			<content:encoded><![CDATA[<p>Monday morning I came in and booted up my machine ready to get some work done and to my surprise all I had on the screen was a flashing icon showing that there was no operating system found. My first instinct was to restart the computer, thinking it may just be a fluke error.  Again, that little icon starts flashing. As my stomach dropped, I remembered that I had made a backup of all my files.  I thought to myself “No problem, I will just have a new drive ordered, get the machine running and just restore my files from the server.” Well that would have been a great idea, if I wanted to put hours of work in to getting the computer back to the same working state as it was when I started.</p>
<p>After talking to one of our engineers about the problem, it was suggested that I just restore from the Time Machine backup.  I haven’t been too familiar with Time Machine in the past; however I figured I would investigate doing this.  After a few minutes on the Apple support site I was convinced that this would work and I was relieved to know that I wouldn’t have to spend hours installing software and searching for the little things, such as the fonts that were installed on the system before the crash.</p>
<p>It took me a bit to locate the OSX disks, as they were stored away, after the move to Softwyre&#8217;s awesome new office.</p>
<p>Once I started the system recovery, I realized that I have never used a recovery system that is so user friendly.  With a few clicks of the mouse the system took care of the rest.  Sure it took a while to recover everything, but Time Machine saved the company and me, hours of manual work.</p>
<p>In conclusion, I must say that this has taught me the beauty of backups.</p>
<p align="center">Are you sure you are backing up?  If not, Contact <a title="Email Us" href="mailto:sales@softwyre.com">Hardwyre/Softwyre</a>, we back it up!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.softwyre.com/blogs/by-design/backing-up-is-a-beautiful-thing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Joomla! Dev &#8211; Template Overrides for Modules/Components</title>
		<link>http://www.softwyre.com/blogs/cat-like-typing/joomla-dev-template-overrides-for-modulescomponents/</link>
		<comments>http://www.softwyre.com/blogs/cat-like-typing/joomla-dev-template-overrides-for-modulescomponents/#comments</comments>
		<pubDate>Tue, 05 May 2009 18:32:53 +0000</pubDate>
		<dc:creator>Softwyre Staff</dc:creator>
				<category><![CDATA[Cat-like Typing]]></category>
		<category><![CDATA[Joomla!]]></category>
		<category><![CDATA[Joomla! Components]]></category>
		<category><![CDATA[Joomla! Custom]]></category>
		<category><![CDATA[Joomla! Dev]]></category>
		<category><![CDATA[Joomla! Modules]]></category>
		<category><![CDATA[Joomla! Templates]]></category>

		<guid isPermaLink="false">http://www.softwyre.com/blogs/?p=484</guid>
		<description><![CDATA[Does the HTML Joomla!'s built-in components spit out bother you?  Would you like to improve it?  Let's look at how overrides can fix that.]]></description>
			<content:encoded><![CDATA[<p>Joomla! isn&#8217;t perfect.  In fact, it&#8217;s pretty far from perfect.  One of my big annoyances is that Joomla! uses tables&#8230; a lot.  I pride my designs on being CSS only.  Tables should be used for tabular data only and definitely not for layout.  Unfortunately Joomla!&#8217;s base components don&#8217;t seem to share the sentiments.   However, while Joomla! doesn&#8217;t always display what we would like it to, it does give us the means to override it and decide for ourselves how it displays.</p>
<p><strong>Overriding Components with Specific Hooks</strong></p>
<p>Okay, let&#8217;s say we&#8217;re building a table to display data for the front or backend of a component.  First we need to have the foresight to realize that having too much data on the page is bad and that we want some pagination.  Since we&#8217;re skilled Joomla! developers (or we&#8217;d like to think we are), we know that Joomla! packs pagination capabilities we can draw upon in the JPagination class.  Check it out in /libraries/html/pagination.php if you haven&#8217;t seen it before.</p>
<p>Fast forward a bit and we&#8217;ve built our table to use JPagination and it&#8217;s great&#8230; except we don&#8217;t like the output and we&#8217;d like to rearrange to look a little nicer.  Well that&#8217;s not a problem at all.  If you took the opportunity to poke through JPagination, you probably noticed this little block of code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$chromePath</span> <span style="color: #339933;">=</span> JPATH_THEMES<span style="color: #339933;">.</span>DS<span style="color: #339933;">.</span><span style="color: #000088;">$mainframe</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getTemplate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>DS<span style="color: #339933;">.</span><span style="color: #0000ff;">'html'</span><span style="color: #339933;">.</span>DS<span style="color: #339933;">.</span><span style="color: #0000ff;">'pagination.php'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">file_exists</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$chromePath</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$chromePath</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'pagination_list_footer'</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> pagination_list_footer<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$list</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_list_footer<span style="color: #009900;">&#40;</span><span style="color: #000088;">$list</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>What this block of code is doing is essentially saying that if /mytemplate/html/pagination.php exists and it has a function called &#8220;pagination_list_footer&#8221; then call that to display the output.  Otherwise call the default class&#8217; &#8220;_list_footer&#8221; function.  All we need to do in this case to get a custom display is create that file and function.</p>
<p><strong>Overriding Component Templates</strong></p>
<p>Overriding components with hooks is rough because many times we don&#8217;t know the hook exists.  Until I sat down and looked through JPagination, I had no idea there was a hook there for an output override.  Unlike those, overriding templates is much easier for us thanks to the great way template files are implemented.</p>
<p>Let&#8217;s look at the directory structure for article of com_content as that is a piece which we will likely want to override fairly often.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">- /com_content
  - /helpers
  - /models
  - /views
    - /archive
	- /article
	  - /tmpl
	    - default.php
		- default.xml
		- form.php
		- form.xml
		- pagebreak.php
		- pagebreak.xml
		- index.html
	- /category
	- /frontpage
	- /section</pre></div></div>

<p>The important things to notice here are the contents of the tmpl directory as those are the pieces we can override.  default.php is the main file we&#8217;re interested in as it controls the display of all articles.  In order to override it, we need to place an override file in our template.</p>

<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">- /templates
  - /ourTemplate
    - /html
	  - /com_content
	    - /article
		  - default.php</pre></div></div>

<p>Once this file and directory structure are in place, Joomla! will call our default.php file when it renders an article.</p>
<p><strong>Overriding Module Templates</strong></p>
<p>This is really no different from components but we should go over it because the module directory structure looks a little bit different (but not too much so).  For this example, let&#8217;s say we&#8217;re going to override mod_mainmenu.  First, we find our template file.</p>

<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">- /modules
  - /mod_mainmen
    - /tmpl
	  - default.php
	  - index.html</pre></div></div>

<p>Next we copy default.php over to our template like so&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">- /templates
  - /ourTemplate
    - /html
	  - /mod_mainmenu
	    - default.php
		- index.php</pre></div></div>

<p>And that&#8217;s it.  We can modify the template default.php and see the changes on the website as Joomla! will prefer that one to its own.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.softwyre.com/blogs/cat-like-typing/joomla-dev-template-overrides-for-modulescomponents/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New cards are in!</title>
		<link>http://www.softwyre.com/blogs/by-design/new-cards-are-in/</link>
		<comments>http://www.softwyre.com/blogs/by-design/new-cards-are-in/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 19:10:49 +0000</pubDate>
		<dc:creator>Softwyre Staff</dc:creator>
				<category><![CDATA[By Design]]></category>
		<category><![CDATA[business cards]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[ink]]></category>
		<category><![CDATA[printer]]></category>
		<category><![CDATA[softwyre]]></category>

		<guid isPermaLink="false">http://www.softwyre.com/blogs/by-design/new-cards-are-in/</guid>
		<description><![CDATA[Well, we picked the first batch of our new cards today and they look fantastic. The color is really good and they really pop. It&#8217;s exactly what we were after&#8230; A strong card that you can&#8217;t miss on your desk. It&#8217;s kind of hard to believe that we got a red that intense on an [...]]]></description>
			<content:encoded><![CDATA[<p>Well, we picked the first batch of our new cards today and they look fantastic. The color is really good and they really pop. It&#8217;s exactly what we were after&#8230; A strong card that you can&#8217;t miss on your desk. It&#8217;s kind of hard to believe that we got a red that intense on an uncoated card.</p>
<p>Jerry at The Print Shop really considers printing an artform and is very careful about putting everything in the right place. He has a strong attention to detail.</p>
<p>Well, now it&#8217;s onto the letterhead.       </p>
<p><a href="http://www.softwyre.com/blogs/wp-content/uploads/2009/04/p-1600-1200-8d7a22d2-c4b7-4302-b88e-af23627d6c04.jpeg"><img src="http://www.softwyre.com/blogs/wp-content/uploads/2009/04/p-1600-1200-8d7a22d2-c4b7-4302-b88e-af23627d6c04.jpeg" alt="" width="225" height="300" class="alignnone size-full wp-image-364" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.softwyre.com/blogs/by-design/new-cards-are-in/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Joomla! Dev &#8211; Module vs Component</title>
		<link>http://www.softwyre.com/blogs/cat-like-typing/joomla-dev-module-vs-component/</link>
		<comments>http://www.softwyre.com/blogs/cat-like-typing/joomla-dev-module-vs-component/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 17:55:58 +0000</pubDate>
		<dc:creator>Softwyre Staff</dc:creator>
				<category><![CDATA[Cat-like Typing]]></category>
		<category><![CDATA[Joomla!]]></category>
		<category><![CDATA[Joomla! Component]]></category>
		<category><![CDATA[Joomla! Custom]]></category>
		<category><![CDATA[Joomla! Dev]]></category>
		<category><![CDATA[Joomla! Module]]></category>

		<guid isPermaLink="false">http://www.softwyre.com/blogs/?p=454</guid>
		<description><![CDATA[When you need a Joomla! custom item, do you choose a module or component?  Let's analyze our their respective strengths to help us decide.]]></description>
			<content:encoded><![CDATA[<p>So you&#8217;re working on a Joomla! powered website and someone asks for something outside the realm of Joomla! and its existing library of extensions.  You know immediately that it&#8217;s going to be a custom something but what kind of something should it be?  There are several options but the two choices that the decision normally falls to are module and component.</p>
<p>Choosing between the two isn&#8217;t so very difficult, it&#8217;s just a matter of picking out the strengths of each and deciding which of them you will take advantage of.</p>
<p><span style="text-decoration: underline;"><strong>Module Strengths</strong></span></p>
<p><strong>Multiple instances on page.</strong> Sometimes there is a need to show things multiple times on a page and for modules this is as easy as copying a module, changing the position of the new one, and enabling it.  Good examples of modules that can take advantage of this are Joomla!&#8217;s mod_banners and mod_mainmenu as you may often want to display ads in various positions on the page or use secondary navigation such as a footer menu in addition to your main menu.</p>
<p><strong>Coexists with components.</strong> Modules do not overwrite the component so you can easily display module contents such as banners and menus alongside components such as com_content which provides your articles.</p>
<p><strong>Smaller than components.</strong> Modules are, quite simply, easier to build than components.  There are fewer files to work with and their use and implementation are fairly straightforward.  In my experience, you write a module to gather some kind of data from a database and display it.</p>
<p><span style="text-decoration: underline;"><strong>Component Strengths</strong></span></p>
<p><strong>Administrative functionality.</strong> Modules have limited configuration ability granted by their parameters however components may have very rich backends with robust feature sets that usually center around full CRUD operations on Joomla!&#8217;s database.</p>
<p><strong>Diverse views.</strong> While the module can parse the request URL and produce different views based on the input provided, the structure for this functionality is better presented in the form of a component as the framework is already there.</p>
<p><strong>Direct menu linking ability.</strong> As components form the content of the page with the template and usually with modules surrounding it, they also provide you the ability to directly link to it.  Something worth noting here is that you do have the option of embedding a module position in an article thus getting a unique page with this module.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.softwyre.com/blogs/cat-like-typing/joomla-dev-module-vs-component/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>While at the printers&#8230;</title>
		<link>http://www.softwyre.com/blogs/by-design/while-at-the-printers/</link>
		<comments>http://www.softwyre.com/blogs/by-design/while-at-the-printers/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 20:18:26 +0000</pubDate>
		<dc:creator>Softwyre Staff</dc:creator>
				<category><![CDATA[By Design]]></category>

		<guid isPermaLink="false">http://www.softwyre.com/blogs/by-design/while-at-the-printers/</guid>
		<description><![CDATA[While I was at The Print Shop today, I got a look at the Heidelberg logo on the side of the printer that&#8217;s producing our business cards. We will give you a sneak peek at the cards soon. I have heard the Heidelberg name for several years and really trust their quality, but I had [...]]]></description>
			<content:encoded><![CDATA[<p>While I was at The Print Shop today, I got a look at the Heidelberg logo on the side of the printer that&#8217;s producing our business cards. We will give you a sneak peek at the cards soon. I have heard the Heidelberg name for several years and really trust their quality, but I had never really taken a look at the logo.</p>
<p>In structure, it&#8217;s sheer brillance as the letter thickness and spacing are spot on. They really take advantage of the horizontal line passing through the entire wordmark, starting with the H, moving 3 E&#8217;s and flying out symmetrically from the G. It looks really good on the printer itself, popping off of the side of it with the thick bold lettering. It makes me wish we were doing a website redesign for them. I could really make that logo stand out on the page. Currently it&#8217;s been pushed to the far right on their current site, which is a real shame. Hopefully their next site will take advantage of what is, in my opinion, a very solid logo that will be great for many years to come.</p>
<p><a href="http://www.softwyre.com/blogs/wp-content/uploads/2009/04/l-1600-1200-25d7a6d0-73f7-455b-87a7-499ba1d33d21.jpeg"><img class="alignnone size-full wp-image-364" src="http://www.softwyre.com/blogs/wp-content/uploads/2009/04/l-1600-1200-25d7a6d0-73f7-455b-87a7-499ba1d33d21.jpeg" alt="" width="300" height="225" /></a></p>
<p>[another iPhone entry]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.softwyre.com/blogs/by-design/while-at-the-printers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Customer Service</title>
		<link>http://www.softwyre.com/blogs/saleswyre/customer-service/</link>
		<comments>http://www.softwyre.com/blogs/saleswyre/customer-service/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 19:15:56 +0000</pubDate>
		<dc:creator>Garland Dunn</dc:creator>
				<category><![CDATA[Saleswyre]]></category>

		<guid isPermaLink="false">http://www.softwyre.com/blogs/?p=446</guid>
		<description><![CDATA[As I look around today&#8217;s business environment, I see a change in one particular area of operations that I find quite alarming.  There is a definite change in how people approach and execute customer service.  What a lot of people don&#8217;t realize is that, in most instances, a happy customer is one who will continue to [...]]]></description>
			<content:encoded><![CDATA[<p>As I look around today&#8217;s business environment, I see a change in one particular area of operations that I find quite alarming.  There is a definite change in how people approach and execute customer service.  What a lot of people don&#8217;t realize is that, in most instances, a happy customer is one who will continue to spend money with your company.  One of the main keys to customer service is setting realistic expectations on the front end and then managing to those expectations.  You must leave nothing to chance and you must not change the rules on your customer.  In order to do this, you must communicate with your customer.  This communication must be ongoing and should not just occur when there are issues that need to be addressed.  Most customers understand that issues are going to come up and that there will be challenges in your business relationship.  How you address those issues, however, says a lot about your business.  A good rule of thumb to follow is to make the resolution to every problem a win/win proposition.  This will help keep your customer happy and keep your business afloat.  Customer service sells!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.softwyre.com/blogs/saleswyre/customer-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First iPhone Blog Entry</title>
		<link>http://www.softwyre.com/blogs/by-design/first-iphone-blog-entry/</link>
		<comments>http://www.softwyre.com/blogs/by-design/first-iphone-blog-entry/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 20:38:11 +0000</pubDate>
		<dc:creator>Softwyre Staff</dc:creator>
				<category><![CDATA[By Design]]></category>

		<guid isPermaLink="false">http://www.softwyre.com/blogs/?p=444</guid>
		<description><![CDATA[Sweet! It&#8217;s my first iPhone based blog entry! I really do like the idea of mobile blogging and it&#8217;s funny, the moment I thought of such a prospect, I knew there already had to be an app for it somewhere. So far, every need I have had from my phone has resulted in a short [...]]]></description>
			<content:encoded><![CDATA[<p>Sweet! It&#8217;s my first iPhone based blog entry! I really do like the idea of mobile blogging and it&#8217;s funny, the moment I thought of such a prospect, I knew there already had to be an app for it somewhere. So far, every need I have had from my phone has resulted in a short search and subsequent download of the right app to fit the bill. </p>
<p>Another example: I am in the process of looking for a new home, I started looking for mortgage calculators online. But then i figured that there had to be one for the iPhone. Turns out there was and now I own Loan Shark ($4.99). Well, actually it&#8217;s on sale for $2.99 at the moment. Darn. Not only does it take care of the mortgage questions, but it does car and personal loans as well. All in a nice, slick interface.  </p>
<p>And actually, this kinda thing has happened quite often, and thanks to the fact that you can download entire apps via 3G, I can immediately take care of the problem. Whatever has come up, there seems to be an app for it. And as I discover more apps, I plan to tell you about them, so stay posted.  </p>
<p>I love the development community that Apple has built. So far it&#8217;s really paying off for the developer AND the end user.</p>
<p>- jrsr     </p>
]]></content:encoded>
			<wfw:commentRss>http://www.softwyre.com/blogs/by-design/first-iphone-blog-entry/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Joomla! Dev &#8211; Admin Component Menu Image</title>
		<link>http://www.softwyre.com/blogs/cat-like-typing/joomla-dev-admin-component-menu-image/</link>
		<comments>http://www.softwyre.com/blogs/cat-like-typing/joomla-dev-admin-component-menu-image/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 07:00:24 +0000</pubDate>
		<dc:creator>Softwyre Staff</dc:creator>
				<category><![CDATA[Cat-like Typing]]></category>
		<category><![CDATA[Joomla!]]></category>
		<category><![CDATA[Joomla! Administrator Menu]]></category>
		<category><![CDATA[Joomla! Component]]></category>
		<category><![CDATA[Joomla! Custom]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.softwyre.com/blogs/?p=421</guid>
		<description><![CDATA[Let me show you how to get your own custom icon/image into a component you've created.]]></description>
			<content:encoded><![CDATA[<p>When we build something, we like to make it look good.  In some circles, this extra effort to make something better or go above and beyond the expected minimum is called &#8220;polish.&#8221;  Products which function well and show great attention to detail are described as &#8220;polished.&#8221;</p>
<p>Now let&#8217;s say you and I are building a Joomla! component.  We want the people using it to regard it as polished.  We want the component to look as good as it works.  We already know it will work amazingly well because we&#8217;re the ones building it (and we&#8217;re awesome) so let&#8217;s focus on making it look at little better.  An easy way to make a component look a little more stylish is by adding a custom menu image.  For example, let&#8217;s have a look at this screenshot:</p>
<p><img class="size-full wp-image-418" title="clt_090420_blandmenu" src="http://www.softwyre.com/blogs/wp-content/uploads/2009/04/clt_090420_blandmenu.png" alt="Bland menu without a custom component or image" width="181" height="252" /></p>
<p>We can easily notice that DOCman has its own custom menu image while the rest have the generic Joomla! component image.  It looks pretty good and really stands out compared to the rest.  Of course, if we make our own component, we end up with it looking like this:</p>
<p><img class="size-full wp-image-419" title="clt_090420_blandmenu2" src="http://www.softwyre.com/blogs/wp-content/uploads/2009/04/clt_090420_blandmenu2.png" alt="Bland menu without a custom image" width="183" height="277" /></p>
<p>Well, we have a component but the image is the Joomla! generic one.  We need to figure out how to change it to a custom image which might be tough but we already have a great example in DOCman so we&#8217;ll analyze where the image comes from and how DOCman got its image there to do it ourselves.</p>
<p>We need to know where the image is coming from and the answer lays within the jos_components table.  Among all the various columns in the table, we find the column called &#8220;admin_menu_img&#8221; and that&#8217;s exactly what we&#8217;re looking for.  All the generic ones have &#8220;js/ThemeOffice/component.png&#8221; while DOCman has &#8220;http://blahblahblah/administrator/components/com_docman/images/dm_documents_16.png&#8221; in its field.</p>
<p>Now that we know where the image is coming from, the rest is pretty easy from here (because we&#8217;re awesome).  We need two things:  a query to put our image in that field and a way to call that query during installation.  To understand how to do the first part properly, we must understand the second.</p>
<p>Joomla! has a section in its installer.xml marked with &#8220;&#8221; which represents files that will be called during installation.  These allow you to do fun and interesting things like what we&#8217;re doing.  First let&#8217;s make a file and put it in there.</p>
<p>In the install.xml:</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;installfile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>install.com_catliketyping.php<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/installfile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Next we create our file in the admin folder and our image in the images folder.  The folder structure should look about like this:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">com_catliketyping &gt; admin &gt; install.com_catliketyping.php
com_catliketyping &gt; admin &gt; images &gt; softwyre_16.png</pre></div></div>

<p>Now let&#8217;s fill in our php install file:</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: #990000;">defined</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'_VALID_MOS'</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Restricted access'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'_CLT_INSTALLER_ICONPATH'</span><span style="color: #339933;">,</span> JURI<span style="color: #339933;">::</span><span style="color: #004000;">root</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>
  <span style="color: #0000ff;">'administrator/components/com_catliketyping/images/'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> com_install<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span>	
	<span style="color: #990000;">global</span> <span style="color: #000088;">$database</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$database</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setQuery</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;
		UPDATE #__components 
		SET admin_menu_img = '
			&quot;</span><span style="color: #339933;">.</span>_CLT_INSTALLER_ICONPATH<span style="color: #339933;">.</span>
			<span style="color: #0000ff;">&quot;softwyre_16.png' 
		WHERE name='Cat-Like Typing'&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$database</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Let&#8217;s stop for a moment and look at what just happened here:</p>
<p>Line 1:      Start PHP.<br />
Line 2:      Die if someone is maliciously accessing this script<br />
Line 3-4:    Let&#8217;s get the path to our images folder (post-installation)<br />
Line 6:      We define the function called during installation &#8211; com_install<br />
Line 8:      We get our global database variable<br />
Line 10-15:  This is the query that will set our component&#8217;s image to the chosen one<br />
Line 16:     We query the database<br />
Line 18:     We return true because all went well (no error testing for now)</p>
<p>And that&#8217;s it.  If we reinstall our component, we see our menu now looks like this:</p>
<p><img class="size-full wp-image-420" title="clt_090420_greatmenu" src="http://www.softwyre.com/blogs/wp-content/uploads/2009/04/clt_090420_greatmenu.png" alt="Great menu with a custom component and image" width="182" height="277" /></p>
<p>Other things to note are that the image is 16&#215;16 (pixels) and that it should probably be on a matching grey background or possibly transparent.</p>
<p>Enjoy your custom menu images!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.softwyre.com/blogs/cat-like-typing/joomla-dev-admin-component-menu-image/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Joomla! Dev &#8211; The Wonders of JURI</title>
		<link>http://www.softwyre.com/blogs/cat-like-typing/joomla-dev-the-wonders-of-juri/</link>
		<comments>http://www.softwyre.com/blogs/cat-like-typing/joomla-dev-the-wonders-of-juri/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 15:18:59 +0000</pubDate>
		<dc:creator>Softwyre Staff</dc:creator>
				<category><![CDATA[Cat-like Typing]]></category>
		<category><![CDATA[Joomla!]]></category>
		<category><![CDATA[Joomla! Custom]]></category>
		<category><![CDATA[JURI]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.softwyre.com/blogs/?p=409</guid>
		<description><![CDATA[Learn how to use Joomla!'s JURI class to make URI/URL manipulation easier now than ever before.]]></description>
			<content:encoded><![CDATA[<p>So when you work on Joomla! components and modules (or at least when I do), you run into a need to manipulate the request <a href="http://en.wikipedia.org/wiki/URI">URI</a>/<a href="http://en.wikipedia.org/wiki/Uniform_Resource_Locator">URL</a>.  This is particularly useful when you want to create permalinks without some creative server/application level URL rewriting.  Joomla! provides a very nice class called JURI for doing this.  JURI is actually just a wrapper around the <a href="http://www.php.net/parse_url">PHP class parse_url</a> but it is an incredibly useful one.</p>
<p>I&#8217;m not going to go through the whole class as the documentation is readily available <a href="http://docs.joomla.org/JURI">here</a> for you to read at your own leisure however I will go through a few usage examples where it has come in rather handy for me.</p>
<p>The first uses are rather innocuous:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$currentURI</span> <span style="color: #339933;">=</span> JURI<span style="color: #339933;">::</span><span style="color: #004000;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$myURI</span> <span style="color: #339933;">=</span> JURI<span style="color: #339933;">::</span><span style="color: #004000;">getInstance</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$myURL</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>These two lines each give me a JURI object.  The first produces a JURI object based off the current request URL/URI.  The second creates a JURI object from the URL sent in.  In some cases, I want to modify the current URI (figure out where I am in the menu system, analyze query string variables passed in, etc) and in some cases I want to build my own new URL.  JURI gives me the ability to do both easily.</p>
<p>So now that we have our URI/URLs, we can start playing with them and the area that we generally want to play with the most is the <a href="http://en.wikipedia.org/wiki/Query_string">query string</a>.  JURI provides three methods that see the most use in this area:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$myVar</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$currentURI</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getVar</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'myVar'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$currentURI</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setVar</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'myVar'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'myNewVarValue'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$currentURL</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">delVar</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'myVar'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The first line above gets the variable from the query string that looks like &#8220;myVar=&#8230;&#8221;  The second line sets that same variable in the query string to a new one (&#8221;myVar=myNewVarValue&#8221;).  The third line removes the variable from the query string if it exists.  These three methods let me do pretty much whatever I want to the query string.</p>
<p>Of course, there are times when you want to rebuild the query string and not worry about what values are already present and JURI has a solution for that as well:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$myURIAndPath</span> <span style="color: #339933;">=</span> JURI<span style="color: #339933;">::</span><span style="color: #004000;">getCurrent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>This will get you the current URI without the query string allowing you to repopulate it yourself.</p>
<p>None of these things are amazing or revolutionary but they&#8217;re useful, fairly intuitive, and a much cleaner alternative to calling parse_url directly.  If you find yourself manipulating URLs/URIs in Joomla! then give them a try.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.softwyre.com/blogs/cat-like-typing/joomla-dev-the-wonders-of-juri/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Loyalties</title>
		<link>http://www.softwyre.com/blogs/by-design/loyalties/</link>
		<comments>http://www.softwyre.com/blogs/by-design/loyalties/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 18:12:16 +0000</pubDate>
		<dc:creator>Softwyre Staff</dc:creator>
				<category><![CDATA[By Design]]></category>

		<guid isPermaLink="false">http://www.softwyre.com/blogs/?p=403</guid>
		<description><![CDATA[In today's wrecked economy, it is becoming increasingly difficult to hold onto clients. Customer loyalty is something that you truly need to earn and it takes a while to get to the point that a person feels completely comfortable dealing with a business.]]></description>
			<content:encoded><![CDATA[<p>In today&#8217;s wrecked economy, it is becoming increasingly difficult to hold onto clients. Customer loyalty is something that you truly need to earn and it takes a while to get to the point that a person feels completely comfortable dealing with a business.</p>
<p>Web development is really no different. If you deliver what you say you are going to deliver, and do it in a timely and reasonable fashion, then you would hope that a client would appreciate that and respond to it positively. Although this is typically the case, sometimes you just can&#8217;t win everyone over. There are always folks that will never be satisfied. I am not saying this to point anyone out, quite the contrary&#8230; I say this because it is a fact of life and of doing business. You can&#8217;t please everybody.</p>
<p>I think that&#8217;s one thing that really gets me down about the Web business&#8230; there is always something that seems to come up and tarnishes otherwise well executed work. And a lot of the time, its not something in the work itself, but a personal preference that in the long run has little bearing on the project itself. Luckily, these incidents are few and far between the good times and ususally pass quickly.</p>
<p>What made me think of all of this was a video I watched at lunch today. Its footage (from another country) of a dog pulling another injured dog off of the road after it had been hit. I am going to post the link here but not the video, as it’s a little disturbing to watch. Its certainly not for the squeamish but certainly worth the watch.</p>
<p><a href="http://www.youtube.com/watch?v=ofpYRITtLSg&amp;feature=player_embedded">If you&#8217;ve ever questioned a dog&#8217;s capacity to be loyal, you won&#8217;t anymore.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.softwyre.com/blogs/by-design/loyalties/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
