Feed aggregator

KnackForge: Translation of custom modules and themes in Drupal 7

Planet Drupal - Thu, 01/10/2015 - 06:42

As we discussed a lot about translation in the previous posts Translation in Drupal 7 : How it works? and TRANSLATION in Drupal 7 : How to work with, let us discuss few points about how to do custom translation to our module and pot(.po) file handling for string translations. Before getting into the custom translation let us know few things about pot file handling. The pot (or) potx file which will be with extension .po. This pot(.po) file can manually be created or this can be generated with the help of the drupal module called Translation template extractor.

Let us see, how to generate the pot file for translation. First we need to enable the Translation Template Extractor module. Once the module is enabled, you will be seeing the “Extract” tab in the TRANSLATE INTERFACE section under REGIONAL AND LANGUAGE.



Now create a custom module and build all your required functionalities in the module and before enabling it, now go to the Extract Tab in Translation Interface, there you can find you module listed under Directory "sites/all/modules".


Categories: Elsewhere

KnackForge: How to set up a video background in Drupal 7 using the jquery.videobackground plugin

Planet Drupal - Thu, 01/10/2015 - 06:41

I’ve recently been working on a jQuery plugin that uses a HTML5 video as the background for a page. An idea that perhaps owes far too much of it’s inception to splash pages, it was worth investigating; as a test for HTML5 video player development and because of it’s interesting use of the video element.

This blog explains about how to set up video background in drupal. There are many plugins available to create background video in drupal and I am going to discuss jQuery videobackground plugin. The plugin should work in any browser that supports HTML5 video.

First you have to download jquery-videobackground plugin from here and place it at theme's js folder, for ex: sites/themes/theme-name/js/jquery.videobackground.js

Next you have added the following jQuery code in your custom js file

$(document).ready(function() { $('body').prepend('<div class="video-background"></div>'); $('.video-background').videobackground({ videoSource: , controlPosition: '#main', poster: 'sites/all/themes/midnight/video/shutter.png', loadedCallback: function() { $(this).videobackground('mute'); } }); });

Here are two callbacks in the plugin, one when the video is preloading and one when the video has loaded. Callbacks allow you to write additional JavaScript that will be triggered by the plugin.

A callback should allow you to use the other buttons. It’ll look something like this:

Categories: Elsewhere

Gbyte blog: What to keep in mind when creating Drupal 8 projects - for developers

Planet Drupal - Thu, 01/10/2015 - 03:50
With only a few critical issues left in the Drupal 8 queue and D8 being surprisingly usable, many developers already use it in small projects to play with the technology and to challenge themselves. I have to admit, I am no exception - the embracement of many PHP technologies and (finally!) the jump to the OOP paradigm makes me want to stop writing right now and code some more.
Categories: Elsewhere

Drupal Association News: Drupal Association Board Meeting: September 23, 2015

Planet Drupal - Thu, 01/10/2015 - 00:44

This month, we got to hold our public board meeting, well, in public. Mostly all together in Barcelona, we met in the middle of DrupalCon to share some updates with the board and community. As always, if you want to catch up on all the details, you can find everything you need to know about the meeting online, including minutes, materials, and a video recording. If you're just here for a summary view, read on!

Drupal 8 Accelerate is fully funded

Early in 2015 we set out to do something that we have never done before: raise $250,000 to get the next release of Drupal out the door. I am thrilled to share that we met that goal at DrupalCon Barcelona, with the last donation coming in from Exove just before Dries took the stage for his keynote. Drupal 8 Accelerate allowed the Drupal core maintainers to identify issues that needed immediate attention and pay contributors to make their time available. Additionally, community members were able to propose sprints and other initiatives to help crush D8 release blockers. We've made over 50 grants around the globe through the program, resolving hundreds of issues. We want to thank everyone in the community who donated and helped spread the word about the campaign, including our anchor donors, Acquia, Appnovation, Palantir.net, Phase2, Wunderkraut, PreviousNext, and Drupalize.me.

D8 release candidate communications plan

We all heard some very exciting news during the Barcelona #Driesnote. Unless we come across any major unexpected hiccups, we'll have a Drupal 8 release candidate ("RC") on October 7. At the Association, we're gearing up to work with the community to shout the RC news, and then the full release news, from the rooftops. We shared the plan at the public board meeting, and are asking the community for help in two specific areas. First, we need your help educating people about Drupal 8 features and how they can be used. We also need your help sharing how Drupal 8 will meet the needs of specific audiences. We'll be updating the Drupal 8 landing page over the next few weeks and want to fill it with all of your great work. Here's the kind of content we're looking for:

Here's how you can share in the D8 release fun:

  • Planning on hosting a release party? Share the details and we'll help spread the word about your event.
  • Are you already building sites with Drupal 8? Share a link in social media and tag it #madewithdrupal8. You can also add it to the list on groups.drupal.org.
  • If you have demos, white papers, blog posts, or some other materials that talk about the virtues of D8, share it on social media and tag it #drupal8rc.
2016 at-large board elections

Every year the Drupal commmunity nominates and elects one individual to serve a 2-year term on the Association board of directors. If you're interested in what the board does and why you might want to consider running, you can check out this blog post and presentation from last year. We'll be holding the next elections in the first three months of 2016, so we took some time in Barcelona to talk about the process. You can review the presentation from the meeting, and here are the key dates for the next election:

  • Nominations (February 1-19, 2016)
  • Meet the candidates (February 22 - March 4, 2016)
    • February 23 session at 7am Pacific
    • February 24 session at noon Pacific
    • February 25 session at 4pm Pacific
  • Voting (March 7-18)
  • Ratification and communication (March 25)
Cake for Angie

We also took a moment to thank long-time board member Angie Byron (webchick) for her service on the board. Angie's term ends in November, and she is stepping down from her board role to focus on making the Drupal 8 release as big as possible. One a personal note, I am so grateful for the opportunity to work with Angie so closely for so long. Her ability to be honest and kind at the same time is something that I have tried to learn from every time I interact with her. Thank you Angie for everything I have been able to learn from you.

Categories: Elsewhere

Ben Armstrong: Halifax Mainland Common: Early Fall, 2015

Planet Debian - Thu, 01/10/2015 - 00:33

A friend and I regularly meet to chat over coffee and then usually finish up by walking the maintained trail in the Halifax Mainland Common Park, but today we decided to take a brief excursion onto the unmaintained trails criss-crossing the park. The last gasp of a faint summer and early signs of fall are evident everywhere.

Some mushrooms are dried and cracked in a mosaic pattern:

Ferns and other brush are browning amongst the various greens of late summer:

A few late blueberries still cling to isolated bushes here and there:

The riot of fall colours in this small clearing, dotted with cotton-grass, burst into view as we round a corner, set behind by a backdrop of nearby buildings:

The ferns here are vivid, like a slow burning fire that will take the rest of fall to burn out:

We appreciate one last splash of colour before we head back under the cover of woods to rejoin the maintained trail:

So many times we’ve travelled our usual route “on automatic”. I’m happy today we left the more travelled trail to share in these glimpses of the changing of seasons in a wilderness preserved for our enjoyment immediately at hand to a densely populated part of the city.

Categories: Elsewhere

Chris Lamb: Free software activities in September 2015

Planet Debian - Thu, 01/10/2015 - 00:23

Inspired by Raphaël Hertzog, here is a monthly update covering a large part of what I have been doing in the free software world, not including work done on my own projects:

  • Added support for --allow-unauthenticated in Ansible's apt module. (#2023)
  • A proposal to change the nouns displayed in the Tails boot menu. (diff)
  • A trivial change to the Tails packaging to use dpkg's --show-field option over manual invokations to sed. (diff)
  • A trivial change to disque's documentation regarding web addresses. (#125)
  • Added youtube-upload's documentation to suggest using Debian packages over pip. (#59)

The Reproducible Builds project was also covered in depth on LWN as well as in Lunar's weekly reports (#1, #2, #3, #4 & #5).

  • redis — A new upstream release, as well as overhauling the systemd configuration, maintaining feature parity with sysvinit and adding various security hardening features.
  • python-redis — Attempting to get its Debian Continuous Integration tests to pass successfully.
  • libfiu — Ensuring we do not FTBFS under exotic locales.
  • gunicorn — Dropping a dependency on python-tox now that tests are disabled.
Bugs filed Patches contributed
RC bugs

I also filed FTBFS bugs against: actdiag, actdiag, bangarang, bmon, bppphyview, cervisia, choqok, cinnamon-control-center, clasp, composer, cpl-plugin-naco, dirspec, django-countries, dmapi, dolphin-plugins, dulwich, elki, eqonomize, eztrace, fontmatrix, freedink, galera-3, golang-git2go, golang-github-golang-leveldb, gopher, gst-plugins-bad0.10, jbofihe, k3b, kalgebra, kbibtex, kde-baseapps, kde-dev-utils, kdesdk-kioslaves, kdesvn, kdevelop-php-docs, kdewebdev, kftpgrabber, kile, kmess, kmix, kmldonkey, knights, konsole4, kpartsplugin, kplayer, kraft, krecipes, krusader, ktp-auth-handler, ktp-common-internals, ktp-text-ui, libdevice-cdio-perl, libdr-tarantool-perl, libevent-rpc-perl, libmime-util-java, libmoosex-app-cmd-perl, libmoosex-app-cmd-perl, librdkafka, libxml-easyobj-perl, maven-dependency-plugin, mmtk, murano-dashboard, node-expat, node-iconv, node-raw-body, node-srs, node-websocket, ocaml-estring, ocaml-estring, oce, odb, oslo-config, oslo.messaging, ovirt-guest-agent, packagesearch, php-svn, php5-midgard2, phpunit-story, pike8.0, plasma-widget-adjustableclock, plowshare4, procps, pygpgme, pylibmc, pyroma, python-admesh, python-bleach, python-dmidecode, python-libdiscid, python-mne, python-mne, python-nmap, python-nmap, python-oslo.middleware, python-riemann-client, python-traceback2, qdjango, qsapecng, ruby-em-synchrony, ruby-ffi-rzmq, ruby-nokogiri, ruby-opengraph-parser, ruby-thread-safe, shortuuid, skrooge, smb4k, snp-sites, soprano, stopmotion, subtitlecomposer, svgpart, thin-provisioning-tools, umbrello, validator.js, vdr-plugin-prefermenu, vdr-plugin-vnsiserver, vdr-plugin-weather, webkitkde, xbmc-pvr-addons, xfsdump & zanshin.

Categories: Elsewhere

Norbert Preining: 6 years in Japan

Planet Debian - Wed, 30/09/2015 - 23:03

Exactly 6 years ago, on October 1, 2009, I started my work at the Japan Advanced Institute of Science and Technology (JAIST), arriving the previous day in a place not completely unknown, but with a completely different outlook: I had a position as Associate Professor, and somehow was looking forward to an interesting and challenging time.

6 years later I am still here at the JAIST, but things have changed considerably, and my future is even less clear than 6 years ago. So it is time to reflect a bit about the last years.

The biggest achievement

My biggest achievement in these 6 years is probably that I managed to learn Japanese to a degree that I can teach in Japanese (math, logic, etc), can read Japanese books to a certain degree, and have generally no problem communicating in daily life. Said that, there is still a long way to go. Reading, and much more writing, is still requiring concentration and power, far from the natural flow in my other languages. While talking feels rather natural, the complexity of the written language is a huge hurdle. But this is probably the good, the high point of the 6 years, a great challenge, that keeps my mind busy and working and challenged over long time, with still more to do.

The happiest thing

Many events here in Japan were of great fun and enjoyment for me. The rich culture, paired with a spectacular love for traditional handicraft I haven’t seen anywhere else, is a guarantee for enjoyable and intellectually stimulating activities. But the biggest joy of my time here of course was that I found a lovely, beautiful, and caring wife. Not knowing the challenges of an international marriage, I was caught without preparation, and so we had (and still have) rough times due to the cultural differences, and different expectations. But this is what makes life interesting, and so I am always grateful for this chance. Whatever happens in the future, she will be part of my decisions and the center of my life.

The biggest disappointment

Of course, when you live in a country for some time, you learn to know the highs and lows. As someone interested in politics and social systems, Japan is a pain in the butt in many respects. But the biggest disappointment was in a different area: Working environment. While I love my work and had great surroundings, there is something that always is present in the background: Foreigners here are not considered assets, but embellishment. Meaning that they are the first ones to loose their jobs when times are difficult, meaning that they are not considered as full members. After many years at a university here, and with no outlook on a job after March, I can only say, Japan is a country of “Japanese first”, especially when it comes to jobs. Of course, other countries are not that different, but looking at the average mixture of nationalities at universities in Europe or the US, and comparing them to Japanese universities, a bleak image is arising. I enjoyed my time here, I worked hard and did a lot for my university, but the economically hard times make it necessary to change things, and that means getting rid of foreigners.

That is the reason why the work environment is the biggest disappointment in these years.


The future is unclear, as it always was. The dire fate of many researchers. Being in my 40ies without a permanent position and a family, I am forced to think hard what my next options are. The hide-and-seek games of Japanese (and other) universities seem to me less and less an option. Sad as it is, after having worked 20+ years in academics, having done some interesting (for me) research and having managed to secure a name in our community, I am not sure where my future is. Continuing on definite contracts does not sound like a great option for me. Several things for the future come to my mind: starting my own business, work as programmer (maybe Google still wants me after I rejected them 2 years ago), work as mountain guide (have done that for some years before going to Japan). All of that is possible, but my loosing the time to research will always be a pain, since I enjoy cracking my brain on some complicated and deep logical problems.

Whatever comes, I will take it as a chance to learn new things. And in one way or another it will work out, I hope.

Categories: Elsewhere

Gizra.com: Elm Loves Headless Drupal

Planet Drupal - Wed, 30/09/2015 - 23:00

Part of my job is to get my hands dirty with technologies I stumble upon. I've decided to have a go at React. Well, one thing led to the other and it seems I went down the client side rabbit hole. I'd like to share with you my path - watch out though, it's a slippery slope.

"Hello World" in Elm

It all started with this Thinking Flux video which explains the problems Facebook faced in its front-end and the new application architecture they are now using.

Since the Flux concept was out, different libraries were written implementing it, but in my view it seems that Redux is the winner in terms of simplicity, popularity, docs and community. I really recommend going over it - at least the intro and basics. You might be tempted to actually learn a bit of React (tutorial) to follow the examples more easily.

Then I saw Redux was crediting Elm for some of its inspiration, so I decided to give it a quick look. I was immediately blown away by Elm. The syntax is weird (unless you know Haskell), it has a crazy learning curve, but a lot of it makes so much sense.

The following recording is a presentation I first gave internally for Gizra devs, then as a BoF in DrupalCon Barcelona, and finally recorded to share it with everyone.

My goal is to get more people excited about Elm so the community and contributions grows. I feel it is now very much like Drupal about 10 years ago - a small community, far from being mainstream, but with a lot of potential.

Maybe if we'll draw from Drupal's experience in building and cultivating a community we'll be able to bring this awesome tool closer to the mainstream.

Continue reading…

Categories: Elsewhere

DrupalCon News: If you're not going to DrupalCon, you're missing out

Planet Drupal - Wed, 30/09/2015 - 21:21

The Drupal Association has partnered with Niswey, an India-based marketing firm, to provide marketing materials for DrupalCon Asia. Every few weeks, we'll be sharing the blogs and comic strips that our Niswey friends have created in anticipation of the convention.

Categories: Elsewhere

Red Crackle: Is Drupal Dying?

Planet Drupal - Wed, 30/09/2015 - 20:55
I am sure you must have heard this question or pondered about it multiple times. Is Drupal dying? If you search about this topic on Google, you will see volumes of opinions, one way or the other. In this post, I am presenting some facts that were brought in front of me and some facts that I myself researched. As of now, I am still wondering whether Drupal is dying or not. Read the post and let me know what you think via comments.
Categories: Elsewhere

Chapter Three: How to Get a Views &amp; Panels Site to Work with Workbench Moderation

Planet Drupal - Wed, 30/09/2015 - 20:28

Workbench moderation works by allowing you to keep a new revision of your content as a draft (or unpublished) while an older revision remains as your published version. Out of the box Drupal handles this beautifully, most of the time. However, once you start adding contributed and/or custom modules, things can start to get hairy.

For example, Path module will generate a new alias each time your node is saved (if you define one in your node’s settings). This is great when the latest revision is your published content, but when the latest revision is a draft, you’ll want the keep the old alias until you publish the draft.

Categories: Elsewhere

Drupal core announcements: Drupal 8 beta 16 on Thursday, October 1, 2015

Planet Drupal - Wed, 30/09/2015 - 18:57
Start:  2015-10-01 (All day) America/New_York Online meeting (eg. IRC meeting) Organizers:  catch xjm

The next (and hopefully final!) beta release for Drupal 8 will be beta 16! (Read more about beta releases.) The beta is scheduled for Thursday, October 1, 2015. To ensure a reliable release window for the beta, there will be a Drupal 8 commit freeze from 00:00 to 23:30 UTC on September 30 (later on today).

Beta 16 will include a couple of important changes, including the removal of the ! placeholder from t(), and the moving of vendor code from /core/vendor into /vendor.

Categories: Elsewhere

Yves-Alexis Perez: Kernel recipes 2015: Hardened kernels for everyone

Planet Debian - Wed, 30/09/2015 - 18:00

As part of my ongoing effort to provide grsecurity patched kernels for Debian, I gave a talk this morning at Kernel Recipes 2015. Slides and video should be available at one point, but you can find the former here in the meantime. I'm making some progresses on #605090 which I should be able to push soon.

Categories: Elsewhere

Rapha&#235;l Hertzog: My Free Software Activities in September 2015

Planet Debian - Wed, 30/09/2015 - 17:12

My monthly report covers a large part of what I have been doing in the free software world. I write it for my donators (thanks to them!) but also for the wider Debian community because it can give ideas to newcomers and it’s one of the best ways to find volunteers to work with me on projects that matter to me.

Debian LTS

This month I have been paid to work 8 hours on Debian LTS. In that time, I mostly did CVE triaging (in the last 3 days since I’m of LTS frontdesk duty this week). I pushed 14 commits to the security tracker. There were multiple CVE without any initial investigation so I checked the status of the CVE not only in squeeze but also in wheezy/jessie.

On unpaid time, I wrote and sent the summary of the work session held during DebConf. And I tried to initiate a discussion about offering mysql-5.5 in squeeze-lts. We also have setup lts-security@debian.org so that we can better handle embargoed security updates.

The Debian Administrator’s Handbook

I spent a lot of time on my book, the content update has been done but now we’re reviewing it before preparing the paperback. I also started updating its French translation. You can help review it too.

While working on the book I noticed that snort got removed from jessie and the SE linux reference policy as well. I mailed their maintainers to recommend that they provide them in jessie-backports at least… those packages are relatively important/popular and it’s a pity that they are missing in jessie.

I hope to finish the book update in the next two weeks!

Distro Tracker

I spent a lot of time to revamp the mail part of Distro Tracker. But as it’s not finished yet, I don’t have anything to show yet. That said I pushed an important fix concerning the mail subscriptions (see #798555), basically all subscriptions of packages containing a dash were broken. It just shows that the new tracker is not yet widely used for mail subscription…

I also merged a patch from Andrew Starr-Bochicchio (#797633) to improve the description of the WNPP action items. And I reviewed another patch submitted by Orestis Ioannou to allow browsing of old news (see #756766).

And I filed #798011 against bugs.debian.org to request that a new X-Debian-PR-Severity header field be added to outgoing BTS mail so that Distro Tracker can filter mails by severity and offer people to subscribe to RC bugs only.

Misc Debian work

I filed many bugs this month and almost all of them are related to my Kali work:

  • 3 on debootstrap: #798560 (request for –suite-config option), #798562 (allow sharing bootstrap scripts), #7985604 (request to add kali related bootstrap scripts).
  • 3 requests of new upstream versions: for gpsd (#797899), for valgrind (#800013) and for puppet (#798636).
  • #797783: sbuild fails without any error message when /var/lib/sbuild is not writable in the chroot
  • #798181: gnuradio: Some files take way too long to compile (I had to request a give-back on another build daemon to ensure gnuradio migrated back to testing, and Julien Cristau suggested that it would be better to fix the package so that a single file doesn’t take more than 5 hours to build…)
  • #799550: libuhd003v5 lost its v5 suffix…

See you next month for a new summary of my activities.

No comment | Liked this article? Click here. | My blog is Flattr-enabled.

Categories: Elsewhere

Kodamera Screencast: Webform - A short introduction

Planet Drupal - Wed, 30/09/2015 - 15:58

The Webform module is a powerful ally when you need complex forms. In this video I talk briefly about when you can use Webform, what different components that ships with the module and also a little about the functionality the the module offers when is comes to sending emails and showing the information added to the webform.Read more

Categories: Elsewhere

Dominique Dumont: Using custom cache object with AngularJS $http

Planet Debian - Wed, 30/09/2015 - 11:02


At work, I’ve been bitten by the way AngularJS handles cache by default when using $https service. This post will show a simple way to improve cache handling with $http service.

The service I’m working on must perform the followings tasks:

  • retrieve data from a remote server.
  • save data to the same server.
  • retrieve the saved data and some extra information generated by the server to update a UI

At first, I’ve naively used $http.get cache parameter to enable or disable caching using a sequence like:

  1. $http.get(url, {cache: true} )
  2. $http.post(url)
  3. $http.get(url, {cache: false})
  4. $http.get(url, {cache: true})

Let’s say the calls above use the following data:

  1. $http.get(url, {cache: true}) returns “foo”
  2. $http.post(url) stores “bar”
  3. $http.get(url, {cache: false}) returns “bar”

I expected the next call $http.get(url, {cache: false}) to return “bar”. But no, I got “foo”, i.e. the obsolete data.

Turns out that cache object is completely left alone when {cache: false} is passed to $http.get.

ok. Fair enough. But this means that the value of the cache parameter should not change for a given URL. The default cache provided by $https cannot be cleared. (Well, actually, you can clear the cache under AngularJS’s hood, but that will probably not improve the readability of your code).

The naive approach does not work. Let’s try another solution by using a custom cache object as suggested by AngularJS doc. This cache object should be created by $cacheFactory service.

This cache object can then be passed to $http.get to be used as cache. When needed, the cache can be cleared. In the example above, the cache must be cleared after saving some data to the remote service.

There’s 2 possibilities to clear a cache:

  • Completely flush the cache using removeAll() function.
  • Clear the cache for the specific URL using remove(key) function. The only hitch is that the “key” used by $http is not documented.

So, we have to use the first solution and create a cache object for each API entry point:

angular.module('app').factory('myService', function ($http, $cacheFactory) { var myFooUrl = '/foo-rest-service'; // create cache object. The cache id must be unique var fooCache = $cacheFactory('myService.foo'); function getFooData () { return $http.get( myFooUrl, { cache: fooCache }); }; function saveFooData(data) { return $http.post( myFooUrl, { cache: fooCache }).then(function() { myCache.removeAll() ; }); } });

The code above ensures that:

  • cached data for foo service is always consistent
  • http get requests are not sent more than necessary

This simple approach has the following limitations:

  • cache is not refreshed if the data on the server are updated by another client
  • cache is flushed when only the browser page is reloaded

If you need more a more advance cache mechanism, you may want to check jmdobry’s angular cache project

All the best

Categories: Elsewhere

Freelock : Countdown to Drupal 8!

Planet Drupal - Wed, 30/09/2015 - 05:25

Drupal 8 has only 4 critical issues before getting released out of beta! Fingers crossed for a release this week!

The major issues that remain are: 

Drupal PlanetBusiness Intelligence
Categories: Elsewhere

Gbyte blog: When custom t() strings are missing from the translate interface

Planet Drupal - Wed, 30/09/2015 - 05:13
The Drupal 7 translation system including the internationalization package is a heavy beast and while it mostly gets the job done, it is all but intuitive in use. For high volume translations it is recommended to use the translation template extractor and translate the strings externally. For small corrections however, it is often much more convenient to use the translation interface (admin/config/regional/translate/translate).
Categories: Elsewhere

Web Wash: Build a Blog in Drupal 8: Content types and Fields

Planet Drupal - Tue, 29/09/2015 - 23:11

With Drupal 8 on the horizon, now is a good time to start using it. The best way to learn the new version is to build something with it.

Over the next few weeks, I'll be publishing a series of tutorials teaching you how to create a blog in Drupal 8. The aim of the series is to help new comers, as well as experienced site builders, how to create a blog website using Drupal 8.

Throughout each tutorial, major changes between Drupal 7 and 8 will be highlighted. Even if you know Drupal 7, follow along and you'll learn what's new in Drupal 8.

In this first tutorial, you'll learn how to create a Blog content type and how to add custom fields. You'll also learn about the Taxonomy system by creating your own vocabulary to categorize blog posts.

Categories: Elsewhere


Subscribe to jfhovinne aggregator