Web Design & Development

Metal Toad: What I Learned Today: Views Plugin Debugging

Drupal Planet - Tue, 24/05/2016 - 20:52
What I Learned Today: Views Plugin Debugging May 24th, 2016 Jonathan Jordan

As I've said before in my custom views filter handlers tutorial, views is amazing. Today I was writing a custom style plugin. I got the plugin to show up in the list of available formats, but whenever I saved the form, it wouldn't stick.

My Typical Method of Debugging in Drupal

Typically I would throw dpm's to debug, so I started walking through the callstack trying to find where things were going wrong. Then I ran into a line in views that called vpr(). It looked like a print_r debug statement, so I knew this was either being logged or there was a setting somewhere.

A Better Way to Debug Views Plugins

Sure enough it is part of the "Enable views performance statistics" setting to have these messages logged with watchdog. To turn it on go to /admin/structure/views/settings/advanced. Even better, when you turn Devel on, you can have them dpm'ed instead. Now I get exactly the information I need to figure out what I was doing wrong, without having to throw my own dpm's in views or ctools.

Other Views Settings for Debugging

Also, if you are just looking to debug your views query the "Show the SQL query" and "Show performance statistics" options on /admin/structure/views/settings are invaluable.

This post is part of my challenge to never stop learning.

Chapter Three: How to Secure Drupal HTTP Headers

Drupal Planet - Tue, 24/05/2016 - 19:29

How to Secure Drupal HTTP HeadersIn this blog post I will briefly overview some of the very useful HTTP response header parameters that will help to secure any website. In short - HTTP Response headers are name-value pairs of strings sent back from a server with the content you requested. More information can be found on the internet.

I will cover some of the most important security-related HTTP parameters. The original blog post was written by Scott Helme who is the creator of SecurityHeaders.io. This is a brief overview of his blog post to introduce this technique to our readers.

Janez Urevc: Drupal's number 1 is from Switzerland

Drupal Planet - Tue, 24/05/2016 - 14:49
Drupal's number 1 is from Switzerland slashrsm Tue, 24.05.2016 - 15:49

Swiss has traditionally been dedicated to the best quality and innovation. Some of the best things in life come from Switzerland. Did anyone mention chocolate?

Photo by Janine, released under CC BY 2.0

Drupal and free software are no exception. Many companies and individuals are dedicated to them on a daily basis. That said, it is no surprise that Drupal's number one comes from Switzerland.

Jerome from MD Systems explains how we achieved that, which are the main advantages of Drupal and why everyone should use it. Very interesting read!

The Making Of Melody Jams

Smashing Magazine - Tue, 24/05/2016 - 13:01

  

After months of hard work, I’ve finally gotten my side project, Melody Jams, into the App Store. It’s been quite the adventure, and I’m thrilled to see it in the store. Seeing it live makes me reflect on the process that got us there: our failures and successes, some of the crazy stuff we figured out and what our hopes and dreams are.

The Making Of Melody Jams

To give you some context, I worked with five other people completely remotely. Most of us still haven’t met in real life. In spite of that, we designed, programmed, animated and submitted the app in four months. It works on iPhone 4s through iPhone 6s+ and iPad 2 through iPad Pro. We also tested it with over 30 kids, ranging from nine months to nine years old, in that timeframe.

The post The Making Of Melody Jams appeared first on Smashing Magazine.

Janez Urevc: Drupal community, please meet Vijay

Drupal Planet - Tue, 24/05/2016 - 09:40
Drupal community, please meet Vijay slashrsm Tue, 24.05.2016 - 10:40

Google summer of code 2016 started with a full swing this week. Vijay is one of the students participating in it. He is working on the Media module for Drupal 8.

He wrote an introduction blog post. I'd like to invite you to read it, say hi and follow his work as it progresses through the summer.

Welcome in the Drupal community Vijay!

mFancyTitle

HTML.it Guide - Tue, 24/05/2016 - 09:00
mFancyTitle è un plugin di jQuery che consente di animare il titolo e la favicon di una pagina HTML. Leggi mFancyTitle

Guida JavaScript di base

HTML.it Guide - Tue, 24/05/2016 - 08:00
Una guida per imparare e un riferimento per ricordare le caratteristiche fondamentali di JavaScript, linguaggio di programmazione principe dello scenario Web, ma sempre più presente in ambito...

RokSprocket: Per creare slideshow, mosaici,tab e altro

Joomla.it - Tue, 24/05/2016 - 07:45
RoksprocketIn questa guida vi parlero' del componente RokSprocket e delle sue funzioni principali.
Qui potete vedere una demo di cio' che fa': http://demo.rockettheme.com/joomla-extensions/roksprocket/
Cioe' permette di creare molti elementi che spesso vengono usati nei siti web come showcase,slider, accordion, tab,griglie,mosaici,etc

LevelTen Interactive: Drupal Con[densed] 2016: The Best Developer Sessions (Part I)

Drupal Planet - Tue, 24/05/2016 - 06:00
drupal condensed

DrupalCon New Orleans was the third DrupalCon I’ve attended, and it never ceases to amaze me how much Drupal has changed over the years, and how much time and effort the community puts in -- not just into core and contrib, but also into building out third party tools, scripts, and methods that will benefit other agencies and freelancers. It really is a privilege to be a part of a community that is so incredibly committed to the values of open source and always willing to share their experience along the way.

Aside from the ...Read more

Blockchain CG online weekly meeting

W3C Community Groups - Tue, 24/05/2016 - 04:27

Hello,

Be advised that the Blockchain CG weekly meeting is always on Thursday 10PM KST. This is GMT+9 (06:00 AM (PDT), 15:00 (CET), or 09:00 AM (EDT)).

Please check the timezone at http://www.timeanddate.com/worldclock/meetingdetails.html?year=2016&month=5&day=5&hour=13&min=0&sec=0&p1=235&p2=224&p3=195&p4=179&p5=136

The meeting is link is as following:

https://meetings.webex.com/collabs/#/meetings/detail?uuid=M28AGI96Z792KX57HCKFRHPEHM-101R9&rnd=594165.71851

 

Drupal Association News: Ready to Serve

Drupal Planet - Mon, 23/05/2016 - 23:28

After five and a half years of serving the Drupal community as a Drupal Association staff member, I’m honored (and thrilled!) to step into the Executive Director role. This community is magical. Your generosity, kindness, and drive to create something meaningful together inspire me every day. Drupal 8 is destined for success, because each drop of code captures this ethos.

You’ve given me so many memorable moments. I remember that feeling of pride—that sense of “I’m one of you now!”—when my sprint mentor helped me contribute to D8. (The contributor sticker on my laptop is a daily reminder of how welcoming you all are.) Then, there was that time at DrupalCon Portland when people joined forces to build a site to help those impacted by a tornado in Oklahoma, USA. And I’ll never forget the first time a company joined our Drupal Supporter Program and then thanked us for creating this way to give back to the Project.

Those who work in other open source projects often point out how unique and special our community is because of its culture. I agree. This community is a bright spot in our complex world, and its health and longevity are worth protecting.

The Association does this through our mission to unite each of you—a global open source community—to BUILD and PROMOTE Drupal. With Drupal 8 out, my job will be to align the Association's resources where they are now needed most. 

Our Mission: To Help You Build and Promote Drupal

Over the last few years, the Drupal Association has partnered with the community to help you build Drupal 8. We invested in an engineering team who helped contribute semantic versioning, DrupalCI, and improved issue queue functionality. We also created the issue credit system to reward and motivate members to contribute to the Project. Plus, we raised funds through Drupal 8 Accelerate to pay for sprints that accelerated the software release. Additionally, DrupalCons have brought thousands of you together to grow your Drupal skills and learn from mentors. And, Con sprints are an opportunity to put that growth to work right away with hundreds of other people.

When Drupal 8 was released, The Drupal Association partnered with the community to promote the software on Drupal.org with rich, educational content, telling the world to “Build something amazing, for anyone.” And, we worked with the community to celebrate this great achievement by coordinating a global party. On release day, there were more than 200 release parties around the world.

We see so many wonderful ways we can help the community build and promote the software, yet our dreams cost more than our funding allows right now. So like any organization with a limited budget, we make choices based on priorities. Leading up to the D8 release, our priority was to help the community release the software. Now that D8 is out in the world, it makes sense to put more effort into promoting the software and do that in a way that only the Drupal Association can uniquely do. And, we need to promote the software in a way that generates more income for the Project so we can sustainably fund all the initiatives that help the community as you build and promote the software.

Grow Adoption. Generate Income

Drupal 8 is a platform that helps end users (customers) create amazing solutions that unleash digital business opportunities and solve business pain points. It’s ideal for complex web solutions as well as mobile, SaaS, and newer tech trends like the Internet of Things (IoT). However, the software alone is often not a complete solution. It must work in concert with third party software and hosting services. These solutions require an architecture strategy, integrations, and implementation—all of which is provided by our large ecosystem of service providers: Drupal shops, system integrators, and digital agencies.

When a CIO or CMO is deciding on Drupal as their platform, these software companies, hosting companies, and service providers want to be included in that decision making process. And, they are willing to pay for the ability to be considered part of a Drupal solution.

As a way to grow Drupal adoption and generate income, the Drupal Association can promote solutions, like Drupal for Higher Education or DevOps for Drupal, through its two main channels: Drupal.org and DrupalCon. For each solution, we’ll invite software companies, hosting companies, and service providers to participate in promotional campaigns and to pay for the ability to engage with the decision makers in our channels.

This is work we’ve already started, and it's working well. On Drupal.org, we have an adoption journey for visitors where they learn about Drupal. We invited other companies to provide educational content and services to improve that journey, so that visitors can see Drupal’s strength when it works in tandem with other technology. For example, from the homepage, people are invited to Download Drupal or Try Drupal, which is a selection of Drupal cloud offerings that let the evaluator get an immediate feel for Drupal. With this approach, we add value for visitors, and we lower barriers to adoption for Drupal. Plus, the Try Drupal partners generate leads and pay the Association for the opportunity.

We’re doing this work through DrupalCon too. We offer one-day summits that focus on specific verticals, such as Higher Ed, Media & Publishing, and Government. Current and prospective Drupal customers use the day to talk about how to use Drupal in new and better ways within their business. These talks help strengthen and deepen customer commitment to Drupal and help new customers decide the best way to use Drupal. As part of this event, we invite sponsors to participate. They are third party software companies and service providers who serve these verticals. We invite them to provide educational content, like case studies, and give them meaningful engagement with the audience. They in turn generate leads for future business and pay us for this business opportunity.

It’s important to point out that this opportunity is for those who want to pay. And that includes Drupal shops, who have always been an important part of our community. But I believe this approach still helps those of you not able to pay. Through promotional campaigns, we can attract more potential customers to the channels you are already engaged in: Drupal.org and DrupalCon. For online campaigns, we can point visitors to the marketplace to find all service providers. At DrupalCon, there are lots of opportunities to network and set meetings with a potential customer. Plus, we will look to share promotional content with businesses so they can use them in their local markets.

Bringing our multi-sided market together to help us promote Drupal and generate income works. It’s a tested approach that we can enhance, ultimately allowing us to realize the full vision of funding more work that helps the community build and promote the software.

Why This Matters

This is personal for me. I want Drupal to be adopted across all sectors and in all kinds of ways, so each of you are rewarded with the opportunity to pursue your Drupal dream and get paid doing it. You all give something special to the Drupal Project, from volunteer coding time to giving hugs and high fives when celebrating or supporting each other. I am constantly moved by these acts of generosity and kindness. My life is better because of knowing you and that fuels me to want to give back in the way that I can. The more we can grow Drupal adoption across sectors, the more doors open up to you to pursue your Drupal dream, from serving citizens through government solutions to working on new technology trends through Internet of Things solutions, and anything in between.

Where do we go from here?

I'm so thankful for Holly Ross's leadership. She showed an amazing ability to build community relationships and operationalize the organization, all while sharing her contagious laugh. The Association is in a better place because of her involvement. By investing in and empowering staff, and by leading by living our values, she created a team that’s passionate about serving our mission. I’m so fortunate to work every day with such incredibly talented, smart, kind, and passionate people. I will fiercely protect this culture we created, because it’s our secret sauce. Together, we’ll build off of the great foundation that Holly created.

I’m working with the board and staff to build towards our vision. We are looking at how to maintain and support the services you need to build the software while creating opportunities to promote solutions through Drupal.org and DrupalCon. We are in thinking and listening mode as we figure out the best way to execute this.

I invite you to share your thoughts on this vision. We are all in this together and we will be able to achieve this goal to fund more work on both sides of the Build/Promote equation if we have a shared vision and work together towards it. So please let me know your thoughts. What are the opportunities you see? What are the areas of concern we should consider?

Matt Glaman: Run \Drupal\Tests\BrowserTestBase with SQLite

Drupal Planet - Mon, 23/05/2016 - 23:22

As part of the push to deprecate SimpleTest and use PHPUnit as the test runner in Drupal 8, there is the \Drupal\Tests\BrowserTestBase class. The BrowserTestBase provides a Mink runner that tests web pages in Drupal. Unlike kernel tests, which require a database and can be run via PHPUnit as well, browser tests use your default database connection. I prefer to run my tests with SQLite as I do not need to have my Docker containers running.

The simplest solution I have found, thus far, is to check the HTTP_USER_AGRENT

if ($_SERVER['HTTP_USER_AGENT'] == 'Drupal command line') { $databases['default']['default'] = array( 'driver' => 'sqlite', 'database' => '/tmp/test.sqlite', 'namespace' => 'Drupal\\Core\\Database\\Driver\\sqlite', ); }

With this, and running php -S localhost:8080 I'm able to write my Drupal Commerce browser tests without having my normal Docker containers running.

Cocomore: 5 recommendations before starting your first Drupal 8 project

Drupal Planet - Mon, 23/05/2016 - 23:00

Start developing with Drupal 8 with some tricks and thoughts before starting your first real Drupal 8 project.

Chromatic: Javascript Theme Functions in Drupal 7

Drupal Planet - Mon, 23/05/2016 - 17:26

Like it or not, sometimes you have to output HTML in javascript.

Recently, I ran across a line of code something like this while reviewing a pull-request for a client:

var inputMarkup = '<span><label data-val="' + inputText + '" for="checkbox-' + index + '" data-tid="' + tid + '">' + inputText + '</label><input type="checkbox" id="checkbox-' + index + '" data-tid="' + tid + '" data-val="' + inputText + '" /></span>';

Aside from the fact that this code was hard to read (and therefore would be more difficult to maintain), the same code was used with no significant modification in three separate locations in the pull-request.

In PHP, most developers familiar with Drupal would immediately reach for one of the well-known parts of Drupal's theme system, render arrays, theme(), or a *.tpl.php file. In javascript, however, I seldom see much use of Drupal 7's extensive javascript API (also made available in a nicely browseable--though not quite up-to-date--form by nod_).

In this case, the relatively difficult-to-read code, combined with the fact that it was repeated several times across more than one file were clear signs that it should be placed into a theme function.

The Drupal.theme() function in the javascript API works much like theme() in PHP. When using theming functions in PHP, we never call them directly, instead using the theme() function.

In javascript, it's similar; when output is required from a given theme function, we call Drupal.theme() with the name of the theme function required, and any variable(s) it requires.

For example, drupal.org shows the following usage:

Drupal.theme('myThemeFunction', 50, 100, 500);

The example uses Drupal.theme() to call the theme function, myThemeFunction(), and pass it the arguments it requires (50, 100, and 500 in this instance). A theme function can accept whatever number of arguments is necessary, but if your theme function requires more than one parameter, it's good practice to define the function to take a single javascript object containing the parameters required by the function.

So in the case of my code-review, I suggested we use a theme function like this:

/** * Provides a checkbox and label wrapped in a span. * * @param {object} settings * Configuration object for function. * @param {int} settings.index * A numeric index, used for creating an `id` attribute and corresponding * `for` attribute. * @param {string} settings.inputText * The text to display as the label text and in various attributes. * @param {int} settings.tid * A Drupal term id. * * @return {string} * A string of HTML with a checkbox and label enclosed by a span. */ Drupal.theme.checkboxMarkup = function(settings) { "use strict"; var checkboxId = 'checkbox-' + settings.index; var inputText = Drupal.checkPlain(settings.inputText); var checkboxMarkup = ''; // Assemble the markup--string manipulation is fast, but if this needs // to become more complex, we can switch to creating dom elements. checkboxMarkup += '<span>'; checkboxMarkup += '<label data-val="' + inputText + '" for="' + checkboxId + '" data-tid="' + settings.tid + '">'; checkboxMarkup += inputText; checkboxMarkup += '</label>'; checkboxMarkup += '<input type="checkbox" value="' + inputText + '" id="' + checkboxId + '" data-tid="' + settings.tid + '" data-val="' + inputText + '">'; checkboxMarkup += '</span>'; return checkboxMarkup; };

This allowed the calling code to be much simpler:

// Creates themed checkbox. checkboxMarkup = Drupal.theme('checkboxMarkup', { index: i, inputText: $('.inputText').val(), tid: $('.tid') }); $container.append(checkboxMarkup);

The HTML generation is now also more loosely coupled, and more portable, meaning that we can easily use Drupal.theme.checkboxMarkup() elsewhere in this project--or in any other Drupal project.

Conocimiento Plus: [GSoC 2016: Social API] Week 0: Community bonding. GSoC starts!

Drupal Planet - Mon, 23/05/2016 - 16:30
Today, Google Summer of Code has officially started. It is time students get to code. Google Summer of Code (GSoC) is a global program that offers students stipends to write code for open source projects. I will be working with the Drupal community on a project called Social API. This project tries to harmonize social networking functionality in […]

This week's sponsor: ​FullStory

A List Apart - Mon, 23/05/2016 - 15:48

With our sponsor FULLSTORY, you get a pixel-perfect session playback tool that helps answer any question about your customer’s online experience.​ ​One easy-to-install script captures everything you need.

Sooper Drupal Themes: Beta: Revolutionary (Free) Drupal Installation Tool. SooperThemes Rebranding. Glazed & Carbide .10 Releases

Drupal Planet - Mon, 23/05/2016 - 15:25

Introducing Zero-Touch Drupal Product Provisioning

2 years ago I started working on a Drupal CMS distribution that makes it less painful to launch a fully configured Drupal website. Today we're proudly launching what I think is the best CMS installation experience you've ever seen. Pantheon and Acquia cloud might be great tools for people like me who work with Drupal on a daily basis, but there is a huge community of people who need something more simple. Our goal was for users to install a fully configured and themed Drupal website, with fully configured CMS components and demo content without requiring any user interaction.

Our Deployment tool currently does the following completely on auto-pilot:

  1. Runs tests to see if the receiving server ready for installation
  2. Generates a custom build of our Glazed CMS installation profile with the CMS components you need
  3. Uploads the files straight from sooperthemes.com to your server
  4. Uses Drush to go through the entire installation on your server
  5. Installs demo content

Looking For Drupal Hosting Partners

From a wider perspective, I see this kind of service as an answer for the Open Web to the streamlined experiences provided by companies like Wix and SquareSpace. The walled garden alternatives for small businesses. In that light want to integrate with as many great Drupal hosting providers as possible. The first Hosting partner I integrated is A2hosting, because they provide SSH and Drush automatically to all users. I'm looking for other hosting providers who offer this, if you know of, or are such a company please let me know in the comments.

Our service launched in beta but theoritically this should work fine on an Drupal/Drush capable server. It doesn't matter if you run Apache with MySLQ or nginx with PostgreSQL, our software has only the following server requirements:

  • Drupal capable stack
  • Drush
  • Rsync
  • SSH with password authentication
Looking For Testers

This means you can try it out right now on your VPS development server, all you need to provide is an empty web directory and database. If you're trying this and can't get it to work on your Drupal/Drush capable server please let me know in the comments. We did a lot of testing but the variety of server configurations is so vast that I'm sure we can improve our software's compatibility. Just to be clear, you don't need to be a subscriber or even registered on sooperthemes.com to use this. As a guest user you cannot choose the premium themes in the form but you can install any configuration of our CMS distribution with the Glazed Free theme.

It has been an adventure developing this new deployment tool. If you are excited too please test it and let me know what you think!

In Other News: SooperThemes Rebranding. Glazed 2.4.10 and Carbide Builder 1.0.10 Released

This week I've also updated the SooperThemes logo. For the past year the sooperthemes.com website has reflected what our new product was: Completely new and finding out where it wants to go. Now the logo more reflects the values of simplicity, open source and friendliness. These are the values I want to embed in our products. The logo is much simpler than the old one. The openings in the O are for open source. And the last detail is the Happy e's. This little touch of Dutch Design is a tilted back lower case e, it was invented by Heineken and reminds of a laughing head.

Today you can also download the latest patch-level release of Glazed theme and Carbide Builder. These releases contain no new features, only bug fixes. See the Glazed CHANGELOG and Carbide CHANGELOG. We've also updated the YouTube background library and put a usage example in the bottom of the Sections and Backgrounds demo page. Enjoy!

YouTube con ASP.NET

HTML.it Guide - Mon, 23/05/2016 - 15:00
Come integrare le API di YouTube in un'applicazione ASP.NET. Leggi YouTube con ASP.NET

Convalidare indirizzo email

HTML.it Guide - Mon, 23/05/2016 - 15:00
Email Validator è un'ottima utility che permette di validare gli indirizzi di posta elettronica. Lo script include due metodi per ottenere la validazione dell'email: uno è tramite input da URL il...

MindMup

HTML.it Guide - Mon, 23/05/2016 - 12:30
Permette di creare mappe mentali o concettuali online e gratis. Leggi MindMup
Syndicate content