Drupal Planet

Expresstut: Mapping in drupal using the gmap, location and views module

In this screencast we will learn how to integrate the gmap, location and views module together. This is the second part on our series of working with maps in drupal. To follow this tutorial, you should have these three modules already installed and configured:

gmap

location

Views

Upon installing and configuring this modules you want to create a content type for which you will be using the location field.

To learn how to configure the gmap and location module, watch the first part of the screencast here. In this tutorial, we would learn how we can display maps anywhere on our drupal sites using any views display we like. After displaying our different markers on the map, we also changed the settings to enable us see informations about our markers when hovered or clicked.

 

 

Another Drop in the Drupal Sea: Ways to shoot yourself in the foot: Custom module and theme names

I was writing an extremely simple custom module (for a D6 site) to make use of hook_block. Every time I enabled the module the blocks no longer displayed on the pages. Since it had been a long time since I had done any work in D6, I figured there must be something I was overlooking in how I wrote the function. If I disabled the module (or even just commented out the hook_block) function then the blocks reappeared. So, I spent a fair amount of time looking over how I had written the hook. But, I couldn't see anything wrong with it.

read more

Ed's Blog: Altmetric for Drupal

Recently I have been looking at how we measure contributions to science in a way that is more well-rounded than the h-index and similar initiatives. Most of this relates to how we measure a user's contributions to projects such as Scratchpads, ViBRANT and eMonocot.

The "alternative metrics" movement has been around for a number of years now, and one of the more established outfits is Altmetric who provide badges for research articles showing how much attention that article has received on a number of purely social (Twitter, Facebook) and 'academic social' (Mendeley, Connotea) networks.

As the badges are pretty easy to implement I have made a small Drupal module that displays an Altmetric badge on Biblio node pages, and provides a configuration page to allow the badges to be customised. The module is available here: Drupal biblio altmetric.


Lullabot: PhpStorm for Drupal

Setting up PhpStorm for Drupal's Coding Standards

Debugging Drupal modules and themes (or Drupal core itself) can be challenging without a good IDE. After using numerous IDE and text editors, PhpStorm has earned its place as my primary IDE for almost anything Drupal-related. By default, PhpStorm is as Drupal friendly as most other IDEs. However, some of its default syntax and formatting settings conflict with the Drupal Coding Standards. Here are a few tips to make PhpStorm play even better with Drupal.

Keymap

Although not related to Drupal, the Keymap is the first thing I change. By default, PhpStorm comes with keyboard shortcuts I find very unnatural. Under Preferences, scroll down to select Keymap on the left, and select the keymap that suits your needs. Mac OS X 10.5+ feels the most intuitive to me. You can also further customize the keyboard shortcuts to each of the actions.

Syntax and Formatting

Next, let's fix the code style. Drupal recommends less than 80 characters per line, and PhpStorm lets us set that as its default.

LevelTen Interactive: hook_drupalcamp_alter(); //experimental Drupal community building take 5

Over the last few years, one of the hottest topics among Drupal agencies is how to break out of the Drupal echo chamber and reach out to new audiences.  If you have been to DrupalCon or local DrupalCamps, you know the unique, passionate community that is Drupal. The challenge has been spreading that passion outside of the Drupal faithful.

One thing that is remarkable about the Drupal community is the events we hold. From meetups, to DrupalCamps & Con, code sprints and beyond, we put on some great happenings despite the fact that most of us are just amateur “event hackers”.... Read more

undpaul: Contextual content with the Flag module and a custom Views "Default Argument Handler"

The Views module is the most installed Drupal module and gives great power to developers for building websites. Because of its rich feature set, Views will be integrated in core as part of Drupal 8. Developers may extend the Views functionality by writing custom plugins using the complex plugin system. This helps implementing functionality for special use cases in Views.

In this blog post I would like to explain how to write a custom "Default Argument Handler" for Views and how to develop a simple context system using the Flag module by providing a sample use case as example.

drupal planet english

Károly Négyesi: Drupal 8 progress from my / MongoDB perspective: update #17

First, a briefing of already committed patches: Image toolkits, aggregator processors and parsers are now plugins. The form storage is now in key-value instead of abusing the cache system. Twig is now available during install, unlocking much of the conversion -- this needs your help. Alex Pott has been named branch maintainer which will make the whole commit process much, much faster.

I converted service definitions from PHP to YAML. Strangely this is a pre-requisite to allow cache backends to handle their own bins because during uninstall we do not have any good ways to figure out which bins are getting uninstalling. With the service definition in YAML, service definitions are easy to read by the uninstall processs, find the services tagged cache and tell the cache backend about the bins being uninstalled.

As promised in the last post, I have used the settings override patch -- which is finally getting some serious traction and I expect to get it in within a week -- to write a test for the interactive installer. Previously this was absolutely impossible. First we needed the drupal_rewrite_settings refactor to allow for overriding parts of arrays in settings.php (this is in HEAD) then we needed to allow including such settings.php specific to the test being run (not yet in, but soon). Now there is a test and it passes, adds a mere 150 LoC and not particularly ugly -- there are not-so-pretty parts, of course, but what did you expect from an installer test? The joy and pride I feel over this is hard to put into words. Installer. test!

Drupal core announcements: Twig Status Update and Call for Contributors

In the beginning, there was a huge outpour of support for Twig and a lot of people helped with the conversion. However, as various issues blocked it, most people have understandably disappeared. Now that Twig is available during Drupal installation, we can continue with conversion of core theme functions and templates.

We’ve got about 2 weeks to finish up conversion so we can move on to things like implement Twig’s autoescape functionality and consolidate similar templates and theme functions.

There are several patches awaiting review, many simple patches that can be created by front-end developers, and some sticky issues we could use developers’ help on.

There are always several people on irc.freenode.net in the #drupal-twig channel available to help you get involved. Please come by and see what you can do to help. Look for @steveoliver, @Cottser, @Fabianx, and @joelpittet for help getting started.

Code Karate: Drupal 7 Panels Module Contexts Relationships

Episode Number:  136 Post Topics:  Drupal Contrib Panels Drupal 7 Layout Tools Site Building Drupal Planet

Another episode covering the Drupal 7 Panels module. This time we continue learning about Panels module contexts, but focus on using Panels module contexts relationships with an entity reference field.

In this episode you will learn:

  • How to set up and use Panels context relationships
  • How to include related node information from an entity reference field
DDoD Video: 

Expresstut: Using the Google Maps Api(Gmap) module in your drupal 7 website

In this tutorial we will be learning how to use the google maps api within our drupal 7 website. This is going to be the first part of a series of tutorials on how to use maps in drupal. In this tutorial, we would be making use of the Gmaps module and integrating it with the Location Module. The location module is useful because users don't neccessarily know the longitude and latitude of a location. With this module, a user is able to simply use the clickable map. The Gmaps in drupal 7 is still not very stable. One of the things I noticed was when I configured the gmaps module on a wamp server with the latest version of gmap was that, the markers were not showing on the map. However when I used the exact module on a drupal lamp stack (Damp) the markers showed just fine. So if you are following this tutorial and your markers don't show up, do not panic. This is just one of those things i noticed while playing around with the gmap module.

For this tutorial we created a scenario where a company wants to show a list of its branches on a map with markers. When you click on any marker, it shows you more information about that branch. Click on the video to learn more.

 

 

 

Drupal.org frontpage posts for the Drupal planet: Drupal 7.22 released

Drupal 7.22, a maintenance release with numerous bug fixes (no security fixes) is now available for download. See the Drupal 7.22 release notes for a full listing.

Download Drupal 7.22

Upgrading your existing Drupal 7 sites is recommended. There are no major new features in this release. For more information about the Drupal 7.x release series, consult the Drupal 7.0 release announcement.

Security information

We have a security announcement mailing list and a history of all security advisories, as well as an RSS feed with the most recent security advisories. We strongly advise Drupal administrators to sign up for the list.

Drupal 7 includes the built-in Update Manager module, which informs you about important updates to your modules and themes.

There are no security fixes in this release of Drupal core.

Bug reports

Drupal 7.x is being maintained, so given enough bug fixes (not just bug reports), more maintenance releases will be made available, according to our monthly release cycle.

Changelog

Drupal 7.22 is a bug fix only release. The full list of changes between the 7.21 and 7.22 releases can be found by reading the 7.22 release notes. A complete list of all bug fixes in the stable 7.x branch can be found in the git commit log.

Update notes

See the 7.22 release notes for details on important changes in this release.

Known issues

None.

Ken Rickard: Aaron Winborn, update 2

Back in July 2012, I wrote about Aaron Winborn's diagnosis with ALS. To encourage donations to his special needs trust, I and the other co-authors of Drupal 7 Module Development pledged to donate quarter 3 and quarter 4 royalties to the trust.

Payment for quarter 4 of 2012 has been delivered, and so today I donated $283.70 to the trust.

That brings the total to $584.93 in donations over the second half of 2012, plus the $1000 donation that Packt made and the contributions from the book's co-authors.

If you can make a donation to Aaron's trust, please do so.

Metal Toad: Quick Tip: Receiving Git Attribution for Your Drupal.org Patches

If you contribute patches to the Drupal issue queues, you often spend a lot of time and hard work getting that patch through the review process. Even though we do it for the good of the community, once it is all said and done, it's nice to get a little acknowledgement. While there is a page for module maintainers on how to properly attribute contributions to users, not all maintainers know about that, and it can often mean they have to spend a little extra time figuring out what your Drupal.org git email address is. But there is a quick way for us as patch contributors to make that easier for them.

Redfin Solutions: Hide “Page Title” quickly using Display Suite in Drupal 7

This is something that is so simple to do, once you have figured out the steps to get to the right little click boxes to appear. I wish that it were more intuitive to find, but for all those who struggle with “hiding” the page titles, Display Suite makes it really easy to choose to hide the page title for a specific Content Type or for a particular Node.

Follow these steps:

Twitter Facebook LinkedIn

read more

Liran Tal's enginx: Monitoring Drupal with Munin


Munin is a lightweight server/agent monitoring tool.
Basically, it works by installing agents on machines you wish to monitor and they report status messages to a munin server, which is another component (ofcourse both the server and agent can run on the same machine). Munin saves those status messages in it's own data store and is integrated with rrdtool to produce nice looking graphs which give you an overview of daily, weekly, monthly and yearly peridocical reports.

Munin In Drupal

Using Munin to monitor some internal Drupal statistics goes a long way regarding insight gathering of what's going on your web application in real-time. While there are some munin related plugins to use on drupal.org I find it to be yet another module on top of already installed that I have and doesn't really serve my need. End users can easily build their scripts to get the information they care about and this doesn't need to exist within the Drupal app at all.

I've forked the munin's contrib project on github and you can find a few scripts to get some nice and information from Drupal 6 already:

  • total files
  • total forums and comments
  • node distribution count
  • users online (total, anonymous vs registered users)
  • users total vs blocked users

And there's nothing like an image to please the eye...



All the code is here: https://github.com/lirantal/contrib/tree/master/plugins/drupal

Installing Munin

We won't dwell into the ins and outs of munin or it's installation, as you can easily find out all of this information and more on munin's website and Google, but here's a short guide on it anyway for CentOS or RedHat-based distributions.

  • If munin package isn't available in your repository try adding using rpmforge (the following uses the RHEL5 64bit repositor):

  1. rpm -Uhv <a href="http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
  2. " rel="nofollow">http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
  3. </a>
  • On the machine that hosts the munin server (it also hosts the html web resources) you should install the munin package:

yum install munin

  • Edit /etc/munin/munin.conf and setup the local host if you're hoping to monitor the munin server too

  1. [localhost]
  2. address 127.0.0.1
  3. use_node_name
  4.  
  • Set a contact for alerts

  1. contact.liran.command mail -s "Munin notification" <script type="text/javascript">eval(unescape('%64%6f%63%75%6d%65%6e%74%2e%77%72%69%74%65%28%27%3c%61%20%68%72%65%66%3d%22%6d%61%69%6c%74%6f%3a%79%6f%75%72%2e%65%6d%61%69%6c%40%65%78%61%6d%70%6c%65%2e%63%6f%6d%22%3e%79%6f%75%72%2e%65%6d%61%69%6c%40%65%78%61%6d%70%6c%65%2e%63%6f%6d%3c%2f%61%3e%27%29%3b'))</script>
  • We'll need to symlink the munin directory from where it installed to to your web directory and then we can create an alias for it too:

  1. # add an alias for apache in /etc/httpd/conf/httpd.conf
  2. Alias /munin /var/www/munin
  3.  
  4. Options FollowSymLinks
  5. AllowOverride None
  6. Order allow,deny
  7. Allow from all
  • So far this was the munin server side of things. If the same machine needs to be monitored too or if you need to install the munin monitoring agent on another machine you need to install the munin-node package:

  1. yum install munin-node perl-libwww-perl
  • On that machine you will then need to enable the plugins you wish to use to monitor services. This can be done by symlinking them to say /etc/munin/plugins and making sure they are set executable so that munin can run them. It comes with a hefty set of plugins by default, located probably at /usr/share/munin/plugins and you may need to tune plugins configuration using the main munin configuration file for the node at /etc/munin/munin-node.conf
Tags: drupal-planetdrupalmonitoring var switchTo5x=true;stLight.options({publisher:'dr-aa0c45a0-4d43-f185-5e54-b9ad4274b94'});

groups.drupal.org frontpage posts: Join us for a live Drupal 8 question & answer session on April 11th 10am EDT !

Start:  2013-04-11 10:00 - 11:00 America/New_York Online meeting (eg. IRC meeting) Organizers:  Dries svettes

Drupal 8 is the first development cycle introducing Drupal core initiatives, which are key focus areas for improving Drupal. Each core initiative is led by an individual or small team, and these initiative leads guide the efforts of other core contributors around their initiative. The initiatives are only a part of all Drupal 8 development, but most of the big Drupal 8 changes have been worked on by these initiative teams. (Read more about the core initiatives.)

Several of the initiative leads participated in a Drupal 8 question & answer session at DrupalCon Sydney and it went very well, so we want to repeat that experience by providing another opportunity to talk with the global Drupal community!

Goals of the session:
  • Share the status, milestones, and next steps for each Drupal 8 initiative.
  • Answer your questions: Want to know what’s going on, or how you can get involved? Now’s your chance to talk with us!
Who will be there? When?

April 11th, 2013 10:00-11:00 am EDT (1500 UTC)

Where?

Via Google Hangout broadcast! (link coming soon)

How do I ask questions?

Send a tweet tagged #D8QA, or join the #drupal-initiativeQA IRC room during the Q&A. (IRC instructions) A moderator will curate the questions.

Who should come to this?
  • Anyone interested in getting a D8 status overview.
  • Developers interested in D8 who want to ask questions.
  • Developers interested in helping finish Drupal 8!
  • Helpers (Devs, Front-end, Theme/Design, UX, Project Mgmt & more!) who want to know how they can help & get involved.

Note that signup is not required, the video will be broadcast and archived. We offer signups as a convenience to get notified.

Aten Design Group: Project Review Wednesday: Members Page

There are currently 83 new Drupal contributors awaiting review of their first project. This is a great place to contribute to the community and learn about interesting upcoming projects, for example...

Module: Members Page What does it do?

We are all familiar with Drupal's default member register/login page, and have probably all spent time trying to customize it, at least I know I have. This module provides a way of creating the registration and member pages with custom content and customizable URLs.

The contributor on this module has put a lot of work into this, including full documentation and examples on how to use his module.

Look Useful? Review it!

If you would like to see this module readily available on Drupal.org, you should review it and help make that happen.

Review It

Pro Tip: If you've never reviewed a project application before, you can find instructions for reviewers on Drupal.org and the Code Review group is happy to help more people get involved.

Pages