Planet Drupal

Subscribe to Planet Drupal feed
Drupal.org - aggregated feeds in category Planet Drupal
Updated: 49 min 20 sec ago

KnackForge: To check Caps lock is on/off status in jQuery

Mon, 27/10/2014 - 19:49
I'm sure that this script will help you in some of your projects that needs a username and password. Sometimes when we want access to a secure page that asks for a username and password and we submit the information but we didn't know that the password was submitted in upper case, we get an error.   Solution:  jQuery('#username').keypress(function(e) { var s = String.fromCharCode( e.which ); if ( s.toUpperCase() === s && s.toLowerCase() !== s && !e.shiftKey ) { jQuery('#capslockdiv').show(); } else { jQuery('#capslockdiv').hide(); } }); jQuery('#password').keypress(function(e) { var s = String.fromCharCode( e.which ); if ( s.toUpperCase() === s && s.toLowerCase() !== s && !e.shiftKey ) { jQuery('#capslockdiv').show(); } else { jQuery('#capslockdiv').hide(); } });

Sample HTML code

Categories: Elsewhere

a-fro.com: Keeping Compiled CSS Out of your Git Repository on Acquia

Mon, 27/10/2014 - 17:13
Keeping Compiled CSS Out of your Git Repository on Acquia

A couple of months ago, after a harrowing cascade of git merge conflicts involving compiled css, we decided it was time to subscribe to the philosophy that compiled CSS doesn't belong in a git repository.

Mon, 10/27/2014 - 12:13 aaron
Categories: Elsewhere

TimOnWeb.com: How To Force Search API To Reindex a Node / an Entity

Mon, 27/10/2014 - 17:00

By default Search API (Drupal 7) reindexes a node when the node gets updated. But what if you want to reindex a node / an entity on demand or via some other hook i.e. outside of update cycle?

Turned out it is a quite simple exercise. You just need to execute this function call whenever you want to reindex a node / an entity:

Drupal Tags  drupal 7, drupal planet Read on about How To Force Search API To Reindex a Node / an Entity
Categories: Elsewhere

KnackForge: Add class to image tags and panel titles

Mon, 27/10/2014 - 16:20

      Nowadays twitter bootstrap theme has become famous among Drupal world due to its flexibility for responsive websites. It is very easy to apply responsive css to the web page by adding appropriate bootstrap classes. If you are new to the twitter bootstrap theme, see here http://getbootstrap.com/css/ for more details about classes. Is it easy to add class to drupal site pages ? If yes, what to do to add class to panel title and image tags ? Lets come to the heart of the topic.

Adding class to panel title

      Eventhough it is easy to apply responsive css to the web page, when comes to drupal site we need to follow some standard approaches for adding classes. I need to add class to panel title in one of my requirements. By sticking with standard approach for this, I found this hook template_preprocess_panels_pane very useful to add class to panel title. Below code snippet will explain more detail about the usage.

function themename_preprocess_panels_pane(&$variables) { $variables['title_attributes_array']['class'][] = 'your class'; }

The above code snippet need to be written in theme's template.php file.

Adding class to img tags

      Then I need to add class to img tags to make the image responsive as one of my requirements. Similar to panel, I found this hook template_preprocess_image very useful to achieve this. See the below code snippet to know in detail

Categories: Elsewhere

Drupalize.Me: Using A Remote Debugger With CasperJS and PhantomJS

Mon, 27/10/2014 - 15:04

Earlier this year fellow Lullabot Juampy wrote about how we've started using CasperJS at Lullabot in order to do regression testing. I haven't had much chance to dig into it until recently, when we decided to implement some CasperJS tests for Drupalize.Me. So far, I'm really enjoying it—except for those occasions where something in my test is simply not working, and I end up spending hours asking CasperJS to take screenshots using console.log(), and trying to figure out what is going on. Fed up with this process I wanted a debugger.

Categories: Elsewhere

Larry Garfield: On Drupal's Leadership

Sun, 26/10/2014 - 03:20

My DrupalCon Amsterdam Core Conversation on Managing Complexity has generated quite a bit of follow-up discussion. That's good; it's a conversation we as a community really need to be having.

There are a few points, though, that I feel bear clarification and further explanation as I fear the point of the talk has gotten lost in the details.

Before continuing, if you haven't yet I urge you to watch the session video as well as the background resources linked from the session page. This is not a new conversation; it's the latest chapter in a very long-running discussion that is larger than the Drupal project, and it behooves us all to be aware of the history and context around it.

read more

Categories: Elsewhere

Blink Reaction: Two Drupal 8 Core Bugs: Found and Fixed

Sun, 26/10/2014 - 00:15

While working on the console project I have found (so far) two Drupal 8 core bugs. In this blog post I will explain how I found these bugs and what I have done to fix them.

First bug - Wrong service definition

I found the first one when adding a command for debugging registered services within the container.

Using the console command:

$ bin/console container:debug

Problem

Categories: Elsewhere

Károly Négyesi: Drupal 8 critical issues office hours Oct 24, 2014

Sat, 25/10/2014 - 22:46

This was our first critical office hours. webflo have forward ported a Views SA (turned out that Twig autoescape made short work of the security hole -- yay! so now it's just a test) and even past the office hours followed up with a patch that now passes. I will monitor the issue further and make sure it gets reviewed and committed. ksenzee started on decoupling cache tags from cache bins -- there's no patch yet, I need to follow up on this one however from our discussion it was clear she was making a lot of progress. I was trying to help penyaskito with the language.settings config is not scalable issue but turned out his problems went away with a fresh install so that issue is now progressing well even without the office hours. So as far as I am concerned, that's two down and one moving (and as a bonus, webflo rerolled fix common HTML escaped render #key values due to Twig autoescape which is major I am not sure why it's not critical). I think critical issues office hours was off to a good start, more people would of course be better. I count 123 critical issues.

Categories: Elsewhere

IXIS: Strengthening our Relationship with the British Council

Sat, 25/10/2014 - 12:56

We are delighted to be working with the British Council on a new Drupal hosting and infrastructure support project. The British Council are valued clients, and we have worked with them for more than 6 years managing both the global suite of 150 country sites, and the prestigious suite of Drupal teaching and learning sites.

We will be working to to create four individual platforms for hosting key Drupal websites on, moving away from just one main infrastructure, to improve resilience, efficiency and increase availability to the sites which generate more than 35 million page impressions per month and are used by more than 65 million people each year alone.

read more

Categories: Elsewhere

Mediacurrent: Culture, Code and Karaoke

Fri, 24/10/2014 - 22:00

What is “culture” and why do we take so much time trying to define it? Is it really important or just another buzzword? This past weekend, we were afforded the opportunity to have a company retreat, that went the distance in proving that culture is something that can’t be bought and paid for, it’s something unique to us and our success really does hinge on its influence. Our people, our relationships, our “culture” is what makes Mediacurrent, Mediacurrent. 

Categories: Elsewhere

Acquia: Learning from hackers a week after the Drupal SQL Injection announcement

Fri, 24/10/2014 - 20:43

Since October 15th, hackers have been busy coming up with creative ways to exploit the SQL Injection in Drupal 7 sites revealed by SA-CORE-2014-005. A week has already passed, and attacks are still ongoing. In a previous post, Moshe Weitzman explained how we were able to protect our customers' sites the moment the vulnerability was announced.

Categories: Elsewhere

Zero to Drupal: Headless Drupal & AngularJS Hackathon (Recap)

Fri, 24/10/2014 - 19:07

Last night I had the privilege of walking us through our first interactive Drupal meetup here in St. Louis. I'll be honest, I didn't have time to fully plan the night out like I had hoped but everything actually turned out great and it was one of the most fun I've had at a meetup in a while.

Security Release

First up, we discussed the recent security release for Drupal 7. Thankfully, everyone in the room was aware of the release and had taken action to patch their sites. Beaven Rudge wrote a great article discussing how important it is to take action against any public Drupal 7 site you've got up. I highly recommend reading through the info-graphic that he posted.

Digging in - The Fun Part

Our goal for the evening was to build two applications for our faux pizza company "Dangulo's" (special credit goes to Jeff Geerling for the name). The first would use Drupal as a backend admin and data api. It would also be used to manage ingredient inventory and process orders. The second would be a separate AngularJS application that would serve a fairly dynamic form that customers would use to order our world-famous pie.

Before we dove in, we had to give an impromptu (and hopefully coherent) walkthrough of how AngularJS works and why we would chose to use it in this case. It's important to note that nearly any front-end framework could have been used for the customer-facing app. However, lately a good portion of my time has been spent with AngularJS so that's the route we chose for this project.

Once we had a good understanding of our architecture and how everything needed to be structured, we moved to the Drupal side. For this project, we decided to go with the beta2 version of Drupal 8. Thankfully, most in the room didn't have much trouble getting D8 up and running.

Drupal Configuration

Within our Drupal app, we needed to:

  • Create a Toppings vocabulary with:
    • Title - the name of the topping
    • In Stock (boolean) - Whether the topping was in stock
  • Create an Orders content type with the following fields:
    • Name (text) - The name of the customer
    • Quantity (number) - The number of pizzas being ordered
    • Toppings (taxonomy term reference) - Referencing Toppings
  • Create a view that ouput a json-formatted list of toppings with:
    • Title
    • In stock

After creating the taxonomy, content type, and views, we created some sample ingredients and ended up with a pretty cool api endpoint for our ingredients.

Hello AngularJS

Next, we moved onto the AngularJS side. For this project, I created a starter app (which can be cloned/downloaded at github) that everyone downloaded so that they wouldn't have to start from zero. I actually used Yeoman to generate this app but decided to just push up a build of the app since no one had had node and/or grunt installed. This led to a small issue that all of the files were minified & uglified but given that we only had two hours to get things going, we forged ahead. If you're interested in working with the full app, it can be found here.

After configuring our controller to use $http to query our Drupal endpoint, and adding some markup to our orders view, we ended up with a list of ingredients from Drupal. Woot!

I'll admit, the app isn't that exciting at this point but the fact that we were able to manage content in Drupal, have it output in a standard format, and then use a completely decoupled application to view that data was very rewarding. Sadly, we ran out of time before we could go any further but in the end, I think we covered a lot of ground.

Next up?

Obviously, our apps are lacking a lot of functionality before they could be considered "production-ready". Things that we weren't able to get to include:

  • Nesting ingredients into categories (ie meats, cheeses, veggies, etc)
  • Building the actual form in AngularJS that has dynamic components (ie showing/hiding toppings selection, order total, etc)
  • Creating order nodes in Drupal from the AngularJS app

Given that we've got so much work to do, we've decided to extend our interactive session into a second meetup. So mark your calendars as we will meet again in November for our last meetup of the year. Our goal will be to finish out our app and head into the holidays with a better understanding of this brave new world.

Special Thanks

Lastly, I'd like to send a special thanks to Relay Technology for hosting our meetup. Josh Paydon stopped by and gave us some great insight into their company, as well as how the tech scene is evolving in St. Louis. If you're a developer looking for work in the St. Louis area, I highly recommend getting in touch with them as they're a great company with some great opportunities available.

Tags
Categories: Elsewhere

Zivtech: Experiencing Portland at the HighEdWeb 2014 Conference

Fri, 24/10/2014 - 17:45

Over the past few days, Alex and I have been out in Portland, Oregon for the HighEdWeb Association’s annual conference. The conference, which is focused on technology in higher education, took place from October 19-22, and featured many incredible presentations, riveting keynote speakers, and talented higher education professionals. As sponsors of the conference, we were proud to be able to support an organization that is built upon the use of technology and the web in higher education, and we were excited to be surrounded by so many dedicated professionals.

One of my favorite parts of the conference (which was my first big conference, by the way), was the opportunity to learn about the jobs many of the attendees had within their universities. Hearing first-hand their experiences, struggles, and successes helped put their needs into perspective in a way I had not yet experienced. As a previous student, it was heart-warming to see the dedication of these professionals and to learn how integral each and every one of them is to the success of their college or university.

Thanks to the HighEdWeb Association and its sponsors, we were also able to attend some of the awesome evening gatherings throughout Portland. My favorite event was the social at the World Forestry Center, complete with a live karaoke band, incredible doughnuts from Portland's own Voodoo Doughnut, and various other food and drinks. The karaoke band, Karaoke from Hell, really made the night, as everyone bravely belted out some tunes from their favorite songs. At times it felt like a true, live concert--some of you HighEdWeb members can really sing!

I am truly thankful that HighEdWeb was my first big conference experience, and I am so happy I was able to go and meet many of the wonderfully talented individuals who attended. It was great getting to hear from everyone, and I loved learning more about their work. I know everyone I spoke with had a blast, and we are all looking forward to 2015.

Were you at the HighEdWeb 2014 conference? Let us know what you loved most down below in the comments.

Terms: HigherEdWebHEWeb14Higher EducationDrupalDrupal PlanetSponsorshipHighEdWeb
Categories: Elsewhere

Deeson: Five Drupal modules you're probably missing out on

Fri, 24/10/2014 - 17:12

Here are five under-rated Drupal modules with less than 10,000 installs (at the time of writing!) which we use all the time.

1. Paragraphs 

Take a look at this fully flexible content creation module called Paragraphs which has 822 reported installs.

Our Content & Marketing Strategist, Emily Turner, explains: 

"Paragraphs enables me to create visually interesting content easily. I can choose from a variety of block types which support text, images and iframe content. I can reorder them and control the look quickly, switching alignment left or right. At Deeson, we've put a lot of effort into customising Paragraphs to help with the editing and publishing process. It makes blogs look more lively and gives creators the control they crave."

2. Coffee

Navigate through Drupal admin quickly with Coffee, which has 7,577 installs reported.

So if you're finding the nav bar a little slow, give this a go! Just Alt+D and type away.

Mac users will know this as similar to Alfred

3. Navbar

Take a look at Navbar, with 6,238 reported installs, for a mobile friendly nav bar. 

This is a backport of the Drupal 8 mobile friendly nav bar. We are using this for all new sites.

4. Image Field Focus

We're a big fan of Image Field Focus, which has 5,525 reported installs.

It allows smart cropping of images and combines well with the Picture element, as we explored in our recent post.

5. Publication date

The Publication Date module is the missing date stamp in Drupal and has 1,548 reported installs.

It automatically sets itself when you tick the publish box so that newly published content will always be at the top of your listings, even if it’s been in draft for months.

Have we missed any?

Come and tell us on Twitter the Drupal modules you think need a shout out. 

Categories: Elsewhere

Drupal Watchdog: Drupl'Art

Fri, 24/10/2014 - 16:34
Column

I like new movies and old music.

Why new movies but old music?

Maybe new TV is better because old movies – and TV – were not very good simply because moving pictures were a new medium, and it has taken artists time to mature.

Maybe old music is better because rock 'n' roll of the ‘60’s and ‘70’s was particularly brilliant, a musical Renaissance era.

But we do know that art is subjective; what I like is not necessarily what you like.

So though I prefer contemporary movies over the classics, some people opt for the opposite; they think old TV shows were the Renaissance period – and I just have no taste for good television.

Is there possibly another explanation, having to do with repetition?

Does repetition strengthen and reinforce one’s preference? Or do we just repeat things we like... a lot?

I often watch every episode and every season of a TV show I enjoy, but I watch each episode only once. Each episode is similar, but different. The patterns of the characters and interactions are similar, but the dialogue and exact story is, of course, different.

But with music, not only do I listen to the same artists, I listen to the same songs over and over again. I’ve heard “Jailhouse Rock” a million times, but only watched the movie once or twice. Hearing something I like, repeatedly, reinforces the song’s pattern, makes me more comfortable with it, and, I think, ultimately leads me to liking it more.

The same could be said of software patterns.

Building on my last article on “Sculpting Conditionals,” nothing helps me more than reviewing someone else's code. I can quickly detect a pattern I’m not familiar with. Frequently, an unfamiliar design pattern indicates trouble. And if the bad pattern occurs once in a code review, it’s worth checking to see if it was done elsewhere in code that is already committed. Unfamiliar patterns should be a klaxon horn, something deserving attention. After some study I might discover that the new pattern is actually better than the old pattern, and it will become something I adopt, but it is always initially a warning.

Categories: Elsewhere

Code Karate: Entity Reference View Widget

Fri, 24/10/2014 - 15:14
Episode Number: 175

If you have ever built a site using the entity reference module, then the Entity Reference View Widget module is a module that you should know about. It isn't always necessary, but can be a lifesaver if you have a lot of referenced content that you need to sort through and select from on your Entity Reference fields. This is a good replacement for using a traditional autocomplete field for your entity reference fields..

In this lesson you will learn:

Tags: DrupalEntity ReferenceDrupal 7Drupal Planet
Categories: Elsewhere

Code Drop: aGov: First Impressions of Australia's Government Drupal Distro

Fri, 24/10/2014 - 03:44

aGov is a Drupal distribution, which has recently been adopted as "GovCMS". It is built and maintained by the Australian Drupal shop PreviousNext. The distribution is a foundation for websites built for government organisations. At Code Drop we've been involved in the development of websites for government bodies locally in WA, however it is an area that is forecast to expand significantly and one that all Drupal agencies should be embracing.

The first step to undertaking the technical aspect of a large project is to evaluate all of the code in the Drupal ecosystem for appropriateness and stability. In this post we’ll go through some of the features found in aGov (7.x-1.x) and how they could be applied to a new government website.

Categories: Elsewhere

Drupal Bits at Web-Dev: Drupal: Altering Page Title and or Title Tag

Fri, 24/10/2014 - 02:41

Sometimes you need to alter the title that appears on the page and or the title tag in Drupal 7. If you need to make them both the same, a call to drupal_set_ttile() from within a hook_preprocess_page() will do it.

Categories: Elsewhere

Drupal core announcements: All the sprints at and around DrupalCon Latin America Bogotá

Thu, 23/10/2014 - 23:10
Start:  2015-02-08 (All day) - 2015-02-13 (All day) America/Chicago User group meeting

https://latinamerica2015.drupal.org/sprints

We have a great tradition of extended sprints around big Drupal events including DrupalCons and Drupal Dev Days. While there is a sprint day included in DrupalCons (usually) on the last day of the con, given that a lot of the Drupal core and contrib developers fly in for these events, it makes a lot of sense to use this opportunity to start sooner and/or extend our stay and work together in one space on the harder problems.

DrupalCon Latin America in Bogotá is the next DrupalCon! We are still looking for space and additional sponsors for the sprints before/after to help with space, internet, coffee, tea and maybe food. There are already various sprints signed up including Multilingual and Sign me up for anything. We are really friendly and need all kinds of expertise!

Now is the time to consider if you can be available and book your travel and hotel accordingly!

Join the sprinters -- sign up now! Practical details
Dates
February 8 - 13 2015 (all days at DrupalCon and some days both before and after).
Times and locations
Day/Time Location Feb 8 Extended sprint, location: TBD Feb 9 Maybe at the venue. There is also training this day). Feb 10 - 11 These are session days. Sprint lounge at venue. Feb 12 Official sprint day, location: TBD Feb 13 Extended sprint, location: TBD
Sponsors

??

Looking for sponsors

We are looking for more sponsors to be able to pay for extra expenses. If you are interested sponsoring or if you need sponsors to cover expenses, please contact me (YesCT).

Frequently asked questions What is a sprint?

Drupal sprints are opportunities to join existing teams and further Drupal the software, our processes, drupal.org and so on.

Do I need to be a pro developer?

No, not at all. First of all sprints include groups working on user experience, designs, frontend guidelines, drupal.org software setup, testing improvements, figuring out policies, etc. However you can be more productive at most sprints if you have a laptop.

Why are there 6 consecutive days of sprints?

DrupalCon is the time when most people in the Drupal community get together. We try to use this time to share our knowledge as well as further the platform in all possible ways. Therefore there is almost always an opportunity and a place to participate in moving Drupal forward.

What if I'm new to Drupal and/or sprinting, how can I join?

If you feel new and would love helping hands, the best day to start is the Thursday Feb 12 sprint day. This is the biggest sprint day with lots of people sprinting and different opportunities based on experience level. For a guided introduction to the tools and processes we use to collaborate, go to the First Time Sprinter workshop in the morning. If you know the tools but still could use help picking issues and going through the process, the Mentored Core Sprint is for you.

I worked on Drupal before, which sprints are for me?

If you have experience with Drupal issues and maybe already know a team/topic, any days of a DrupalCon may be your sprint days, and even the days before and after. These sprints do not have formal mentoring available, but of course if you have questions, there are always plenty of friendly people to help you. The community organizes off-site sprint opportunities for the days before/after DrupalCon and the event itself provides sprint locations from Feb 10 -12 throughout the session days in the event venue and in the official event hotel. These sprints are broken down to teams working on different topics. It is very important that you sign up for them, so we know what capacity to plan with.

Further questions?

Ask me (YesCT), I am happy to answer.

#node-427578 .picture, #node-427578 h3 { display: none; } #node-427578 .field-type-datestamp { margin: 0 0 2em 0; } #node-427578 dl { margin-bottom: 1em; } #node-427578 dd { margin-top: 0.5em; } #node-427578 h3.content { display: block; }
Categories: Elsewhere

Pages