<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>wax ideal &#187; web development</title>
	<atom:link href="http://waxideal.com/blog/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://waxideal.com/blog</link>
	<description>learning to be human, since 1984</description>
	<lastBuildDate>Wed, 08 Sep 2010 08:38:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>The Wild, Wild Web</title>
		<link>http://waxideal.com/blog/2010/09/08/the-wild-wild-web/</link>
		<comments>http://waxideal.com/blog/2010/09/08/the-wild-wild-web/#comments</comments>
		<pubDate>Wed, 08 Sep 2010 08:38:14 +0000</pubDate>
		<dc:creator>sarandi</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html/xhmtl]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://waxideal.com/blog/?p=529</guid>
		<description><![CDATA[A dial tone, followed by the sound of a broken coffee grinder. Then, Darth Vader exhales through his respirator and pauses abruptly: You&#8217;ve got mail. The first time I went online was on one of my uncle&#8217;s old computers. It was running either Windows (3.1 or 95) and still used DOS for many of its]]></description>
			<content:encoded><![CDATA[<p>A dial tone, followed by the sound of a broken coffee grinder. Then, Darth Vader exhales through his respirator and pauses abruptly: You&#8217;ve got mail.</p>
<p>The first time I went online was on one of my uncle&#8217;s old computers. It was running either Windows (3.1 or 95) and still used DOS for many of its applications. The thing was ancient, and I was scant 10 years old. I didn&#8217;t fully understand the implications of communicating or publishing content online, and by no means did I understand the technology that made it all work.</p>
<p>Fast-forward 4 years: every weirdo with an AOL account and too much time had a Geocities account &#8211; including me. I learned html 3 and 4, and eventually unlearned the marquee and blink elements. I tinkered with PERL, and javascript, and when CSS announced, I immediately started changing font colors, sizes, and other superficial properties.</p>
<p>More frequently than I cared to, I upgraded to the most recent browser &#8211; just to get crucial features that now seem completely arbitrary. The worst part was that the overlap between browser features was so limited; Netscape and Internet Explorer rarely rendered things the same way and had drastically different sets of element support.</p>
<p>Nearly 15 years later and proprietary elements are a thing of the past &#8211; but each browser development team implements element <em>support</em> at what seems to be their whim and fancy. After almost a decade and a half, it may not be the wild west that it once was &#8211; but cross-browser compatibility issues still render  markup development nothing less than a rodeo. Luckily, good cowboys (and gals) can use some friendly frameworks to lasso up the troublemakers *cough*Internet Exploder*cough*.</p>
<p>Now git along, little doggie.</p>
<p>What can we do about it? Design for browsers whose development teams employ agile development cycles to push the limits of current markup capabilities. Thanks <a href="http://techie-buzz.com/browsers/firefox-3-7-dropped-next-firefox-4-0.html">Firefox</a> &#038; <a href="http://blog.chromium.org/2010/07/release-early-release-often.html">Chrome</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://waxideal.com/blog/2010/09/08/the-wild-wild-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>301 Redirects in Drupal Pages</title>
		<link>http://waxideal.com/blog/2010/05/15/301-redirects-in-drupal-pages/</link>
		<comments>http://waxideal.com/blog/2010/05/15/301-redirects-in-drupal-pages/#comments</comments>
		<pubDate>Sat, 15 May 2010 10:33:23 +0000</pubDate>
		<dc:creator>sarandi</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[quick tip]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://waxideal.com/blog/?p=497</guid>
		<description><![CDATA[I recently ran into a problem with a Drupal site I designed and maintain. Here&#8217;s a quick explanation of the problem, and then the solution. The front page has a Views Slideshow Block that grabs node data from custom CCK types. These types contain an image to be displayed in the slideshow (but not the]]></description>
			<content:encoded><![CDATA[<p>I recently ran into a problem with a Drupal site I designed and maintain. Here&#8217;s a quick explanation of the problem, and then the solution.</p>
<p>The front page has a Views Slideshow Block that grabs node data from custom CCK types. These types contain an image to be displayed in the slideshow (but not the node itself) and a checkbox for enabling or disabling the node from appearing in the Slideshow Block. The slideshow images by default link to the nodes from which they were created.</p>
<p>The problem is linking to a page rendered by Views. Since I can&#8217;t add a field for the image or checkbox in a view page (not that I know of, let me know if I&#8217;m wrong on this) I had to figure out a different way. And I did, but not without further glitches.</p>
<p>I added the image and checkbox fields to my Page content type and created a node with the appropriate image. It appeared in the slideshow and linked to the page. I then tried several methods to redirect the alias to the correct page. First, the Path Redirect Module. Fail. Then, cpanel&#8217;s .htaccess redirect configuration tool. Fail. <a title="Apache URL Rewriting Guide" href="http://httpd.apache.org/docs/2.2/rewrite/rewrite_guide.html" target="_blank">Then manual .htaccess configuration</a>. Fail.</p>
<p>I don&#8217;t really know why the .htaccess failed &#8211; I have suspicions it has to do simply with Apache not updating, the fact that I have the Global Redirect Module installed, the clean url directives that already exist in the .htaccess file, or some similar url rewriting conflict.</p>
<p>In a pinch, I added this snippet of code to the body of the page I created:</p>
<pre><code>&lt;?php
 header("HTTP/1.1 301 Moved Permanently");
 header("Location: http://www.mysite.com/aliasname");
 exit();
 ?&gt;
</code></pre>
<p>This delicious morsel did the trick, but not without a headache first. You&#8217;ll have to have access to posting PHP code, and post it as source, even if you select the PHP option.</p>
]]></content:encoded>
			<wfw:commentRss>http://waxideal.com/blog/2010/05/15/301-redirects-in-drupal-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Windows 7 Symlinks</title>
		<link>http://waxideal.com/blog/2010/03/29/using-windows-7-symlinks/</link>
		<comments>http://waxideal.com/blog/2010/03/29/using-windows-7-symlinks/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 05:19:40 +0000</pubDate>
		<dc:creator>sarandi</dc:creator>
				<category><![CDATA[business]]></category>
		<category><![CDATA[clients]]></category>
		<category><![CDATA[document storage]]></category>
		<category><![CDATA[organization]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[windows 7]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://waxideal.com/blog/?p=469</guid>
		<description><![CDATA[I ran into a problem with integrating my web development/design projects on my computer with my local webserver. To further explain: I keep all my professional work, including client files, on a separate hard drive partition so that I can easily and regularly back them up, let&#8217;s call it g:\ Client files for web projects]]></description>
			<content:encoded><![CDATA[<p>I ran into a problem with integrating my web development/design projects on my computer with my local webserver. To further explain:</p>
<ul>
<li>I keep all my professional work, including client files, on a separate hard drive partition so that I can easily and regularly back them up, let&#8217;s call it g:\</li>
<li>Client files for web projects are organized as such: g:\clients\client-name\project-name , so that if a long-term client wants a site redesign, I can easily keep these separate rather than dumping them into a single public_html directory for each client</li>
<li>My local testing server is pointed at a different partition, let&#8217;s call it h:\</li>
<li>I want to be able to serve individual projects via the testing server, but only work on the project files</li>
</ul>
<p>Naturally, I thought of unix aliases but I&#8217;m currently running Windows 7 so I tried shortcuts. Didn&#8217;t work. After a little digging, I found the solution: symlinks (which work in numerous OSes &#8211; thanks for the correction). From the command line, type:</p>
<pre>mklink /D H:\target\directory\linkname G:\clients\client-name\project-name</pre>
<p>mklink /D creates a symlink, or a soft link that is the Windows equivalent to unix aliases. The first argument is the directory where you want the link to be placed, and the second is the source directory. Easy as pie.</p>
<p>Be careful when deleting/writing content &#8211; the linked directory allows you to manipulate the original file!</p>
]]></content:encoded>
			<wfw:commentRss>http://waxideal.com/blog/2010/03/29/using-windows-7-symlinks/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fixing PHPList Delete/Merge Attributes Function</title>
		<link>http://waxideal.com/blog/2010/03/18/fixing-phplist-deletemerge-attributes-function/</link>
		<comments>http://waxideal.com/blog/2010/03/18/fixing-phplist-deletemerge-attributes-function/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 20:46:09 +0000</pubDate>
		<dc:creator>sarandi</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://waxideal.com/blog/?p=465</guid>
		<description><![CDATA[I recently installed PHPList v2.10.10 (the latest stable release) to manage an email campaign and ran into a slight problem. PHPList allows users to define their own form fields for lists &#8211; name, address, birthday, email, and so on. These fields are referred to as &#8220;attributes&#8221;. Almost any type of data can be configured by]]></description>
			<content:encoded><![CDATA[<p>I recently installed PHPList v2.10.10 (<a title="The latest stable release of PHPList" href="http://www.phplist.com/download" target="_blank">the latest stable release</a>) to manage an email campaign and ran into a slight problem. PHPList allows users to define their own form fields for lists &#8211; name, address, birthday, email, and so on. These fields are referred to as &#8220;attributes&#8221;. Almost any type of data can be configured by adding an attribute in PHPList. You then create a sign-up page and choose which attributes you want users to enter, and whether or not that attribute is required to complete list sign-up.</p>
<p>I started setting up my attributes and naturally, added one by accident. After finding a button deceivingly named &#8220;delete&#8221;, I clicked it to correct my error. An http request was sent and the page reloaded &#8211; but my attribute was still there, winking at me like an old man who &#8211; while sitting on his porch &#8211; witnessed your ice cream tumbling off its cone after the first lick.</p>
<p>Luckily, a quick search found a remedy so I pass it along to you, the ethereal inter-web user:</p>
<p><a title="Fix for PHPList delete/merge function" href="http://forums.phplist.com/viewtopic.php?f=17&amp;t=24502#p67476" target="_blank">http://forums.phplist.com/viewtopic.php?f=17&amp;t=24502#p67476</a></p>
<p>Take that, old man.</p>
]]></content:encoded>
			<wfw:commentRss>http://waxideal.com/blog/2010/03/18/fixing-phplist-deletemerge-attributes-function/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>10 Tips for HTML Email Lists, Templates, and Campaigns</title>
		<link>http://waxideal.com/blog/2010/03/15/10-tips-for-html-email-lists-templates-and-campaigns/</link>
		<comments>http://waxideal.com/blog/2010/03/15/10-tips-for-html-email-lists-templates-and-campaigns/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 03:45:45 +0000</pubDate>
		<dc:creator>sarandi</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[html/xhmtl]]></category>
		<category><![CDATA[typography]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://waxideal.com/blog/?p=461</guid>
		<description><![CDATA[Developing a good-looking email campaign should be easy, right? You&#8217;d be amazed at how backwards the process is. This post assumes you have the technical and creative chops to hosting the email service yourself, rather than choosing a paid service like constant contact or mailchimp. Where&#8217;s the fun in that?! From choosing the right host]]></description>
			<content:encoded><![CDATA[<p>Developing a good-looking email campaign should be easy, right? You&#8217;d be amazed at how backwards the process is. This post assumes you have the technical and creative chops to hosting the email service yourself, rather than choosing a paid service like constant contact or mailchimp. Where&#8217;s the fun in that?!</p>
<p>From choosing the right host to archaic css support, here are some tips to help you remedy the malaise of maligned markup and hosting services:</p>
<ol>
<li>Start with a plan. You need to know five things:
<ol>
<li>how many people you plan on reaching</li>
<li>how frequently you will be emailing them</li>
<li>what features you would like (html vs plaintext, images, etc.)</li>
<li>the duration of your campaign</li>
<li>your budget</li>
</ol>
</li>
<li>Find email list software that does everything you need it to do and is easy to use. Generally, they have demo sites where you can test out their features. Some even integrate with popular CMSes, like Drupal, WordPress, and Joomla. Try several of them out until you find something that you like and that is either offered by your host, or that can easily be installed. Choosing software with good documentation and a large, nerdy user base is typically a good bet.</li>
<li>If you are planning on sending a lot of emails, find a host that allows it. Hosts typically set a throttling rate to govern the number of emails that can be sent per hour and per day. Defaults on these figures are usually low, but can often be raised after contacting customer support. Do some research beforehand and you&#8217;ll be okay.</li>
<li>Make sure the email list software you are using &#8211; as well as your host &#8211; aren&#8217;t blacklisted by major mail servers like gmail, yahoo, etc. Similarly, make sure your host&#8217;s filtering/spam settings are either disabled or allow for large quantities of outgoing mail with your keywords.</li>
<li>Keep the design simple. Most mail clients and online email service providers allow for minimal use of css and html. They vary drastically in their support (you can find more info here: <a title="Email Standards" href="http://www.email-standards.org/" target="_blank">http://www.email-standards.org/</a> ), but here are some quick pointers:
<ol>
<li>Use tables for optimum control over content alignment. Some email clients don&#8217;t render floating elements properly and certainly don&#8217;t degrade elegantly. You can avoid tabular layouts altogether if you keep your design simple with a single column of text.</li>
<li>Avoid the default line length; in other words, your text shouldn&#8217;t  run as wide as the window. There are two reasons for this:
<ol>
<li>It is harder to read</li>
<li>It won&#8217;t grab the reader&#8217;s attention to begin with &#8211; it looks like most junk they get in their inboxes. Even if they do start reading it, make it easier by limiting the width of a text block to 35-55 characters, either by setting a css width on your containing element, or by using deprecated methods like setting the width attribute in a table.</li>
</ol>
</li>
<li>Use inline css on each element that you want to configure</li>
<li>Counter-intuitively, don&#8217;t depend on the &#8220;cascade&#8221; in body css &#8211; in other words, if you want all of your text to be styled with font-family: verdana, you might need to place that on each element</li>
<li>Related to the previous point, avoid using css in the body element; some mail engines strip all html that is outside of body, including body.</li>
<li>Avoid images as CSS backgrounds &#8211; instead, use image elements and get creative; a well designed image can create a fake page-corners, fades, and other common html graphics techniques. (a great example is the Organizing for America Campaign)</li>
</ol>
</li>
<li>Design for your audience. If you don&#8217;t know who that is, do some research. There&#8217;s nothing wrong with designing as broadly as possible &#8211; but with clear guides. If you know people who have difficulty reading small text will be receiving your email, ensure the text is large enough and with sufficient contrast. Don&#8217;t make it gaudily large, around 12-16px in many common webfonts generally does the trick. Images can&#8217;t be read by screen readers without alt attributes, so always include them. Title attributes are helpful as well, for mouseovers.</li>
<li>Make sure the email has a clear goal and that it is easy to achieve; use image and text links to guide the reader to an actionable task. Generally, these links should point to a landing page on your site from which you can collect referral information.</li>
<li>Make sure your content is engaging. From the images to the copy, everything should be designed to appeal to the reader&#8217;s senses and sensibilities. Knowing your audience is crucial for this step, so do some research if you haven&#8217;t already.</li>
<li>Test, test, test. If you don&#8217;t have accounts on the major email services, sign up for them. I would advise keeping track of these usernames/passwords in a safe place (<a title="Keepass - Free, secure, opensource password management" href="http://keepass.info" target="_blank">http://keepass.info</a>), for future testing purposes. Avoid filling out personal information other than what is required by law. While I don&#8217;t condone creating false aliases, I also don&#8217;t condone data-mining, as commonly practiced by google/gmail. Tread carefully and wisely. Also, download and/or purchase major email clients (thunderbird, outlook, eudora, etc.), configure them with the appropriate server settings, and test there too.</li>
<li>Finally: know the law. The European Union and a few states require opt-in/out clauses and privacy policies to be provided at the time of sign-up and linked in every transmission. Unless you&#8217;re living in China, North Korea, or other places where access to information is limited (among other things), the internet is boundless &#8211; you can&#8217;t plan on never getting a hit from the EU, California, Minnesota, Nevada, or other places where laws exist to protect privacy over the web. While it&#8217;s unlikely that problems will arise, they can be avoided altogether by including these things. The best way to protect yourself is to know the law and plan for future problems. I&#8217;m by no means a lawyer, but I have taken a course in internet/information law. If you&#8217;re uncertain, you should probably set up a consultation meeting with a bar-certified professional specializing in this area. A great online resource is <a title="EPIC - Electronic Privacy Information Center" href="http://www.epic.org" target="_blank">http://www.epic.org</a> You can sign-up for their feeds to stay on top of current electronic privacy legislation, cases, and so on.</li>
</ol>
<p>There are certainly more techniques and considerations, but these should help get you started if you&#8217;re uncertain or new to managing and designing email lists. While I strongly condone pushing browser standards forward, the state of email rendering is even less homogeneous &#8211; and emails translate into business and money. While it&#8217;s great to support and use standards, the burden of implementing standards compliant emails shouldn&#8217;t be on the client. Designers &amp; developers need better support from corporations. Full stop, end of transmission.</p>
]]></content:encoded>
			<wfw:commentRss>http://waxideal.com/blog/2010/03/15/10-tips-for-html-email-lists-templates-and-campaigns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Quick Note on Image Visibility in Drupal&#8217;s Views_Gallery Module</title>
		<link>http://waxideal.com/blog/2010/02/23/a-quick-note-on-image-visibility-in-drupals-views_gallery-module/</link>
		<comments>http://waxideal.com/blog/2010/02/23/a-quick-note-on-image-visibility-in-drupals-views_gallery-module/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 02:51:19 +0000</pubDate>
		<dc:creator>sarandi</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[quick tip]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://waxideal.com/blog/?p=425</guid>
		<description><![CDATA[For anyone whose views_gallery module seems to be installed and configured correctly: Don&#8217;t forget to enable anonymous user permissions. This goes for most uploaded content, including attachments.]]></description>
			<content:encoded><![CDATA[<p>For anyone whose views_gallery module seems to be installed and configured correctly:</p>
<p>Don&#8217;t forget to enable anonymous user permissions. This goes for most uploaded content, including attachments.</p>
]]></content:encoded>
			<wfw:commentRss>http://waxideal.com/blog/2010/02/23/a-quick-note-on-image-visibility-in-drupals-views_gallery-module/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inserting a span element into an anchor via Drupal&#8217;s $primary_links</title>
		<link>http://waxideal.com/blog/2010/02/22/inserting-a-span-element-into-an-anchor-via-drupals-primary_links/</link>
		<comments>http://waxideal.com/blog/2010/02/22/inserting-a-span-element-into-an-anchor-via-drupals-primary_links/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 03:54:36 +0000</pubDate>
		<dc:creator>sarandi</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://waxideal.com/blog/?p=421</guid>
		<description><![CDATA[I previously wrote about how to insert a span into a link, but after testing this method quickly failed when coupled with the Views module. When a Page view is created and assigned to a node url, everything is fine and dandy. The issues arise when you want a link to use an alias. Luckily,]]></description>
			<content:encoded><![CDATA[<p>I previously wrote about how to insert a span into a link, but after testing this method quickly failed when coupled with the Views module. When a Page view is created and assigned to a node url, everything is fine and dandy. The issues arise when you want a link to use an alias. Luckily, I&#8217;ve devised a really simple work around:</p>
<p>use the same code to generate your menu:</p>
<pre class="brush: php;">&amp;lt;?php if (!empty($primary_links)): ?&amp;gt;
&amp;lt;?php print theme('links', $primary_links, array('id' =&amp;gt; 'nav')); ?&amp;gt;
&amp;lt;?php endif; ?&amp;gt;
</pre>
<p>this calls the links() function inside of includes/theme.inc, which triggers the l() function in the includes/common.inc to write the primary links menu. We can&#8217;t override the l() entirely because other code uses it, so we&#8217;ll copy the code from theme.inc and override the l() function with a site template specific one. Here&#8217;s my code:</p>
<p>theme.inc</p>
<pre class="brush: php;">function mytheme_links($links, $attributes = array('class' =&amp;gt; 'links')) {
 global $language;
 $output = '';
 $options = array(
 'class' =&amp;gt; '',
 'html' =&amp;gt; FALSE,
 );

 if (count($links) &amp;gt; 0) {
 $output = '&amp;lt;ul' . drupal_attributes($attributes) .'&amp;gt;';

 $num_links = count($links);
 $i = 1;

 foreach ($links as $key =&amp;gt; $link) {
 $class = $key;

 $links['attributes']['title'] = $link['title'];
 // Add first, last and active classes to the list of links to help out themers.
 if ($i == 1) {
 $class .= ' first';
 }
 if ($i == $num_links) {
 $class .= ' signup last';
 $links['attributes']['class'] .= $class;
 }
 if (isset($link['href']) &amp;amp;&amp;amp; ($link['href'] == $_GET['q'] || ($link['href'] == '&amp;lt;front&amp;gt;' &amp;amp;&amp;amp; drupal_is_front_page()))
 &amp;amp;&amp;amp; (empty($link['language']) || $link['language']-&amp;gt;language == $language-&amp;gt;language)) {
 $class .= ' active';
 }
 $output .= '&amp;lt;li' . drupal_attributes(array('class' =&amp;gt; $class)) .'&amp;gt;';

 if (isset($link['href'])) {
 // Pass in $link as $options, they share the same keys.

//here's my call to the overridden function
 $output .= mytheme_l($link['title'], $link['href'], $links);
 }
 else if (!empty($link['title'])) {
 // Some links are actually not links, but we wrap these in &amp;lt;span&amp;gt; for adding title and class attributes
 if (empty($link['html'])) {
 $link['title'] = check_plain($link['title']);
 }
 $span_attributes = '';
 if (isset($link['attributes'])) {
 $span_attributes = drupal_attributes($link['attributes']);
 }
 $output .= '&amp;lt;span'. $span_attributes .'&amp;gt;'. $link['title'] .'&amp;lt;/span&amp;gt;';
 }

 $i++;
 $output .= &quot;&amp;lt;/li&amp;gt;\n&quot;;
 }

 $output .= '&amp;lt;/ul&amp;gt;';
 }

 return $output;
}</pre>
<p>and now the l() function in common.inc gets changed to mytheme_l():</p>
<pre class="brush: php;">function mytheme_l($text, $path, $options = array()) {
 global $language;

 // Merge in defaults.
 $options += array(
 'attributes' =&amp;gt; array(),
 'html' =&amp;gt; FALSE,
 );

 // Append active class.
 if (($path == $_GET['q'] || ($path == '&amp;lt;front&amp;gt;' &amp;amp;&amp;amp; drupal_is_front_page())) &amp;amp;&amp;amp;
 (empty($options['language']) || $options['language']-&amp;gt;language == $language-&amp;gt;language)) {
 if (isset($options['attributes']['class'])) {
 $options['attributes']['class'] .= ' active';
 }
 else {
 $options['attributes']['class'] = 'active';
 }
 }

 // Remove all HTML and PHP tags from a tooltip. For best performance, we act only
 // if a quick strpos() pre-check gave a suspicion (because strip_tags() is expensive).
 if (isset($options['attributes']['title']) &amp;amp;&amp;amp; strpos($options['attributes']['title'], '&amp;lt;') !== FALSE) {
 $options['attributes']['title'] = strip_tags($options['attributes']['title']);
 }
 // Inject a span inside the anchor tag for the purposes of this theme - NOTE - May have to remove check_plain() around
 // the $text variable
 return '&amp;lt;a href=&quot;'. check_url(url($path, $options)) .'&quot;'. drupal_attributes($options['attributes']) .'&amp;gt;&amp;lt;span&amp;gt;'. ($options['html'] ? $text : check_plain($text)) .'&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;';
}</pre>
<p>You can see that all I did was include the span element inside the anchor tag using simple php string concatenation. Until I can find a better solution, this does the trick. Don&#8217;t ask me about benchmarking, though&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://waxideal.com/blog/2010/02/22/inserting-a-span-element-into-an-anchor-via-drupals-primary_links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
