Drupal Blogs
Drupal core announcements: Kernel patch for WSCCI nearly complete
The WSCCI team has gotten the kernel patch ready. This is step one to WSCCI and SCOTCH initiatives.
While there is plenty of follow-up work to do, in order to unblock continued work the kernel code will be marked RTBC on 28 May 2012 per http://drupal.org/node/1463656#comment-5992676 (baring any epic fail situations we discover before then). Review and suggestions for follow-up work are still welcome and encouraged until then.
Clemens Tolboom: Symfony development from a Drupal perspective
While still working on D8MI Let Symfony Translation component handle language messages I needed to code for Symfony to on the Translation component.
So how does that work writing and testing Symfony code?
Download Symfony cd /tmpgit clone https://github.com/symfony/symfony.git
cd symfony
ls Dependency management
Note the composer.json which is key to get the Symfony phpunit test running. As a Drupal developer new thing are to be learned. Composer manages all dependencies needed to run either a Symfony application or the phpunit test. As we are developing for Drupal but need to be able to convert Drupal Gettext related test cases to Symfony we need to be able to run Symfony unit tests.
Awesome composerSo let's start by downloading composer from http://getcomposer.org/download/ and follow their instruction.
cd /tmp/symfonycurl -s http://getcomposer.org/installer | php
This installs a composer.phar file which is capable to process the composer.json and download all dependencies needed to run the phpunit tests. You can run
php composer.phar installto see all runtime dependencies being downloaded and installed. As a Symfony developer you need the development dependencies too. Install these through composer.
php composer.phar install --devwhich installs the development dependencies too. I like this composer stuff to get started.
Running phpunitRunning all tests is easy. (When you don't have phpunit see below for how I managed this on a Mac OS 10.6)
cd /tmp/symfonyphpunit
and see all tests running smoothly. Note the S's which are skipped unit tests.
Run the Translation componentAs this blog is about D8MI we need to run the Translation tests.
cd /tmp/symfonyphpunit src/Symfony/Component/Translation/ What are those skipped tests? cd /tmp/symfony
phpunit --verbose src/Symfony/Component/Translation/ Changing a fixture
By downloading ie http://ftp.drupal.org/files/translations/7.x/drupal/drupal-7.11.nl.po we see these files have no whitelines between each translation item.
msgid "Home"msgstr "Inici"
msgid "User interface"
msgstr "Interfície d'usuari"
so lets test this with Symfony by editing one of the tests fixtures.
cd /tmp/symfonyvi src/Symfony/Component/Translation/Tests/fixtures/resources.po
# remove all whitelines (this is just the last line) or just add some (depending on Symfony current state)
phpunit src/Symfony/Component/Translation/
This will show two failures. So our unittests do some good work.
Installing phpunitInstalling phpunit (on Mac Os 10.6)
This is from a lame history so I commented out some command.
sudo su -pear channel-discover pear.phpunit.de
# pear channel-discover components.ez.no
# pear channel-discover pear.symfony-project.com
# pear install phpunit/PHPUnit
# pear upgrade
pear install --alldeps phpunit/PHPUnit
Dave Hall Consulting: Your Site Should be Full of BEANs*
From: Dave Hall
To: boxes <boxes-module@drupal.org>
Subject: Our Relationship
Dear boxes,
I'm sorry but things just aren't working out between us. It's not you, it's me. I need some time to myself. I need to think things through. I'm not sure what I want. We should spend some time apart. We should try new things. I will miss you, but this is for the best. Let's meet for coffee in a couple of weeks.
Love
xox
Breaking up is never easy, but recently I broke up with the boxes module. I'd been with boxes for a long time, we'd done a lot of good things together. Over time I'd become oblivious to some of boxes' flaws, such as giving black eyes to sys admins who run features reverts on sites where users can edit boxes. Life was pretty good, but my life still felt somewhat empty and incomplete.
One day I was standing in a crowded room with lots of modules on drupal.org and across the room I spotted BEAN. I feel in love instantly. BEAN was decked out in all the latest Drupal 7 gear - fields, Entity API and CTools. The way BEAN moved make me weak at the knees. After another beer I got my courage up, crossed the room and asked if BEAN would like to come back to my site. I was shocked, BEAN wanted to hang out with me and it wasn't just a one night fling. I've been going steady with BEAN for a couple of months now.
Just before BEAN moved in permanently to my dev environment I had to find a way of removing all the remnants of boxes from my life (aka existing sites). It took me less than an hour. I created a new BEAN type and called it "box", I then wrote a little "drush scr" script which converted all of my boxes to BEANs and even updated my contexts to use the newly created BEANs. I hope neither bean or boxes finds my work on github. I chose github hoping neither of them would find my work and also because I don't want to maintain this as a module on d.o.
On a serious note - BEAN is awesome! If you haven't tried it, you really should. BEAN treats blocks as content, not config which is really useful for most sites. For new sites BEAN is a drop in replacement for core blocks or boxes making it super easy to get started. To learn more check out the docs.
If you're interested in seeing the full power of the BEAN module, and other cool stuff I've been working on recently, please comment on my DrupalCon session proposal - An Enterprise Scale Drupal Workflow. It will be a more technical version of my session at Drupal Business Days a couple weeks ago.
* "Full of beans" is phrase commonly used in Australia to describe energetic children.
Drupal core announcements: Content creation redesign: Core patch
A few months ago we started the initiative to redesign the content creation screen, following our research and design proposal we have now finished usability testing a prototype.
The results are in and participants had a neutral or mildly favorable response to the content creation prototype. Participants found it easy to add content (create and edit) and it was clear to participants that the sidebar is related to the content but it is not central to the activity of content creation. This was good news to us! It confirmed that our direction was good and we where encouraged by all the positive feedback from the community.
We would like help bringing this to Drupal core in Implement the new create content page design. We need help on all fronts, but primarily in fixing a number of outstanding problems and carrying out code reviews.
Matt Butcher: Updated Instructions for Installing Drupal Vagrant on Windows 7
VirtualBox, Vagrant, Ruby, and Git have all gone through upgrades (major and minor) since I wrote the chapter on installing them in Multi-Site Drupal. While this hasn't made much of a difference for Mac and Linux/UNIX, Windows 7 support is now much better.
Here is a guide for installing the Multi-Site vagrant image for Drupal 7 on Windows 7. (If you're interested in running Drupal Vagrant, these instructions will work for that project as well.)
Aaron Winborn: Demo of Drupal's Media: YouTube module
The following transcript is for the video at http://www.youtube.com/watch?v=XfPKKisE88w :
Hello, my name is Aaron Winborn. I am a developer for Advomatic, the author of Drupal Multimedia, and a contributor and a co-maintainer of several Drupal modules, including the Media suite of modules.
Today, I will demonstrate a new feature of the Media: YouTube module: browsing and searching videos directly from YouTube, in the media browser itself. So first, let’s set up our environment.
We are assuming that you already know how to install Drupal. If not, you can find information at Drupal.org.
So right now we are at the modules administration page. We are interested in the modules under the Media package. You will need to install and enable the File Entity module (version 7.x-2.x), and the same version of the Media module.
We will not enable the included Media Field module; it is there for legacy purposes, and has been deprecated in favor of core’s File Field.
The Media Internet Sources module, included with the Media module, is a dependency of the Media: YouTube module, so we will enable that.
Next will be the Media: YouTube module, also version 7.x-2.x.
Finally, we will install the WYSIWYG module.
Let’s start by configuring WYSIWYG. We do that by going to Configuration > Content Authoring > WYSIWYG profiles. Note that I have also installed and enabled the Admin Menu module and the Admin Menu Toolbar module, which gives us the fancy drop-down menus for administration that you see here.
Now in order to use WYSIWYG, you need to have also installed a third-party WYSIWYG library, such as CKEditor or TinyMCE. You need to follow the instructions with the WYSIWYG module to install that, although it is quite simple actually. You just download and unpack the file into the sites/all/libraries folder. You can see that I am using CKEditor here.
The WYSIWYG module allows us to set up profiles for the various text formats on our site; in this demo, we will edit the Filtered HTML format.
Open up the buttons and plug-ins field set next. Then check the Media Browser check box. That will add the media browser button to our WYSIWYG editor, which we will see soon.
In order to use that however, we need to configure the filter in question. In fact, I believe that if we do not do this step 1st, we will get an error message, complete with a link to the format configuration page.
On this page, we need to check the box next to “Convert Media tags to markup”. That is the answer to the number 1 support question that we get in the Media queue, which is, “Why is there bracketed goobly gook instead of my images?”
So now, as we will see, everything should be working now. So let’s test it.
Here on the create article page, we see a fancy button on the body text area! Let’s click it.
And there we go.
These are thumbnails being pulled directly from YouTube. How about that?
And there is even a ghetto pager, or at least previous/next links.
And you can also search YouTube directly from our browser.
So now we will select a video and submit it. Add a title and save the node. And there we go.
And that’s it really. Well, almost.
There are some more settings, specifically here to control which tabs show up for WYSIWYG. Note that at the time of this demonstration, you will not have this functionality unless you install the patch over at node 1434118.
To complete the demo, we will also do the same for fields. Let’s add a field to hold YouTube videos. We will call it Media, and it will be a file field with a Media file selector widget.
Here, let’s reorder it as well for the demo.
We leave everything at their default settings.
Hold on, I forgot that we need to allow the YouTube URI scheme. And the video file type.
So now we will create a new article, and select the media.
And here we have all the tabs available to our browser, including the new and improved YouTube tab.
And also, let us look at another new feature of the media module: My files!
This has been a long-awaited feature for the Media module as well.
Now here comes the 2nd most asked question in the support queue: “How come there is a link to my file, rather than the file itself?”
Let’s just fix that now.
Now we are in the file type administration page, where we can configure the display for each of our file types. Note that we can also add fields to our files, although we are not going to do that in this demo.
We will jump to the video display...
No, we want to make sure that our large formatter is set up properly for YouTube. And it is, so let’s set up that as the formatter for our Media file field.
And there it is, as a generic file, which is simply a link to the file stream itself. We will change that to rendered file. And then we set the view mode to large.
While we are in there, we can do the same for our teasers. We will just set that to the preview view mode, which by default will display a thumbnail.
Whoops, I forgot to save it. Let’s just do that again.
And there is the video.
And there is the thumbnail.
Well done!
DrupalCon Munich: Scholarship Recipients for DrupalCon Munich Announced
The DrupalCon Munich team was excited about the interest for this year's scholarship award, with 57 applications submitted. The DrupalCon scholarship program allows Drupal Community members, who would otherwise not be able to attend DrupalCon, to benefit from the DrupalCon experience as the Drupal Community benefits from each scholar's attendance.
The scholarship committee has made the final selection, and we are proud to present these deserving Drupalistas with Scholarships. Scholarships give access persons who would like to attend DrupalCon but lack financial resources to do so. The following awardees will be attending this year's conference in Munich, where the theme will be 'Open Up! Connecting systems and people’.
Scholarship Recipients*:
- Greg Dunlap
- Cathleen Theys
- Jeremy Thorson
- Yves Chedemois
- Thomas Svenson
- Karyn Cassio
- Capi Etheriel
- Jessica M.
- Wolfgang Ziegler
*We will add more recipients to this list as we confirm.
We would like to thank everyone who applied for a scholarship, and congratulate those of you who were selected.
ScholarshipsDrupal Watchdog: The Drupal Mobile Process
In creating the mobile application for the Chicago DrupalCon, our team learned quite a few things about iOS/Android Drupal-based mobile app development. This article will distill a couple of hundred hours of our work into a few lessons you can use on your next Drupal-based mobile application.
Assemble a Good TeamOne thing we realized early on was that if we wanted this project to be a success we were going to need to treat it like a proper project. Proper meant actually bringing on a UX person to make sure the app made sense. It also meant that it should have a backend engineer and a front end developer.
Our engineer for the backend was Larry Garfield (known as Crell in the Drupal world), our UX person was Jen Simmons, and I brought up the front-end development side of things.
Outline Your RequirementsAfter determining our resources, we outlined our requirements and their importance. We found it helpful to break this down into three categories; must do, important but not critical, and nice to have.
For our project, the list of application requirements went like this:
Author Patrick TegliaPat is an experienced Drupal front-end developer and mobile app enthusiast currently working for Palantir.net as a Senior Developer, building wicked cool things such as the DrupalCon mobile app.
InterWorks Drupal Blog: Drupal 101: Intro to Views - The Essentials
Views are a massive part of Drupal and you can't experience the power of Drupal without the Views module.
Chapter Three: Content Strategy is the Missing Piece
In lieu of the fact that I was unable to go attend Confab this week, I wanted to represent the Content Strategy movement by sharing a notion I've been thinking about for quite some time. I believe there are three key ingredients to making an amazing website:
- Beautiful Design
- Meaningful Content
- Rock Solid Development
While this concept may seem self evident, I find most web projects do a great job at focusing on design and development, but fail to allocate sufficient resources, time, and consideration to the "Meaningful Content" chunk of the triangle.
Fortunately, the evolving field of Content Strategy has produced a concepts, tools, and methodologies which have begun to shift people's opinions on the importance of this sector.
In an effort to support this momentum, I've compiled a list of resources to share with future collaborators, web practitioners, and site administrators.
After all, the more we all know about Content Strategy, the better the web will become.
Hash tags to follow- #contentstrategy (my personal favorite)
- #confab2012
- http://blog.braintraffic.com/
- http://www.smashingmagazine.com/content-strategy-storytelling/
- http://www.smashingmagazine.com/2011/06/03/content-strategy-optimizing-y...
- http://www.slideshare.net/KMcGrane/adapting-ourselves-to-adaptive-conten...
- http://boagworld.com/tumblog/the-truth-about-content-strategy/
- http://boagworld.com/site-content/10-ways-to-put-your-content-in-front-o...
InterWorks Drupal Blog: Auditing a Drupal Core Install
- Determine current version of Drupal being used
- Downloading a clean Drupal Core
- Running an initial diff (show the difference) between the two
- Run a detailed diff on
IXIS: The EU Cookie Crunch Update
Following on from last months initial release of the Cookie Control module for Drupal 7 there has been an increase in blog posts and talk both in and outside of the Drupal world about the implications and solutions to getting sites compliant in time for May 26th 2012.
This week the UK Government revealed that their own sites (some running on Drupal) will not be compliant in time for the deadline! While government websites do not carry advertising, cookies are still used to carry out various tasks, such as helping site administrators monitor levels of traffic.
DrupalCon Munich: Community sets sights on DrupalCon Europe
With the passing of the call for papers deadline last week DrupalCon Munich is now a hot topic. Witnessing a fever pitched last minute rush, we have well over 300 session proposals. It is now the role of the track chairs to evaluate submissions using the new selection process. You are encouraged to use comments to indicate sessions you would particularly like to see featured. Final conference program and pre-conference trainings will be announced May 29th via this web site.
This week Neil Kent, Events Director at Drupal Association, was in Munich to meet with conference suppliers, finalise plans at the venue and members of the local organising community team. We are pleased to confirm he has secured a limited number of double rooms at an exclusive DrupalCon rate at The Westin Grand Hotel. Following the successful forumla at DrupalCon Chicago, we are particularly excited to provide attendees exclusive use of the majority of the facilities in the Westin Grand Hotel, home of the conference. Drupalers will have the freedom to meet, code, socialise anywhere, anytime, any way they please.
Florian Loretan, Community Representative, was recently interviewed by both Lullabot and Modsunravelled podcasts. He explains the conference theme "Open Up! Connecting Systems and People" and describes how it will shape the conference.
If you can't wait until August, the next warmup event to DrupalCon Europe is Drupal Dev Days, Barcelona. From our local team Miro Dietiker, João Ventura, Florian Loretan, Daniel Nolde, Andreas Sahle and Ralf Hendel will all be attending. Be sure to look them up to find out more about what we have in store for devops track and core conversations. For the more adventurous Drupal Camping is coming to Allersee, Germany. In the meantime why not sample some of the fabulous attractions Munich has to offer on our Pinterest board.
The DrupalCon Global Team has seen several appointments in recent weeks. Kris Bytaert, one of instigators of the devops movement, is now devops track chair. Kris recently defined his vision of how devops at Munich. Rick Nashleanas becomes the first Global Content Manager, his latest blog post he discusses the value global chairs will contribute. Karyn Cassio has been appointed Global Community Track Chair, and blogs about how she hopes to encourage people to Come for the Software, Stay for the Community.
Tickets are selling fast. Following the success of Denver, we are confident the DrupalCon Munich will be a sell out. Go buy your tickets! Book a room at the Drupal Hotel!
Finally, if you have any questions relating to DrupalCon Munich our support team can be reached via our contact form in German or English.
Appnovation Technologies: Building a slideshow with Views Slideshow 3 and jQuery Cycle
The Views Slideshow module makes it easy to build a slideshow, once you know all the requirements to set it up. Views slideshow 3.x is only compatible with Views 3.x. It also depends on two other modules: Ctools (not needed for Drupal 7) and Libraries API.
Drupal Watchdog: Building a Mobile Version Of Your Website With Panels
Panels variants can easily be used to create a mobile version of your website. If you’re already using Panels, you need one module: Mobile Tools (http://drupal.org/project/mobile_tools). It contains a plug-in for Panels, making it easy to create a specific variant for mobile.
First, create your normal page layout using Panels. Then, create a second variant and when you add content (or in the content settings), choose "Mobile" for your build mode.
It’s as easy as that!
Author Lynette MilesLynette Miles is the co-author of Drupal Building Blocks, and has worked in the tech industry for her entire professional career. She became involved with Drupal in 2006, and participates in the documentation team as well as coordinating the Views bug squad.
David Corbacho: Drupal with Twig templates
It's not a secret that Drupal 8 most likely will have in core the option of using Twig templating system.
The discussion about it happened quite fast between March-April 2012. See this issue: [meta] New theme system, where Dries commented: "I just wanted to let everyone know that I'm in support of rethinking the theme system. I'm also comfortable that the team will come up with a good solution."
Why to use a template system when PHP can be already be used as a template system?Reason to use a template system is mainly to separate the presentation from business logic. When you use PHP as template system you are giving too much power to the presentation layer. So it's easy that things get messy mixing code and layout, and even worse: having security issues in custom themes.
John Albin stood up in Denver and said "We hand themers a loaded gun and tell them to hammer in a nail with it. Oh, and be careful"
So a template engine enforces a clean separation, using a tag-based syntax, so no PHP knowledge is needed and improves reusability of templates.
Web designers with non-programming background are the ones who most will appreciate this separation. And also preventing they do not to shoot themselves in the foot, compromising the security of your web site.
If you are not sold still, read these two articles and comments discussion of the convenience of a template engine that is not PHP:
Templating Engines in PHP, and the follow up. By Fabien, main developer of Symphony and Twig.
TwigTwig is quite powerful, supporting macros, i18n, extensions, template inheritance, etc. From a developer point of view, Twig is that complex that almost in the line of "what's the point of learning such a complex templating language when we have PHP?"
But from a designer point of view it's more about "I have complete control to do literally anything with the content without having to bother the programmer at all".
Pros- The main benefit of bringing Twig to Drupal will be security. The rest of pros/cons are not so important as providing a default secure HTML output.
- Powerful, expressive template language with easy syntax and very cool features
- It's widely supported among IDEs (Eclipse, PHPStorm, etc).
- Not NIH syndrome in Drupal community: It will bring Symphony and Drupal communities closer, since we are sharing more and more components
- Re-use in JavaScript? There is a github repo at least that provides Twig in JavaScript .
- A little steeper learning curve for Drupal.
- (Just wondering) How tightly coupled is Twig with Symphony?
- Performance and memory could be an issue (See http://www.phpcomparison.net ), although the bottenecks of your website probably are in other places.
- (Just wondering) Headaches about versioning? If Twig is evolving constantly, how Drupal 8 core will handle it when development gets frozen.
Some implementation details are in this post Drupal 8 Theme System Sprint. (Jacine, chx, and John Albin)
* chx's sandbox: Drupal 8 with twig
For Drupal 7 we have some also these two experimental modules
* ReneB's sandbox Twig for Drupal (Twig implemented as a theme engine)
* smokris' Twig template engine (Twig implemented as an input filter)
ReneB presentation slides: Twig for Drupal @ Frontendunited Amsterdam 2012
Note: When googling about Twig, notice that most of articles, benchmarks, etc are based on old versions of Twig.
Twig has evolved a lot in the last months.
Drupalpress, Drupal in the Health Sciences Library at UVA: Rule Scheduling and Emailing Views According to CCK date fields
Sometimes Drupal opens up a big can of whoop-up process on ya, and Rules Scheduler is one of those gems. Rule Scheduler allows you to use rule triggers to schedule rule sets.
Use Case:Ever want to send an email the day before a scheduled event? We use CCK Sign-up and wanted to send an email to users one week before an event, as well as the day of. We also needed to send teachers views of the roster of students
Here’s the 2 minute mojo on it http://www.youtube.com/watch?v=55HwOzFHoB8 and it just highlights the mistakes I was making.
The recipe came out of Drupal documentaiton, and these two tutorials got me 90% of the way:
- Tutorial 2: Publish content exactly 24 hours after it was created
- Tutorial 3: Publish content based on a CCK date field
working with scheduled rules
And I thought I was home free, however I ran in to a pretty stupid problem that took me a minute to understand = all the identifiers need to have tokens in them with unique values or else they overwrite themselves in the database.
Solution? Easy = add some tokens – [node:nid] worked for me
The nicely scheduled rules
Another fun feature in this project was revisiting one of my favorite modules: Rules Views Integration. The cool thing about scheduling a rendered view in a rule set is that the rule gets rendered at the last minute and so you can schedule (in our case) a class roster to go out and it’ll have the most up to date information possible at the time of sending.
NB: I also ran in to a problem where cron wasn’t sending my emails initially. I have no idea why it was stuck, however Ultimate Cron has been a good friend of late and unlocking and running the tab got it back on track = I haven’t seen it stall in a few weeks now.
Ultimate Cron unlock and run run run
Something else I haven’t gotten into yet, however, is the use of the Rules Scheduler Views. Something tells me there is some magic to be had in there, used correctly. At this point however I’m just using the off-the-shelf defaults. I know of no Views Bulk Operations for scheduled rules, so perhaps the default info is all there is to know. In any case, it’s an elegant solution to working with drupal’s cron functions.
Patrick J Waters: Recent Project: Converting the BMJ (British Medical Journal) to Drupal
Recently I had the privilege of being part of a team that converted the BMJ (British Medical Journal) to Drupal. The BMJ (British Medical Journal) is one of the world’s top five international peer reviewed medical journals with more than 1.5 million unique visitors and 6.8 million page views per month.You can read the about the project and it's success at http://drupal.org/node/1557636
Pronovix: Drupal Government Days Brussels videos online
It seems like a lot is moving in Drupal for government, after Drupal got serious momentum when the White house launched their Drupal site the Drupal Government Days in Washington DC on 18 May, 2012, will be the third dedicated Drupal Government event.
Read moreMediacurrent: "Shun" Your Clients to Serve Them Better
With something as simple as the post title, I've already broken one of the rules I'll be setting forth here—that of expectation setting. This is not a post about ignoring your clients or putting them aside or picking only the right clients and shunning the rest. This real subject of this post is the '-tion' (pronounced shun) suffix at the end of the three key thoughts: communicaTION, expectaTION and execuTION.

Recent Comments
1 year 38 weeks ago
1 year 38 weeks ago
2 years 28 weeks ago
2 years 35 weeks ago
3 years 17 weeks ago
3 years 18 weeks ago