Modules Unraveled: 061 The Walkthrough.it Project with Kristof Van Tomme - Modules Unraveled Podcast
- What is walkthrough.it?
- I heard that this works with Selenium in the background
- What is Selenium?
- How does Selenium make this awesome?
- How is this related to the Tour module in Drupal 8 core?
- How do you record walkthroughs?
- How do you play walkthroughs?
- You recently finished a crowdfunding campaign on IndieGoGo, can you tell a bit more about
- What things did you promised as part of the campaign?
- WalkHub: walkthrough server distribution,
- Walkthrough module for Drupal
- really awesome t-shirts
- WalkHub.net: GitHub for interactive tutorials
- An iPad application with introductory tutorials for Drupal distributions
- What is this iPad app for?
- Can you tell me a bit more about the Drupal module?
- Will there be versions for both Drupal 7 and Drupal 8?
- You promised that you would document 1 distribution with walkthroughs if your IndieGoGo
campaign would be a success. Do you already know which one will win?
Recently the company I work for shifted the bulk of our instant message communications over to Campfire, and established a series of rooms to discuss our various projects. This transition seemed to go fairly well, once everyone settled on their preferred client interface. I was used to using IRC and found a nice little Ruby gem that piped Campfire through my IRC client. Chatting in this environment quickly had me missing Druplicon, the friendly Drupal fueled chat bot that tirelessly serves the Drupal IRC community. I decided to look for a replacement, and after some searching I stumbled upon Hubot, a Node.js powered chat bot. It was initially built by the folks at GitHub and includes a long list of plugin scripts added by community developers. This was immediately appealing for several reasons:
- It is built using Node.js
- It is written in Coffeescript (something I have wanted to try my hand at for a while)
- Additional scripts appeared easy to write, and plugin simply
- It has built in Campfire integration
So I installed Hubot on a small server, with a handful of scripts that I thought would be useful and fun for our team. Adding the bot to our Campfire rooms was fairly painless, and after writing a small init script we were good to go. This sparked some discussion among our team about how the bot was deployed, cool ways it could be extended, and methods of use. A fellow developer, David Fells, mentioned that it would be handy if we could tell Hubot to execute Drush commands. This gave me pause, and after a quick:
"That's a great idea! You mind if I implement that?"
"Sure, go for it."
As you can imagine there were, and are, several security concerns. The early prototype actually had user commands pipe right into Drush which is a security nightmare. Any user with access to the bot could escape or pipe in any old Bash command directly through the bot. Further, any Drupal installation that Drush is aware of would be at the mercy of users who may or may not have the best intentions at heart. Needless to say this approach was quickly abandoned in favor of a hand picked list of commands made available to the bot. This caused the code to be a bit more tedious, and likely less elegant, but I needed to insure that Drush would be executing the allowed commands, and nothing more. After some discussion I also decided to weed the available commands down to a relatively innocuous set (giving information vs. actually changing something). I attempted to structure the code in a way that it would not be difficult for another developer to add commands. Overall, I'm pretty happy with the end result, and the pull request was soon accepted. You can find this script along with all of the other Hubot scripts on GitHub.
In this tutorial we will be looking at how we can allow multiple file upload in drupal. To achieve this, we will be considering the plupload module. Plupload is a GPL licensed library used for multiple file uploading The plupload module allows backwards bend in other to achieve cross-browser compatibitility. using HTML5, flash, silverlight and even the classic HTML4 depending on the clients computer resources. Modules used for this tutorial. Filefield sources Filefiled sources plupload plupload
One of the best things about Drupal is the ability to flexibly manage your content. If you're coming from a WordPress background, you'll know that system uses the Post and Page for its content types. In Drupal you have something similar in the Article and Basic page, but also an easy to use interface for creating a virtually unlimited number of other content types.
Before we get into the how, let's briefly discuss why we would want to use custom content types. Some of you may be thinking to yourselves that you've been getting along very nicely without additional content types. Whenever you've needed to organize your content, you've always had your taxonomy terms handy.
Although taxonomy terms (the equivalent of Categories in WordPress) are very useful, they don't solve the same problem as content types. Let's break away for a moment from the idea of our site consisting of pages and instead think of it as being comprised of objects. Of course we still have objects we call pages, but we may also find that our site has other types of objects like products, events, and forum topics.
Ultimately, all of our objects may be expressed as web pages, but conceptually they represent different types of things and have often have different characteristics. We can use Drupal's custom content types and the Fields UI to define these objects and give a more logical structure to our site's content.
Now you may be asking about those taxonomy terms...where do they fit in? Taxonomy terms simply help us differentiate between the variations we find within our objects. For example, a bicycle and a shirt are both products, but certainly quite different. So we can use taxonomy terms to essentially create sub-categories within our content types. In a future lesson in this series we'll take a closer look at taxonomy in Drupal.Creating a Custom Content Type
Now that we have an idea of why we would want a new content type, let's create one called "Product" for our example site. We'll begin by going to Structure > Content types. You should see something like the screenshot below.
You'll see a link at the upper left that says, "Add content type". Go ahead and click that link. You'll be directed to the screen below where we can define our new content type.
The name and description fields are pretty self explanatory, but we'll briefly go through the other fields in the tabs at the bottom of the form.
Submission form settings
You see three settings under this tab. The first is "Title field label". This is what content creators will see when creating a new piece of content and by default it's set to, "Title". Frequently with custom content types, this isn't as descriptive as we would like. In our case we should change it to something like, "Product name".
The second setting controls preview options and the last one allows you to create a message that will be displayed at the top of the page providing submission guidelines. This can be very useful if the content type you are creating will be user-generated content.
These setting help you determine the default status of the post when you click 'Save'. For example, should the post be automatically published? Should it be promoted to the front page? If you have the Revisioning module installed you will also see options for creating a new revision - very handy if you want to be able to roll back any changes.
You can disable the display of the author and post date information by unchecking this box.
This is where you can adjust the settings for the comments on your site. I personally recommend you consider disabling Drupal comments and use a third party commenting system. I've talked about this in a recent post, but suffice it to say there are significant advantages to not using Drupal's built-in comments.
With this setting, you can optionally make your content assignable to any menus you may have created for your site.
This setting isn't present in Drupal by default, but is found in our example site because using a sitemap is such an important - and in my view, fundamental - part of building a website. However, there are times when you may not want a content type indexed by search engines and here is where you can disable that if needed.
This is another one that isn't included by default with Drupal, but also very useful for most sites. It exposes the custom breadcrumb information on the node edit form.
For most of these settings, we'll stick with the defaults. Once we've given our content type a name we'll click the "Save and add fields" button at the bottom of the form. You should then see something similar to the image below.
The image above is the Fields UI, the administrative interface for adding and configuring the fields for your content types. There are a few fields here that have been added by modules that are installed with the example site (Meta tags, for example) and two that are included by default by Drupal. The default fields are Title - in our case renamed to Product name - and Body.
What we're going to do next is add a new field. Since we're adding a content type for our products, Price seems like a logical field to start with.
You'll notice in the area highlighted in green how we have the form filled out. Our Field type is set to decimal and we've chosen a text box for the widget - aka input element - that will appear on the node create form for our content type. Let's go ahead and click Save to continue.
The next screen (not shown) allows us to set the precision of our decimal number as well as how many digits should be to the right of our decimal point. We've kept these at the defaults and continued to the screen below.
We won't go over each of these, but an important point to keep in mind is that these settings will change depending on the content type you set for the field. For example, if you chose the image type, you would have settings for allowable file formats, maximum and minimum image size, as well as for which image style you wanted to apply.
In this particular example, one field we may want to change would be the prefix. Maybe setting it to the dollar sign (or pound, euro, etc.) might be a good idea. Let's do this and then click save. You'll then see that our field has been added to our content type and we can change its position on the node create/edit form by dragging it up or down our list of fields.
Before we move on we should briefly note that you can also reuse fields that you may have defined previously using the, "Add existing field" component. One situation where this may come in handy is for an image field. Instead of having multiple image fields, you could reuse a single field for all of your content types and control the display of the image using image styles. Sometimes this may not be what you need, but in general it's a good practice because it will make things less confusing as your site grows in complexity.Managing Display
The final thing we'll discuss is managing the display of our fields. You'll see a tab on the page titled, "Manage Display". The settings on that tab are pretty straightforward so I won't go into too much detail, but something that new site builders sometimes do is forget to hide the display of the label for certain fields, in particular, those for images. This tab is where you can remove the label for those images as well as other aspects of how the fields for the content type will be displayed on your nodes (aka web pages).
That's it for our discussion of content types and the fields UI. There is a lot going on, but fortunately it is pretty intuitive to use, particularly once you've got a handle on what is happening conceptually. Next time we're going to take a look at using Views - a big and very important topic! If you'd like to keep up to date on this series, you can subscribe to the RSS feed.
In the meantime, if you'd like to comment on this post, you can do so on this discussion forum.
Nowadays Drupal Services support becomes stronger and more flexible. The main functionality is provided by Services module. You can find more than 1300 modules tagged with “services” that is more than enough.
Out of the box services provides just REST/RCP server and pure documentation of available options. But sometimes we need to build Client instance to retrieve data from another Drupal env that provides for example RESTful server. You have some ways to implement it:
- Custom handmade solution, built using services source only
- Use “Services Documentation” or “Services API” modules to get more useful info to build your own handmade Client instance
- Use contrib modules which provides already created Client instance like Services Client or Services Guzzle!
I prefer to use ready, tested solutions, not to reinvent the wheel and save my time Meet Services Guzzle module. It brings power of Guzzle framework to Services module, also Guzzle is already part of D8. The module provides three things:
- Generate Guzzle Service Description from endpoint definition.
- Example of Guzzle Client instance implementation and usage.
- GUI for Client debugging
Guzzle Service Description
Guzzle has really amazing feature - factory method to create Client instance from Guzzle description. You can read about it here. So the main job of our module is generate this description for particular endpoint object. For example we have endpoint “Node service” that provides all node operations: retrieving, creating, deleting, etc. SG (let make a shortcut for Services Guzzle module) create an additional tab for endpoints that looks like:
Here we can see Guzzle version of endpoint object in JSON format, that is even human-readable. Now we have two ways to create a Guzzle Client (see on DrupalServicesClient class in the services_guzzle_client submodule):
- Create service.json file and put Guzzle description json string there, then this lovely piece of code will create ready-to-work instance: $client = \DrupalServices\DrupalServicesClient::factory(array('includes' => array($path_to_json . '/service.json'));
- Provide array with this description and use $client = \DrupalServices\DrupalServicesClient::factory($array_of_service_description);
That’s all, now you have full Guzzle Client object!
Guzzle Client usage
Now when we have a Guzzle Client lets see how it works. If you return to Guzzle endpoint service description json you will find array of operations like "NodeOperationRetrieve" or "NodeOperationCreate". Inside every operation there are some other options, but now we need only “parameters”. So for NodeOperationRetrive we need name of operation and param - “nid”. Lets use our Client to retrieve a node:
$arguments = array('nid' => 1);
$command = $client->getCommand('NodeOperationRetrieve', $arguments);
$response = $client->execute($command);
And if node with given id exists we will get node data into $response variable. Did you notice that it is template of using any operation provided by your endpoint. Just change operation name and arguments. For example updating node:
$arguments = array('nid' => 1,
‘node’ => array(‘title’ => ‘Modified title’));
$command = $client->getCommand(NodeOperationUpdate, $arguments);
$response = $client->execute($command);
Gui for Guzzle client debugging
Service Guzzle Client provide example of usage and also UI to test and debug your local endpoint or external from given service description. After you choose one of these options you will get a list of available operations to test.
Use “UserOperationRetrieve” for example. Some operations will need Authorize first, it depends on your permissions. SG UI provides form for auth every time. So for UserOperationRetrieve we have such separate page with form:
And if you provide valid credentials and existed user id you will get the full user object via dpm theme (so familiar for Drupal developers). Also you will get the full exception message if some occurs.
Service Guzzle module introducing is over. Waiting for feedback.Language English Tags: DrupalDevelopmentTutorialsCheck this option to include this post in Planet Drupal aggregator: planet
Welcome to another Commerce Module Tuesday! Today we are looking at Commerce Reporting, maintained by Christophe Van Gysel who interned at Commerce Guys last year and is now interning at Google in the United States (yes, we’re all jealous of Christophe). Get ready for a high impact and extremely useful module, folks. It not only “just works” it takes all of it’s data from the existing database and displays fancy graphs and filterable reports. In other words, even if your store was built on a pre-beta Commerce from 2011, this module would still be able to read your store history.
Christophe had to really jump a number of hurdles to get this module launched last year, not the least of which was a lack of community consensus on how to display graphs from Views 3.x on Drupal 7. So he built the Visualization API which has now eclipsed commerce_reports in terms of active installs. So, as a part of another Commerce Module Tuesday, I invite you to sit back and take a look at another awesome community contributed module that fills a vital role: data mining.
Everplans.com is a website meant to help people prepare for and deal with death. The previous iteration of their site presented numerous technical challenges, making it difficult for their team to achieve their goals. It became Digett's job to give Everplans a website that works for, not against, its users and administrators.
Apache Solr is a Java application that gives you a more full featured search experience than the default Drupal search. It provides tools to allow your users to narrow down the search results and adjust the sorting. Solr can be very confusing initially due to the new terms it introduces as well as the sheer number of configuration options. This guide helps you plan out the items that you need to think about before you ever install the module.
Don't worry if this doesn't make sense, we have an upcoming webinar that should help fill in all the blanks. Be sure to check out our free Intro to Solr in Drupal webinar.
For context, click here to jump down to the reference links.Where We Are
I'm pleased to announce the following:
- My co-authors and I have completed a rough draft of this white paper and we're actively refining it to get to a completed first draft.
- Ned McClain of Applied Trust has joined the project as a co-author. Ned's expertise and years of experience in this field has been an extremely valuable asset and this project will continue to benefit as a direct result of his input.
- A heartfelt thanks to Ryan Cross of CrossFunctional for becoming our latest project sponsor.
- The article that sparked this project (Let's Talk About PCI Compliance for Ubercart and Drupal Commerce) has crossed 2500 page views. This reinforces (at least to me) that there is a demand for more information on this subject matter.
- The number of reported Ubercart/Drupal Commerce installations continues to grow rapidly.
- Many "silver bullet" strategies are not as bulletproof as you'd like to believe.
- A new version of the PCI standard will be released within a year and the requirements are only going to get more stringent.
- As companies become more distributed and adopt cloud-based solutions, it's important to define who is responsible (and liable) in the context of securing payments.
- Fully understanding this topic can give you and/or your business a competitive advantage in the Drupal ecommerce marketplace.
And perhaps the most important item—if you currently own, operate, or host an ecommerce website that is NOT compliant, you could be putting your business at risk.Next Steps
This is a complex topic that requires a lot of time to check assumptions, distill a large volume of material down to the most important elements, and write it in a way that is understandable across several audiences within the community. Having nearly achieved a fully complete first draft, we are at the stage where we will need to iterate and refine it to ensure its one cohesive document and it has all the necessary components (most notably references, citations, and footnotes). We will then reach out to additional reviewers to get feedback from a wider audience. If all goes as planned, this feedback will only require us to make minor adjustments and we will have a clear path forward to a final release.Sponsorship
There are still several gold and silver sponsorships available if you are willing and able to fund the remaining portions of this project. While a lot of progress has been made, I recall several personal (and painful) experiences submitting manuscripts to scientific journals only to find out that the quantity of revisions requested required rewriting a paper from scratch. Yes this can be disheartening, but it almost always resulted in a much better end product. Therefore, if you would like to become a sponsor, please reach out to me using the contact information at the official website for the white paper.
Thank you for your time and I look forward to contributing this work back to the community!Reference
The following articles, posts, and websites describe the motivating factors for starting this project:
- Let's Talk About PCI Compliance for Ubercart and Drupal Commerce
- Proposal: Drupal PCI Compliance White Paper
- Drupal PCI Compliance White Paper (Official Website)
The Multi Node Add module provides an interface for creating multiple pieces of content easily from a single page. The module is a time saver for content creators who often enter in a large amount of articles and pages. Using Multi Node Add is fairly straight forward, just enable the module and then go to /multi_node_add to create content.
The following blog post was written by Cathy Theys of comm-press, and is also read by Cathy Theys. You can find the original article where you can comment, and find all of the links mentioned in the blog on the Comm Press blog. Enjoy!Tags: Audioblog, planet-drupal
A time consuming task for all software users is testing.
It takes time to find all the download links, to set up a test environment and to install all the additional software you need.
Simplytest.me is an ingenious solution for Drupal. Simplytest.me will install Drupal sites for you, as well as modules and themes that you want to use. Here's a brief introduction to this very useful site.
How to plan a Drupal Project
When a client comes to you with an amazing idea for the project that is going to change EVERYTHING in a market, enthusiasm for getting down and building before thinking through how that goal might be achieved is very common. You may get a "plan" on the back of napkin. There are a few approaches that you can take to reach the client's ultimate goal.
Angularjs and Drupal - A new power couple in the open web space.
This lets you build complex single page applications in a predictable and standardized way.
It also presents an interesting approach on how to address some of the more common customer scenarios..
We have seen many customers that are stuck in some kind of Drupal Hell with codebase from Drupal 5 stuck in time because their original developer hacked core or views and they never had the budget to upgrade.
It's extremely challenging to provide value to this type of customer but we've found an interesting pattern using Angularjs to create modern cutting edge interfaces even within the weirdest sphagetticoded nightmares.
So let's say we have a Drupal5 site stuck in 2008...
- Create a content type called angularapp
- Overide page.tpl.php as page-node-angularapp.tpl.php (Drupal 5 needed custom code in template.php
- Load the angular.js library and dependencies plus your apps code
- Comment out the print of the $content in you're overiden template and instead add
- The code above renders the angular app based on the code
<section ng-app="appname"><div ng-view></div></section>
The idea is to replace the rendering of $content all together when the angularjs is rendered.Is there anybody out there?
It doesn't matter how much amount of frontend wizardry goes on we still need someone to answer those angular services and provide the frontend with the data coming from the Drupal site.
We do a fair amount of node.js server side programming so sometimes drupal isn't even part of the equation but when Drupal is the server side there are several options to address it.
1. Services module (Drupal - 5-8)
2. restws module (Drupal 7)
3. As Will Vincent pointed out you can roll your own with returning drupal_json_output in your hook_menu.
For the Angular curious - I created a gist (rendered belowe) - walking through the relevant steps in an angular app -
Just going to DrupalCon to watch is awe inspiring. The amount of people there, all sharing one common goal: to learn more and grow the power of Drupal, thereby empowering themselves... it's all really inspiring stuff. There's more than a few reasons I keep coming back.Stay ahead of the curve.
The most important thing I've gotten out of DrupalCons is a glimpse of the future. Drupal, like most open source software technologies, moves fast. People are always working on the next version. If you don't spend some time this year paying attention to whats going on, you won't be ready next year when the curve passes you by.
We built and launched our first website for ThinkDrop in the days before DrupalCon 2010 San Francisco, around April 19th. We used an alpha release of Drupal 7. We knew we only wanted a barebones design to start so we went ahead and tried it, and Drupal 7 worked well enough to get online for the next few months.
Then, we learned enough at the convention to realize that might have been a bad idea. A few data migrations and alpha2alpha hacking we got up to speed with the latest and greated versions of Drupal 7. We hit the 7.0 release in January 2011, almost 9 months later.
We were ready and motivated for Drupal 7 because of DrupalCon, which we already had experience with when it was first released.See how open-source gets done... "In Real Life".
These conventions are where everyone comes together to get more work done than any other week of the year. It is an impressive sight to see all of the pieces moving at once.
The Core Conversations are a window into how Drupal gets planned and built.
It is even more stunning to see a DrupalCon Sprint. At DrupalCon Denver, people filled two gigantic rooms, all to work on core Drupal 8. It was abuzz like a stock exchange floor or a newsroom at the Daily Planet. It will make your jaw hang open walking into that space.Meet People, Learn Personalities
To come to DrupalCon, you get to see the faces of everyone that's built the things you use every day. Knowing a username and knowing a person are two totally different things.
Five minutes in person with someone will give you more information about an individual's personality than 100 page long comment threads on Drupal.org will. I can guarantee that.
Even if you don't directly engage in a conversation, Just seeing a speaker and knowing their username along with their voice, mannerisms, and appearance will change how you might interact with that person online.
Interacting with people on the internet is hard. Working with them on the internet can be even harder. Sometimes all you have to go by is a single username. The only way to really get an idea of someone online is by reading as much of their writing as possible. It's very easy to make assumptions about someone's personality when all you see is written words, which we all read as we interpret them.
It's much, much easier to work and communicate with people when you are familiar with their personalities, and have met at least once. To be a member of any open source community, it really helps to have at least a semi-realistic idea in your head of who people really are.Work Hard, Play Hard
I know its a bad stereotype, conference goers and partying. But when done properly, you will forge relationships for business and friendship that might last forever. When done improperly, you will forge memories for all those that witness your temporary lapse(s) in judgement.
Stay wise and use the buddy sytem.Make it what you need it to be.
DrupalCon is what you make it. Don't expect it to cater directly to you. It's really up to you to go out and make the most of it, for you, whatever your position might be. Even if you end the conference and feel like nothing specific comes out of it for you, at least it motivated you to clean up your resume or polish up your old modules. Make the most of it.
DrupalCon is a huge opportunity to learn about a huge variety of topics, and meet a huge variety of people.
Just walking around the various spaces of DrupalCon you will overhear things that will make your head spin, things you find obvious, and everything in between. It's knowledge being transfered at a phenomenal rate, all around you.
Don't stop learning!Tags: DrupalConPlanet Drupal
It seems like we are always trying to stay one step ahead of proposed web standards in an attempt to future-proof our sites and take advantage of emerging technologies. One such proposed standard that is exciting – yet difficult to implement at times in existing frameworks – is the new responsive PICTURE element.
Not so fast… The element is still in the “unofficial draft” state, so it has limited support (some advance versions of newer browsers might have it, but nothing in production to date). However, there are some solutions out there that will serve up the element if the browser supports it, but fallback to the polyfill solution if not. One that is turning out to be incredibly helpful is the combination of the Picture and Breakpoints modules to help future-proof D7 sites that implement responsive themes like Omega.
How does it work? Pretty simple – (once you get the hang of it, after setting a few up):
- Install the Breakpoints and Picture modules.
- Define breakpoints for your images (and additionally core image styles for those breakpoints if you don’t already have some you’d like to leverage).
- Define breakpoint groups that will be used by the Picture module to associate breakpoints to image styles.
- Map image styles to breakpoints in each group.
- Under Manage Display for an image field, select the Picture field formatter instead of Image and select the picture group (aka breakpoint group) you want to use for this field. Other settings are similar to the Image field formatter.
- Check out your new images!
What you should see on a browser that does not support the PICTURE element yet is a collection of IMG and SCRIPT tags to manage the polyfills leveraging weblinc’s picture library. On a browser that supports the element, you will see a PICTURE element generated using the CSS3 media queries defined by the Breakpoints module and the images being served up from image style paths as mapped by the Picture module. The beauty of this solution in Drupal is that you can apply it to existing image fields with minimal impact since the implementation is encapsulated in a field formatter, with only wrapper-level CSS changes being your biggest hurdle.
For a more detailed tutorial on setting up and leveraging these incredibly useful modules, check out the tutorial on drupal.org.
Every small finding is worth sharing. This blog post is no except for this fact. Drupal ships with a module for blogging since a long time. This mighty module offers a potential multi-user blogging feature to Drupal site. This is an essential module for most of the contents publishing site. Blog content has been architectured to leverage node. A new blog can be created by any user with permission "Blog entry: Create new content" as of Drupal 7.Google Plus One Linkedin Share Button Tweet Widget Facebook Like