Drupal Planet

Marek Sotak: Revolution in end-user documentation! Say hello to Inline Manual

Let's face it. Making documentation for end-users (content editors, administrators, etc...) is the most painful process of all the processes when it comes to handing over a project to the client. Hard to estimate, time consuming to create, never up to date, almost impossible to re-use, change one thing and you have to rebuild all the screenshots, realisation that nobody reads it, etc... Sounds familiar?

comm-press | Drupal in Hamburg: OMG! Drupalcon Porland! So many sprinters!

Knowledge Language English OMG! Drupalcon Porland! So many sprinters!Cathy Theys05/10/2013 - 10:46350 people! Will any of the 350 new contributors work on any issues you are passionate about?

We are estimating 350 participants at the mentored Get Involved with Core Sprint on Friday May 24, 2013 at Drupalcon Portland. That's a lot of people, and we will need a lot of tasks for them to work on during the sprint. One of the things we know about a successful sprint is that creating a task list in advance is critical. But we do not want to make the task list too far in advance. Because if made too far in advance, it will get out of date and some tasks become not relevant. Mentors will be meeting on Tuesday May 21, 2013 at 4:30 to do task selection. That will be right after the session about being a mentor and sprint planning: Running coaches wanted! Contribution sprints and trainings.

Web Omelette: Cool Module: Maxlength

Maxlength is a cool module that allows you to set maximum character limits for your Drupal form text fields. Not only that users who fill in these forms can see the maximum number of characters they can write but they will also be prevented from writing more than they should.

Károly Négyesi: Drupal 8 progress from my / MongoDB perspective: update #19

The biggest changes (at least from my end, as usual) since the last update are allowing plugins to have their services injected. It's perhaps not the most beautiful solution ever but it works. Again for plugins, one directory depth have been removed, it's still ridiculous but less so and the PHP-FIG (nudged by our quicksketch, thanks much) is finally moving ahead with creating a new autoloader standard which will make the directory structure a bit saner.

Now, on to the future: I had a phone call with Dries and a few others discussing the future of hooks. While hooks are familiar to everyone who ever coded for Drupal, they are not object oriented (not unit testable, etc) and so they may (or may not) be off-putting to the new kind of contributors we want to attract. There are many roads we could take: for example, we can convert hooks wholesale (scripted) to a Drupal-specific OOP syntax based on magic naming, attempt the same with EventSubscriber. We feel this should wait until Drupal 9. However, we will add a HookEvent which allows Eventsubscriber classes to react to hooks. Probably we will need to make a more efficient version of the container aware event subscriber, but that's a minor detail. Also, we will attempt, pending it actually passes tests and other gates, most importantly the performance gate to convert all entity hooks into events in core while keeping entity hooks around. This is somewhat both a forward and a backwards compatible solution, reflecting where Drupal 8 stands: on the road from a mostly convention based PHP 4 procedural codebase to a mostly configuration based PHP 5 OOP codebase.

I have spent most of my core time on this entity event patch, it's a big one. It's a very very big one. It not just converts to events it also separates logic out from the storage controllers so that the storage controllers actually deal with storage only. For example, separate the comment thread calculation logic from retrieving the max thread values. Or the user password hashing needs to happen no matter how the user entity actually gets stored. I am getting some help in this, but by far not enough -- so if you are interested in this, please contact me to help, there's not a lot of time left.

ThinkShout: Zen and the Art of Farmyard Maintenance

Like many developers, we get pretty psyched about building stuff. Sometimes it takes us a little longer to get excited about describing the stuff we built... but RedHen has been getting enough attention that it was time to do some communicating, especially considering we recently released version 7.x-1.2 of the module.

Today we published a significant, if not quite complete, chunk of RedHen documentation to Drupal.org here. That documentation can now grow with RedHen!

But I know what you're thinking: "Documentation? Am I having some horrible 2005 fever dream? Where's the video??"

So, ok: I made a little instructional video about getting started with RedHen. It's my first one, so critique gently: it's surprisingly difficult to converse with an imaginary audience.

This video covers installing RedHen and configuring a Contact Type, and a few other introductory RedHen tricks. Note that the video gives instructions for creating a RedHen link in the Admin toolbar, but you can also just move the pre-built RedHen menu that lives under Structure into the Toolbar to get the full drop-down fun.

Setting up RedHen: Creating your first Contact Type from Gabe Carleton-Barnes on Vimeo.

Tags: RedHenVideoDocumentationHowToDrupal Planet

Drupal Association News: Drupal.org D7 - improving issue pages

Just like any other community website, Drupal.org has lots of places which could be changed and improved. However upgrading such a website to the next major version of Drupal is already a huge undertaking. So when we originally started the Drupal.org D7 upgrade project our goal was a straight port to Drupal 7. No major regressions, no major new features.

Nearly all sections and pages on D7 Drupal.org will look the same as they do now on Drupal 6. This includes documentation pages, project pages, case studies and marketplace nodes, issue queues, change records etc.

Drupal Commerce: Showcasing the latest Drupal Commerce sites

DrupalCommerce.org exists to help people learn how to use and develop for Drupal Commerce. In addition to the traditional education tools we offer in our documentation, video library, and Commerce Q&A, we host a showcase of sites built using Drupal Commerce. It’s one thing to tell people how to use a tool to build something, but it’s quite another to show actually show them the end result.

And the results are stunning.

Since launching, we’ve received dozens of showcase requests from developers around the world. These sites have varied widely in design, feature set, market, and size, and each one provides an opportunity for new developers to learn something new.

Our DrupalCommerce.org handyman Josh Miller just finished a redesign of the showcase that will make it even easier for you to find reference sites built using Drupal Commerce and learn how they were built. Our showcase is now organized by a variety of categories based on the products sold and the tools used. You can quickly scan a list of beautiful sites for design and feature inspiration, and in our featured showcases you can find a write-up or case study describing the modules and processes used to develop the featured site.

We aim to give credit where credit is due, so while we would love for you to share your latest work with the community, we would also love to link to your company or personal website so new users know who to look to for advice and consulting when they need help. Our featured showcases in particular give you an opportunity to talk about the modules you used (or contributed!) to build a site and talk about how you solved the various configuration and deployment tasks involved in launching a high quality eCommerce project.

Use the showcase submission form to get your latest creation featured today!

Open Source Training: A Beginners Guide to Drupal Overrides

The problem with many software applications is you can't make them your own. With Drupal, however, you have the option to override how Drupal does things. From altering a form to customizes the way your pages are displayed, Drupal provides options.

The concept of overriding something in Drupal can be made reality in several ways: Drupal's APIs, theme overrides, as well as overriding default configurations in modules. Whatever it is you need to do, the number one rule you should endeavor to follow is: don't hack the core (or a contributed module). Don't open the code files in Drupal and change them to meet your needs. There are better ways.

In this tutorial, we will focus on overriding themes.

Bluespark Labs: Rooms 1.0 Released and Roadmap

After almost 22 months since our initial commit on the Rooms project we are happy to announce a 1.0 release! We are really proud of this release as it brings together a rich set of features built on a flexible core that can grow and improve over time.

Our central objective with Rooms is to provide the absolutely best tool for creating booking experiences on hotel websites through an open-source solution. We want to free up accommodation owners to actually own and define that experience for their users and do that in a way that is unique to them.

There are three key ingredients that come together to achieve this.
Drupal - undoubtedly one of the strongest CMS’s out there it allows us to construct truly elegant websites.
Commerce - a powerful Drupal-based open-source commerce solutions that enables us to offer flexible and sophisticated checkout experiences for our users.
Rooms - it tightly integrates with Commerce adding the booking and room management layer dealing with a range of situations and features.

Put these three things together and you get Drupal Rooms. What, we believe, currently represents one of the most flexible open-source booking solutions out there. Check out our screencast for an overview of what is possible.

Rooms 1.0 Demo - Hotel Booking Management.

Rooms 1.0, however, is just the first step for us.

Roadmap

Now that we have a stable core to built on top we are going to focus on two key areas.

Developing Rooms 1.x

Usability Enhancements
Expect a constant stream of usability enhancements on the Rooms 1.0 branch. We want to not only have the most powerful booking solution but also the easiest to use. We already have great ideas about wizards to enable you to setup your Rooms-based hotel.

More use cases
It sometimes feels that there are as many feature requirements as there are hotels out there. Inspired by the Commerce ecosystem expect to see features added to the core but also add-on modules that will enable you to do more. We have a couple in the making that we can’t wait to share with everyone.

Rooms 2.x

At the same time we will be working on a 2.x branch of Rooms. The focus here will be on growing Rooms in two directions.

Multiple Hotels and Hotel Owners
We want a module that will allow you to build in Drupal a site that can host multiple hotels with multiple hotel owners managing them.

Beyond Room Bookings
While Rooms right now is focused on just hotel nightly bookings we believe we can expand the core engine to handle both more fine-grained bookings (e.g. hours-based) as we well as larger bookings (e.g. minimum of a week).

The Rooms Sites are Coming!

Last but certainly not least we have a host of Drupal Rooms sites in the works. We will be sharing those (and the code so you can get a head-start with your own sites) before Drupalcon Portland - yes, I know in just a few days!

Drop us a line if you want to discuss any of the above. We are looking forward to helping people build their hotel sites and the comments, feature requests and bug reports that we have been getting so far were instrumental to making Rooms a great booking solution.

Tags: Drupal RoomsDrupal Planet

Drupal Association News: Take Our Quick Survey on Webinar Topics

Last month, the Drupal Association launched a webinar series with the goal of providing more educational opportunities for the community. Our first webinar was on Spark and it was a great success with 500+ registrants. We are excited to do more!

But, as we mentioned in a previous blog post, before we move forward we want to hear from you. What topics do YOU want to learn about?

Personal blog tags: webinars

EchoDitto Tech Blog: Speed up PHP on NFS with turbo_realpath on CentOS

If you run a website based on PHP, and have your source files on a network file system like NFS, OCFS2, or GlusterFS, and combine it with PHP's open_basedir protection, you'll quickly notice that the performance will degrade substantially.

Normally, PHP can cache various path locations it learns after processing include_once and require_once calls via the realpath_cache. There's a bug in PHP that effectively disables the realpath_cache entirely when combined with open_basedir. Popular PHP applications with Drupal and WordPress make heavy use of these functions to include other files, so you would very quickly notice the drop in performance in this scenario. If you want to isolate your websites from each other (or from the rest of the operating system), how can you retain any shred of performance?

This is where Artur Graniszewski's turbo_realpath extension really comes in handy. I won't retype his installation instructions, so follow the previous link to get it installed manually.

If you're running CentOS 5 or CentOS 6, check out yum.echoditto.com and you'll find source and compiled RPMs that will install alongside the RedHat/CentOS-supplied PHP packages. The RPM will create a basic configuration file at /etc/php.d/turbo_realpath.ini. Essentially, it enables the PHP module but defaults all settings off, so you will need to read the comments (taken from Artur's most recent post on turbo_realpath) to determine how you want to use it.

Configuration

We frequently use turbo_realpath on a per-VirtualHost basis with Apache 2.2 and mod_php. If you use PHP-FPM, you can apply similar settings in your FPM pool configuration files. If you install our RPM and don't edit /etc/php.d/turbo_realpath.ini, add something similar to the following to each VirtualHost:

<IfModule php5_module> php_admin_value realpath_cache_basedir "/var/www/vhosts/domain.com:/usr/share/pear:/usr/share/php:/usr/lib64/php:/usr/lib/php:/tmp:/var/tmp" </IfModule>

This is effectively the same using open_basedir; any directories referenced in realpath_cache_basedir will be the only ones the website is allowed to access, and they will be cached as determined by the realpath_cache_size and realpath_cache_ttl. If you look in php.ini, you may notice the default values for these are:

; Determines the size of the realpath cache to be used by PHP. This value should ; http://www.php.net/manual/en/ini.core.php#ini.realpath-cache-size ;realpath_cache_size = 16k   ; Duration of time, in seconds for which to cache realpath information for a given ; http://www.php.net/manual/en/ini.core.php#ini.realpath-cache-ttl ;realpath_cache_ttl = 120

You may want to increase these if you're finding your website is still not loading quickly. On our systems, we have bumped the realpath_cache_size and realpath_cache_ttl settings up to 1m and 300, respectively.

Speed and Security!

With turbo_realpath enabled, realpath_cache_basedir set to appropriate open_basedir-like values, and realpath_cache_size and realpath_cache_ttl increased from defaults, we're able to have isolated PHP sites and have better performance by caching the locations of included/required files effectively. Hopefully, our RPMs will help you on your system for a quick installation of the excellent turbo_realpath module!

References

Image from iAmFreeman

Six Mile Tech: Entity Rules - Exposing Rules' power without Rules' complexity

The new Entity Rules module for Drupal provides a new way to associate Rule components with events for different entities such as users, nodes and taxonomy terms.  This allows users who do not have access to the Rules UI to still configure when the Rule components are triggered for the Entity types that they can administer.  It also allows this user to specify values for the parameters that are sent to these Rules components.

OpenSourcery: DrupalCon PDX: Pinball Pub Crawl!

As many of you know DrupalCon Portland is coming up in just a few short weeks. We here at OpenSourcery are very excited about this and we're looking forward to this rare opportunity to show off Portland to the greater Drupal community. 

In fact we are so excited about DrupalCon PDX that we're going to be throwing a Pinball Pub Crawl Party along with Network Redux. What is a Pinball Pub Crawl you ask?

The party will be from 5-10pm Thursday May 23rd.  

We'll start our evening off at OpenSourcery's offices where there will be free beer and free pizza provided by Hot Lips. Greg Dunlap (heyrocker) will teach a brief "how to not suck at pinball" course (complete with special 'Pin Cam' AV projection technology) and you'll get a chance to put his advice into practice with free play on the four pinball machines at OpenSourcery. We'll also have foosball, ping pong, table games, a pinball tournament, and oh so much more!

But the night doesn't end there! Our free shuttle will then take you on to a Portland must – Ground Kontrol, a pinball and video game mecca for a private evening of free play from 7-10pm.   

Feeling more like a walk? Those who wish can make the journey to Ground Kontrol on foot, stopping along the way at a few of Portland's best local bars, all of which have their own uniquely Portland character and pinball to boot. 

If you're worried about getting here don't be! We will be running a free shuttle between the convention center, OpenSourcery, and Ground Kontrol from 4:30-10:30 pm!  Tickets are free and can be reserved here.  

Space is limited  and we expect the party to fill up qucikly so reserve your spot now. Only guests who have signed up in advance will be allowed into OpenSourcery and Ground Kontrol on the event night. Sorry, this event is for 21+ attendees only.

Mike Crittenden: Making a Drupal bookmarklet

Down with copying and pasting!

Last weekend I built/launched Frugalzon, which is a little hand-curated list of cool stuff on Amazon for $10 or less. (It's still new and fairly empty, but give it time!)

The Drupal site itself is simple--one content type, one view, one taxonomy, that's pretty much it. The only interesting aspect comes in the form of content entry. Since the whole point of the site is to be hand-picked items, I couldn't just pull some Amazon feed of cheap products. I had to manually add each of the items on there (and I continue to add a few items per day) by choosing stuff I think is cool. To make this easier, I made a bookmarklet that scrapes the info off of whatever Amazon product page I'm looking at and pre-populates a node add form on Frugalzon with that data.

So there are two things at work here: page scraping and prepopulation.

Page scraping

The first part of the bookmarklet gathers up the relevant info on the Amazon product page I'm viewing. This includes:

  • Title
  • Price
  • Prime shipping or regular
  • Image URL
  • Page URL (with my affiliate code added)
  • Category

For finding this stuff, the easiest method is to just use your browser's dev tools. Inspect the elements to find a unique selector to match them, and then test it out in the console. This can get a little tricky sometimes depending on the markup, especially on a site like Amazon that has a few different possible product templates each with unique un-semantic markup.

Here's the JS in my bookmarklet that does all of this on Amazon.

var frugalzontitle = jQuery('h1').text().trim(); var frugalzonprice = jQuery('.a-color-price, .priceLarge').eq(0).text().trim().replace("$",""); var frugalzoncategory = jQuery('.nav-category-button').eq(0).text().trim().replace('All ', '').replace(',', ''); var frugalzonimage = jQuery('#holderMainImage img, #prodImageCell img').attr('src'); var frugalzonurl = document.URL; if (frugalzonurl.indexOf('?') > -1) { frugalzonurl += '&tag=frugalzon-20'; } else { frugalzonurl += '?tag=frugalzon-20'; } if (jQuery('#actualPriceExtraMessaging img').length > 0 || jQuery('#price img').length > 0) { frugalzonshipping = 'Prime'; } else { frugalzonshipping = 'Normal'; }

As you can see, Amazon includes jQuery in the page so we can use that (yay!). If the site you're scraping doesn't, then you can either load it in noConflict mode or just use vanilla JS selector hotness. You might also notice that I'm prefixing all of my variable names with "frugalzon" as a poor man's way of namespacing this.

So now we have all the data we need...what do we do with it?

Node prepopulation

There's a cool module called Prepopulate that lets you pass data to the node/add/whatever page as a query string and that data will prepopulate the form. So for example, going to /node/add/product?edit[title]=Something would make the Title field have a default value of Something when the page loads.

This works great, but it can get a little hairy with different field types (Image URL, taxonomy term reference, plain text, etc.) because each field type has a different array path in the $form array in Drupal. Luckily, this is documented and all you have to do is view the source to see what the name attributes of your form elements look like to know what to pass.

In the end, here's what my JS looked like to build the URL to hit.

url = 'http://frugalzon.localhost/node/add/product?'; url += 'edit[title]=' + encodeURIComponent(frugalzontitle) + '&'; url += 'edit[field_price][und][0][value]=' + encodeURIComponent(frugalzonprice) + '&'; url += 'edit[field_url][und][0][value]=' + encodeURIComponent(frugalzonurl) + '&'; url += 'edit[field_category][und]=' + encodeURIComponent(frugalzoncategory) + '&'; url += 'edit[field_shipping][und]=' + encodeURIComponent(frugalzonshipping) + '&'; url += 'edit[field_image][und][0][filefield_remote][url]=' + encodeURIComponent(frugalzonimage) + '&'; window.open(url, '_blank');

You'll notice that the Image field is passing in a URL which is handled via the filefield_sources module. Also, the Category field is a tag-style term reference field so whatever gets passed in there will be fine; you don't have to match up tid's to existing terms or anything.

Putting it all together

So now we have our bookmarklet code (here's a full gist) and we're set up to handle it on the Drupal side (using the Prepopulate module), so we just need to make an actual bookmarklet out of this thing.

I used this online tool for that. Paste in your JS and it'll crunch it and build a little link for you to drag to your bookmarks bar. This worked like a charm. Now, adding products to Frugalzon is as simple as clicking the bookmarklet on an Amazon product page and then clicking "Save" on the prepopulated node add form. Not bad!

Hey, maybe you should follow me on Twitter!

Trellon.com: New CRM Core Releases, and What to Expect

Today, Trellon released new versions of CRM Core and CRM Core Profile. Both of these modules include new features that are important for anyone looking to build modules that use CRM Core as a backend for storing contact information.

These releases are part of our Garden Party roadmap, as part of the 'Live Music' stage. They are for site builders and developers looking to build modules and features that expand upon CRM Core's basic capabilities. With them, you have some more powerful tools for working with contact records stored in your Drupal site, and they include some usability enhancements based on feedback we received as part of the 0.91 release of CRM Core.

I wanted to share a little about what you will find, and why it is important.

read more

Lullabot: Announcing Our 5th Annual DrupalCon Party

DrupalCon Portland will be happening in a few weeks and, as usual, Lullabot will be out in force. Our entire team will be there and we'll be spending our days training (4 classes) and presenting (8 sessions). We'll also be hanging out at both the Lullabot and Drupalize.Me booths in the exhibit hall. As usual, we've got a lot going on.

Drupal Association News: Sponsored blog post: Where should Drupal professionals focus for the next phase of growth?

As part of the Diamond and Platinum sponsorships for DrupalCon Portland, we've offered leaders at these sponsor companies the opportunity to guest blog on the Drupal Association site. In today's post, Robert Douglass of Commerce Guys takes a look at where Drupal is today, and the untapped opportunities for Drupal growth in e-commerce.

Personal blog tags: sponsor blogDrupalCon Portlandguest blog

Pages