Cwgordon7's blog - drupal /taxonomy/term/1/0 en Usability: Rearranging the Node Form /usability-rearranging-the-node-form <p>I've been working on implementing Leisa Reichelt's <a href="http://www.d7ux.org/content/">design for the new node add/edit form</a>. <a href="http://hojtsy.hu/">Gábor Hojtsy</a> started the process off by creating a <a href="http://drupal.org/node/472126">patch</a> to move the submit buttons up to the right, and separate the node form into a "Content" and a "Meta" tab. I refined his patch to make the horizontal tabs a reusable form element, and in the current state of the patch, the node form looks as pictured:</p> <p><a href="/usability-rearranging-the-node-form" target="_blank">read more</a></p> /usability-rearranging-the-node-form#comments drupal usability Mon, 15 Jun 2009 15:48:02 +0000 cwgordon7 19 at How to: Write Automated Tests for Drupal /how-to-write-automated-tests-for-drupal <p>With <a href="http://drupal.org/cvs?commit=111813">an automated testing framework in core</a>, Drupal is now far along the road to a practice of <a href="http://en.wikipedia.org/wiki/Test-driven_development">Test-driven development</a>. But there's one thing missing: a complete, in-depth, up-to-date tutorial on how to actually <strong>write</strong> these tests. Although there is the <a href="http://drupal.org/project/simpletest_automator">SimpleTest Automator</a> module to help you create these tests through the user interface, it is currently imperfect and under development, so this post will be a tutorial on writing these tests manually.</p> <h2>Testing resources</h2> <p>Here's just a general list of resources we should keep handy while writing our test:</p> <ul> <li><a href="http://drupal.org/node/265762">Testing API functions</a> - This is a quick cheat sheet of some functions that are very helpful during testing. These include controlling the internal testing browser, creating users with specific permissions, and simulating clicking on links that appear in the page.</li> <li><a href="http://drupal.org/node/265828">Available assertions</a> - Assertions are how you determine whether your code is working or not - you assert that it <strong>should</strong> be working, and let the testing framework handle the rest for you. This is a library on the assertions that are available to use in our testing framework.</li> </ul> <p><a href="/how-to-write-automated-tests-for-drupal" target="_blank">read more</a></p> /how-to-write-automated-tests-for-drupal#comments drupal how to simpletest Mon, 14 Jul 2008 06:02:47 +0000 cwgordon7 17 at Awesomeness and Drupal /awesomeness-and-drupal <p>It has recently come to my attention that I was the only one on drupal.org that had <a href="http://drupal.org/profile/interest/awesomeness">"awesomeness"</a> as an interest. My complaints on irc sparked the discussion: what does the word "awesomeness" mean? Is it even a word? And why is Drupal pure awesomeness?</p> <p>So I compiled a list of definitions of "Awesomeness" from the internet:</p> <p><a href="/awesomeness-and-drupal" target="_blank">read more</a></p> /awesomeness-and-drupal#comments awesomeness drupal Wed, 11 Jun 2008 21:50:58 +0000 cwgordon7 14 at Paris SimpleTest Sprint, Day 2 /paris-simpletest-sprint-day-2 <p><img src="http://buytaert.net/images/drupal/timeline-drupal-7-testing.jpg" align="right" /><br /> Only hours ago, after over three years of work on the SimpleTest module, <a href="http://drupal.org/cvs?commit=111813">Dries committed the SimpleTest module to core</a>. This is an <strong>amazing</strong> achievement. Drupal is looking at getting 100% core test coverage, both unit and functional. A lot of work went into the SimpleTest module today before it was committed. We (the Drupal SimpleTest Sprinters) set up an SVN repository containing a version of Drupal with SimpleTest there as a module, and opened it up for all of us to commit. It was chaos (in a good way). Without the roadblock of patches, code was rapidly sucked into the SimpleTest module; finally Dries had to give us a SimpleTest "code freeze" so as to actually start to get stuff to work.</p> <h2>Current SimpleTest Status</h2> <p>SimpleTest is in core! What can be left to do? Actually, a lot, but first, let's go over what we've done today:</p> <ul> <li> <img src="/misc/watchdog-ok.png" /> Got SimpleTest into Core! </li> <li> <img src="/misc/watchdog-ok.png" /> Got all tests except for Trigger and Poll tests actually passing! </li> <li> <img src="/misc/watchdog-ok.png" /> Got PHPCoverage to generate a 500 MB XML file on Rok's laptop! (Though we have yet to find a script that can deal with all that data without crashing). </li> <li> <img src="/misc/watchdog-ok.png" /> Made SimpleTest's web interface <strong>pretty</strong> with the addition of <em>icons</em> and <em>assertion groups</em>! </li> <li> <img src="/misc/watchdog-ok.png" /> Got the code necessary for <a href="http://testing.drupal.org/">testing.drupal.org</a> working! </li> </ul> <p>And then, there are <a href="http://groups.drupal.org/node/10099">the things that are left to do</a>:</p> <p><a href="/paris-simpletest-sprint-day-2" target="_blank">read more</a></p> /paris-simpletest-sprint-day-2#comments drupal paris simpletest sprint simpletest Sun, 20 Apr 2008 23:02:07 +0000 cwgordon7 13 at Paris SimpleTest Sprint, Day 1 /paris-simpletest-sprint-day-1 <p>Today we began the <a href="http://drupal.org/project/simpletest">SimpleTest</a> code sprint! This is an area of <a href="http://buytaert.net/drupal-7-timeline">huge importance to Drupal</a>, as one of our weaknesses has proven to be the number of testers we have, particularly how small that number is. Automated testing will provide an easy way to maintain the quality of core&mdash; each time a patch is created for core, it will be sent off to a <a href="http://testing.drupal.org/">testing server</a> where the patch will be applied to a copy of the Drupal core and all the SimpleTests run on it. If there are failures, the patch would be marked as such and whoever submitted the patch would be forced to hang their head in <strong>shame</strong>.</p> <h2>What we accomplished today</h2> <p>Today, Dries Buytaert, Rok Žlender, Károly Négyesi, Jimmy Berry, Kevin Bridges, Douglas Hubler, Miglius Alaburda and I got together for 10 hours for the sole purpose of improving automated testing in core. It was great. We bounced ideas off one another, and came up with a great <a href="/paris-simpletest-sprint-day-1#unit-testing">plan for unit testing with mock functions and classes</a> without runkit. We made our <a href="/paris-simpletest-sprint-day-1#test-coverage">test coverage tests</a> work, although they are still running :). We <a href="/paris-simpletest-sprint-day-1#simpletest-pres">gave a presentation</a> to the people at Drupal Camp Paris on how to write basic functional tests for both core and contributed modules. We talked to Dries about the possibility of <a href="http://drupal.org/node/243335">getting SimpleTest into core</a>.</p> <p><a href="/paris-simpletest-sprint-day-1" target="_blank">read more</a></p> /paris-simpletest-sprint-day-1#comments drupal paris simpletest sprint simpletest Sat, 19 Apr 2008 23:18:44 +0000 cwgordon7 12 at Google sponsors two Drupal developers to Testing Sprint, Paris /google-sponsors-two-drupal-developers-to-testing-sprint-paris <p><img src="http://buytaert.net/images/drupal/timeline-drupal-7-testing.jpg" align="right" /><br /> Thanks to the <strong>amazing</strong> <a href="http://www.hawthornlandings.org/">Leslie Hawthorn</a> and the <strong>awesome</strong> <a href="http://sites.google.com/a/dibona.com/dibona-wiki/Home">Chris DiBona</a>, we can add an additional two sprinters to the list for <a href="http://drupal.org/testing-sprint">SimpleTest Sprint, Paris</a>! Both <a href="http://drupal.org/user/157412">Charlie Gordon</a> (me) and <a href="http://drupal.org/user/214218">Jimmy Berry</a> (aka boombatower) are now going to be at the testing sprint! Let's all thank <a href="http://google.com/">Google</a> for this awesome act of kindness towards the Drupal community!</p> <p>SimpleTest is critical to Drupal, not only for quality assurance, but also to <a href="http://buytaert.net/drupal-7-timeline">postpone the code freeze</a> so we can add more features to Drupal 7 and make it <strong>as awesome as possible</strong>.</p> <p><img src="/sites/default/files/drupal_testing.png" align="right" width = "298" /><br /> As this beautiful graph clearly shows, after Drupal has made the switch to <strong>complete SimpleTest coverage</strong> for core, the quality of Drupal will skyrocket, as we will be able to ensure that each patch committed to core does not break any of the SimpleTests, therefore <strong>less bugs and more features</strong>! When we have complete core SimpleTest coverage for Drupal, we will be free to explore awesome new features instead of spending precious time on bug hunting and bug fixing.</p> <p>Let's make that Drupal 7 release a killer! :)</p> <p><a href="/google-sponsors-two-drupal-developers-to-testing-sprint-paris" target="_blank">read more</a></p> /google-sponsors-two-drupal-developers-to-testing-sprint-paris#comments drupal google simpletest Thu, 10 Apr 2008 01:08:30 +0000 cwgordon7 11 at DROP (Drupal Rockin' Open Participation) /drop-drupal-rockin-open-participation <p>For those of you who haven't read the <a href="http://drupal.org/">drupal.org</a> front page post yet, <a href="http://drop.cwgordon.com/node/13"><strong>DROP</strong></a> is a new program that encourages and helps people get involved in the Drupal community! DROP is basically a continuation of <a href="http://drupal.org/project/ghop">GHOP</a>, only extended so that <strong>everyone</strong>, not just 13-18 year old high school students, can participate.</p> <p>Have you ever wanted to <strong>contribute</strong> to Drupal, but weren't sure where to begin? Developers, have you ever seen <strong>small tasks</strong> on drupal.org that you don't have time for but that are important nonetheless, and would be good for people just starting to learn Drupal? Then <strong>DROP</strong> is for you. <strong>DROP</strong> is an organization of small tasks from drupal.org, both documentation tasks and coding tasks&mdash;and everyone can participate in it, either by proposing DROP tasks, mentoring them, or doing them. No matter what your skill level and experience with Drupal is, you can find some way to benefit from this new program. <a href="/drop-drupal-rockin-open-participation">Read on</a> to learn more about this program, or <a href="http://drop.cwgordon.com/node/13">click here</a> to go to the DROP site's <em>about</em> page.</p> <p><a href="/drop-drupal-rockin-open-participation" target="_blank">read more</a></p> /drop-drupal-rockin-open-participation#comments drop drupal Sat, 16 Feb 2008 07:10:59 +0000 cwgordon7 9 at GHOP Students at Drupalcon /ghop-students-at-drupalcon <p>Over the past few months, the GHOP program has made innumerable contributions to the Drupal community. Now that GHOP is ending, many of these students are choosing to remain long-term contributors. This is awesome: it's exactly what the program was meant to achieve, getting high school students involved in open source communities. And <strong>what better way to get involved in Drupal than to go to Drupalcon?</strong></p> <p>Deeply inspired by <a href="http://drupal4hu.com/node/108">chx's chipin for Dmitri</a>, I have posted here the chipins' of two students requesting financial assistance to get to Drupalcon. Please, please, please seriously consider contributing to this cause. We want new contributors in the Drupal community? Well, here they are: but they need your help to fully join the community.</p> <p><a href="/ghop-students-at-drupalcon" target="_blank">read more</a></p> /ghop-students-at-drupalcon#comments drupal drupalcon ghop Tue, 22 Jan 2008 19:58:11 +0000 cwgordon7 8 at Introducing Flexifilter /introducing-flexifilter <p>Today, the initial version of <a href="http://drupal.org/project/flexifilter">Flexifilter</a> for Drupal 6.x was released. "What is this flexifilter?" you might ask. And the answer: Flexifilter is an awesome new module that's going to totally revolutionize the way filters are done in Drupal. It's going to become (almost) as important as CCK and Views for a site builder. Flexifilter was initially created by <a href="http://drupal.org/user/210422">Corsix</a> as a part of <a href="http://drupal.org/project/ghop">GHOP 2007-08</a>.</p> <h2>What it is</h2> <p>Flexifilter allows you to define custom filters <strong>entirely through the user interface</strong>. You name a filter, you can create it. A filter to append a "back to top" link if the text is longer than 1000 characters? No problem. A filter to change links in the form of [[link|title]] into links in the form of &lt;a href="link"&gt;title&lt;a&gt;? Downright easy. And, if you ever want to change the format from [[link|title]] to {{link:title}}, there will be no delving into php code necessary: just change your settings on the admin page.</p> <p><a href="/introducing-flexifilter" target="_blank">read more</a></p> /introducing-flexifilter#comments drupal flexifilter ghop youth rights Sun, 13 Jan 2008 03:55:56 +0000 cwgordon7 7 at How to: create a wiki with Drupal /how-to-create-a-wiki-with-drupal <p>Over the past two years, Drupal's wiki capabilities have expanded exponentially. Yet, still we get support requests on the forums, "How can I make a wiki with Drupal?" Well, here is a detailed plan that gives wiki functionality to Drupal. This tutorial assumes you're starting with an installed version of Drupal 5.x, and that you're familiar with installing modules.</p> <h2>Absolute Wiki Essentials:</h2> <ol> <li><strong>Step 1: Allow for categorization of wiki pages.</strong> <p>There is often this request: I want to be able to categorize my wiki pages into a hierarchy. Well, with Drupal core's book module, you can do just that! First, <strong>enable the book module</strong>. Then, go to the admin/content/types page to view your content types. <strong>Delete</strong> any content types you don't want. Then, <strong>rename</strong> the "Book page" content type to "Wiki page" or something similar. Also, in the "workflow" fieldset, make sure to check the "create new revision" checkbox. This will make it so that, by default, every edit of a page is done in a revision. </li> <p><a href="/how-to-create-a-wiki-with-drupal" target="_blank">read more</a></p> /how-to-create-a-wiki-with-drupal#comments drupal how to wiki Fri, 28 Dec 2007 01:33:02 +0000 cwgordon7 6 at