Skip to Content

Planet Drupal

Syndicate content
Drupal.org - aggregated feeds in category Planet Drupal
Updated: 7 hours 2 min ago

Symphony Blog: Easy Amazon S3 in Drupal with S3FS

26 January 2016 - 1:23am

You may already be familiar with Amazon S3, the most popular solution for cost effective storage services nowadays. You will need it when you are looking for:

  • Low cost storage: it happens to be my case, when I implemented a Drupal based web app for a local governmental authority. The app is used by branches from all provices of the country, and they usually upload a large amount of data (documents, photos, scans etc ...) regularly. Using the app server's storage is too expensive. So I converted the Drupal file system to Amazon S3, leaving only the core and modules on the app server.
  • Fast loading: many bloggers have used S3 to store their photos, videos, audios and files, for better serving their readers. As customers are from all over the world, saving the multimedia content to S3 will let them access them much faster.
  • And many more benefits

In this tutorial, we will show you how to convert the Drupal 7 file system to Amazon S3 and sync all existing files to S3 Storage.

1. Preparation

You will need to run several client programs like drush and awscli. So if your site is on a shared hosting, you are not able to install and execute them. Pls download it to your local host and configure it there. After that you can upload to your shared hosting.

The techniques that I use in this tutorial are:

read more

Categories: Drupal

Pronovix: Upping our game in accessibility, openness and signature technology - PDF in Drupal part 1

26 January 2016 - 12:50am

In the web community, PDF has become synonym for a range of accessibility bad practices. Some people even think that we would all be better off if PDF would finally die, just like Flash and Internet Explorer. As a result PDF is not very sexy in the Drupal and wider PHP community and this has negatively impacted our tooling.

Categories: Drupal

DrupalCon News: Registration is Open! Get your ticket today.

25 January 2016 - 9:16pm

For those of us who have been breathlessly waiting since you saw the jazz band in Los Angeles, registration for DrupalCon New Orleans is open at last!

Coming up in May, DrupalCon New Orleans promises to be a fantastic time — so make sure you register today to get the earlybird rate.

Categories: Drupal

Appnovation Technologies: Generating an Automatic Style Guide for a Drupal 8 Theme

25 January 2016 - 8:23pm
In this post I wanted to share my experience of integrating an automatic living style guide into a Drupal 8 theme.
Categories: Drupal

NEWMEDIA: <h2>Plan Extra Time for Architecture

25 January 2016 - 4:26pm
Plan Extra Time for Architecture and Development

Drupal 8 includes several of the most popular contrib modules into core. Most noteworthy is the venerable Views module, but others include common field types such as Date, Link, and Entity Reference.

Categories: Drupal

NEWMEDIA: <p>It’s been almost two years since my

25 January 2016 - 4:26pm

It’s been almost two years since my colleagues and I released the first version of the Drupal PCI Compliance white paper.

Categories: Drupal

NEWMEDIA: <h2 id="motivation-why-cms-security

25 January 2016 - 4:26pm
Motivation: Why CMS Security Matters

Regardless of whether your site is a simple blog or a top 50 web property, they all represent an investment of time, money, and creative energy.

Categories: Drupal

NEWMEDIA: <p>At newmedia we've been utilizing

25 January 2016 - 4:26pm

At newmedia we've been utilizing Sass and Compass compiled with Ruby for CSS Preprocessing for quite some time now in our Drupal projects. While this toolset has served us well, the toolset for Frontend Developers has been growing and improving tremendously as time goes on.

Categories: Drupal

NEWMEDIA: <p>I’ve been closely watching the

25 January 2016 - 4:26pm

I’ve been closely watching the fallout of the SA-CORE-2014-005 Drupal core security advisory, which is sometimes referred to as “Drupageddon” to emphasize the severity of this security issue.

Categories: Drupal

NEWMEDIA: <h2>A Brief History of the Makefile</h2

25 January 2016 - 4:26pm
A Brief History of the Makefile

Technically, my very first computer was a Tandy 1000. In reality, it was a glorified game console used by myself, my mom, and my brother to play Tetris off a 3.5" floppy disk that I had copied from a friend at school.

Categories: Drupal

NEWMEDIA: <p>Here at NEWMEDIA! we are constantly

25 January 2016 - 4:26pm

Here at NEWMEDIA! we are constantly learning and improving. Over the course of the past year we have been refining our continuous integration and hosting platforms as they relate to Drupal.

Categories: Drupal

NEWMEDIA: <p>When working in a team or in an

25 January 2016 - 4:26pm

When working in a team or in an environment where your code and systems are going to be used by people other than yourself, it is especially important that your site development process is clear, simple, and easy to understand. This, of course, is easier said than done when developing a complex D

Categories: Drupal

NEWMEDIA: <p>Everyone here at NEWMEDIA is

25 January 2016 - 4:26pm

Everyone here at NEWMEDIA is extremely enthusiastic about this year's DrupalCamp Colorado, which will be held on August 1st-3rd in Denver.

Categories: Drupal

NEWMEDIA: <p><a href="https://www.drupal.org

25 January 2016 - 4:26pm

Mailchimp, Recurly, Mollom, Stripe, and on and on—It's easy to get spoiled by

Categories: Drupal

Drupal.org Featured Case Studies: EIT Avionics

25 January 2016 - 12:11pm
Completed Drupal site or project URL: http://www.eitavionics.com/

EIT Avionics produces devices for aircraft to increase safety and situational awareness. They needed a new site to showcase their products and introduce their company, and they wanted to be able to edit the site themselves. We built the site with Drupal 8 and a custom responsive Drupal theme.

Key modules/theme/distribution used: ViewsOrganizations involved: PlethoraTeam members: caspervoogtjesse.voogt
Categories: Drupal

Drupal Camp NJ 2015: Mentoring & Collaboration day - Sunday, January 31

25 January 2016 - 10:06am

We are hosting a free Mentoring & Collaboration day, Sunday at the FFW office.

Categories: Drupal

Mediacurrent: Drupalcamp Atlanta 2015: Decoupled Drupal 8

25 January 2016 - 8:14am
Trending Toward “Headless”

Lately, there has been an increased interest in decoupled Drupal (a.k.a. headless Drupal). Lullabot and TWIT.tv are two organizations that have recently announced new sites that feature decoupled Drupal.

Categories: Drupal

Mediacurrent: Drupalcamp Atlanta 2015: Using Data-Driven Documents (D3) with Drupal

25 January 2016 - 7:57am

At DrupalCamp Atlanta 2015, I led a discussion on the d3.js library for an audience of site builders, themers and developers.

Data-Driven Documents or D3 refers to a javascript library combining html, css and sag to build graphic visualizations for data. The d3.js library uses scalable vector graphics to generate charts, graphs and maps that are scalable and interactive.

Check out my session recording below. It covers: 

Categories: Drupal

Microserve: Optimising your Drupal CKEditor

25 January 2016 - 6:13am
Optimising your Drupal CKEditorJan 25th 2016 Configuring CKEditor

First rule to configure your WYSIWYG's:  Only give your users what they need.

When you install CKEditor it gives you almost every option in the toolbar. This is fine for an admin who knows what they do and how to use them, but for most users they are going to be overwhelmed or they can go too over the top with the formatting options, which can result in some ugly looking content on the website. 

Below is a configured CKEditor for a full profile using the full html text format. (…/admin/config/content/ckeditor/edit/Full). This would generally be used for site admins and editors. You can setup different CKEditor profiles and text formats for different users according to what you need. 

Here's a couple of useful buttons to use:

  • Format: I don’t know why you wouldn’t have this set! It gives the option to have headings or paragraphs etc. What you should always do is change the font formats under ‘CLEANUP AND OUTPUT’ and take out H1. It is a nightmare if the client gets a hold of that! You only want one H1 tag on your page and that tends to be the node title. Any more than this is bad for SEO.
  • Remove Format: This removes inline styling which usually happens when pasting text into the editor. They're are ways to add paste filters to strip out html you do and don't want.
  • Full page/Maximize: I just prefer this for myself really. I find the text area constraining and I like seeing the bigger picture without extending the box or scrolling a lot. There is an auto grow plugin or you can manually set the editors height in the settings config file.
  • Link: I use a plugin module to easily link to internal paths called CKEditor link.
  • Div: To add a div wrapper. This is handy because it keeps div classes/ids when saved as full html, also when using templates and custom styles.
  • Show blocks: Adds an outline to each element with their tag displayed next to them.
  • Templates: Gives the ability to add custom code into your editor. For example: If you want to add a two column layout with images you can write a template file for this and select it here. 
  • Styles: Gives the ability to create custom styles for your text editor. Such as, give a p tag a certain class to style differently.
Advanced content filter -

I would recommend enabling the Advanced content filter (ACF). This cleans up and strips out unwanted html such as inline styling, font styles, scripts or risky code and converts b tags to strong tags etc. However, if you did want something like text colors on all elements or the use of spans. Add this code :

config.extraAllowedContent = 'span;*{color}';

to 'Custom JavaScript configuration' under 'Advanced options' at the bottom of settings page. Alternatively, you can load CKEditor.config.js from your theme directory (remember to clear the browsers cache when using this file).

The above option is per CKE profile. See here about ACF and other samples.

If you have any examples or other ways you filter HTML I would be interested to hear them - simply leave a comment at the end of the post!

Theming CKE contents

As an option you can load your theme's CSS into the CKE body. This helps your users see how it will look on without having to preview the page. 

This is quite simple:

Under CSS in the profile settings, there are three options - 'CKEditor default', 'Use theme CSS' or 'Define CSS'. You can only use the theme CSS if you are using plain CSS for your site, as this doesn't work with SASS/LESS etc. The other option is to define the CSS and write some custom CSS for the editor itself. So, if I have a CSS file in my theme directory under - /sites/all/themes/custom_theme/css/editor.css then the path to the CSS file would be - %h%tcss/editor.css .

NOTE: The styles you write in this CSS file will not apply to the rest of the site unless it's added in the themes .info file.

Finally, images! Using the Picture module you can ask users to set an image style when inserting a new image into the editor. This will mean the content editor can't insert images that are just too big for what they need to be.

Written by: Kirsty Bewley, Front-end Developer

Microserve is a Drupal Agency based in Bristol, UK. We specialise in Drupal Development, Drupal Site Audits and Health Checks, and Drupal Support and Maintenance. Contact us for for further information.

Categories: Drupal

Code Enigma: Drupal Views: Combined fields filter

25 January 2016 - 2:32am
Drupal Views: Combined fields filter Language English Drupal Views: combined filters

How to search content across multiple content types, without limiting your data model.

Mon, 2016-01-25 10:32By salva

When building a Drupal site, it's very easy to be tempted to build the data model based on the features and options that one can get out of the box in other contributed modules (and I had my rant about it). And that's fine. Sometimes. For small sites, taking this path can pay off in development speed, since it will reduce the number of steps needed to accomplish something, as well as offer more reusability of components, and simplify overall configuration of the site. For large scale sites, this might become a performance problem as the software (and the content grows).

An example of simplicity in the short term vs performance in the long run is often easily explained with the Views module. A few years ago, it was "too easy" to decide to share plenty of fields between different Content Types, because of all the speed gained in development. In a recent project, we chose not to do this, and keep things as split as possible. However, we still needed to search content across different content types, using a single textbox. Well, it turns out this is very easy to achieve in Views too.

Entering Views combined fields filter

Since a few years ago, the Views module includes a Global filter that allows a site builder to add filtering options based on the value of multiple fields. Our use case was as follows:

  • Two ContentTypes with a "Full Description" field (textarea), called field_{type}_description.
  • A site section that should allow searching by the contents of both of those content types.

That might seem a case where one would jump into code and implement a hook_views_query_alter() to amend configuration as needed. However, it turns out this can be easily done in config with the mentioned filter. First things first, we add all the fields that we want to include in the combined fields filter. We needed the content title, plus the Full Description of the contents (which appears twice because the label of the fields is the same, even though the fields are completely different.

Finally, all we have to do is add the filter, which is in the "Filters" section of the View configuration, as any other filter (see first picture of this post). After adding it, we'll be presented with the standard settings popup for the filter. From there, we select all the fields that will be considered part of the filter, click "Apply", and then save the view. The other options are the standard ones provided by other Views filters (e.g: operator, label, description, etc).

Now we're ready to embed the view in a page and use it. This is just a suitable solution for many use cases, but not for all of them. While in our case we kept the goodness of the Views module and a sane data model, the combined fields filter wouldn't be suitable in a case where we had several more fields to filter by, as it would just add more overhead to the underlying database query. However, it proves to be an useful tool to have in your kit!

WordPress ServicesPage Drupal Help Haiti: Day 3Blog Drupal Distributions - Getting Going FasterBlog Views DependenciesBlog
Categories: Drupal


Google+
about seo