Web Design & Development

KnackForge: How to update Drupal 8 core?

Drupal Planet - Sat, 24/03/2018 - 06:01
How to update Drupal 8 core?

Let's see how to update your Drupal site between 8.x.x minor and patch versions. For example, from 8.1.2 to 8.1.3, or from 8.3.5 to 8.4.0. I hope this will help you.

  • If you are upgrading to Drupal version x.y.z

           x -> is known as the major version number

           y -> is known as the minor version number

           z -> is known as the patch version number.

Sat, 03/24/2018 - 10:31

Valuebound: Drupal 8: How to create a custom block programatically

Drupal Planet - Mon, 19/12/2016 - 08:33
Drupal 8: How to create a custom block programatically Jaywant.Topno Mon, 12/19/2016 - 02:33

Valuebound: Drupal 8: Custom Block Creation programmatically

Drupal Planet - Mon, 19/12/2016 - 08:33
Drupal 8: Custom Block Creation programmatically Jaywant.Topno Mon, 12/19/2016 - 02:33

Working Remotely Around The World: Workspaces To Explore

Smashing Magazine - 8 hours 34 min ago

  

If you’re a footloose creative soul searching for a more affordable and friendly space than a typical rented or home office, coworking could work for you.

Alt-Text

Coworking spaces are popping up in cities all around the world. They allow freelancers, small business owners and independent workers to rent a working area that is shared with others. The setup is usually more casual than the fixed rental agreement you would get in a dedicated office space.

The post Working Remotely Around The World: Workspaces To Explore appeared first on Smashing Magazine.

Google Authenticator per WordPress

HTML.it Guide - 8 hours 55 min ago
Google Authenticator è un plugin gratuito che permette di abilitare il doppio livello di autenticazione di Google su WordPress. Leggi Google Authenticator per WordPress

JA Simpli un semplice ma versatile template gratuito

Joomla.it - 9 hours 5 min ago
Da Joomlart.com arriva un nuovo template sviluppato in collaborazione con altre realtà del mondo Joomla: Stackideas, JoomlaTools, JoomlaCorner, JoomlaShine, TechJoomla.
L'obiettivo che si sono proposti è quello di realizzare un template semplice ma versatile e completo. Inoltre gratuito e pronto all'uso senza doversi "appoggiare" a determinati Framework esterni ma sfruttando al massimo quanto già presente in Joomla 3.
JA Simpli è completamente responsive e ben strutturato e si propone come un nuovo template di default del pacchetto Joomla adatto per svariati utilizzi, dalla landing page al sito di notizie al sito aziendale ecc..

jQuery Toast Plugin

HTML.it Guide - 9 hours 55 min ago
Toast è un plugin di jQuery che permette di visualizzare una serie di notifiche "toast", facilmente personalizzabili. Leggi jQuery Toast Plugin

Photoshop, tecniche essenziali

HTML.it Guide - 10 hours 55 min ago
Photoshop: le tecniche essenziali per il disegno e l'illustrazione oltre che naturalmente per il fotoritocco e l'applicazione di effetti alle immagini. Il tutto corredato di esempi e tutorial per...

Gábor Hojtsy: Winner of the 2016 Aaron Winborn Award

Drupal.org - Wed, 25/05/2016 - 23:00

The Aaron Winborn Award was created in 2015 after the loss of one of one of the Drupal community’s most prominent members, Aaron Winborn, to Amyotrophic Lateral Sclerosis (also referred to as Lou Gehrig's Disease in the US and Motor Neuron Disease in the UK). Aaron’s commitment to the Drupal project and community made him the epitome of our unofficial motto: "Come for the code, stay for the community". The Community Working Group with the support of the Drupal Association came together to honor Aaron's memory by establishing the Aaron Winborn Award, which annually recognizes an individual who demonstrates personal integrity, kindness, and above-and-beyond commitment to the Drupal community.

Nominations were opened in March, giving community members the opportunity to nominate people they believe deserve the award, which were then voted on by the members of the Community Working Group, along with previous winners of the award.

We are pleased to announce that the 2016 recipient of the Aaron Winborn Award is Gábor Hojtsy. During the closing session of DrupalCon New Orleans, Community Working Group members presented the award to Gábor. The award was accompanied by a free ticket to DrupalCon, which he donated to Bojhan Somers.

Gábor was described in his nomination as an "amazing community connector" who is passionate about empowering others, stepping aside and allowing others the space and support to lead, and celebrating even the small wins that people who work with him achieve. The stellar work and leadership he displayed on the D8 Multilingual Initiative, managing sprints, Drupal events and setting up localize.drupal.org are just a few of the ways that this tireless Drupal contributor has been making an enormous impact in our community for more than a decade.

We hope you will join us in congratulating Gábor, who has demonstrated personal integrity, kindness, and above-and-beyond commitment to the Drupal community in abundance.

Front page news: Planet Drupal

May 26 Weekly Online Meeting : SWIFT Invited

W3C Community Groups - Wed, 25/05/2016 - 17:47

I am glad to announce that we will have a blockchain specialist from Society for Worldwide Interbank Financial Telecommunication (also known as SWIFT) for the regular weekly meeting.

He will explain the society’s approach for the blockchain technology. He will also explain how to utilize ISO20022 for the entire blockchain community.

The link for SWIFT meeting is https://meetswift.webex.com/swiftnet/j.php?MTID=mcb905d42ed233858ebb8e2abfbc0ae41.

NOTE: The link is different from the usual link we have been using for the past few weeks.

myDropWizard.com: Drupal 6 security update for XML sitemap!

Drupal Planet - Wed, 25/05/2016 - 17:26

As you may know, Drupal 6 has reached End-of-Life (EOL) which means the Drupal Security Team is no longer doing Security Advisories or working on security patches for Drupal 6 core or contrib modules - but the Drupal 6 LTS vendors are and we're one of them!

Today, there is a Moderately Critical security release for XML sitemap to fix a Cross-Site Scripting (XSS) vulnerability.

The module doesn't sufficiently filter the URL when it is displayed in the sitemap.

This vulnerability is mitigated if the setting for "Include a stylesheet in the sitemaps for humans." on the module's administration settings page is not enabled (the default is enabled).

Download the patch for XML Sitemap 6.x-2.x (also works with 6.x-2.1, the latest release), 6.x-1.x or 6.x-1.2.

If you have a Drupal 6 site using the XML sitemap, we recommend you update immediately! We have already deployed the patch for all of our Drupal 6 Long-Term Support clients. :-)

If you'd like all your Drupal 6 modules to receive security updates and have the fixes deployed the same day they're released, please check out our D6LTS plans.

Note: if you use the myDropWizard module (totally free!), you'll be alerted to these and any future security updates, and will be able to use drush to install them (even though they won't necessarily have a release on Drupal.org).

Drupal Bits at Web-Dev: Drupal file_scan_directory option nomask

Drupal Planet - Wed, 25/05/2016 - 15:44

Other than a quick sample of blocking a specific file extension using the 'nomask' option, the documenttation for Drupal's file_scan_directory() does not help much with how to bock content from certain directories.  The documentation says

The  Perform a regular expression match">preg_match() regular expression of the files to ignore.'

So it leaves you to believe that any regex should work.   So setting

$options['nomask'] = "#(/deleted/)#"

should block any directory named 'deleted'.  The problem is, it doesn't work that way.   In file_scan_directory() the regex is not run against the full path of the file, it is only run against the directory or filename recursively.  It is not evaluating  'directory1/subsection/deleted/index.html' , where the regex above would definitely come back with a hit and reject the item.  It is first evaluating, 'directory', then 'subsection', then 'deleted'...   It does not get a hit on deleted because it is missing the slashes on each side.

One possibilty would be to remove the slashes from the regex like this:

$options['nomask'] = "#(deleted)#";

But without the slashes, it would not only reject the directory 'deleted', it would reject the directory 'not-deleted'  and the file 'faq-why-my-account-was-deleted.htm' which might have undesired consequences.

The trick to get it to reject only 'deleted' as a directory and its contents is to restrict the regex to only the start and end of the string being evaluated. like this

$options['nomask'] = "#^(deleted)$#";

and if you wanted to block 'deleted' and another directory like '_vti_cnf' it would look like this:

$options['nomask'] = "#^(deleted|_vti_cnf)$#";

 

Estrapolazione tweet

HTML.it Guide - Wed, 25/05/2016 - 15:00
Tweet Php. Classe creata per poter estrapolare da un utente di Twitter i propri tweet e trasformarli in un lista HTML. Lo script per funzionare richiede i codice da sviluppatore di Twitter. Leggi...

ASP.NET 4.0 Chart Control

HTML.it Guide - Wed, 25/05/2016 - 15:00
Un esempio di come utilizzare i chart controls di ASP.NET 4.0 Leggi ASP.NET 4.0 Chart Control

Once Upon a Time

A List Apart - Wed, 25/05/2016 - 15:00

Once upon a time, I had a coworker named Bob who, when he needed help, would start the conversation in the middle and work to both ends. My phone would ring, and the first thing I heard was: “Hey, so, we need the spreadsheets on Tuesday so that Information Security can have them back to us in time for the estimates.”

Spreadsheets? Estimates? Bob and I had never discussed either. As I had been “discouraged” from responding with “What the hell are you talking about now?” I spent the next 10 minutes of every Bob call trying to tease out the context of his proclamations.

Clearly, Bob needed help—and not just with spreadsheets.

Then there was Susan. When Susan wanted help, she gave me the entire life story of a project in the most polite, professional language possible. An email from Susan might go like this:

Good morning,

I’m working on the Super Bananas project, which we started three weeks ago and have been slowly working on since. We began with persona writing, then did some scenarios, and discussed a survey.

[Insert two more paragraphs of the history of the project]

I’m hoping—if you have the opportunity (due to your previous experience with [insert four of my last projects in chronological order])—you may be able to share a content-inventory template that would be appropriate for this project. If it isn’t too much trouble, when you get a chance, could you forward me the template at your earliest convenience?

Thank you in advance for your cooperation,

Susan

An email that said, “Hey do you have a content-inventory template I could use on the Super Bananas Project?” would have sufficed, but Susan wanted to be professional. She believed that if I had to ask a question, she had failed to communicate properly. And, of course, that failure would weigh heavy on all our heads.

Bob and Susan were as opposite as the tortoise and the hare, but they shared a common problem. Neither could get over the river and through the woods effectively. Specifically, they were both lousy at establishing context and getting to the point.

We all need the help of others to build effective tools and applications. Communication skills are so critical to that endeavor that we’ve seen article after article after article—not to mention books, training classes, and job postings—stressing the importance of communication skills. Without the ability to communicate, we can neither build things right, nor build the right things, for our clients and our users.

Still, context-setting is a tricky skill to learn. Stray too far toward Bob, and no one knows what we’re talking about. Follow Susan’s example, and people get bored and wander off before we get to the point.

Whether we’re asking a colleague for help or nudging an end user to take action, we want them to respond a certain way. And whether we’re writing a radio ad, publishing a blog post, writing an email, or calling a colleague, we have to set the proper level of context to get the result we want.

The most effective technique I’ve found for beginners is a process I call “Once Upon a Time.”

Fairy tales? Seriously?

Fairy tales are one of our oldest forms of folklore, with evidence indicating that they may stretch back to the Roman Empire. The prelude “Once upon a time” dates to 1380 BCE, according to the Oxford English Dictionary. Wikipedia lists over 75 language variations of the stock story opener. It’s safe to say that the vast majority of us, regardless of language or culture, have heard our share of fairy tales, from the 1800s-era Brothers Grimm stories to the 1987 musical Into the Woods.

We know how they go:

Once upon a time, there was a [main character] living in [this situation] who [had this problem]. [Some person] knows of this need and sends the [main character] out to [complete these steps]. They [do things] but it’s really hard because [insert challenges]. They overcome [list of challenges], and everyone lives happily ever after.

Fairy tales are effective oral storytelling techniques precisely because they follow a standard structure that always provides enough context to understand the story. Almost everything we do can be described with this structure.

Once upon a time Anne lacked an ice cream sandwich. This forced her to get off the couch and go to the freezer, where food stayed amazingly cold. She was forced to put her hands in the icy freezer to dig the ice cream sandwich box out of the back. She overcame the cold and was rewarded with a tasty ice cream sandwich! And they all lived happily ever after.

The structure of a fairy tale’s beginning has a lot of similarities to the journalistic Five Ws of basic information gathering: Who? What? When? Where? Why? How?

In our communication construct, we are the main character whose situation and problem need to be succinctly described. We’ve been sent out to do a thing, we’ve hit a challenge, and now we need specific help to overcome the challenge.

How does this help me if I’m a Bob or a Susan?

When Bob wanted to tell his story, he didn’t start with “Once upon a time…” He started halfway through the story. If Bob was Little Red Riding Hood, he would have started by saying, “We need scissors and some rocks.” (Side note: the general lack of knowledge about how surgery works in that particular tale gives me chills.)

When Susan wanted to tell her story, she started before “Once upon a time…” If she was Little Red Riding Hood, she started by telling you how her parents met, how long they dated, and so on, before finally getting around to mentioning that she was trapped in a wolf’s stomach.

When we tell our stories, we have to start at the beginning—not too early, not too late. If we’re Bob, that means making sure we’ve relayed the basic facts: who we are, what our goal is, possibly who sent us, and what our challenge is. If we’re Susan, we need to make sure we limit ourselves to the facts we actually need.

This is where we take the fairy-tale format and put it into the first person. Susan might write:

Once upon a time, the Bananas team asked me to do the content strategy for their project. We made good progress until we had this problem: we don’t have a template for content inventories. Bob suggested I contact you. Do you have a template you can send us?

Bob might say:

Once upon a time, you and I were working on the data mapping of the new Information Security application. Then Information Security asked us to send the mapping to them so they could validate it. This is a problem because we only have until Tuesday to give them the unfinished spreadsheets. Otherwise we’ll hit an even bigger problem: we won’t be able to estimate the project size on Friday without the spreadsheet. Can you help me get the spreadsheet to them on time?

Notice the parallels between the fairy tales and these drafts: we know the main character, their situation, who sent them or triggered their move, and what they need to solve their problem. In Bob’s case, this is much more information than he usually provides. In Susan’s, it’s probably much less. In both cases, we’ve distilled the situation and the request down to the basics. In both cases, the only edit needed is to remove “Once upon a time…” from the first sentence, and it’s ready to go.

But what about…?

Both the Bobs and the Susans I’ve worked with have had questions about this technique, especially since in both cases they thought they were already doing a pretty good job of providing context.

The original Susan had two big concerns that led her to giving out too much information. The first was that she’d sound unprofessional if she didn’t include every last detail and nuance of business etiquette. The second was that if her recipient had questions, they’d consider her amateurish for not providing every bit of information up front.

Susans of the world, let me assure you: clear, concise communication is professional. The message isn’t not to use “please” and “thank you”; it’s that “If it isn’t too much trouble, when you get a chance, could you please consider…” is probably overkill.

Beyond that, no one can anticipate every question another person might have. Clear communication starts a dialogue by covering the basics and inviting questions. It also saves time; you only have to answer the questions your colleague or reader actually have. If you’re not sure whether to keep a piece of information in your story, take it out and see if the tale still makes sense.

Bob was a tougher nut to crack, in part because he frequently didn’t realize he was starting in the middle. Bob was genuinely baffled that colleagues hadn’t read his mind to know what he was talking about. He thought he just needed the answer to one “quick” question. Once he was made aware that he was confusing—and sometimes annoying—coworkers, he could be brought back on track with gentle suggestions. “Okay Bob, let’s start over. Once upon a time you were…?”

Begin at the beginning and stop at the end

Using the age-old format of “Once upon a time…” gives us an incredibly sturdy framework to use for requesting action from people. We provide all of the context they need to understand our request, as well as a clear and concise description of that request.

Clear, concise, contextual communication is professional, efficient, and much less frustrating to everyone involved, so it pays to build good habits, even if the basis of those habits seems a bit corny.

Do you really need to start with “Once upon a time…” to tell a story or communicate a request? Well, it doesn’t hurt. The phrase is really a marker that you’re changing the way you think about your writing, for whom you’re writing it, and what you expect to gain. Soup doesn’t require stones, and business communication doesn’t require “Once upon a time…”

But it does lead to more satisfying endings.

And they all lived happily ever after.

Mediacurrent: 6 Questions Every Project Manager Should Ask

Drupal Planet - Wed, 25/05/2016 - 14:27
One Word to Save Your Project

Your company’s business development team just announced a new Drupal project has been given the green light, and you will be the project manager. What do you need to do to help your development and strategy teams succeed in giving the client the best possible experience and product? You need to ask the right questions.

3 questions to ask regardless of the CMS in play

The project manager of any technical project, leveraging Drupal or some other CMS, should first and foremost ask:

1. Where is the Statement of Work (SOW) and how do I access it?

Isometric and 3D Grids

Codrops - Wed, 25/05/2016 - 14:01

IsometricGrids_800x600

View demo Download source

Today we’d like to share some isometric grid styles with you. The inspiration comes from the Hotchkiss website where an isometric, scrollable grid is shown with some cool hover effects. In our first experiment we created a scrollable grid just like the one seen on that site, with some hover effects that involve random rotations. The second demo shows some ideas for “static” grids that are not scrollable but that serve more kind of a decorative purpose.

For the grid layout we are using Metafizzy’s Masonry, the cascading grid layout library by David DeSandro.

Attention: Some of the techniques we are using are very experimental and won’t work in all browsers. Support for transform-style: preserve-3d is necessary for this demo.

IsometricGrids_0

The first demo shows how an isometric grid can be scrolled using the pagescroll.

In the second demo we show some ideas for different static/decorative styles. The grid is used as a background element that allows for some interaction. There are many possibilities and the following serve as inspiration:

IsometricGrids_1

IsometricGrids_3

IsometricGrids_4

IsometricGrids_5

Unfortunately, IE does not support transform-style: preserve-3d which breaks nested 3D elements. So this demo won’t work in the versions that don’t support it.

We hope you enjoy this experiment and find it inspiring!

Find this project on Github

View demo Download source

Isometric and 3D Grids was written by Mary Lou and published on Codrops.

Guida Android

HTML.it Guide - Wed, 25/05/2016 - 14:00
Come progettare le App per smartphone Android. La guida che vi aiuterà a progettare e creare le applicazioni per il più diffuso sistema operativo per telefonini al mondo. Leggi Guida Android

A Guide To Personal Side Projects

Smashing Magazine - Wed, 25/05/2016 - 13:58

  

Personal side projects are a cornerstone of creative growth and discovery. While they might not always result in financial gain, the long-term benefits are often much more useful. Benefits such as personal growth, creative exploration and generation of professional opportunities are some of the reasons to engage in them.

A Guide To Personal Side Projects

In this article, we’ll explore these benefits, as well as learn how to decide on a project and how to effectively manage our time (using my recently launched project an an example). Finally, for inspiration, we’ll look at some great examples of personal projects.

The post A Guide To Personal Side Projects appeared first on Smashing Magazine.

Liip: Drupal: Dynamic IMCE Profiles

Drupal Planet - Wed, 25/05/2016 - 13:15

Today I will describe a way to handle multiple teams with their own private file folders using the IMCE module.

Let’s pretend that we have to develop a website called awesome-website.com which consists of three (or more) different teams. The team structure could look as followed:

Website Groups

Every team should only be allowed to edit their own pages but no page from any other team. Therefore it would also make sense to separate the team’s file folders so that the files can be stored separately to secure its privacy.
Of course, we could simply add three IMCE profiles and define their folder access rights individually there. But what about when working with 10 teams? Or 50? Or even more? Then we definitely would prefer a more flexible solution.
Thankfully, IMCE ships with the ability to define user folders by PHP execution, how awesome! But in order to achieve this, we’ll have to set up teams as taxonomy terms first and reference them from our user entities.

Setting up the “Teams” taxonomy vocabulary

First things first: Let’s create a new taxonomy vocabulary called “Teams”. For every team that we will have on our website, we have to create a new taxonomy term in this vocabulary.
Before adding any teams as taxonomy terms though, we’ll have to add a new field called “FTP Folder” to the taxonomy vocabulary.
This field will specify the name of every team’s root folder. So, naturally it shouldn’t contain any spaces or other wicked special characters and it should be URL readable.
In order not to face any unusual results later, it is recommended to configure this field as required.

Afterwards, we can add our three terms, “Team Alpha”, “Team Beta” and “Team Gamma”.
As value for their FTP Folders, we use “team-alpha”, “team-beta” and so on.

That’s it for the taxonomy part! Now let’s link this information to the team’s users.

Adding a taxonomy term reference field to the user entity

In my case, I didn’t have multiple roles for the teams. I only had one, called “Team member”. Because every team has exactly the same rights as the others, maintaining only one role suited me best.
For really special cases, I could always just create a new role with the special permissions.

So, how do we link users to their teams the easiest? Exactly, by just adding a taxonomy term reference field to the user entity!
Let’s call this field “Team” and reference our previously created taxonomy vocabulary “Teams” with it.

Now, when adding a new user, we can select it’s team belonging and IMCE will be able to grab the needed information from there.
Yes, IMCE will be able to do that but it’s not doing it yet.
Getting the teams ftp folder for the current user is still something we have to code, so let’s proceed to the next step.

Writing a custom function to provide the accessible directories for an user

Now we need to provide IMCE the information that we’ve set up before.
We’ve created users belonging to teams, which hold the FTP root folder name for the teams.
What’s left to do, is to write a function (ideally in a custom module, in my example the module is called “awesome_teams”), that combines all information and returns it to IMCE.
Following function would do that for us:

function awesome_teams_imce($user) { $user_folders = array('cms/teams/all'); $user_wrapper = entity_metadata_wrapper('user', $user); $user_teams = $user_wrapper->field_team->value(); foreach ($user_teams as $user_team) { $user_team_wrapper = entity_metadata_wrapper('taxonomy_term', $user_team); array_push($user_folders, 'cms/teams/' . $user_team_wrapper->field_ftp_folder->value()); } return $user_folders; }

The function expects an user object as argument and will return an array of strings containing all the folder names an user is allowed to access.
Our folder structure would look like this:

  • sites/default/files/cms
  • sites/default/files/cms/teams
  • sites/default/files/cms/teams/all
  • sites/default/files/cms/teams/team-alpha
  • sites/default/files/cms/teams/team-beta
  • sites/default/files/cms/teams/team-gamma

Note: The folder “cms/teams/all” is a special folder and every user is allowed to access it.
It will be used to save files which are used globally over multiple or even all teams.

What our code does, is actually looping over all assigned teams for the given user (yes, an user can be in multiple teams!), and adding the teams ftp folder names to the array of accessible folders.

There is no “hook_imce” hook, the “_imce” in the function name does nothing till now. You can also name your function differently. The link from IMCE to our function is something we have to set up in an IMCE profile.
Let’s proceed to the last step then, shall we?

Creating the IMCE profile “Team member”

Now, as the last step, let’s create an IMCE profile called “Team member”. You’re free to define any settings as you like, there’s only one thing that will be special about this profile: The accessible directories path.

Instead of writing something constant as “cms/teams/team-alpha”, we’ll write “php: return awesome_teams_imce($user);” here.
So, the setting should look like this:

imce-profile-settings

Now save the profile and you are done!

As soon as one team member now accesses the IMCE page (either via /imce or by the configured file/image fields), he will only see his team’s directories and the special directory “all” which is meant for exchange.

This wasn’t that difficult, was it?

I hope I was able to give you an insight on how to solve more complicated file permission issues with IMCE.
Don’t forget to give feedback, ask questions and follow our blog if you want to read more about our Drupal experiences at Liip!

Syndicate content