Feed aggregator

Planet Drupal
3 hours 45 min ago
Categories: Muualla verkossa

Drupal 8 Initiatives: Drupal 8 Multilingual Initiative meeting on May 23, 2012

Start:  2012-05-23 17:00 - 18:00 UTC Online meeting (eg. IRC meeting) Organizers:  Gábor Hojtsy

We'll review current top priority tasks and discuss new ones to work on. Let's keep momentum on our active issues in property translation, config translation, gettext generalization, etc. We should keep going strong! There are still plenty of opportunities to help! Come to this meeting and ask for tasks. We can find tasks for all skill levels and interests!

The meeting is in the #drupal-i18n channel on IRC. See http://drupal.org/irc for more information. The time above is marked with UTC - check in your own timezone.

Planet Drupal
13 hours 48 min ago
Categories: Muualla verkossa

Urban Insight: Prototyping Responsive Websites - Part 1

Websites being built today need to be accessible on mobile devices such as smartphones and tablets. I will outline a prototyping process that we are experimenting with to efficiently create designs for responsive websites.

Planet Drupal
15 hours 41 min ago
Categories: Muualla verkossa

Drupal Watchdog: Little Views Tricks #1

In Views 3.x, official support for SQL grouping was added, mostly by incorporating the functionality of the former views_groupby module. This can be a bit confusing, because this function really performs aggregation tasks like SUM, instead of grouping under a particular field. Views can group by a field though, allowing for things like quarterly reports sorted by year, with the year displayed at the top of each section. Here’s how in Views 7.x-3.x:

  1. Create a view with fields
  2. Add some fields that use the same data each time (date, title, price for example)
  3. Under Format -> Format, choose Settings
  4. Choose a Grouping field and Apply appropriately.

Done!

Author Lynette Miles

Lynette Miles is the co-author of Drupal Building Blocks, and has worked in the tech industry for her entire professional career. She became involved with Drupal in 2006, and participates in the documentation team as well as coordinating the Views bug squad.

Planet Drupal
21.05.2012
Categories: Muualla verkossa

Deeson Group: How to use $form['#attached'] with a JavaScript setting in Drupal 7 Form API

"You're entering a realm which is ...unusual, maybe it's magic. That contains some kind of monster, the second one... Prepare to enter, The Scary Door."

If none of that makes any sense, watch the video at the end of the post. This is a little how I felt wrangling with #form attachments.

A pre-cursor, you can use drupal_add_js() to add JavaScript to your forms, but if your form gets submitted and has errors, the regenerated form will be missing your JavaScript added via drupal_add_js(), which is why we have #attached.

We all know and love drupal_add_js(), however I myself am not totally grounded with Form attachments. Throwing in a local or external file is easy enough, as is inline, though I had trouble with settings.

A fun point in my fumblings was the ridiculous thought of attempting to use an Array as an index for an Array.... Thought better of it (this isn't actually possible anyway).

After traversing drupal_render(), and then drupal_process_attached() I found this:

// In some cases, the first parameter ($data) is an array. Arrays can't be // passed as keys in PHP, so we have to get $data from the value array.

Ah, and so just use an index then, much more sensible! Here's how you use form attached with a JavaScript setting array.

$form['#attached']['js'][] = array( 'data' => array( 'xx_system' => array( 'xx_code' => variable_get('xx_code', 'xx'), 'xx_key' => variable_get('xx_key', 'xx'), ), ), 'type' => 'setting', ); Read moreHow to use $form['#attached'] with a JavaScript setting in Drupal 7 Form APIBy Alli Price | 21st May 2012
Planet Drupal
21.05.2012
Categories: Muualla verkossa

Tigerfish: Drupal 7: Redirecting users based on their country or location for an i18n site

Recently I was tasked with coming up with a system for redirecting users to the correct version of a translated site based on where they were accessing the site from. Having spent some time looking on Google and Drupal.org I did not find anything suitable and so decided to write my own which I am now sharing due to the lack of resources on this subject.

Recently I was tasked with coming up with a system for redirecting users to the correct version of a translated site based on where they were accessing the site from. Having spent some time looking on Google and Drupal.org I did not find anything suitable and so decided to write my own which I am now sharing due to the lack of resources on this subject.

read more

Planet Drupal
21.05.2012
Categories: Muualla verkossa

Lullabot: Module Monday: Variable Check

Fixing unserialize() woes

Ever run into errors like the following on your Drupal sites?

Notice: unserialize() [function.unserialize]: Error at offset 74 of 75 bytes in variable_initialize() (line 749 of /srv/www/<sitename>/includes/bootstrap.inc).

This is a symptom of an invalid variable in the {variables} table. When the Drupal cache is cleared (or variable_set() is called), Drupal queries the variable table for all site settings and saves them in your cache for quick access. If you're getting errors like the above, odds are your variable table contains a corrupted or unserialized value.

So now that you know what the problem is, how do you solve it? For larger sites there can be hundreds, if not thousands of variables in the {variables} table. Finding the broken value can be time consuming and difficult.

Enter Variable Check!

Once the Variable Check module is installed, a new report is added to the Reports section in the site administration.

As we can see, Variable Check is correctly identifying an invalid string length, an unserialized value, and a missing quote from a string value.

Drupal.org
21.05.2012
Categories: Muualla verkossa

New Drupal 7 core co-maintainer: David Rothstein

I selected Angela "webchick" Byron as my co-maintainer for Drupal 7 back in DrupalCon Szeged in August 2008. Since then, together we shepherded efforts of 1,000 core contributors to create Drupal 7, got the release out the door in January of last year, and worked hard thereafter to stabilize Drupal 7, to the point that the number of Drupal 7 sites eclipsed the number of Drupal 6 sites earlier this year.

However, Angela's level of responsibility in the community has grown significantly in the past 3.5 years, and she wears many hats, from Drupal Association board member to code sprint planner to Drupal.org coordinator to evangelist to general community cat herder. We both felt that it was time to transition the role of Drupal 7 core co-maintainer off of her plate, in order to give her more time to focus on her other community roles.

When thinking about replacements for Angela, David Rothstein was at the top of my list. David was a key contributor to Drupal 7 and heavily involved in a wide range of issues throughout the code base. He was also on the Drupal Gardens team, developing against Drupal 7 while it was still in active development, and so has a very thorough and deep understanding of Drupal 7's internals. David is extremely conscientious and thorough in his reviews, and is incredibly calm and respectful in his communication style.

I'm thrilled to say that David accepted the invitation to join the core co-maintainer team, and will have time to work on managing Drupal 7 releases through community time provided by his current employer, Advomatic. David will not be committing to the Drupal 8 branch, but will be focused on guaranteeing the quality of Drupal 7.

Please join me in welcoming David to the core maintainer team!

Planet Drupal
21.05.2012
Categories: Muualla verkossa

Dries Buytaert: David Rothstein

I selected Angela "webchick" Byron as my co-maintainer for Drupal 7 back in DrupalCon Szeged in August 2008. Since then, together we shepherded efforts of 1,000 core contributors to create Drupal 7, got the release out the door in January of last year, and worked hard thereafter to stabilize Drupal 7, to the point that the number of Drupal 7 sites eclipsed the number of Drupal 6 sites earlier this year.

However, Angela's level of responsibility in the community has grown significantly in the past 3.5 years, and she wears many hats, from Drupal Association board member to code sprint planner to Drupal.org coordinator to evangelist to general community cat herder. We both felt that it was time to transition the role of Drupal 7 core co-maintainer off of her plate, in order to give her more time to focus on her other community roles.

When thinking about replacements for Angela, David Rothstein was at the top of my list. David was a key contributor to Drupal 7 and heavily involved in a wide range of issues throughout the code base. He was also on the Drupal Gardens team, developing against Drupal 7 while it was still in active development, and so has a very thorough and deep understanding of Drupal 7's internals. David is extremely conscientious and thorough in his reviews, and is incredibly calm and respectful in his communication style.

I'm thrilled to say that David accepted the invitation to join the core co-maintainer team, and will have time to work on managing Drupal 7 releases through community time provided by his current employer, Advomatic. David will not be committing to the Drupal 8 branch, but will be focused on guaranteeing the quality of Drupal 7.

Please join me in welcoming David to the core maintainer team!

Planet Drupal
21.05.2012
Categories: Muualla verkossa

Phase2 Technology: Caching in Drupal

Caching is commonly used to boost the performance of Drupal based websites and there are many modules and options for fine grained control of when items expire. However, the standard caching settings available under performance are frequently misinterpreted and different caching backends have subtly different behavior. Here is a breakdown of what the settings mean for page caching and how the two most common storage engines behave for particular events.
Planet Drupal
21.05.2012
Categories: Muualla verkossa

Chris Mavergames: Drupal 7 Mobile Web Development

I just picked up my copy of Drupal 7 Mobile Web Development. From a preliminary browse of the ToC, it looks great. Will post a review here soon...

Kommentit
21.05.2012
Categories: Drupal.fi

RATKAISTU

Homma toimii sittenkin, syynä oli puuttellinen yksityisen tiedostojärjestelmän polun määrittely. Anteeksi väärä "hälytys"!

Päivitykset
21.05.2012
Categories: Drupal.fi

Yksityiset tiedostot 7.14-versiossa?

Hei, olen omassa kehitysympäristössä valmistellut sivustoa Drupal 7.12 -versiolla. Siellä saan valittua sisältötyypin tallennuskohteeksi joko "Julkiset tiedostot" tai "Yksityiset tiedostot" haluamallani tavalla. Aloitin toisen sivuston teon asentamalla 7.14-version, ja siellä en pääse valitsemaan kuin "Julkiset tiedostot". Eli mistähän johtuu, että "Yksityiset tiedostot" - valintaa ei ole käytettävissä tässä versiossa? Harmittaa, kun juuri tämän ominaisuuden takia vaihdoin Joomlasta Drupaliin, mutta osaako joku kertoa, että katosiko tämä etu nyt kuitenkin päivityksen myötä? Toivottavasti ei!

Kommentit
21.05.2012
Categories: Drupal.fi

Hyvä editori?

Mikä on WYSIWYG-editorien tilanne vuonna 2012, eli
mikä kannattaa ottaa käyttöön ettei kerjää itselleen turhia ongelmia (aloittelijalle kun sattuu kaikenlaista muutenkin ;-) )?

Käytössä on Drupal 7.14.

Planet Drupal
20.05.2012
Categories: Muualla verkossa

Drupal core announcements: Kernel patch for WSCCI nearly complete

The WSCCI team has gotten the kernel patch ready. This is step one to WSCCI and SCOTCH initiatives.

While there is plenty of follow-up work to do, in order to unblock continued work the kernel code will be marked RTBC on 28 May 2012 per http://drupal.org/node/1463656#comment-5992676 (baring any epic fail situations we discover before then). Review and suggestions for follow-up work are still welcome and encouraged until then.

Planet Drupal
20.05.2012
Categories: Muualla verkossa

Clemens Tolboom: Symfony development from a Drupal perspective

While still working on D8MI Let Symfony Translation component handle language messages I needed to code for Symfony to on the Translation component.

So how does that work writing and testing Symfony code?

Download Symfony cd /tmp
git clone https://github.com/symfony/symfony.git
cd symfony
ls Dependency management

Note the composer.json which is key to get the Symfony phpunit test running. As a Drupal developer new thing are to be learned. Composer manages all dependencies needed to run either a Symfony application or the phpunit test. As we are developing for Drupal but need to be able to convert Drupal Gettext related test cases to Symfony we need to be able to run Symfony unit tests.

Awesome composer

So let's start by downloading composer from http://getcomposer.org/download/ and follow their instruction.

cd /tmp/symfony
curl -s http://getcomposer.org/installer | php

This installs a composer.phar file which is capable to process the composer.json and download all dependencies needed to run the phpunit tests. You can run

php composer.phar install

to see all runtime dependencies being downloaded and installed. As a Symfony developer you need the development dependencies too. Install these through composer.

php composer.phar install --dev

which installs the development dependencies too. I like this composer stuff to get started.

Running phpunit

Running all tests is easy. (When you don't have phpunit see below for how I managed this on a Mac OS 10.6)

cd /tmp/symfony
phpunit

and see all tests running smoothly. Note the S's which are skipped unit tests.

Run the Translation component

As this blog is about D8MI we need to run the Translation tests.

cd /tmp/symfony
phpunit src/Symfony/Component/Translation/ What are those skipped tests? cd /tmp/symfony
phpunit --verbose src/Symfony/Component/Translation/ Changing a fixture

By downloading ie http://ftp.drupal.org/files/translations/7.x/drupal/drupal-7.11.nl.po we see these files have no whitelines between each translation item.

msgid "Home"
msgstr "Inici"
msgid "User interface"
msgstr "Interfície d'usuari"

so lets test this with Symfony by editing one of the tests fixtures.

cd /tmp/symfony
vi src/Symfony/Component/Translation/Tests/fixtures/resources.po
# remove all whitelines (this is just the last line) or just add some (depending on Symfony current state)
phpunit src/Symfony/Component/Translation/

This will show two failures. So our unittests do some good work.

Installing phpunit

Installing phpunit (on Mac Os 10.6)

This is from a lame history so I commented out some command.

sudo su -
pear channel-discover pear.phpunit.de
# pear channel-discover components.ez.no
# pear channel-discover pear.symfony-project.com
# pear install phpunit/PHPUnit
# pear upgrade
pear install --alldeps phpunit/PHPUnit
Planet Drupal
20.05.2012
Categories: Muualla verkossa

Dave Hall Consulting: Your Site Should be Full of BEANs*

From: Dave Hall
To: boxes <boxes-module@drupal.org>
Subject: Our Relationship

Dear boxes,

I'm sorry but things just aren't working out between us. It's not you, it's me. I need some time to myself. I need to think things through. I'm not sure what I want. We should spend some time apart. We should try new things. I will miss you, but this is for the best. Let's meet for coffee in a couple of weeks.

Love

Dave
xox

Breaking up is never easy, but recently I broke up with the boxes module. I'd been with boxes for a long time, we'd done a lot of good things together. Over time I'd become oblivious to some of boxes' flaws, such as giving black eyes to sys admins who run features reverts on sites where users can edit boxes. Life was pretty good, but my life still felt somewhat empty and incomplete.

One day I was standing in a crowded room with lots of modules on drupal.org and across the room I spotted BEAN. I feel in love instantly. BEAN was decked out in all the latest Drupal 7 gear - fields, Entity API and CTools. The way BEAN moved make me weak at the knees. After another beer I got my courage up, crossed the room and asked if BEAN would like to come back to my site. I was shocked, BEAN wanted to hang out with me and it wasn't just a one night fling. I've been going steady with BEAN for a couple of months now.

Just before BEAN moved in permanently to my dev environment I had to find a way of removing all the remnants of boxes from my life (aka existing sites). It took me less than an hour. I created a new BEAN type and called it "box", I then wrote a little "drush scr" script which converted all of my boxes to BEANs and even updated my contexts to use the newly created BEANs. I hope neither bean or boxes finds my work on github. I chose github hoping neither of them would find my work and also because I don't want to maintain this as a module on d.o.

On a serious note - BEAN is awesome! If you haven't tried it, you really should. BEAN treats blocks as content, not config which is really useful for most sites. For new sites BEAN is a drop in replacement for core blocks or boxes making it super easy to get started. To learn more check out the docs.

If you're interested in seeing the full power of the BEAN module, and other cool stuff I've been working on recently, please comment on my DrupalCon session proposal - An Enterprise Scale Drupal Workflow. It will be a more technical version of my session at Drupal Business Days a couple weeks ago.

* "Full of beans" is phrase commonly used in Australia to describe energetic children.

Planet Drupal
19.05.2012
Categories: Muualla verkossa

Drupal core announcements: Content creation redesign: Core patch

A few months ago we started the initiative to redesign the content creation screen, following our research and design proposal we have now finished usability testing a prototype.

The results are in and participants had a neutral or mildly favorable response to the content creation prototype. Participants found it easy to add content (create and edit) and it was clear to participants that the sidebar is related to the content but it is not central to the activity of content creation. This was good news to us! It confirmed that our direction was good and we where encouraged by all the positive feedback from the community.

We would like help bringing this to Drupal core in Implement the new create content page design. We need help on all fronts, but primarily in fixing a number of outstanding problems and carrying out code reviews.

Planet Drupal
19.05.2012
Categories: Muualla verkossa

Matt Butcher: Updated Instructions for Installing Drupal Vagrant on Windows 7

VirtualBox, Vagrant, Ruby, and Git have all gone through upgrades (major and minor) since I wrote the chapter on installing them in Multi-Site Drupal. While this hasn't made much of a difference for Mac and Linux/UNIX, Windows 7 support is now much better.

Here is a guide for installing the Multi-Site vagrant image for Drupal 7 on Windows 7. (If you're interested in running Drupal Vagrant, these instructions will work for that project as well.)

read more

Planet Drupal
18.05.2012
Categories: Muualla verkossa

Aaron Winborn: Demo of Drupal's Media: YouTube module

The following transcript is for the video at http://www.youtube.com/watch?v=XfPKKisE88w :

Hello, my name is Aaron Winborn. I am a developer for Advomatic, the author of Drupal Multimedia, and a contributor and a co-maintainer of several Drupal modules, including the Media suite of modules.

Today, I will demonstrate a new feature of the Media: YouTube module: browsing and searching videos directly from YouTube, in the media browser itself. So first, let’s set up our environment.

We are assuming that you already know how to install Drupal. If not, you can find information at Drupal.org.

So right now we are at the modules administration page. We are interested in the modules under the Media package. You will need to install and enable the File Entity module (version 7.x-2.x), and the same version of the Media module.

We will not enable the included Media Field module; it is there for legacy purposes, and has been deprecated in favor of core’s File Field.

The Media Internet Sources module, included with the Media module, is a dependency of the Media: YouTube module, so we will enable that.

Next will be the Media: YouTube module, also version 7.x-2.x.

Finally, we will install the WYSIWYG module.

Let’s start by configuring WYSIWYG. We do that by going to Configuration > Content Authoring > WYSIWYG profiles. Note that I have also installed and enabled the Admin Menu module and the Admin Menu Toolbar module, which gives us the fancy drop-down menus for administration that you see here.

Now in order to use WYSIWYG, you need to have also installed a third-party WYSIWYG library, such as CKEditor or TinyMCE. You need to follow the instructions with the WYSIWYG module to install that, although it is quite simple actually. You just download and unpack the file into the sites/all/libraries folder. You can see that I am using CKEditor here.

The WYSIWYG module allows us to set up profiles for the various text formats on our site; in this demo, we will edit the Filtered HTML format.

Open up the buttons and plug-ins field set next. Then check the Media Browser check box. That will add the media browser button to our WYSIWYG editor, which we will see soon.

In order to use that however, we need to configure the filter in question. In fact, I believe that if we do not do this step 1st, we will get an error message, complete with a link to the format configuration page.

On this page, we need to check the box next to “Convert Media tags to markup”. That is the answer to the number 1 support question that we get in the Media queue, which is, “Why is there bracketed goobly gook instead of my images?”

So now, as we will see, everything should be working now. So let’s test it.

Here on the create article page, we see a fancy button on the body text area! Let’s click it.

And there we go.

These are thumbnails being pulled directly from YouTube. How about that?

And there is even a ghetto pager, or at least previous/next links.

And you can also search YouTube directly from our browser.

So now we will select a video and submit it. Add a title and save the node. And there we go.

And that’s it really. Well, almost.

There are some more settings, specifically here to control which tabs show up for WYSIWYG. Note that at the time of this demonstration, you will not have this functionality unless you install the patch over at node 1434118.

To complete the demo, we will also do the same for fields. Let’s add a field to hold YouTube videos. We will call it Media, and it will be a file field with a Media file selector widget.

Here, let’s reorder it as well for the demo.

We leave everything at their default settings.

Hold on, I forgot that we need to allow the YouTube URI scheme. And the video file type.

So now we will create a new article, and select the media.

And here we have all the tabs available to our browser, including the new and improved YouTube tab.

And also, let us look at another new feature of the media module: My files!

This has been a long-awaited feature for the Media module as well.

Now here comes the 2nd most asked question in the support queue: “How come there is a link to my file, rather than the file itself?”

Let’s just fix that now.

Now we are in the file type administration page, where we can configure the display for each of our file types. Note that we can also add fields to our files, although we are not going to do that in this demo.

We will jump to the video display...

No, we want to make sure that our large formatter is set up properly for YouTube. And it is, so let’s set up that as the formatter for our Media file field.

And there it is, as a generic file, which is simply a link to the file stream itself. We will change that to rendered file. And then we set the view mode to large.

While we are in there, we can do the same for our teasers. We will just set that to the preview view mode, which by default will display a thumbnail.

Whoops, I forgot to save it. Let’s just do that again.

And there is the video.

And there is the thumbnail.

Well done!

read more

Planet Drupal
18.05.2012
Categories: Muualla verkossa

DrupalCon Munich: Scholarship Recipients for DrupalCon Munich Announced

The DrupalCon Munich team was excited about the interest for this year's scholarship award, with 57 applications submitted. The DrupalCon scholarship program allows Drupal Community members, who would otherwise not be able to attend DrupalCon, to benefit from the DrupalCon experience as the Drupal Community benefits from each scholar's attendance.

The scholarship committee has made the final selection, and we are proud to present these deserving Drupalistas with Scholarships. Scholarships give access persons who would like to attend DrupalCon but lack financial resources to do so. The following awardees will be attending this year's conference in Munich, where the theme will be 'Open Up! Connecting systems and people’.

Scholarship Recipients*:

*We will add more recipients to this list as we confirm.

We would like to thank everyone who applied for a scholarship, and congratulate those of you who were selected.

Scholarships
Syndicate content