<?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/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>Raised By Turtles &#187; Posts on Drupal, Wordpress and other Web Dev topics</title>
	<atom:link href="http://raisedbyturtles.org/category/webdev/feed/" rel="self" type="application/rss+xml" />
	<link>http://raisedbyturtles.org</link>
	<description>None of the News that's Fit to Print</description>
	<lastBuildDate>Wed, 09 May 2012 01:51:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Change CNAME Record to run Google Apps on Your Domain at Moniker</title>
		<link>http://raisedbyturtles.org/cname-record-for-google-apps/</link>
		<comments>http://raisedbyturtles.org/cname-record-for-google-apps/#comments</comments>
		<pubDate>Wed, 09 May 2012 01:44:35 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://raisedbyturtles.org/?p=737</guid>
		<description><![CDATA[The Moniker.com interface is a bit confusing, so here's a step-by-step instruction on how to change the CNAME record for a domain at Moniker]]></description>
			<content:encoded><![CDATA[<p>I know this seems like a pretty obscure topic, but if you have a domain that you&#8217;re using for a website, but want to also be able to use it for Google Apps, you need to edit the CNAME record at your registrar. I found this rather inobvious at Moniker, so after I figured it out, I created a Google Knol about this. It seemed to be appreciated, but Google closed down the whole Knol system so I figured I would just copy it here so it&#8217;s still available somewhere. </p>
<ol>
<li>Log in to your account at <a href="http://moniker.com">Moniker.com</a>.</li>
<li>Go to the <b>My Domains</b> page (i.e. your domain manager)</li>
<li>Select the <b>check box</b> for the domain you want to set up for Google Apps</li>
<li>On the domain management menu, click <b>IP</b> (third tab from the left in current layout)</li>
<li>Click on <b>Template Manager</b></li>
<li>Click on <b>Create New Template</b> and name it something like Google Apps</li>
<li>Delete all selections for that template by clicking the check box next to each entry and saving the template. This gives a blank slate to work with.</li>
<li>Under <b>Add Template Records</b> -&gt; <b>Select Record Type</b> choose to add a CNAME record.</li>
<li>Your <b>hostname </b>will be the verification code Google gave you (something like googleffffffffab123456) and your address will be that code appended to the Google domain (so in this example googleffffffffab770727.google.com). Note that there is no <i>http </i>or anything like that.</li>
<li>Go to the <a href="http://www.google.com/support/a/bin/answer.py?hl=en&amp;answer=47283">Google help page on creating a CNAME record</a> and scroll down to the <b>Check the status of your CNAME record</b> and enter the address with no http prefix (again googleffffffffab770727.google.com in this example). It should verify in a couple of hops if it&#8217;s working right.</li>
<li>Go back to your Google Apps admin panel and verify your domain.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://raisedbyturtles.org/cname-record-for-google-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thinking about URLs and Overthinking about URLs</title>
		<link>http://raisedbyturtles.org/urls-slashes-dynamic-site/</link>
		<comments>http://raisedbyturtles.org/urls-slashes-dynamic-site/#comments</comments>
		<pubDate>Tue, 01 May 2012 19:02:16 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://raisedbyturtles.org/?p=733</guid>
		<description><![CDATA[A discussion about trailing slashes on URLs for "listing" pages got me thinking about what a URL is and should be. Yeah, this post is a bit obsessive.]]></description>
			<content:encoded><![CDATA[<p>Rethinking URLs and Trailing Slashes</p>
<p>There is a level a geekiness beyond which few will tread. This likely crosses that frontier. I&#8217;m prompted to write this as a result of a discussion on WebmasterWorld about which URLs should and should not have a trailing slash. One person threw out the idea that URLs for files should not have slashes and URLs for directories should. While that seems sensible, when talking about the architecture of a website, that terminology makes no sense anymore in the context of dynamic websites. In that case, we would be better off to speak of <a href="http://en.wikipedia.org/wiki/Graph_(mathematics)">vertices or nodes and edges</a> or, if the site is strongly hierarchical, we could think in terms of <a href="http://en.wikipedia.org/wiki/Tree_(data_structure)">branch nodes and leaf nodes</a>. In the latter case, we might (or might not) consider branch nodes to be &#8220;directories&#8221; or &#8220;folders&#8221; and leaf nodes to be &#8220;files&#8221;, even though the URLs no longer bear any relation to some underlying structure on a hard disk.</p>
<p>So all of this got me thinking about the characteristics of a modern URL and what it means for thinking about site structure and the implications that has for building listing pages that are good for the user first and foremost and good for search engine optimization as a consequence. Of course, in my usual elliptical way, it will take me 2,000 words to cycle back around to that point.</p>
<p>Before I go into all that, to stave off pedantic comments about URLs versus URIs, a URL is simply &#8220;a type of URI that identifies a resource via a representation of its primary access mechanism (e.g., its network &#8216;location&#8217;), rather than by some other attributes it may have&#8221; according to the <a href="">W3C report on the subject</a> (see also <a href="http://danielmiessler.com/study/url_vs_uri/">Dan Meissler&#8217;s summary</a>). Translation: what you see in your browser address bar is always a URL and all URLs are URIs (actually Chrome breaks this by omitting the protocol identifier, but close enough). A URL was once considered a specific subset of URIs, but can now be considered a colloquial but useful (as per the W3C report) rather than a technical term.</p>
<h2>URLs Are Abstract</h2>
<p>In the old days, it was usual for URLs to reveal something about server architecture, and you still see this on some sites (especially ASP sites on Windows servers). Examples are URLs like:</p>
<ol>
<li>http://example.com/page.html</li>
<li>http://example.com/page.php</li>
<li>http://example.com/category/</li>
<li>http://example.com/index.php?p=123</li>
</ol>
<p>In the first two examples, the file extension suggests that the URL is pointing at a file, and that #1 is a simple HTML file that will be fed directly to the client (i.e. browser) as it exists on the server, while #2 is a PHP file, which needs to be evaluated by the PHP processor on the server, which will then feed the actual data to the client. In #3, especially since it is on the same domain as the others, we assume because of the trailing slash that it points to a directory, that is a collection of files on the server hard disk. In the final example, the URL suggests that it points to a file and that file is getting a parameter passed to it and the variable &#8220;p&#8221; will have the value &#8220;123&#8243;. </p>
<p>Now of course, this could all be wrong. We&#8217;re making an assumption that the URL indicates something about the server. However, early on Tim Berners-Lee proposed the <em>Axiom of Opacity of URIs</em> which states simply:</p>
<blockquote><p>The only thing you can use an identifier for is to refer to an object. When you are not dereferencing, you should not look at the contents of the URI string to gain other information.</p></blockquote>
<p>source: Tim Berners-Lee, <a href="http://www.w3.org/DesignIssues/Axioms.html">Universal [<em>sic</em>] Resource Identifiers — Axioms of Web Architecture</a>, 1996.</p>
<p><em>Dereferencing</em> is just a tech geek way of saying <a href="http://www.w3.org/2001/tag/doc/httpRange-14/2007-05-31/HttpRange-14#sec-information-resources">retrieving the resource</a> which is a tech geek way of saying displaying the page or image.</p>
<p>So in other words, the URL should only tell you and only does tell you how to locate the thing you&#8217;re looking for. It should not and ultimately does not expose the underlying system that is finding that thing. This axiom was usually ignored in the early days of the web because it was so easy to make a URL point to a file or a directory on the hard drive of the server. So out of laziness, URLs betrayed a lot about the server architecture, but this was a consequence of laziness, not an inherent and certainly not a desirable characteristic of a URL.</p>
<p>In my own case, like all beginners at the time, I started with simple URLs that mapped directly to specific files using the actual file names, including file extensions. One of the reason I started building my own content management system (CMS), though, was that the lack of abstraction bothered me. I hadn&#8217;t read any of this stuff by Tim Berners-Lee, but I just felt that storage location and addressing should not be so tightly tied to each other. </p>
<p>As a former programmer, I believed in having an abstraction layer between the user interface and the underlying technology. However, at the time I built my first pages, I was writing my dissertation in history. As a scholar, having URLs point to the host, directory, subdirectory and file location was like having call numbers point to the building, floor, shelf and shelf position of a book, rather than some abstract naming scheme like the <a href="http://www.loc.gov/catdir/cpso/lcco/">Library of Congress classification</a>. We do not expect the call number of a book to reveal anything about the architecture of the storage facility and I could see no reason why the URL of the &#8220;resource&#8221; would betray anything about the architecture of the server. Rather, the LC call number is based on the <em>information architecture</em> of the LC system without reference to the <em>physical architecture</em> of the building holding the books. It seemed only natural to me that my site URLs should be based on the information architecture of the site, without reference to the server setup.</p>
<p>This observation set me on the path of creating my own content management systems where the page content was split among as many database tables as necessary and the URL was simply an entry in yet another table. The URL table had a column with the URL and that was keyed to some number or whatever that told the program how to put together the page. At this point, the URL was a pure abstraction. </p>
<p>Eventually, I began looking for an open-source alternative to my custom CMS, which as a spare-time project of one guy had substantial limitations. One of the things that initially attracted me to <a href="http://drupal.org">Drupal</a> was that it offered complete URL abstraction, using a lookup table as I was doing in my custom CMS. Now, ten years later, Drupal remains my CMS of choice, even though WordPress and many others now have similarly convenient URL abstraction (yes, this blog is on WordPress — I like it for blogging or very simple brochure sites; I like Drupal for almost everything else).</p>
<p>In 1997, to get good URL abstraction, I needed to build a system that had URL abstraction as a basic component and for that I had to know a programming language and be able to interface with a database. Most people were still hand-coding HTML at the time. Only a small number of people, either through reading or just thinking about it, knew about the Axiom of URI Opacity or, as I conceived it, URL Abstraction. Those that did, often did not have the technical means to achieve it. So we came to think of URLs as being somehow related to server technology. And we came to think of branch and leaf nodes in terms of directories and files, and we differentiated directories from files by the presence of absence of trailing slashes and file extensions.</p>
<p>Flash forward to 2012. Beginners are now more likely to install WordPress than to learn to hand code HTML. And WordPress and most other CMS now have very convenient URL Abstraction built in. So I now see abstract URLs, that is URLs that are simply a lookup column in a database, as the norm. The old-school URLs that tell you something about the machine architecture are a dying breed. And good riddance. by implication, the idea that a URL should differentiate a directory or listing from a file or page becomes problematic, as we&#8217;ll see.</p>
<h2>URLs As API</h2>
<p>If URLs are abstract and are just a lookup column in a table, what does that mean? Among other things, it means that they no longer are a server hardware interface, they are a sort of Application Programming Interface. They are a means not simply of looking up a resource, but of interacting with the underlying program through an abstracted interface. I say the interface is abstract because I don&#8217;t know what a given URL does once captured by the program (because URI Opacity is a fundamental principle), only that it does <em>stuff</em>. But as a Drupal developer, I can grab any part of the URL and create very different results, routing data through one template or another based on the second or third or fourth term of the URL. </p>
<p>In effect, when I build a site in a system like Drupal with abstract URLs, I can make any part of the URL fire any sort of action, in effect exposing an API to users and designers. Yes, the URL still tells the server how to &#8220;dereference a resource&#8221; but the underlying program can treat any and all parts of the URL as a parameter and in arbitrary ways (i.e. any part can have any meaning/implication). This is a natural consequence of opacity and abstraction.</p>
<h2>URLs are Content</h2>
<p>This may stretch the definition of content a bit, but think about what an abstract URL becomes. It is a column in a lookup table, which means that from an information storage point of view, it is identical to the meta title, the H1 tag content, the nagivation menu items and the body of the page, the latter of which may be assembled from many different tables. </p>
<p>We will commonly use the URL as the key to figure out which item to look up in the other tables, but I may decide to list all pages of a certain taxonomic category, in which case the category is the lookup criteria and the URL is simply data.</p>
<p>Is it content? I would say that ideally it is in the sense that it contains actual information that tells the user, search engines and site editors what the page is about. If it is stored like any other data and it conveys information about the page like any other data, is it not page-specific content? If you&#8217;re paying attention, it might appear that passing information about the page through the URL violates the axiom of URI opacity. However, URI opacity refers to how the user agent is to treat the URI, not whether or not it can convey information to a reader about the meaning and content of the resource that is referenced. In the case of a web page served via HTTP to a browser, it means that the browser is not to make assumptions about how to handle the page based on any component of the URL (file extension, presence/absence of a query string). It is, rather, the job of the HTTP headers to pass this information and the browser to do what it&#8217;s told. So URI opacity means opaque to the user agent, not necessarily to the user!</p>
<h2>Directories Are Abstract</h2>
<p>Since URLs are abstract, opaque and serve as API and content, what then is the distinction between &#8220;directory&#8221; and &#8220;file&#8221;. In the discussion that prompted this, someone said that directories are lists of pages. I can see that definition working on a classic server setup where when you have a URL that points to a directory and you allow the user to have the &#8220;index view&#8221;. In that case you get a list of files in that directory. In that case, we typically want (and depending on server setup may even need) a trailing slash to indicate what we&#8217;re looking at. But such a view is a gross violation of the principle of abstaction. It&#8217;s fine for a file server, but not for a website. </p>
<p>If we switch to a dynamic site built on Drupal (and to a much lesser extent WordPress), we quickly lose all sense of listing pages as directories. To take a very simple example, my <a href="http://yosemiteexplorer.com/nature/flowers">Yosemite flower identifier page</a> is what would be a classic &#8220;listing&#8221; page. And yet, what do we find there?</p>
<ul>
<li><strong>Rich Structured Data</strong>. What&#8217;s here is being pulled from several different database tables to put together a list, yes, but not really a mere list of pages and certainly not a list of files. It has a photo, the common name (which is the only part linked to the page for that specific flower), the Latin name (genus and species) and the Family name. This is not merely a listing or link to the page, but a subset of data on the page. This particular page does not have any introductory content, but it could easily prepend a 30,000 word discourse on the native plants of Yosemite to the listing. In which case, is it primarily a <em>list</em> or primarly a <em>page</em>? And what possible meaning do those terms then have? In any case, the terms &#8220;directory&#8221; and &#8220;file&#8221; have no meaning at all here.</li>
<li><strong>Arbitrary Data Collections: Infinite <em>Directories</em> for a Given Set of <em>Pages</em></strong>. The structured data presented here is arbitrary. I could list these same pages and have the strucutred data show as paragraphs rather than columns, I could have columns with color and number of petals rather than taxonomy. I can have a virtually infinite number of presentations for this same listing of pages. Because we have abstracted URLs, collections of pages are arbitrary, abstract themselves and blur the line between listing and page. The distinction between branch nodes and leaf nodes still makes sense, but both become &#8220;pages&#8221; (though in Drupal parlance only leaf nodes are &#8220;nodes&#8221;).</li>
<li><strong>The URL is an API</strong>. The user has access to various select boxes to create a custom listing page. This is simply offering the user a convenient means to hack the URL, which is to say, the API for this list. Again, thinking in terms of a URL that points to a directory loses all meaning.</li>
</ul>
<h2>Who Cares?</h2>
<p>So who cares whether or not URLs are abstract and whether or not a trailing slash is added to a URL? More to the point, what does this have to do with anything practical? I would say there are substantial implications here for the design of pages, specifically branch node pages. The most important of them is this: if the distinction between directories and files is meaningless, between listings and pages has become inobvious, and if we see all page-specific parts of the page as &#8220;content&#8221;, this suggest something to us about site architecture. </p>
<p>The main thing it suggests is that we need to look for the &#8220;value add&#8221; that a listing has. If it is a mere listing, does it help the user or merely add one click layer to her quest to find relevant information? The value add might be a nice introduction and guide to the category, with most popular and best pages highlighted. In the case of my flower finder page, the value add over a straight list is that people can filter by characteristics they know in order to get a small set of photos from which they can, perhaps, visually identify the flower.</p>
<p>All of this has me thinking in terms of paying more attention to the content of my branch nodes, as it were. It has me thinking that laziness and sloth lead me to create simple listing pages, but these have little value to the user and they also make it harder for the search engines to differentiate one collection of pages from another. So ideally, every branch node becomes a significant content page, a guide to both user and search engine and, I would say, to site editor to sharpen her sense of the information architecture of the site. As you can see, sadly, the organizational principle of Raised By Turtles is basically to put things in the blender and then pour… but that&#8217;s work for another day.</p>
]]></content:encoded>
			<wfw:commentRss>http://raisedbyturtles.org/urls-slashes-dynamic-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WAMP Server Debugging Tips</title>
		<link>http://raisedbyturtles.org/wamp-server-debugging-tips/</link>
		<comments>http://raisedbyturtles.org/wamp-server-debugging-tips/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 17:30:54 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://raisedbyturtles.org/?p=717</guid>
		<description><![CDATA[My brother was having trouble getting WAMP Server running on his machine. This is the process I took him through to get it running. These tips apply equally to XAMPP or any other install of an Apache server on Windows. If you don&#8217;t know, WAMP and XAMPP are installers that let you set up a [...]]]></description>
			<content:encoded><![CDATA[<p>My brother was having trouble getting <a href="http://www.wampserver.com/en/">WAMP Serve</a>r running on his machine. This is the process I took him through to get it running. These tips apply equally to <a href="http://www.apachefriends.org/en/xampp.html">XAMPP</a> or any other install of an Apache server on Windows. If you don&#8217;t know, WAMP and XAMPP are installers that let you set up a webserver quickly and easily on a Windows machine, usually for testing or whatnot (in this case, to give my brother a sandbox to play in to test out WordPress). These are pretty basic tips — if you&#8217;ve set up WAMP before and run virtual hosts and all that, this is probably not worth more than a quick skim. It&#8217;s oriented at people struggling with the most common, basic problems (locating document root, making sure port 80 is available and things like that).</p>
<p>First things first. <strong>Reboot</strong> of your computer after install (not just a standby/hibernate). Though rare, it can happen that the http server can&#8217;t access port 80 and therefore can&#8217;t start (port 80 is the default for webservers). If you don&#8217;t know what that means, that&#8217;s fine. Just read on.</p>
<p>So now you&#8217;ve rebooted and it&#8217;s still not working, so we want to find out whether it&#8217;s on the WordPress end or the server end.</p>
<ul>
<li>Can you <strong>access a text file</strong> through your browser using http (i.e. not opening the file directly, but through the server)? Let&#8217;s say you have a <em>readme.txt</em> on your local server. If you go to <em>http://localhost/readme.txt</em> (assuming that exists), will that come up? If that works, than your http server is fine and the issue is with WordPress. </li>
<li>If you get a <strong>Page Not Found</strong> error (also known as a 404), that means the server is running, but it doesn&#8217;t have a file named readme.txt in the root directory. If you think it does, you&#8217;ll need to figure out which directory WAMP sees as your server root. To figure this out, find out where WAMP is on your computer. Typically, unlike most applicationsm, WAMP installs to <em>C:\wamp</em>, but it could be in your <em>Program Files</em> directory depending on how you installed it. There you want to find your <em>httpd.conf</em> file which is going to be in a location similar to <em>C:\wamp\bin\apache\Apache2.2.11\conf</em>. In the httpd/conf file, look for places where DocumentRoot is set. It will have one global setting and <em>may</em> have additional settings depending on how things are set up (if you have additional virtual hosts set up). The first one should be where localhost runs. So <strong>verify that DocumentRoot points to where your files are actually stored</strong>. Now try to load the readme.txt file<br />
    again. </li>
<li>If that works we can now <strong>make sure that PHP</strong> is up and running right. Create a file that has just this one line in it:<br />
  &lt;?php phpinfo(); ?&gt;<br />
  Now save that to something like <em>info.php</em> in your server root and just go to <em>http://localhost/info.php</em>. That should bring up a long page of output about your PHP setup. If you are just getting a blank white page when you go somewhere you expect to open a PHP file, that means WAMP is running, but you have either errors or no content in your application. That&#8217;s a whole different debugging process.</li>
</ul>
<h2>Assuming you can&#8217;t bring up a simple text file.</h2>
<p>So you&#8217;ve done all that, and things just don&#8217;t happen when you try to open http://localhost. I&#8217;ve had this happen fairly often because I&#8217;ve had Windows (especially Vista) turn on Microsoft&#8217;s IIS server after automatic updates. When this happens, IIS grabs port 80, it&#8217;s not available for Apache and your web server can&#8217;t start. So you run automatic updates and suddenly Apache and WAMP and all that go away. So we need to get rid of IIS and open up port 80.</p>
<ul>
<li> Via the Control Panel
<ul>
<li> Open up Programs and Features</li>
<li> Select Turn Windows Features on or off</li>
<li> Navigate to IIS (Internet Information Services) and just turn all that junk off. Deselect it all.</li>
<li> Restart</li>
</ul>
</li>
<li>Via the Services Manager
<ul>
<li> in the Start menu, type Services. This should bring up the Services icon. Click it to open</li>
<li> Scroll down to Windows Web Publishing Service and right click and choose properties</li>
<li> Change the startup behavior from Automatic to Disabled.</li>
<li>reboot</li>
</ul>
</li>
</ul>
<p>If you&#8217;ve rebooted and you still can&#8217;t get Apache started, check that something else isn&#8217;t blocking port 80. So from the Windows command prompt (go to Run and type <em>cmd</em>) type:</p>
<p>&gt; netstat -aon</p>
<p>then check for a line that has port 80 appended to an IP address, for example:</p>
<p>TCP 255.255.165.21<strong>:80</strong> 0.0.0.0:0 LISTENING 832</p>
<p>This tells us that Process 832 is using port 80. Go the task Manager to check the PID of 832 and terminate it if it&#8217;s not WAMP. Now try to start WAMP. If it does, you have figured out the problem, but you will want to figure out why that process is starting up and whether you can either stop it from launching when you boot or get it to use another port. I&#8217;ve found that Skype is common offender and it has a setting in the Skype options to make sure it does not use port 80.</p>
<p>As with any complex application, there is room for all sorts of other things to go wrong, but in practice I&#8217;ve found that in most simple cases, this will get you up and running.</p>
]]></content:encoded>
			<wfw:commentRss>http://raisedbyturtles.org/wamp-server-debugging-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tax Time: Getting Sales and Shipping Data out of Ubercart</title>
		<link>http://raisedbyturtles.org/sales-tax-shipping-data-ubercart/</link>
		<comments>http://raisedbyturtles.org/sales-tax-shipping-data-ubercart/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 03:53:47 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[ubercart]]></category>

		<guid isPermaLink="false">http://raisedbyturtles.org/?p=703</guid>
		<description><![CDATA[We needed to grab a special report in time for tax season. Fortunately, with a bit of SQL it's easy t grab pretty much anything you want from Ubercart]]></description>
			<content:encoded><![CDATA[<p>A client needed to know how much he had charged in sales tax in the state of California in 2011, the total for those orders, and the amount charged to the customer for shipping. This is because, as it turns out, shipping is not taxable by the state of California, but any amount over and above the actual amount paid to the shipper <em>is taxable</em>. So in other words, if UPS charges you $2 to ship the package, but you charged $4 for shipping, the second two dollars is taxable. This is a bit of problem in this case because the client uses a flat rate for shipping, which means in California, the cost of shipping is probably high on most orders, and therefore taxable.</p>
<p>You can pull this data from Ubercart simply enough but it requires a few subqueries to get all the data you need. This is because both the sales data and shipping are in the same table, namely <em>uc_order_line_items</em>. So you need to pull each line item from the table as a separate subquery.</p>
<p>There&#8217;s one other gotcha. Ubercart carries tax through to four decimal places in the database, so you need to round that to the nearest penny, as Ubercart does on checkout. This gives you a spreadsheet with all the values you need, minus the actual amount paid for shipping, which you&#8217;ll have to pull from Quickbooks or whereever.</p>
<p>It&#8217;s possible, also, that you&#8217;ll have to adjust for your server time if your server is in another time zone. In other words, you may need to adjust the timestamp to take that into account. And of course, Ubercart stores your order dates and times as Unix timestamps, so we have to take that into account when we do whatever conversions we need. Fortunately MySQL handles Unix timestamps with no problem.</p>
<p>When all is said and done, we end up with the following query:</p>
<pre class="brush: sql; title: ; notranslate">
SELECT FROM_UNIXTIME(o.created,&quot;%Y-%m-%d&quot;) AS 'Date', o.order_id AS 'Order ID',
    tax.sales_tax AS `Sales Tax`, shipping.shipping AS 'Shipping Charged',
    o.order_total AS 'Order Total', o.billing_postal_code AS 'Zip Code', o.billing_city AS 'City', z.zone_name AS 'State'
FROM
    (SELECT ROUND(amount,2) AS sales_tax, order_id FROM uc_order_line_items WHERE TYPE LIKE 'tax') AS tax,
    (SELECT amount AS shipping, order_id FROM uc_order_line_items WHERE TYPE LIKE 'shipping') AS shipping,
    uc_orders AS o,
    uc_zones AS z
WHERE o.order_status LIKE 'completed'
    AND tax.order_id LIKE o.order_id AND shipping.order_id LIKE o.order_id
    AND o.created &gt; UNIX_TIMESTAMP('2010-12-31 23:59:59') AND o.created &lt; UNIX_TIMESTAMP('2012-01-01 00:00:00')
    AND z.zone_id LIKE o.billing_zone
    AND o.billing_zone LIKE '12'
ORDER BY o.billing_postal_code;
</pre>
<p>Notice that we are ordering by billing postal code. This is because in many ways, this is our most relevant piece of information. Many of the client&#8217;s customers order while on the road, so the billing address is the one that counts for tax purposes (the same as for a gift purchase or whatever). The postal code typically determines the tax rate, so it allows us to effectively sort by location. Once exported into an Excel spreadsheet, though, we can of course sort and hash however we want.</p>
<p>Here&#8217;s a sample of the final output in SQLYog (a Windows MySQL client):</p>
<div id="attachment_707" class="wp-caption alignright" style="width: 310px"><a href="http://raisedbyturtles.org/wp-content/uploads/ubercart-data.png" rel="lightbox[703]" title="SQLYog Screenshot"><img src="http://raisedbyturtles.org/wp-content/uploads/ubercart-data-300x82.png" alt="sample output" title="SQLYog Screenshot" width="300" height="82" class="size-medium wp-image-707" /></a><p class="wp-caption-text">Sample Output from SQLYog</p></div>
<p>Enjoy!</p>
<hr />
]]></content:encoded>
			<wfw:commentRss>http://raisedbyturtles.org/sales-tax-shipping-data-ubercart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mega Menus: SEO Concerns and Usability Pros and Cons (Intro)</title>
		<link>http://raisedbyturtles.org/mega-menus-seo-concerns-and-usability-pros-and-cons/</link>
		<comments>http://raisedbyturtles.org/mega-menus-seo-concerns-and-usability-pros-and-cons/#comments</comments>
		<pubDate>Fri, 23 Dec 2011 05:27:08 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[mega menus]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://raisedbyturtles.org/?p=667</guid>
		<description><![CDATA[After a much-mentioned article by Jakob Nielsen, "mega menus" became all the rage, but there are some serious issues to consider before diving in. The can create serious usability issues and negatively impact your site information architecture and, ultimately how you are found, ranked and categorized by the search engines.]]></description>
			<content:encoded><![CDATA[<p>In current parlance, a <em>mega menu</em> is usually displayed as a horizontal navigation bar that expands when hovering over it with the cursor. Unlike a normal, hierarchical dropdown, a mega menu dropdown has multiple columns, lots of links and shows all subcategory menu links to the user on first view. I was previously thinking about using mega menus on a couple of sites and took a few <a href="http://raisedbyturtles.org/drupal-mega-menu-ideas/" title="Drupal Mega Menu ideas">random notes on mega menus in Drupal</a>, but there weren&#8217;t any particularly compelling Drupal modules at the time. </p>
<p>Since my first explorations, a handful of modules have made great progress and you can achieve full-featured mega menus with the excellent <a href="http://drupal.org/project/megamenu">Megamenu module</a>. There are also some other now-mature projects like <a href="http://drupal.org/project/nice_menus">Nice Menus</a>, and the <a href="http://drupal.org/project/superfish">Superfish module</a>, which includes mega menu support. Upon further reflection, though, I became increasingly troubled by various usability drawbacks and SEO concerns. My notes on the topic got rather long, so I&#8217;ve divided them into a series that sums up some thoughts on the <a href="http://raisedbyturtles.org/usability-advantages-disadvantages-mega-menus">usability advantages and disadvantages of mega menus</a> and then looks at the <a href="http://raisedbyturtles.org/mega-menus-and-seo-concerns-and-solutions-mega-menus">SEO concerns with mega menus</a>. You can see an example here from the <a href="http://yosemitepark.com">new YosemitePark.com</a> site (click to view full size):</p>
<div id="attachment_669" class="wp-caption aligncenter" style="width: 310px"><a href="http://raisedbyturtles.org/wp-content/uploads/yosemite-park-mega-menu.jpg" rel="lightbox[667]" title="YosemitePark.com mega menu"><img src="http://raisedbyturtles.org/wp-content/uploads/yosemite-park-mega-menu-300x179.jpg" alt="Screenshot" title="YosemitePark.com mega menu" width="300" height="179" class="size-medium wp-image-669" /></a><p class="wp-caption-text">Lots of Options!</p></div>
<p>You might be able to see some potential problem areas there, but let&#8217;s take a look at the good, bad and ugly of mega menus in the next post. Read on about <a href="http://raisedbyturtles.org/usability-advantages-disadvantages-mega-menus" title="Usability advantages and problems with mega menus">Mega Menus and usability ——»</a></p>
]]></content:encoded>
			<wfw:commentRss>http://raisedbyturtles.org/mega-menus-seo-concerns-and-usability-pros-and-cons/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<series:name><![CDATA[Mega Menus Usability and SEO]]></series:name>
	</item>
		<item>
		<title>Usability Advantages and Disadvantages of Mega Menus (Mega Menus Part 1)</title>
		<link>http://raisedbyturtles.org/usability-advantages-disadvantages-mega-menus/</link>
		<comments>http://raisedbyturtles.org/usability-advantages-disadvantages-mega-menus/#comments</comments>
		<pubDate>Fri, 23 Dec 2011 05:27:03 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[mega menus]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://raisedbyturtles.org/?p=678</guid>
		<description><![CDATA[Mega menus have been heralded as a usability enhancement, but they can also result in serious usability challenges. It's not a simple yes or no. It's quite easy to end up with navigation that is difficult, occasionally impossible, for the user to actually navigate.]]></description>
			<content:encoded><![CDATA[<p>In 2009, usability expert Jakob Nielsen argued that, when done right, <a href="http://www.useit.com/alertbox/mega-dropdown-menus.html" title="Jakob Nielsen's Useit article on mega menus">mega menus could enhance usability</a>. Mega menus have a few notable advantages over traditional, hierarchical dropdowns or more spare navigation, but they also have some serious drawbacks as we&#8217;ll see in a second.</p>
<h2>Usability Advantages of Mega Menus</h2>
<ul>
<li><strong>All options visible</strong>. A traditional dropdown menu hides almost all options from the user until she hovers over the parent category. If the user does not think with the same hierarchy as the designer, she will have to play Treasure Hunt, hovering over many parent items to find an item. This can lead to frustration too if the dropdown keeps disappearing when the user is not asbolutely precise with the cursor. In theory, mega menus can solve that problem.</li>
<li><strong>Organizing options</strong>. Mega menus allow friendly and visual grouping of options into logical groups. A traditional dropdown becomes completely dizzying when the number of options gets too large.</li>
<li><strong>Images and Icons</strong>. Often, mega menus are designed to have images or icons that correspond to, and quickly confirm for the visitor, the content of the menu. So the Contact category might be illustrated with an address book or telephone icon or some such thing.</li>
</ul>
<h2 id="usability-minus">Usability Concerns</h2>
<p>So mega menus are a no-brainer right? What could go wrong? As it turns out, plenty. Jakob Nielsen has highlighted <a href="http://www.useit.com/alertbox/mega-menus-wrong.html" title="Jakob Nielsen: Mega Menus Gone Wrong (Useit article)">a few mega menu usability issues</a>. Usability expert Jared Spool noted early on that mega menus could get you into trouble in his article on <a href="http://www.uie.com/articles/mega_menus" title="View Spool's article on UIE.com">6 Epic Forces Battling Your Mega Menus</a>. Usability aside, Spool explains the sudden popularity of mega menus thus:</p>
<blockquote><p>Mega menus seem like such a good idea. After all, they make the marketing team happy, as they remove all that nasty navigation away from the prime real estate of the home page, leaving room for the team’s messaging goodness. At the same time, the mega menu gives the design team a rich sandbox to play in, with much flexibility on how they display the site&#8217;s main links.</p></blockquote>
<p>He lays out his six arguments against mega menus, most of which are in fact <a href="http://blogs.perficient.com/spark/2011/08/24/mega-menus-spool-vs-nielsen/" title="Molly Malsam discusses Spool versus Nielsen">not unique to mega menus</a> at all and I don&#8217;t find them inherently problematic (not that germane here; scroll to the bottom of the article for some <a href="#six-problems">thoughts on Spool&#8217;s six problems</a>). He notes that Amazon, a rigorous conversion optimizer, tried mega menus for a year and dropped them. Spool concludes:</p>
<blockquote><p>If your design would benefit in some desperate manner from this navigation cliché, go ahead and use it. However, you probably want to watch it real close. Make sure you’re watching your users and your key performance indicators (especially revenue, if you’re an e-commerce concern).</p></blockquote>
<p>I wouldn&#8217;t go so far as that, but the it&#8217;s easy to see some of the issues that might arise with mega menus.</p>
<ol>
<li><strong>Forest of Options Obscures the Trees</strong>. I know, that metaphor usually runs the other way around, but with mega menu, you often see a pretty forest, but have trouble finding the tree you want. You can see in my screenshot from the <a href="http://raisedbyturtles.org/mega-menus-seo-concerns-and-usability-pros-and-cons" title="Mega Menus intro">introduction</a>, there is a temptation to make the mega menu into a sitemap (cick image to enlarge).
<div id="attachment_669" class="wp-caption aligncenter" style="width: 310px"><a href="http://raisedbyturtles.org/wp-content/uploads/yosemite-park-mega-menu.jpg" rel="lightbox[678]" title="YosemitePark.com mega menu"><img src="http://raisedbyturtles.org/wp-content/uploads/yosemite-park-mega-menu-300x179.jpg" alt="Screenshot" title="YosemitePark.com mega menu" width="300" height="179" class="size-medium wp-image-669" /></a><p class="wp-caption-text">Lots of Options!</p></div>
<p>Since you <em>can</em> throw in every imaginable option, you <em>do</em>. As a result, the user is presented with a dizzying array of options and, one might guess, becomes <a href="http://video.google.com/videoplay?docid=6127548813950043200#">paralyzed by the number of options</a>. It creates an easy out for designers and site architects who don&#8217;t want to make choices. Now, I don&#8217;t want to get into the old saw about only presenting users with seven choices in menus. It is <a href="http://uxmyths.com/post/931925744/myth-23-choices-should-always-be-limited-to-seven" title="UX Myths article debunking the Seven Items myth with lots of citations and quotes">not true now and never was</a>, but at a certain point, the number of options becomes visually distracting and difficult to read, and it seems to me quite common to see mega menus cross that line simply because they can.</li>
<li><strong>Screen Size problems</strong>. This is not unique to mega menus. This can be a problem with options dropdowns (i.e. <em>select boxes</em>) that have long options or standard dropdown menus if they get big enough. The problem is that the mega menu is, well, <em>mega</em>, so this is a lot more common. You can see from this screenshot that mega menus can become completely non-functional if the window is narrow, as on a mobile device, or short, as on a netbook (click images to see full-sized):
<div id="attachment_670" class="wp-caption aligncenter" style="width: 310px"><a href="http://raisedbyturtles.org/wp-content/uploads/yosemite-park-mega-menu-oops.jpg" rel="lightbox[678]" title="Usability Advantages and Disadvantages of Mega Menus (Mega Menus Part 1)"><img src="http://raisedbyturtles.org/wp-content/uploads/yosemite-park-mega-menu-oops-300x286.jpg" alt="screenshot of cut off mega menu" title="" width="300" height="286" class="size-medium wp-image-670" /></a><p class="wp-caption-text">Oops! A not-so-mega menu</p></div>
<div id="attachment_679" class="wp-caption aligncenter" style="width: 310px"><a href="http://raisedbyturtles.org/wp-content/uploads/yosemite-park-mega-menu-short.jpg" rel="lightbox[678]" title="Short window mega menu screenshot"><img src="http://raisedbyturtles.org/wp-content/uploads/yosemite-park-mega-menu-short-300x116.jpg" alt="Short window mega menu screenshot" title="Short window mega menu screenshot" width="300" height="116" class="size-medium wp-image-679" /></a><p class="wp-caption-text">Oops! Short window problems</p></div>
<p>You can see that the mega menu is cut off on a narrow or a short screen. Anything that sticks out past the browser window is missing. With most types of content, this isn&#8217;t a big deal. Sure, the user has to scroll right to see it, which is annoying, but it can be done. <strong>With a mega menu, however, the user cannot scroll!</strong> Why? Because it only stays displayed when the mouse is hovering over the menu. Move the cursor down to the scroll bar, and the mega menu disappears. Scroll, and the link goes off screen. You literally cannot use the mega menu on a narrow screen.</p>
<p>The Yosemite Park site solves this by allowing you to click on the root term and be taken to an index page, where the sub-options are displayed by default. That&#8217;s a pretty good solution, but it means the user needs to know, or guess, that the root term is a link and is clickable. It would be interesting to track visitors and see how they ultimately use this navigation.</li>
</ol>
<p>This was part of what ultimately took the blush off mega menus for me personally. I just found that you compound implementation problems and if you&#8217;re not careful and don&#8217;t test on a lot of platforms, you have a high chance of letting a significant usability problem creep in. In addition, I was also concerned with the <a href="http://raisedbyturtles.org/mega-menus-and-seo-concerns-and-solutions-mega-menus" title="Mega Menu SEO Problems">SEO impacts of mega menus (next section) ——»</a>.</p>
<hr />
<h2 id="six-problems">Addendum: Spool&#8217;s issues with mega menus</h2>
<p>If you&#8217;re really interested in Jared Spool&#8217;s Six Epic Problems, here&#8217;s a quick rundown, but it&#8217;s really more the <a href="http://raisedbyturtles.org/mega-menus-and-seo-concerns-and-solutions-mega-menus/" title="Mega Menus and SEO Concerns and Solutions (Mega Menus Part 3)">SEO issues</a> that you should read about next. Anyway, I&#8217;m not all that concerned with most of these issues, but here are some supplementary thoughts on Spool&#8217;s Six Epic Problems.</p>
<ol>
<li><em>Menus are not Buttons. Since a menu isn&#8217;t a button, users don&#8217;t know they have to do something to make it expand</em>. Realistically, they may simply not know it expands and will go there to click, only to see more options revealed. It&#8217;s better than not expanding.</li>
<li><em>Missing Trigger Words. In other words, since most options are hidden, users can&#8217;t see that they exist.</em> But short of the navigation taking up the whole page as a sitemap, you&#8217;re not going to change this, and a mega menu at least gets you half way, though as you&#8217;ll see in the next part on the <a href="http://raisedbyturtles.org/mega-menus-and-seo-concerns-and-solutions-mega-menus/" title="Mega Menus and SEO Concerns and Solutions (Mega Menus Part 3)">SEO problems with mega menus</a>, that halfway solution is often a result of a bad information architecture decision.</li>
<li><em>Category Names not always inherently sensible</em>. Well, of course not. This is a problem with any navigation and, again, is an information architecture problem more than a user interface problem.</li>
<li><em>Users Wait Before Moving Their Mouse. In other words, if they can&#8217;t see what they want, users sit there paralyzed and won&#8217;t click anything at all</em>. Again, mega menus aren&#8217;t the root problem. If the design only allows, say, seven navigation links, then that&#8217;s what there is and they may not always have enough <a href="http://www.useit.com/alertbox/20030630.html" title="Jakob Nielsen on Information Scent and Information Foraging">information scent</a> to get the user to click, whether on hover those menu items reveal nothing (i.e. it&#8217;s a single-level menu hierarchy), reveals a cascade of hierarchical dropdowns (classic model) or is a mega menu. Realistically, the mega menu at least removes a one or more decision points vis-à-vis the classic hierarchical dropdown, where the user will have the &#8220;pause&#8221; problem at every level, instead of just at the root level.</li>
<li><em>Mega menus hide the information that&#8217;s under them. That&#8217;s a problem when the user accidently hovers over the menu while trying to read the content, which suddenly get&#8217;s hidden</em>. That can be annoying, but in a minimally usable design, the mega menu should disappear simply on mousing out and most users today will know this. I find this a much less problematic usability issue than the one I noted where in a small screen, parts of the mega menu are not visible, clickable or usable at all.</li>
<li>P<em>roblems with hoverless devices. As we move to devices that don&#8217;t have cursors and mouses, they can have trouble triggering the menu expansion</em>. Of course, this again is not unique to mega menus, but concerns anything that uses hover behavior as a trigger. This has become so ubiquitous that I think this is largely solved by most devices these days, though I am an iPad virgin, so I can&#8217;t say for sure.</li>
</ol>
<p>Read on about the <a href="http://raisedbyturtles.org/mega-menus-and-seo-concerns-and-solutions-mega-menus" title="Mega Menu SEO Problems">SEO impacts of mega menus (next section) ——»</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://raisedbyturtles.org/usability-advantages-disadvantages-mega-menus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[Mega Menus Usability and SEO]]></series:name>
	</item>
		<item>
		<title>Mega Menus and SEO Concerns and Solutions (Mega Menus Part 2)</title>
		<link>http://raisedbyturtles.org/mega-menus-and-seo/</link>
		<comments>http://raisedbyturtles.org/mega-menus-and-seo/#comments</comments>
		<pubDate>Fri, 23 Dec 2011 05:27:02 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[mega menus]]></category>

		<guid isPermaLink="false">http://raisedbyturtles.org/?p=683</guid>
		<description><![CDATA[Search engines have made a lot of progress in terms of figuring out what your page is about, but large numbers of navigation links muddy the signal you send to the search engines, both about your page and about the rest of your site. There are lots of possible solutions, but the real solution is getting the information architecture right.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve already reviewed some of the <a href="http://raisedbyturtles.org/usability-advantages-disadvantages-mega-menus" title="Mega Menus and usability">usability problems with mega menus</a>, but the SEO problems are another source of concern. There are a variety of solutions thrown out around the web, but most of them are aimed at masking the problems rather than truly solving them. So first let&#8217;s look at the nature of those problems, then we&#8217;ll look at some <a href="#fixing-mega-menu-seo">solutions to the mega menu problem</a>. In brief, though, this is ultimately not a design or technology problem, but an information architecture problem, so the best solutions lie with better architecure.</p>
<h2 id="mega-menu-seo-problems">Mega Menus and Search Engine Optimization Problems</h2>
<p>Ultimately, it wasn&#8217;t the usability questions that brought me up short with respect to mega menus. It was the SEO concerns. Mega menus end up putting <strong>lots</strong> of links at the top of the page, sometimes hundreds. Google itself says <a href="http://support.google.com/webmasters/bin/answer.py?hl=en&#038;answer=35769#1" title="Google Content guidelines">in its Webmaster Guidelines</a> that webmasters should &#8220;Keep the links on a given page to a reasonable number.&#8221; Google&#8217;s official <a href="http://www.google.com/webmasters/docs/search-engine-optimization-starter-guide.pdf" title="PDF Download">Search Engine Optimization Starter Guide</a> (PDF) recommends that webmasters should avoid &#8220;creating complex webs of navigation links, e.g. linking every page on your site to every other page&#8221; (p. 12). When the mega menu gets truly large, it effectively ends up doing just that or very nearly.</p>
<p>Few voices in the Search Engine Optimization community are more respected, experienced, and authoritative than Ted Ulle. Back in 2008, Ted had a number of clients with <a href="http://www.webmasterworld.com/google/3354323.htm">-950 penalties</a> and one of the common characteristics that jumped out was a <a href="http://www.webmasterworld.com/google/3687528.htm">tendency to have site navigation with tons of links</a>. In internet years, 2008 is a while ago, but Ted continued to see this problem in 2010 and 2011, as we&#8217;ll see. Also, in 2010, <a href="http://www.seomoz.org/qa/view/41165/mega-dropdown-menus-mega-nav-link-dilution">Jane Copland of SEOMoz said</a> that in her opinion &#8220;massive drop-downs certainly aren&#8217;t adhering to SEO best practices.&#8221; </p>
<p>So why would a large collection of links in the page templage create problems? There are a number of possible reasons. Unlike some of the usability issues, none of these are unique to menus <em>formatted</em> as classic mega menus. Instead, they are a simple function of the number of links, but I do believe that once the mega menu tool is available to the design team, the number of links tends to explode. So it is more an enabler than a cause <em>per se</em>. </p>
<ol>
<li><strong>Confused Relevancy Signals</strong>. It helps the search engines determine what a page is about if you keep it laser-focussed on the topic at hand. Normal navigation adds a handful of keywords that can confuse the signal a bit, but it compensates by helping focus the search engine&#8217;s understanding of overall site content and spotlight the most important pages. Mega menus, on the other hand, can add hundreds of keywords that confuse the signal. In information theory, the keywords in the mega menu are &#8220;noise&#8221; and it make it harder for the search engines to figure out the &#8220;signal&#8221; (page topic) and therefore figure out relevancy of the page to a given search.
<p>Google <em>is</em> getting better at ignoring navigation and boilerplate content. <a href="http://econsultancy.com/us/forums/best-practice/mega-menu-s-and-seo#forum_post_12821">Some people contend</a> that, therefore, this is not a problem. But Ted Ulle stated in January 2011 that he still believed that a <a href="http://www.webmasterworld.com/google/4258045.htm#msg4258115" title="Tedster weighs in">large number of links in the page template is problematic for relevancy</a>. In brief, you are challenging the search engine by adding this much noise to the signal and you have to ask whether or not you really want to depend on the strength of the Google or Bing algorithm to sort out your &#8220;<a href="http://www.webmasterworld.com/google/4052542.htm#msg4052628">semantic chaos</a>&#8221; as Ted calls it.</li>
<li><strong>Link Equity Dilution</strong>. This is similar to the semantic confusion caused by the forest of anchor text in your navigation. Each page has a certain strength and each link passes some of that page rank to the pages it links to. You can stop passing that equity by using the <em>nofollow</em> attribute on your link, but you can&#8217;t preserve the link equity this way. When you add a <em>nofollow</em> attribute to the link, it still <a href="http://searchenginewatch.com/article/2052219/Google-Further-Clarifies-Nofollow-and-PageRank-Sculpting" title="Matt Cutts clarifies the use of the nofollow attribute">leaks equity from the source page</a>, it just doesn&#8217;t add it to the target page. So no matter how you cut it, they massive number of links are diluting the link strength of the page and tending to make it harder for the engines to figure out which parts of the site are important.</li>
<li><strong>Crawl Challenges</strong>. This was more of an issue in the old days when search engines crawled only the first 100KB of code or so, but even with improvements, you&#8217;re putting a bigger challenge before the search engine.</li>
<li><strong>Page Load Times</strong>. Again, this is a minor issue, but a massive collection of links in the navigation will slow down load times and rendering. Of course, one decent image or a large CSS file will quickly outweigh this, but we do know that load times are or soon will be taken into account in the Google algorithm at least, and we can expect other engines to follow suit.</li>
</ol>
<h2 id="fixing-mega-menu-seo">Fixing the Mega Menu Problem</h2>
<p>So what is an enterprising webmaster to do? You have a number of options, some better than others.</p>
<ol>
<li><strong>Reduce the number of links.</strong>good results with clients by reducing navigation from over 60 links down to 22. By tracking click patterns, Ted and his team found that a single link accounted for 60% of the clicks from the front page and the top ten links accounted for 99% of all clicks. So with some serious thinking about information architecture and some good analytics, you can simply reduce the number of links which will also improve usability. If you can get buy in, this is the preferred solution of course, but buy in will be difficult in any large organization unless you have the data and a strong case. And even then, some doorkeeper with a love of the current layout may block any and all arguments, no matter how reasonable.</li>
<li><strong>Source-Ordered Content</strong>It is quite possible to put your menu at the end of your code and get your main page content at the top, but then display the page with the header (and thus the navigation) at the top. This is relatively easy to implement and I used to do it systematically (less so now), but of course, the links are still on your page. So though it mitigates the effects of having all that anchor text and links high on the page, the noise is still there.</li>
<li><strong>iframe for navigation</strong>. I&#8217;ve never actually done this, but some people recommend it for boilerplate content in the site footer. The problem with doing this for the navigation is that you&#8217;ve entirely removed the navigation as an on-page factor for relevancy and so forth. So yes, you get rid of the noise in the signal, but you also get rid of a lot of the signal and your ability to build link flow throw the site. It seems like a collossally bad idea.</li>
<li><strong>Use HTML 5 and hope the search engines understand</strong>. The HTML 5 spec includes the ability to specifically denote part of your document as navigation <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-nav-element">using the nav element</a>. Of course, this is bleeding edge, so it&#8217;s rather early to expect the search engines to be smart enough to understand this and act appropriately. But let&#8217;s just assume it&#8217;s 2015 and they all &#8220;get&#8221; this. You still have the fundamental problem that your navigation is a key tool in telling the search engine what your site is about, and by including a massive number of links, you&#8217;ve given up your chance to provide signal to help the search engine cut through noise. In other words, at a certain number of links, you&#8217;re still adding noise rather than adding signal. So, again, it may mitigate the ill effects of the design, but it still misses out on a great opportunity.</li>
<li><strong>Lazy Loading</strong>. Lazy loading is where delay loading content until the user wants it. So you images that are low on the page, for example, don&#8217;t get loaded until the user scrolls down. There are some excellent <a href="http://www.appelsiini.net/projects/lazyload">JQuery lazy loader plugins</a> that let you implement this simply enough. So that would keep it out of the search engines, but the navigation needs to be responsive and readily available to the user, so load on demand seems like a terrible solution in this case.</li>
</ol>
<p>So in short, it seems like the best alternative is to use your navigation like a lens to focus the search engine on the main points of your site, and you do that by making hard choices. As I mentioned at the outset of this series, in the end, I found great solutions for mega menus in Drupal , but for all the reasons detailed here, have tended to avoid mega menus if possible.</p>
]]></content:encoded>
			<wfw:commentRss>http://raisedbyturtles.org/mega-menus-and-seo/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<series:name><![CDATA[Mega Menus Usability and SEO]]></series:name>
	</item>
		<item>
		<title>WordPress Debugging with the wp-pear-debug plugin</title>
		<link>http://raisedbyturtles.org/wordpress-debugging-with-wp-pear-debug-plugin/</link>
		<comments>http://raisedbyturtles.org/wordpress-debugging-with-wp-pear-debug-plugin/#comments</comments>
		<pubDate>Mon, 25 Apr 2011 06:12:56 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://raisedbyturtles.org/?p=577</guid>
		<description><![CDATA[The wp-pear-debug brings a few handy debugging tools to Worpdress. If you're not working in an IDE with full-fledged debugging, this is a must have for any Wordpress developer.]]></description>
			<content:encoded><![CDATA[<p>The awesome wp_pear_debug brings the power of pear_debug to WordPress. What&#8217;s that mean? It means that hundreds of system variables are at your fingertips, that your GET and POST data can be easily viewed without needing to add any special debug code, and that with just a line of code, you can output any variable, including arrays and objects, to appear in a nice little dropdown. Very handy.</p>
<p>The video shows it in use. I apologize for the terrible audio that goes in and out of sync and has a lot of noise &#8211; I did this on my slow old laptop with the mike built into my cheapo headset. The video is a bit disorganized, but hopefully it&#8217;s enough to show you the power of wp_pear-debug. See below the video for some useful links.</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/oguD2eqAmFw?hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/oguD2eqAmFw?hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>The common methods available in php_debug are listed here:<br />
<a href="http://www.php-debug.com/www/docs/V2.0.0/PHP_Debug/Debug.html">http://www.php-debug.com/www/docs/V2.0.0/PHP_Debug/Debug.html</a></p>
<p>That page is surprisingly hard to find from the php_debug home page, so make a note of it.</p>
<p>Plugin Home Page<br />
<a href="http://www.communitymodder.com/Released-wordpress-plugins/wp-pear-debug-wordpress-plugin.html">http://www.communitymodder.com/Released-wordpress-plugins/wp-pear-debug-wordpress-plugin.html</a> &#8211; nice description, screenshots, and help on how to install and use the plugin.</p>
<p>The official <a href="http://wordpress.org/extend/plugins/wp-pear-debug/">WordPress.org Plugin download page</a></p>
<p>In the video, I call the dump() method using the direct invocation:<br />
wp_pear_debug::dump($defaults, &#8216;Defaults1&#8242;);</p>
<p>Since I&#8217;m not doing much, this was simpler than creating a new object and invoking it as</p>
<p>$debugObject = wp_pear_debug::get();<br />
$debugObject->dump($default);</p>
]]></content:encoded>
			<wfw:commentRss>http://raisedbyturtles.org/wordpress-debugging-with-wp-pear-debug-plugin/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A few favorite WordPress plugins</title>
		<link>http://raisedbyturtles.org/favorite-wordpress-plugins/</link>
		<comments>http://raisedbyturtles.org/favorite-wordpress-plugins/#comments</comments>
		<pubDate>Sun, 17 Apr 2011 20:50:39 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://raisedbyturtles.org/?p=568</guid>
		<description><![CDATA[Everyone has their favorite Wordpress Plugins. Here are some of my favorites.]]></description>
			<content:encoded><![CDATA[<p>Okay, everyone has their list and many people have built a lot more WordPress sites than me and know the available plugins better than me (and I keep up more with Drupal anyway). Still, I have a few WordPress sites that are either my own, or that I&#8217;ve built for people and I had a project to go through and find those plugins that I really like and that either meet a specific need very well or that I just find myself using repeatedly. And without further ado, here&#8217;s the list, categorized for easier scanning.</p>
<h2>SEO</h2>
<ul>
<li><a href="http://urbangiraffe.com/plugins/headspace2/">Headspace2</a> — an SEO Swiss Army Knife. This lets you control titles, control what gets indexed and what doesn&#8217;t, create meta descriptions (which are used in the Google results if there is not a matching keyword phrase on your page), integrate analytics packages, use distinct page titles (in the <em>title</em> tag) and post title (in the <em>H1</em> tag), and much, much more.</li>
<li><a href="http://urbangiraffe.com/plugins/redirection/">Redirection</a> — Another John Godley plugin like Headspace2. This lets you redirect links, which is useful for at least two situations: 1) you can redirect for pages with obsolete URLs not already handled by WordPress and 2) you can send links to an address like <em>http://yoursite.com/outbound/outgoing</em>—link which allows you to track outbound links and their statistics. If the outbound link may change often, you can redirect to a standard location and just change the URL in one spot. </li>
<li><a href="http://www.arnebrachhold.de/redir/sitemap-home/">Google XML sitemaps</a> — for some reason, the Headspace2 plugin wasn&#8217;t working for a while on some sites, so I used this.</li>
<li><a href="http://www.laptoptips.ca/projects/wordpress-excerpt-editor/">Excerpt Editor</a> — just discovered this one — killer plugin for bulk editing Excerpts on legacy site. The name Excerpt is misleading. In point of fact, what we want is summaries or teasers that give the user a sense of what the article is about, rather than an excerpt (usually the first bit of the post) that may or may not describe the actual content. So this makes the category pages and front page a lot more scannable for the user. Furthermore, since the &quot;excerpts&quot; are not excerpts at all, but unique content, this will help with duplicate content issues (which is why I put it under SEO, though it could just as easily be considered a usability plugin). Anyway, this makes it super easy. I needed to create 25 excerpts quickly on a site the other day and this made it super easy (not so easy that I&#8217;ve done it on this blog, but I&#8217;m raised by turtles, so things take time).</li>
</ul>
<h2> Interface Customization</h2>
<ul>
<li><a href="http://freakytrigger.co.uk/wordpress-setup/">Widget Logic</a> — show/hide widgets for certain categories, pages, users, tags. For example, let&#8217;s say you have a text widget that says &quot;Sign up for our newsletter,&quot; you might not want this on your newsletter signup page. This lets you show and hide widgets on specific pages and posts, as well as categories pages.</li>
<li><a href="http://omninoggin.com/projects/wordpress-plugins/wp-greet-box-wordpress-plugin/">WP Greet Box</a> — Based on an idea made famous by Seth Godin, which suggest showing some special content only to new users (users with no cookie for your site). So if Greet Box thinks the user has never been to the site before, you could show a header above the post that says &quot;check out these other popular posts&quot; or something like that to orient new users to your site.</li>
<li>WP Post Admin Column Filter — filters the post admin screen so that it only shows columns you want — no website as I just wrote the pre-alpha version. Very simple and currently hard-coded column selection only.</li>
<li><a href="http://wordpress.org/extend/plugins/exclude-pages/">Exclude Pages</a> — lets you keep specific pages out of Page widgets/menus. For example, I might want to have a Terms and Conditions page, but I typically wouldn&#8217;t want that to show up in my Recent Pages or my main menu. This lets me exclude those.</li>
</ul>
<h2>Spam Protection</h2>
<ul>
<li> <a href="http://wordpress-plugins.feifei.us/hashcash/">Hashcash</a> — block most spam without making users deal with a CAPTCHA. This can also be used in conjunction with a CAPTCHA or with <a href="http://wordpress.org/extend/plugins/akismet/">Akismet</a> (which should be on every WordPress site).</li>
</ul>
<h2>Ad Management</h2>
<ul>
<li> <a href="http://www.reviewmylife.co.uk/blog/2010/12/06/ad-injection-plugin-wordpress/">Ad Injection</a> — inject ad code or any code into posts. A lot of the really major media sites like to put ads in the middle of an article so that the reader has to read over it. This does it automatically for small-timers like us and it could be used for many things besides ads, such as a random image to dress up posts, or whatever.</li>
<li><a href="http://code.openx.org/projects/show/advertising-manager">Ad rotation</a> — This lets you put a set of ads into rotation for various spots on your site and manage them through a central interface. This is good if you want something simpler than OpenX or Doubleclick for Publishers.</li>
</ul>
<h2>Image Display</h2>
<ul>
<li> <a href="http://www.23systems.net/plugins/lightbox-plus/">Lightbox Plus</a> — A lightbox, that is a plugin that displays images in a floating layer above the page, without leaving the page. It&#8217;s what I&#8217;m using on this site.</li>
<li><a href="http://blog.splash.de/plugins/floatbox-plus">Floatbox Plus</a> — a paid lightbox, but very nice. We&#8217;re using this on the photo gallery on the site of our <a href="http://yosemitehouse.com/pictures">Yosemite Vacation Rental</a>.
  </li>
</ul>
<h2> Debug</h2>
<ul>
<li><a href="http://www.communitymodder.com/">wp pear_debug</a> — sort of like the Drupal devel module. A bit hard to explain and I hope to do a video of this one, but let&#8217;s say you need to capture some information about what&#8217;s happening inside a plugin. If you have it output all kinds of debug info, that messes up the look and may itself cause things to crash. This lets everything run normally, but outputs the dumped data nicely formatte.</li>
<li><a href="http://wordpress.org/extend/plugins/debug-bar/">Debug Bar</a> — this gives you all kinds of information about the setup and system. Not nearly as handy as wp_pear_debug, but still handy.</li>
</ul>
<h2>Contact Forms</h2>
<ul>
<li><a href="http://www.deliciousdays.com/cforms-plugin">cForms II</a> — Awesome contact form plugin that allows you to build complex forms and require specific information. Very good if you&#8217;re capturing leads, taking reservation requests, that sort of thing. We use this to create a reservation request form for our <a href="http://yosemitehouse.com">vacation rental in Yosemite</a>. Super handy and it has worked really well for us.</li>
<li><a href="http://yoast.com/wordpress/enhanced-wordpress-contact-form/">Contact form from Joost de Valk</a> — simple and it&#8217;s by Joost, which means it&#8217;s done right. If you don&#8217;t need all the bells and whistles of cForms II, this is a good option.</li>
<li><a href="http://green-beast.com/blog/?page_id=136">Secure and Accessible Contact Form</a> — an old workhorse. This is still in use on this site and most other places and never have had a problem.</li>
</ul>
<h2> Geek</h2>
<ul>
<li><a href="http://www.viper007bond.com/wordpress-plugins/syntaxhighlighter/">Syntax highlighting evolved</a> — if you post code on your blog, this will give you great syntax highlighting. You can see it in action on this site on my pages on <a href="http://raisedbyturtles.org/robots-meta-drupal-nodes-by-taxonomy-term/">adding noindex and nofollow tags to Drupal category pages</a> and my page on <a href="http://raisedbyturtles.org/robots-meta-drupal-nodes-by-taxonomy-term/">adding custom form labels on Drupal forms</a> (useful if the client just dislikes the standard labels or if you want different labels on the public and admin sides).</li>
</ul>
<h2>Third—Party Integration</h2>
<ul>
<li>Twitter — <a href="http://rick.jinlabs.com/code/twitter">display tweets on your site</a>&#8230; Since I never actually tweet, I can say this seems to work fine, but it doens&#8217;t exactly get a tough workout from me </li>
</ul>
<h2>Automated Backup and Maintainence</h2>
<ul>
<li><a href="http://www.blogtrafficexchange.com/wordpress-backup">Back up your files</a> — uploads and your custom stuff. Essentially a backup of your wp—content folder (minus base themes I think).</li>
<li><a href="http://lesterchan.net/portfolio/programming/php/">Database backups</a> emailed to you or just archived.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://raisedbyturtles.org/favorite-wordpress-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using WordPress on WebEnabled</title>
		<link>http://raisedbyturtles.org/using-wordpress-on-webenabled/</link>
		<comments>http://raisedbyturtles.org/using-wordpress-on-webenabled/#comments</comments>
		<pubDate>Fri, 18 Mar 2011 02:39:56 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[webenabled]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://raisedbyturtles.org/?p=559</guid>
		<description><![CDATA[So I&#8217;ve been using WebEnabled lately. If you don&#8217;t know it, Webenabled is a service that lets you build sandbox environments for tons of open source apps (Drupal, WordPress, CivicCRM and many many more) and gives you all kinds of tools &#8211; version control, site cloning, and more. One of the killer tools is Deploy, [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve been using <a href="http://webenabled.com">WebEnabled</a> lately. If you don&#8217;t know it, Webenabled is a service that lets you build sandbox environments for tons of open source apps (Drupal, WordPress, CivicCRM and many many more) and gives you all kinds of tools &#8211; version control, site cloning, and more.</p>
<p>One of the killer tools is Deploy, which lets you build a site, then put in the FTP and database info for your live site and simply hit a button and push your dev site out to the live site. When coupled with the Drupal <a href="http://drupal.org/project/deploy">Deployment module</a> it&#8217;s amazing (post on that coming one of these days).</p>
<p>WordPress, though has a nasty habit of making all the links absolute and then using the General Settings to set site root. The problem is that you have to set this to http://devsite.com for development and then when you deploy to the live site, it will die because it needs to be http://devsite.com</p>
<p>There&#8217;s a simply solution though. You can set the URL in your wp_config.php file to use as site root whatever it&#8217;s hosted on by simply adding these lines</p>
<blockquote><p>define(&#8216;WP_SITEURL&#8217;, &#8216;http://&#8217;.$_SERVER['HTTP_HOST']);<br />
define(&#8216;WP_HOME&#8217;, &#8216;http://&#8217;.$_SERVER['HTTP_HOST']);</p></blockquote>
<p>That&#8217;s it. Now you can deploy and it will just run, out of the box.</p>
]]></content:encoded>
			<wfw:commentRss>http://raisedbyturtles.org/using-wordpress-on-webenabled/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Adding robots meta tags to Drupal nodes having a given taxonomy term</title>
		<link>http://raisedbyturtles.org/robots-meta-drupal-nodes-by-taxonomy-term/</link>
		<comments>http://raisedbyturtles.org/robots-meta-drupal-nodes-by-taxonomy-term/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 00:56:43 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[meta]]></category>
		<category><![CDATA[robots]]></category>
		<category><![CDATA[taxonomy]]></category>

		<guid isPermaLink="false">http://raisedbyturtles.org/?p=554</guid>
		<description><![CDATA[There is no Drupal 6 module that lets you add a meta noindex to pages tagged with a specific term, but here's how to do it easily in the theme layer. ]]></description>
			<content:encoded><![CDATA[<p>Well, the title is a mouthful, but here&#8217;s the situation. You have some nodes that are classified with a certain taxonomy term and you want to tell Google not to index those pages, how do you do it? There is the excellent <a href="http://drupal.org/project/nodewords">nodewords</a> module that lets you manage all kinds of meta tags, including most use cases for the robots meta tag. You can assign meta robots for the taxonomy listing pages, but not for nodes that are tagged with a certain term. For that, you need a little scripting.</p>
<p>Fortunately, Drupal provides you with <a href="http://api.drupal.org/api/drupal/modules--taxonomy--taxonomy.module/function/taxonomy_node_get_terms_by_vocabulary/6">taxonomy_node_get_terms_by_vocabulary()</a>. In Drupal 6, this takes the $node object and a vocabulary ID. Then you just have to cycle through the terms it returns and see if your term is in there. </p>
<p>In my case, I have some pages that need to be publicly accessible, but must not be in Google or other indexes. So I let those get tagged with a special taxonomy term (&#8220;custom&#8221; in my case, but it could be &#8220;noindex&#8221; or anything). All you need to know is the vocabulary ID and the term ID for the term you&#8217;re testing for and you can apply the meta noindex to any node. Sometimes node_load() carries a high cost, but since we&#8217;re only testing this on nodes and we&#8217;re testing for the node in question, that data should be cached and should not result in another database query.</p>
<pre class="brush: php; title: ; notranslate">
function MYTHEME_preprocess_page(&amp;$vars, $hook) {

// if this is a node and not being edited and it is tagged with term 41, then add a &quot;noindex&quot; tag
   if (arg(0) == 'node' &amp;&amp; is_numeric(arg(1)) &amp;&amp; is_null(arg(2))) {
	    $node = node_load(arg(1));
	    $terms = taxonomy_node_get_terms_by_vocabulary($node, 2);

		foreach($terms as $term) {
		  if ($term-&gt;tid == '41') {
			$vars['head'] = drupal_set_html_head('&lt;meta name=&quot;robots&quot; content=&quot;noindex&quot; /&gt;');
		    break;
		  }
		}
	}
}
</pre>
<p>In order to get the meta tag to show, you&#8217;ll need to clear your caches.</p>
]]></content:encoded>
			<wfw:commentRss>http://raisedbyturtles.org/robots-meta-drupal-nodes-by-taxonomy-term/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Ubercart not Charging Shipping</title>
		<link>http://raisedbyturtles.org/ubercart-not-charging-shipping/</link>
		<comments>http://raisedbyturtles.org/ubercart-not-charging-shipping/#comments</comments>
		<pubDate>Mon, 14 Feb 2011 19:01:09 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[ubercart]]></category>

		<guid isPermaLink="false">http://raisedbyturtles.org/?p=545</guid>
		<description><![CDATA[If your customer has Javascript turned off, he may accidentally be awarded free shipping. The fix is simple.]]></description>
			<content:encoded><![CDATA[<p>Recently an order came through an Ubercart shop I built where the customer managed to avoid getting charged for shipping. Poking around, I tried disabling Javascript, since the shipping quotes are driven by Javascript.  At this point, of the customer checks out with Paypal, he&#8217;s home free. No shipping required. But even if paying with a credit card, which also requires Javascript, he has to enable Javascript. If he does so and then presses  the Checkout button, he will be brought back to the page to fill in credit card details, but the shipping quote will not fire unless he clicks &#8220;Calculate Shipping.&#8221;</p>
<p>As it turns out, you can simply require the form submission to fail just like it does for credit cards and bring the user back to the checkout details page. To do so, simply go to Admin -&gt; Store Administration -&gt; Configuration -&gt; Shipping Quote Settings (/admin/store/settings/quotes/edit) and turn on &#8220;Prevent the customer from completing an order if a shipping quote is not selected.&#8221;</p>
<div id="attachment_546" class="wp-caption aligncenter" style="width: 310px"></p>
<div class="mceTemp mceIEcenter">
<dl id="attachment_546" class="wp-caption aligncenter" style="width: 310px;">
<dt class="wp-caption-dt"><a href="http://raisedbyturtles.org/wp-content/uploads/shipping-quote-settings.png" rel="lightbox[545]" title="Ubercart Shipping Quote settings screenshot"><img class="size-medium wp-image-546" title="Ubercart Shipping Quote settings screenshot" src="http://raisedbyturtles.org/wp-content/uploads/shipping-quote-settings-300x94.png" alt="Ubercart Shipping Quote settings screenshot" width="300" height="94" /></a><p class="wp-caption-text">Ubercart: require customer to select shipping</p></div>
</dt>
<dd class="wp-caption-dd">Ubercart: require customer to select shipping</dd>
</dl>
</div>
<p>And that&#8217;s pretty much it &#8211; just check that setting and no more accidental free shipping.</p>
]]></content:encoded>
			<wfw:commentRss>http://raisedbyturtles.org/ubercart-not-charging-shipping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubercart Quickbooks Integration and Ubercart Shipping Integration Options</title>
		<link>http://raisedbyturtles.org/ubercart-quickbooks-integration-and-ubercart-shipping-integration-options/</link>
		<comments>http://raisedbyturtles.org/ubercart-quickbooks-integration-and-ubercart-shipping-integration-options/#comments</comments>
		<pubDate>Fri, 17 Dec 2010 06:30:53 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[quickbooks]]></category>
		<category><![CDATA[shipping]]></category>
		<category><![CDATA[ubercart]]></category>
		<category><![CDATA[webgility]]></category>

		<guid isPermaLink="false">http://raisedbyturtles.org/?p=537</guid>
		<description><![CDATA[Integrating shipping with an online store has it&#8217;s share of challenges and is a common subject of conversation in the forums for Ubercart (USPS Shipping Labels), osCommerce (non-answers on USPS integration and no answer though there does seem to be some integration). Sadly, if you should be so lucky as to be on osCommerce, X-Cart, [...]]]></description>
			<content:encoded><![CDATA[<p>Integrating shipping with an online store has it&#8217;s share of challenges and is a common subject of conversation in the forums for Ubercart (<a href="http://www.ubercart.org/forum/ideas_and_suggestions/466/usps_print_labels">USPS Shipping Labels</a>), osCommerce (<a href="http://forums.oscommerce.com/topic/344407-print-shipping-labels-for-ups-fedex-andor-usps/">non-answers on USPS integration</a> and <a href="http://forums.oscommerce.com/topic/367029-ups-fedex-and-us-mail-shipping-labels/">no answer</a> though there does seem to be <a href="http://addons.oscommerce.com/info/1498">some integration</a>). Sadly, if you should be so lucky as to be on osCommerce, X-Cart, Zen Cart, Magento, CRE Loaded or Cube Cart, you can get Quickbooks and shipping integration for only $160 from <a href="http://www.magneticone.com/store/advanced_search_result.php?keywords=quickbooks&amp;x=0&amp;y=0">Magnetic One</a>. Some of these are good carts and not expensive (Cube Cart), but for one reason or another I rejected them for the project in question (mostly because of Ubercart&#8217;s incredible ability to structure, remix and present data).</p>
<p>Webgility&#8217;s eCC seems to be the leading solution for most carts and the ones that have a really nice shipping integration are mostly hosted solutions, which poses a problem if your store has out of the ordinary situations. So what are the options?</p>
<h2>Webgility eCC</h2>
<p>This is actually a great solution. It has only one real problem from our perspective – it expect all computers to be on the same network. This is not, as it happens, our use case. The ony downsides here seem to be that to get eCC working, you have to have Quickbooks working and if your copies of eCC will be running in a non-networked environment, you have to have 2 full licenses, rather than a full and an add-on license. So the total extra cost is $170 extra for a full eCC license and whatever it costs for a cheap, outdated copy of Quickbooks on EBay (about $50). So for $220, this issue goes away. </p>
<p>In addition, you&#8217;re on the hook for a monthly fee of about $16-$35 or so, which is the cost to have a Stamps.com or Endicia Dazzle account which is required for shipping label printing to work. This is typical of most of these systems and not eCC specific.</p>
<h2>Deep Thought Courrier</h2>
<p>Deep Thought Courrier handles only the Quickbooks end and is $500, so a fair bit pricier than eCC. On the plus side, the Courrier Deep Thought website is actually powered by Ubercart, so they are presumably eating their own dogfood. The app also works with Cubecart and osCommerce. But this still leaves the shipping integration unsolved.</p>
<h2>(eCC OR Deep Thought Courrier) + Pony Express Mailer</h2>
<p>Meanwhile, <a href="http://ponyexpressmailer.com/index.php">Pony Express Mailer</a> handles only shipping integration, though I use the term &quot;integration&quot; a bit loosely. Pony Express is only $40 and connects to a database <em>if it&#8217;s local</em> and then to USPS Click n Ship. Of course, an e-commerce site is not going to have a local database, so that means creating a method of building an XML file in your store, downloading that, and then uploading it to Pony Express. At that point, Pony Express supposedly integrates with Click n&#8217; Ship, though I can&#8217;t test this because their link on their free trial page is broken. Hopefully they&#8217;ll get back to me soon.</p>
<p>The disadvantage here is the extra step required: open website, download orders, open orders from Pony Express for shipping, and then input shipping info into the site, which presumably is going to be a manual cut and paste affair.</p>
<p>The advantage is that it uses Click n&#8217; Ship directly, without going through Stamps.com or Endicia, and thus has no monthly fee. This means a minimum savings of around $200/year.</p>
<h2>Atandra T-HUB</h2>
<p><a href="http://www.atandra.com/quickbooks-shopping-cart-integration-compatibility.html">Atandra T-HUB</a> is basically the same functionality as eCC, though a fair bit more expensive. If you want Quickbooks and shipping integration, you start at $500 with additional fees for support contracts ($250 per year) and setup and training ($250). Unfortunately, T-HUB does not have an off-the-shelf Ubercart integration, despite supporting a zillion other carts (sigh). So for Ubercart you have<a href="http://www.support.atandra.com/index.php?_m=knowledgebase&amp;_a=viewarticle&amp;kbarticleid=1&amp;nav=0,2"> three options</a></p>
<ul>
<li>Use their CSV datafile option. Essentially, have your store generate a CSV file, download it, load it into T-HUB and off you go. On the other hand, ugh&#8230; Not a very convenient solutions</li>
<li>Hire them to do a custom integration. Let&#8217;s assume this is not cheap</li>
<li>Do it yourself based on their published XML spec. In this case, you must pay about $450–$700 to have your integration &quot;certified&quot; and of course you still pay the T-HUB license fees.</li>
</ul>
<h2>Farther Afield</h2>
<p>If you want to look outside the Book, then you can use <a href="http://www.xtuple.com/postbooks">xTuple/Postbooks</a> which is sort of an open source Quickbooks as near as I can tell (and more — it looks like a full Enterprise Resource Management system) and it has <a href="http://www.xtuple.org/ubercart-integration">full Ubercart integration</a>. That will, of course, be a massively hard sell to anyone who already has a business running on Quickbooks.</p>
<p>Then there have been some attempts at a direct Quickbooks integration with Ubercart. That still leaves the shipping problem unsolved, but the bigger problem is that neither of these projects, either <a href="http://drupal.org/project/uc_qb">Ubercart Quickbooks Integration</a> or <a href="http://drupal.org/project/qb">Quickbooks API</a> have ever made it as far as an official stable release. Since this is critical financial data were talking about, it would be nice to see something a lot more mature, but it&#8217;s a potential place to start if you&#8217;re looking to roll your own. If you want to go that route, it looks like the best place to start is <a href="https://github.com/harking/Quickbooks-API/">George Montana Harkin&#8217;s fork of the QB API project</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://raisedbyturtles.org/ubercart-quickbooks-integration-and-ubercart-shipping-integration-options/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using a View as a Content Field in Drupal</title>
		<link>http://raisedbyturtles.org/view-as-content-field-in-drupal/</link>
		<comments>http://raisedbyturtles.org/view-as-content-field-in-drupal/#comments</comments>
		<pubDate>Tue, 02 Nov 2010 19:01:01 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[node reference]]></category>
		<category><![CDATA[views]]></category>

		<guid isPermaLink="false">http://raisedbyturtles.org/?p=498</guid>
		<description><![CDATA[Sometimes you're just dying to bring the power of views formatting to individual CCK fields. The Node Reference Views modules does just that.]]></description>
			<content:encoded><![CDATA[<p>Sometimes in Drupal you&#8217;d like a field that pulls data from other fields, possibly other content types or who knows. If it&#8217;s relatively simple, you can use the <a href="http://drupal.org/project/computed_field">Computed Field module</a> to pull data straight from the database. But if you want to get really tricky, you can use the <a href="http://drupal.org/project/nodereference_views">Node Reference Views</a> module. For example, let&#8217;s say you want to include the weights of individual components of an item, so you get a dropdown list of components to choose from, then once you&#8217;ve chosen them, they will be displayed in your field formatted as you&#8217;ve selected in your View. In other words, imagine that you&#8217;re formatting a list of components using Views as you might normally do, but now you insert that in your node as a field.</p>
<p>So in short you use Node Reference to set the <em>source</em> of the data and you use Node Reference Views to set the <em>format</em> of the data.</p>
<p>Enable both modules.</p>
<p>Now, add a new field to your content type. You&#8217;ll have three choices &#8211; checkboxes, select list or auto-complete. It doesn&#8217;t really make any difference. This is just how you&#8217;re going to choose which ones to include. Select list works well for a medium number of choices %raisedbyturtles.orgexample the total number of components you&#8217;ll have available). On the next screen where you&#8217;re configuring the field, choose which content types are going to be available. In our case we have a special content type for components.</p>
<div id="attachment_512" class="wp-caption aligncenter" style="width: 421px"><a href="http://raisedbyturtles.org/wp-content/uploads/set-content-types.png" rel="lightbox[498]" title="Set the content types"><img src="http://raisedbyturtles.org/wp-content/uploads/set-content-types.png" alt="" title="Set the content types" width="411" height="150" class="size-full wp-image-512" /></a><p class="wp-caption-text">Choose your content types</p></div>
<p>Now we have to create view using the same name as the field type. If you have forgotten what you called it, raisedbyturtles.orgink to get the field name (you can also edit the field and it will tell you on the edit screen).</p>
<div id="attachment_507" class="wp-caption aligncenter" style="width: 310px"><a href="http://raisedbyturtles.org/wp-content/uploads/field-name.png" rel="lightbox[498]" title="Click to enlarge"><img src="http://raisedbyturtles.org/wp-content/uploads/field-name-300x68.png" alt="Hovering over link to get field name" title="Click to enlarge" width="300" height="68" class="size-medium wp-image-507" /></a><p class="wp-caption-text">This field name must be your view name as well (click to enlarge)</p></div>
<p>Now go over to the Views listing and create a new view and give it the same name as the field. In this case nr_component_weights. The view in this case is simple — we just grab the name of the component and the weight. We format it as fields (inline) and rows.</p>
<div id="attachment_511" class="wp-caption aligncenter" style="width: 310px"><a href="http://raisedbyturtles.org/wp-content/uploads/views-screen.png" rel="lightbox[498]" title="Views Settings (click to enlarge)"><img src="http://raisedbyturtles.org/wp-content/uploads/views-screen-300x185.png" alt="Views settings screen" title="Views Settings (click to enlarge)" width="300" height="185" class="size-medium wp-image-511" /></a><p class="wp-caption-text">Views Settings (click to enlarge)</p></div>
<p>Then, here&#8217;s the magic — under <em>Display fields</em> (as opposed to <em>Manage fields</em>) you can choose View as the display mode. The field will now automatically use the View that has the same name.</p>
<div id="attachment_510" class="wp-caption aligncenter" style="width: 310px"><a href="http://raisedbyturtles.org/wp-content/uploads/select-display-view.png" rel="lightbox[498]" title="Select Display Type"><img src="http://raisedbyturtles.org/wp-content/uploads/select-display-view-300x49.png" alt="Display fields screenshot" title="Select Display Type" width="300" height="49" class="size-medium wp-image-510" /></a><p class="wp-caption-text">Choose the View display formatter</p></div>
<p>Now when you go to your node edit screen, you can select whichever nodes (in this case Components) you want to include.</p>
<div id="attachment_508" class="wp-caption aligncenter" style="width: 328px"><img src="http://raisedbyturtles.org/wp-content/uploads/node-selection.png" alt="Screenshot: Node selection on edit screen" title="Node selection on edit screen" width="318" height="115" class="size-full wp-image-508" /><p class="wp-caption-text">Select the nodes you want included in the view</p></div>
<p>Then when you view your page, it will include a field that consists of those nodes, formatted by the View you just created.<br />
<div id="attachment_509" class="wp-caption aligncenter" style="width: 437px"><img src="http://raisedbyturtles.org/wp-content/uploads/result.png" alt="screenshot: as shown to end user" title="Resulting Output" width="427" height="245" class="size-full wp-image-509" /><p class="wp-caption-text">Voila - views output as a field</p></div></p>
<p>Magic!</p>
]]></content:encoded>
			<wfw:commentRss>http://raisedbyturtles.org/view-as-content-field-in-drupal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pull Ubercart Product Options onto Page Using Computed Field</title>
		<link>http://raisedbyturtles.org/pull-ubercart-product-options-onto-page-using-computed-field/</link>
		<comments>http://raisedbyturtles.org/pull-ubercart-product-options-onto-page-using-computed-field/#comments</comments>
		<pubDate>Tue, 02 Nov 2010 05:53:38 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[computed field]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[ubercart]]></category>

		<guid isPermaLink="false">http://raisedbyturtles.org/?p=503</guid>
		<description><![CDATA[How to make product options into a displayable field in Ubercart]]></description>
			<content:encoded><![CDATA[<p>This is just a little tip that came up because I was working on a shop that has a large number of product options in a select list and we want those to be more scannable and searchable in plain text columns as a field. In order to get this into a field you can use the <a href="http://drupal.org/project/computed_field">Computed Field module</a> which will let you enter PHP code and execute and output it. It has some advantages over enabling the PHP filter</p>
<ol>
<li>You don&#8217;t have to actually enable the PHP filter, which cuts down on the risk</li>
<li>The resulting field won&#8217;t be editable by just anyone, but only people who have rights to manage content types</li>
<li>full CCK integration</li>
<li>Options for storing in DB or not, so you can effectively cache the computed value, which in the case we&#8217;ll look at here, has a bit of overhead.</li>
</ol>
<p>One thing to keep in mind: if you do store the value in the database, I believe this will not update until you save the node. I&#8217;m not sure if there&#8217;s a refresh mechanism or not.</p>
<p>This is pretty simple &#8211; just enable the <a href="http://drupal.org/project/computed_field">Computed Field module</a> and create a new field on your content type and make it a Computed Field type.</p>
<p>Then in the computed field, you just add your PHP to grab what you need. In our case, we want to grab the attribute options that are specific to the actual node that we&#8217;re looking at.</p>
<p>Obviously, this is hardcoded for Attribute 1. </p>
<pre class="brush: php; light: true; title: ; notranslate">
$result = db_query(&quot;select ao.name from
                {uc_product_options} as po, {uc_attribute_options} as ao
                 where ao.aid='1' AND ao.oid=po.oid AND nid='%d'
                 order by `name`&quot;, $node-&gt;nid);

$items = array();
while ($row = db_fetch_object($result)) {
  $items[] = check_plain($row-&gt;name);
}
if (empty($items))
{
 $node_field[0]['value'] = '';
}
else
{
  $num_options = count($items);
  $leftside = '';
  $rightside = '';
  $colsize = intval($num_options/2);

  for ($i=0; $i&lt;$colsize; $i++) {
      $leftside .= '&lt;li&gt;' . $items[$i] . '&lt;/li&gt;';
  }
  $leftside = '&lt;ul class=&quot;left half&quot;&gt;'. $leftside . '&lt;/ul&gt;';
  for ($i=$colsize; $i&lt;$num_options; $i++) {
      $rightside .= '&lt;li&gt;' . $items[$i] . '&lt;/li&gt;';
  }
  $rightside = (empty($rightside)) ? '' : '&lt;ul class=&quot;right half&quot;&gt;'. $rightside . '&lt;/ul&gt;';
$items = array();
  $node_field[0]['value'] = $leftside . $rightside;
}
</pre>
<p>And then to output it, in the Display field, </p>
<pre class="brush: php; light: true; title: ; notranslate">
$display = $node_field_item['value'];
</pre>
]]></content:encoded>
			<wfw:commentRss>http://raisedbyturtles.org/pull-ubercart-product-options-onto-page-using-computed-field/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Limiting Menu Choices for Drupal Content Creators</title>
		<link>http://raisedbyturtles.org/limiting-drupal-menu-choices/</link>
		<comments>http://raisedbyturtles.org/limiting-drupal-menu-choices/#comments</comments>
		<pubDate>Mon, 01 Nov 2010 22:52:49 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[menus]]></category>

		<guid isPermaLink="false">http://raisedbyturtles.org/?p=493</guid>
		<description><![CDATA[One challenge for any Drupal site is making the interface simpler for the &#8220;end admin&#8221;, that is to say the person who will ultimately run the site, but is not a developer or Drupal guru. In general, you can turn most things on and off, but the menu system does not allow you to hide [...]]]></description>
			<content:encoded><![CDATA[<p>One challenge for any Drupal site is making the interface simpler for the &#8220;end admin&#8221;, that is to say the person who will ultimately run the site, but is not a developer or Drupal guru. In general, you can turn most things on and off, but the menu system <strong>does not allow you to hide admin menu choices for general site editors</strong>.</p>
<p>So if you have site editors that have the rights to create new menu items, you end up with a massive set of menu choices the user is confronted with and no way to stop them from trying to add a Product link (for example) to the Navigation menu. Or less worrisome, it&#8217;s just a hassle for the user to try to find the right menu, since they sort alphabetically. So they&#8217;ll have scroll forever for anything with a name that sorts lower than Navigation.</p>
<p>Thankfully, there is a module that lets you <strong>hide irrelevant menus in the Drupal node creation form: <a href="http://drupal.org/project/ctm">Menu Settings per Content Type module</a></strong>. This module lets you set it so that when adding content, only menus that might be relevant for that content type get displayed.</p>
<p>Here you can see a before and after, but note that even though I did some Photoshop work to show more of the Before versiraisedbyturtles.org visible, it&#8217;s still a lot less than half the choices. Whereas for the After, that shows the entire menu as presented to the content editor/writer.</p>
<div id="attachment_494" class="wp-caption aligncenter" style="width: 290px"><a href="http://raisedbyturtles.org/wp-content/uploads/content-type-menus.png" rel="lightbox[493]" title="Menu Options Filtering in Drupal"><img src="http://raisedbyturtles.org/wp-content/uploads/content-type-menus-280x300.png" alt="" title="Menu Options Filtering in Drupal" width="280" height="300" class="size-medium wp-image-494" /></a><p class="wp-caption-text">click to see full size</p></div>
]]></content:encoded>
			<wfw:commentRss>http://raisedbyturtles.org/limiting-drupal-menu-choices/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Custom Form Labels in Drupal without String Overrides</title>
		<link>http://raisedbyturtles.org/custom-form-labels-in-drupal-without-string-overrides/</link>
		<comments>http://raisedbyturtles.org/custom-form-labels-in-drupal-without-string-overrides/#comments</comments>
		<pubDate>Tue, 26 Oct 2010 00:04:07 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[modules]]></category>

		<guid isPermaLink="false">http://raisedbyturtles.org/?p=481</guid>
		<description><![CDATA[Change a Drupal form label in such a way that you change it in one place and leave it alone in another, which is not possible with string overrides]]></description>
			<content:encoded><![CDATA[<p>One of the aggravating aspects of customizing built-in labels and other strings in Drupal is that it&#8217;s a simple substitution that will change all occurrences of the exact string through the entire site, regardless of context. So the quick and dirty methods work much of the time, especially for longer strings that are more likely to be unique. In the case of single-word strings, though, they often have different meanings in different contexts. For example, &#8220;View&#8221; can be a noun or a verb, and it might refer to viewing an image or a View from the views module. So sometimes you want and need to be very precise in the way you make these changes.</p>
<p>Let&#8217;s say that you have a field like Weight in one of your Drupal content types (for example, an e-commerce site with Ubercart will have Products and those all have a Weight field). So you want to change that on the entry form to something like Shipping Weight (product as packaged), as distinguished, for example, from Field Weight (product as used). </p>
<p>It&#8217;s really easy to change that using one of the many string substitution methods in Drupal. You can create a full-on translation file using the built-in Drupal Locale system, but that&#8217;s overkill if you&#8217;re building a site in English. Simpler is to use the <a href="http://drupal.org/projectstringoverrides">String Overrides module</a>, which lets you simply override any string. Simply input &#8220;Weight&#8221; in one column and &#8220;Shipping Weight&#8221; in the other and it&#8217;s done!</p>
<p>Simpler still, in your <i>settings.php</i> file, you can simply add a few overrides without the extra overhead of adding a whole module:</p>
<pre class="brush: php; light: true; title: ; notranslate"> $conf['locale_custom_strings_en'] = array(
   'Weight'      =&gt; 'Shipping Weight',
 );
</pre>
<p>Same effect. Great! Just one little problem. Now if you go to a page that has some type of sorting, like for a menu item or taxonomy term, the Weight field that determines sort order in Drupal now reads &#8220;Shipping Weight&#8221; when that isn&#8217;t what it is at all. Arrgh! Drupal indiscriminately looks for any text wrapped in the t() function that matches &#8220;Weight&#8221; and replaces it, regardles of context. That&#8217;s no good!</p>
<p>To get some more granularity, you need to alter your form on a form-by-form basis. To do this, I created a simply module to make the form tweaks I need. I call it TD_form_tweaks because it is for the Trail Designs site. Like any module, it needs a .info file</p>
<p>td_form_tweaks.info</p>
<pre class="brush: plain; title: ; notranslate">
name = TD Form Tweaks
description = &quot;Programmatically make necessary tweaks to forms on the site.&quot;
package = User interface
core = 6.x

version = &quot;6.x-0.9&quot;
core = &quot;6.x&quot;
project = &quot;td_form_tweaks&quot;
datestamp = &quot;1287267734&quot;
</pre>
<p>And then the actual functionality.</p>
<pre class="brush: php; title: ; notranslate">
/**
* @file
* td_form_tweaks allows form modifications using the methods outlined
* in this excellent Lullabot post:
* http://www.lullabot.com/articles/modifying-forms-drupal-5-and-6
*/

/**
* Implementation of hook_form_alter().
*
* This lets you make changes to any form in the site. You can alter
* remove or add form elements. You can also alter the validation
* and submission behavior. The name will always be modulename_form_alter.
* If this will only be used on one form, you can use the hook_FORM_ID_alter
* function instead of the hook_form_alter.
* see http://api.drupal.org/api/function/hook_form_FORM_ID_alter/6
*/
&lt;pre&gt;
function td_form_tweaks_form_alter(&amp;$form, $form_state, $form_id) {

/*
* used with devel module to determine form ID and such
*      $dpm($form);
*/

$is_product == FALSE;
$product_types = uc_product_types();

// is user creating a new product page?
if (arg(0) == 'node' &amp;&amp; arg(1) == 'add' &amp;&amp; in_array(arg(2), $product_types)) {
   $is_product = TRUE;
}

// is user editing an existing product page?
if (arg(0) == 'node' &amp;&amp; arg(2) == 'edit') {
  $node = node_load(arg(1));
  if (!empty($node-&gt;type) &amp;&amp; in_array($node-&gt;type, $product_types)) {
     $is_product = TRUE;
  }
}

// if it's a product, alter the form
if ($is_product &amp;&amp; $form['#id'] == 'node-form') {
      if (!empty($form['base']['weight']['weight'])) {
        $form['base']['weight']['weight']['#title'] = t('Packaged Weight');
      }
  }
}
</pre>
<p>And voilà! This could easily include a <b>switch</b> statement and be set up to make any number of changes to any number of product types. A bit more work than a simple string override, yes, but it doesn&#8217;t propogate willy-nilly throughout the site.</p>
]]></content:encoded>
			<wfw:commentRss>http://raisedbyturtles.org/custom-form-labels-in-drupal-without-string-overrides/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Superfish Menu Block Hidden Behind Following Block in Fusion Theme</title>
		<link>http://raisedbyturtles.org/superfish-menu-block-hidden-behind-following-block-in-fusion-theme/</link>
		<comments>http://raisedbyturtles.org/superfish-menu-block-hidden-behind-following-block-in-fusion-theme/#comments</comments>
		<pubDate>Sat, 23 Oct 2010 23:50:56 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[fusion]]></category>
		<category><![CDATA[superfish]]></category>

		<guid isPermaLink="false">http://raisedbyturtles.org/?p=474</guid>
		<description><![CDATA[I have nothing especially original to add here — this page is mostly meant as a bookmark for my memory. The fix for a vertical menu is slightly (but only slightly) different from the solution outlined in the official docs, so here it is. Essentially, the problem is this: the Fusion theme for Drupal uses [...]]]></description>
			<content:encoded><![CDATA[<p>I have nothing especially original to add here — this page is mostly meant as a bookmark for my memory. The fix for a vertical menu is <i>slightly</i> (but only slightly) different from the solution outlined in the official docs, so here it is.</p>
<p>Essentially, the problem is this: the <a href="http://drupal.org/project/fusion">Fusion theme</a> for <a href="http://drupal.org">Drupal</a> uses <a href="http://users.tpg.com.au/j_birch/plugins/superfish">Superfish menus</a>. If you have a vertical style menu that expands downwards and you have a block below it, when it expands, the flyout menu will be partialy hidden by the menu block below it.</p>
<p>After much going around, the community came up with a couple of solutions mixed into <a href="http://drupal.org/node/645212">a long thread on Drupal.org</a> and more succinctly summed up in a <a href="http://fusiondrupalthemes.com/support/documentation/troubleshooting/why-does-my-superfish-dropdown-menu-go-behind-adjacent-region-">support page at Fusion Themes</a> and that content is reiterated on the general <a href="http://fusiondrupalthemes.com/support/documentation/troubleshooting">Fusion Theme Troubleshooting page</a>. See also the page on <a href="http://fusiondrupalthemes.com/support/theme-developers/special-features/customizing-dropdown-menu">Customizing the Fusion dropdown menus</a> which has some useful information on theming that aspect of Fusion. The Fusion folks also have some good instructions on making a slick looking <a href="http://fusiondrupalthemes.com/story/100525/customizing-superfish-menus-your-fusion-theme">horizontal menu with the second-level menu also horizontal</a>—a neat effect. The third level, if you have one, is then a normal vertical dropdown.</p>
<p>In essence, they suggest setting the containing Drupal block to <i>overflow: visible</i> in the CSS and, if that doesn&#8217;t solve the problem, to set the inner block, that is <i>.block .inner</i> to <i>position:static</i></p>
<p>Neither of those worked for me. I went round and round with this, trying all sorts of combinations, applying these in many combinations to many elements, also playing with <i>position:relative</i> and many other options. Eventually, the solution was dead simple. Assuming that you have a menu named &#8220;main&#8221; and it&#8217;s in a block, then</p>
<blockquote><p>
#block-menu-menu-main  {<br />
position:static;<br />
}
</p></blockquote>
<p>That seems to have solved all of my Superfish issues with positioning.</p>
<p>I still couldn&#8217;t get the arrows to show using autoArrows, but I simply wanted arrows on all menu items that have a flyout submenu. Since Drupal already applies the class &#8220;expanded&#8221; to such items, this was easier to do with simple CSS anyway.</p>
<blockquote><p>
li.expanded {<br />
background:url(&#8220;/sites/default/themes/acquia_prosper/images/arrow.png&#8221;) no-repeat right center transparent;<br />
}
</p></blockquote>
<p>And then finally, to override default Superfish settings as set by Fusion, you simply add a new Superfish initialization function in your <i>js/acquia_prosper_script.js</i> file like so:</p>
<blockquote><p>
Drupal.behaviors.acquia_prosperSuperfish = function (context) {<br />
  $(&#8220;div.block ul.sf-menu&#8221;).superfish({<br />
    hoverClass:  &#8216;sfHover&#8217;,<br />
    delay:       800,<br />
    animation:   {opacity:&#8217;show&#8217;,height:&#8217;show&#8217;},<br />
    speed:       &#8216;slow&#8217;,<br />
    autoArrows:  false,<br />
    dropShadows: false,<br />
    disableHI:   false<br />
  }).supposition();<br />
};
</p></blockquote>
<p>That pretty much solved my Superfish problems.</p>
<p>One remaining issue is that I wanted some top-level menu items that are NOT links. That is to say, that have no destination page, but only a submenu. Drupal does not by default allow this. The page I mentioned earlier on customizing Fusion dropdowns suggests the <a href="http://drupal.org/project/special_menu_items">Special Menu Items module</a>. I haven&#8217;t tried it yet, but it looks like it would do the trick.</p>
]]></content:encoded>
			<wfw:commentRss>http://raisedbyturtles.org/superfish-menu-block-hidden-behind-following-block-in-fusion-theme/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Drupal Mega Menu ideas</title>
		<link>http://raisedbyturtles.org/drupal-mega-menu-ideas/</link>
		<comments>http://raisedbyturtles.org/drupal-mega-menu-ideas/#comments</comments>
		<pubDate>Sun, 17 Oct 2010 05:27:47 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[mega menus]]></category>
		<category><![CDATA[superfish]]></category>

		<guid isPermaLink="false">http://raisedbyturtles.org/drupal-mega-menu-ideas/</guid>
		<description><![CDATA[These are just some random notes on various solutions and half solutions people have put out there for making &#8220;mega menus&#8221; in Drupal. I&#8217;m sure there are much better roundups out there. I just don&#8217;t want this to fade entirely into the disorganized soup of my delicious bookmarks. In brief, a mega menu is a [...]]]></description>
			<content:encoded><![CDATA[<p>These are just some random notes on various solutions and half solutions people have put out there for making &#8220;mega menus&#8221; in Drupal. I&#8217;m sure there are much better roundups out there. I just don&#8217;t want this to fade entirely into the disorganized soup of my delicious bookmarks.</p>
<p>In brief, a mega menu is a dropdown menu that shows all child menus (as in child and grandchild menus) in one big flyout.</p>
<p>Many Drupal themes come with Superfish menus, including the popular Fusion family of themes, so that seems like a decent place to start. Over on Dave Buchholz&#8217;s I-cre8 blog, he has a <a href="http://www.i-cre8.biz/jquery-superfish-mega-menu">brief post on Superfish mega menus</a> that links to a demo and a download.</p>
<p>Beyond Superfish, there is an alpha version of a <a href="http://drupal.org/project/megamenu">Megamenu module</a>. Does it play nice with Superfish or replace it? I&#8217;m not sure yet.</p>
<p>If you&#8217;ve planned way ahead and haven&#8217;t started theming yet, you could use the <a href="http://www.joomlart.com/drupal/themes/jd-t3-blank">JDT3 theme from JoomlArt</a> which comes with Mega Menus built in, though you will have to buy a membership in JoomlArt in order to access it. The site is running Joomla I suppose, but there is a <a href="http://demo.t3.joomlart.com/drupal/">Drupal demo</a>, which with a little styling would be quite adequate.</p>
<h2>Some Other Menu Stuff</h2>
<p>The <a href="http://drupal.org/project/menu_block">Menu block module</a> creates a block that appears dependent on context. So if you have articles and galleries, if you&#8217;re looking at an article category or node, it can give you a menu block with items relevant to navigation from where you are currently.  If that makes any sense&#8230;</p>
<p>And while we&#8217;re at it, if you want to <strong>add arrows</strong> to Superfish menus in a Fusion theme, the good folks at FusionDrupalThemes.com have a <a href="http://fusiondrupalthemes.com/story/100525/customizing-superfish-menus-your-fusion-theme">nice little tutorial</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://raisedbyturtles.org/drupal-mega-menu-ideas/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Stamps.com or Endicia Dazzle with Webgility eCC and Ubercart?</title>
		<link>http://raisedbyturtles.org/stamps-com-or-endicia-dazzle-with-webgility-ecc-and-ubercart/</link>
		<comments>http://raisedbyturtles.org/stamps-com-or-endicia-dazzle-with-webgility-ecc-and-ubercart/#comments</comments>
		<pubDate>Mon, 11 Oct 2010 19:31:00 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[dazzle]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[ecc]]></category>
		<category><![CDATA[endicia]]></category>
		<category><![CDATA[stamps.com]]></category>
		<category><![CDATA[ubercart]]></category>
		<category><![CDATA[webgility]]></category>

		<guid isPermaLink="false">http://raisedbyturtles.org/?p=457</guid>
		<description><![CDATA[I&#8217;ve been testing Webgility eCC with Ubercart and Dazzle and Stamps.com. Okay, I expect anyone who makes it to this page will know what all of those are, but in brief: Ubercart is a shopping cart system built on Drupal. I love the power of Drupal CCK (custom structured data fields of any imaginable sort) [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been testing Webgility eCC with Ubercart and Dazzle <em>and</em> Stamps.com. Okay, I expect anyone who makes it to this page will know what all of those are, but in brief:</p>
<ul>
<li><a href="http://ubercart.org">Ubercart</a> is a shopping cart system built on <a href="http://drupal.org">Drupal</a>. I love the power of Drupal <a href="http://drupal.org/project/content">CCK</a> (custom structured data fields of any imaginable sort) plus <a href="http://drupal.org/project/content">Views</a> (which allows for amazing custom data extraction and presentation. There&#8217;s simply nothing like it and Ubercart lets you build on the power of Drupal.</li>
<li><a href="http://webgility.com">Webgility e-Commerce Connector (eCC)</a> is a desktop tool that provides complete integration between Ubercart, the Quickbooks accounting system and shipping systems, notably Endicia Dazzle and Stamps.com.</li>
<li><a href="http://stamps.com">Stamps.com</a> lets you buy US Postal Service postage and print shipping labels straight from your computer, for both domestic and international shipping.</li>
<li><a href="http://endicia.com">Endicia Dazzle</a> lets you print shipping labels not only from the USPS for domestic and international shipping, but also from UPS and FedEx if you sign up for one of the pricier plans.</li>
<li>Both pre-fill and print integrated customs declarations as a single label and advise on prohibited items for the country in question (you can&#8217;t legally send a radar detector to Swizterland, for example).
</li>
</ul>
<p>Overall, the system is pretty incredible and both Dazzle and Stamps.com work great. As standalone applications, I could take either one and be very happy. Both of them offer 30-day free trials, so there&#8217;s no harm in doing what I did and testing both to see which works best for you.</p>
<p>When it comes to using Stamps.com and Endicia Dazzle through the eCC interface, though, there are a couple of differences as you can see in these pictures and as described below (click to see full sized images):</p>
<div id="attachment_461" class="wp-caption aligncenter" style="width: 310px"><a href="http://raisedbyturtles.org/wp-content/uploads/stamps-in-ecc.png" rel="lightbox[457]" title="Stamps.com Tab in eCC"><img src="http://raisedbyturtles.org/wp-content/uploads/stamps-in-ecc-300x180.png" alt="Stamps.com Tab in eCC" title="Stamps.com Tab in eCC" width="300" height="180" class="size-medium wp-image-461" /></a><p class="wp-caption-text">Stamps.com Tab in eCC with Shipping Info</p></div>
<div id="attachment_460" class="wp-caption aligncenter" style="width: 310px"><a href="http://raisedbyturtles.org/wp-content/uploads/endicia-in-ecc.png" rel="lightbox[457]" title="Endicia Tab in eCC"><img src="http://raisedbyturtles.org/wp-content/uploads/endicia-in-ecc-300x180.png" alt="Endicia Tab in eCC" title="Endicia Tab in eCC" width="300" height="180" class="size-medium wp-image-460" /></a><p class="wp-caption-text">Dazzle—no shipping rates</p></div>
<div id="attachment_462" class="wp-caption aligncenter" style="width: 310px"><a href="http://raisedbyturtles.org/wp-content/uploads/endicia-native.png" rel="lightbox[457]" title="Endicia Native Interface"><img src="http://raisedbyturtles.org/wp-content/uploads/endicia-native-300x272.png" alt="Endicia Native Interface" title="Endicia Native Interface" width="300" height="272" class="size-medium wp-image-462" /></a><p class="wp-caption-text">Endicia—no shipping info</p></div>
<p>Now when you click to generate the label in Stamps.com it just generates it right from eCC without opening the Stamps.com desktop application. When you click to generate the label via Endicia Dazzle, it takes you to the Dazzle desktop app, but minus the information you really care about—the Send To address and the shipping charges. This is not the case if you are shipping entirely from within the Endicia interface, but in that case, there&#8217;s no great way to get your data from your store to Endicia—the best option for Ubercart is to generate an XML file, download it, open Endicia, load the XML file into Endicia and then generate labels.</p>
<ul>
<li>Stamps.com actually tells you how much the shipping will cost before you print. To me, this is just a huge plus in favor or Stamps.com</li>
<li>Stamps.com also keeps you within Webgility eCC and so you see the address that it&#8217;s printing for and all the other details. The eCC Dazzle connector transfers you to the desktop Dazzle application when you click on &#8220;Generate Label&#8221;, but the handoff is a little rough.
<ul>
<li>when the Dazzle app comes up, it does not display the Ship To address or the postage charges.</li>
<li>If you have Dazzle already open, the XML file used to transfer data between eCC and Dazzle will be locked, which means that eCC can&#8217;t send data to it and you&#8217;ll go almost through the whole process and then it will fail with and &#8220;Outputfile not generated&#8221; error (note, this is not &#8220;Output File not generated&#8221;, outputfile is a specific term used by the Dazzle XML spec).</li>
</ul>
<p>Again, this is another huge plus in favor of Stamps.com</li>
<li>Dazzle has a &#8220;test mode&#8221; where it will print labels with &#8220;Void&#8221; across them, so that you can test print before you commit. I think that&#8217;s key, since you don&#8217;t see the rates ahead of time, but really not necessary in the Stamps.com interface, because you have all the information you need. So I would say this somewhat mitigates the issues mentioned above, but who wants to print a test label, review it, and then print it for real?</li>
</ul>
<p>With the USPS shipping, postage is like money. When you print a label, you&#8217;ve spent money just as much as if you converted your dollars into a Starbucks Frappuccino and, since the Ship To address is printed on the label, a week-old label is about as hard to convert back into dollars as a week-old Frappuccino. So if you&#8217;re primarily shipping USPS, it&#8217;s a lot nicer to use the Stamps.com interface. </p>
<p>On the other hand, Stamps.com limits you to just one shipper. If you bump up to one of the Pro Plans with Endicia, you also get UPS, FedEx and Ke</p>
<p>Depending on your budget, however, you can use both. In order to run eCC you need the Dazzle premium service ($16/month). Stamps.com costs about the same</p>
]]></content:encoded>
			<wfw:commentRss>http://raisedbyturtles.org/stamps-com-or-endicia-dazzle-with-webgility-ecc-and-ubercart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

